diff --git a/mozilla/xpinstall/wizard/os2/setup/ifuncns.c b/mozilla/xpinstall/wizard/os2/setup/ifuncns.c index 1c5af83c59e..60ee75b7b34 100644 --- a/mozilla/xpinstall/wizard/os2/setup/ifuncns.c +++ b/mozilla/xpinstall/wizard/os2/setup/ifuncns.c @@ -1341,6 +1341,38 @@ HRESULT ProcessOS2INI(ULONG ulTiming, char *szSectionPrefix) return(FO_SUCCESS); } +/* Helper function that moves a given hobject to the front of */ +/* an association string in OS2.INI */ + +void MoveHOBJToFront(HOBJECT hobject, char* szApp, char* szKey) +{ + CHAR szhobj[CCHMAXPATH]; + CHAR *szOrigBuffer, *szNewBuffer, *szCurrNew, *szCurrOrig; + ULONG ulSize; + int i; + + sprintf(szhobj, "%d\0", hobject); + PrfQueryProfileSize(HINI_USERPROFILE, szApp, szKey, &ulSize ); + szOrigBuffer = (char*)malloc(sizeof(char)*ulSize); + szNewBuffer = (char*)malloc(sizeof(char)*ulSize); + PrfQueryProfileData(HINI_USERPROFILE, szApp, szKey, szOrigBuffer, &ulSize); + szCurrOrig = szOrigBuffer; + szCurrNew = szNewBuffer; + strncpy(szCurrNew, szhobj, 7); + szCurrNew +=7; + for (i=0; i