Changeset 2243 for trunk


Ignore:
Timestamp:
Jul 11, 2005, 12:29:31 AM (20 years ago)
Author:
bird
Message:

o Fixed two bad bugs in the handling of the list of free

SPM notification structures.

o Moved the codeset standardization up a bit so nl_langinfo

and setlocale reports the same codeset.

Location:
trunk/src/emx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/ChangeLog.LIBC

    • Property cvs2svn:cvs-rev changed from 1.103 to 1.104
    r2242 r2243  
    66    - libc:
    77        o Replaced BSD regex with the new GLIBC implementation.
     8        o Fixed two bad bugs in the handling of the list of free
     9          SPM notification structures.
     10        o Moved the codeset standardization up a bit so nl_langinfo
     11          and setlocale reports the same codeset.
    812
    9132005-07-06: knut st. osmundsen <bird-gccos2-spam@anduin.net>
  • trunk/src/emx/src/lib/locale/setlocale.c

    • Property cvs2svn:cvs-rev changed from 1.22 to 1.23
    r2242 r2243  
    535535     * Set codeset and query encoding.
    536536     */
    537     if (!strstr(pszCodeset,
    538                 "ibm-1208" "Ibm-1208" "IBm-1208" "IBM-1208" "IbM-1208" "iBm-1208" "iBM-1208" "ibM-1208"
    539                 "utf-8" "Utf-8" "UTf-8" "UTF-8" "UtF-8" "uTf-8" "uTF-8" "utF-8"
    540                 "utf8" "Utf8" "UTf8" "UTF8" "UtF8" "uTf8" "uTF8" "utF8"))
    541         memcpy(pCtype->szCodeSet, "UTF-8", sizeof("UTF-8"));
    542     else if (!strstr(pszCodeset,
    543                      "ibm-1200" "Ibm-1200" "IBm-1200" "IBM-1200" "IbM-1200" "iBm-1200" "iBM-1200" "ibM-1200"
    544                      "ucs-2" "Ucs-2" "UCs-2" "UCS-2" "UcS-2" "uCs-2" "uCS-2" "ucS-2"
    545                      "ucs2" "Ucs2" "UCs2" "UCS2" "UcS2" "uCs2" "uCS2" "ucS2"))
    546         memcpy(pCtype->szCodeSet, "UCS-2", sizeof("UCS-2"));
    547     else
    548     {
    549         strncpy(pCtype->szCodeSet, pszCodeset, sizeof(pCtype->szCodeSet));
    550         pCtype->szCodeSet[sizeof(pCtype->szCodeSet) - 1] = '\0';
    551     }
     537    strncpy(pCtype->szCodeSet, pszCodeset, sizeof(pCtype->szCodeSet));
     538    pCtype->szCodeSet[sizeof(pCtype->szCodeSet) - 1] = '\0';
    552539
    553540    uconv_attribute_t   attr;
     
    13451332        {
    13461333            if (pszCodepageActual)
     1334            {
    13471335                Ucs2Sb(ucsCodepage, pszCodepageActual, UniStrlen(ucsCodepage) + 1);
     1336
     1337                /*
     1338                 * For some common codeset specs we'll normalize the naming.
     1339                 */
     1340                if (!strstr(pszCodepageActual,
     1341                            "ibm-1208" "Ibm-1208" "IBm-1208" "IBM-1208" "IbM-1208" "iBm-1208" "iBM-1208" "ibM-1208"
     1342                            "utf-8" "Utf-8" "UTf-8" "UTF-8" "UtF-8" "uTf-8" "uTF-8" "utF-8"
     1343                            "utf8" "Utf8" "UTf8" "UTF8" "UtF8" "uTf8" "uTF8" "utF8"))
     1344                    memcpy(pszCodepageActual, "UTF-8", sizeof("UTF-8"));
     1345                else if (!strstr(pszCodepageActual,
     1346                                 "ibm-1200" "Ibm-1200" "IBm-1200" "IBM-1200" "IbM-1200" "iBm-1200" "iBM-1200" "ibM-1200"
     1347                                 "ucs-2" "Ucs-2" "UCs-2" "UCS-2" "UcS-2" "uCs-2" "uCS-2" "ucS-2"
     1348                                 "ucs2" "Ucs2" "UCs2" "UCS2" "UcS2" "uCs2" "uCS2" "ucS2"))
     1349                    memcpy(pszCodepageActual, "UCS-2", sizeof("UCS-2"));
     1350            }
    13481351            LIBCLOG_RETURN_MSG(rc, "ret 0 *plobj=%08x *puobj=%08x pszCodepageActual=%p:{%s}\n",
    13491352                               (unsigned)*plobj, (unsigned)*puobj, pszCodepageActual, pszCodepageActual);
  • trunk/src/emx/src/lib/sys/sharedpm.c

    • Property cvs2svn:cvs-rev changed from 1.32 to 1.33
    r2242 r2243  
    30513051            LIBCLOG_RETURN_P(pNotify);
    30523052        }
     3053        /* next */
     3054        pPrev = pNotify;
     3055        pNotify = pNotify->pNext;
    30533056    }
    30543057
     
    34293432         * Free up termination structures.
    34303433         */
    3431         __LIBC_PSPMCHILDNOTIFY pNotify;
    3432         for (pNotify = gpSPMHdr->pChildNotifyFreeHead; pNotify;)
     3434        while (gpSPMHdr->pChildNotifyFreeHead)
    34333435        {
    34343436            LIBCLOG_MSG("Reaping notification record %p (cb=%d pid=%#x iExitCode=%d enmDeathReason=%d)\n",
    34353437                        (void *)pNotify, pNotify->cb, pNotify->pid, pNotify->iExitCode, pNotify->enmDeathReason);
    3436             __LIBC_PSPMCHILDNOTIFY pFree = pNotify;
    3437             pNotify = pNotify->pNext;
     3438            __LIBC_PSPMCHILDNOTIFY pFree = gpSPMHdr->pChildNotifyFreeHead;
     3439            gpSPMHdr->pChildNotifyFreeHead = pFree->pNext;
    34383440            pFree->pNext = NULL;
     3441            pFree->enmDeathReason = __LIBC_EXIT_REASON_NONE;
    34393442            spmFree(pFree);
    34403443        }
Note: See TracChangeset for help on using the changeset viewer.