Changeset 3056


Ignore:
Timestamp:
Apr 8, 2007, 7:12:27 PM (19 years ago)
Author:
bird
Message:

Added a fixed default (C/POSIX) collate locale to avoid unilib strangeness. Made an attempt at adjusting for this strangeness for the non-default locales...

Location:
trunk/libc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/include/klibc/locale.h

    r2909 r3056  
    241241/** String collation information. */
    242242extern __LIBC_LOCALECOLLATE         __libc_gLocaleCollate;
     243
     244
    243245/** Character case conversion tables. */
    244246extern __LIBC_LOCALECTYPE           __libc_GLocaleCtype;
  • trunk/libc/src/libc/locale/locale_collate.c

    r3002 r3056  
    7979};
    8080
     81
     82
     83
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
     100
     101
     102
     103
     104
     105
     106
     107
     108
     109
     110
     111
     112
     113
     114
     115
     116
     117
     118
     119
     120
     121
     122
     123
     124
     125
     126
     127
     128
     129
     130
     131
     132
     133
  • trunk/libc/src/libc/locale/os2/setlocale.c

    r2935 r3056  
    221221static int query_mbcs(UconvObject uobj, char *mbcs, unsigned char *au2MBCSPrefixs);
    222222
    223 static int localeCollateDo(__LIBC_PLOCALECOLLATE pCollate, UconvObject uobj, LocaleObject lobj);
     223static int localeCollateDo(__LIBC_PLOCALECOLLATE pCollate, UconvObject uobj, LocaleObject lobj);
    224224static void localeCollateFree(__LIBC_PLOCALECOLLATE pCollate);
    225225static inline unsigned char Transform(LocaleObject lobj, UconvObject uobj,
     
    384384 * @param   uobj            The UconvObject to use. Collate is responsible for freeing it.
    385385 * @param   lobj            The LocaleObject to use. Collate is responsible for freeing it.
    386  */
    387 static int localeCollateDo(__LIBC_PLOCALECOLLATE pCollate, UconvObject uobj, LocaleObject lobj)
     386 * @param   pszLocale       Pointer to the locale base specifier.
     387 */
     388static int localeCollateDo(__LIBC_PLOCALECOLLATE pCollate, UconvObject uobj, LocaleObject lobj, const char *pszLocale)
    388389{
    389390    int rc;
     
    391392    /* Cleanup in case of some special LC_ALL call. */
    392393    localeCollateFree(pCollate);
     394
     395
     396
     397
     398
     399
     400
     401
     402
     403
    393404
    394405    /*
     
    435446                aCW[i].len = sizeof(aCW[i].ucsWeight) / sizeof(aCW[i].ucsWeight[0]);
    436447            }
     448
     449
     450
     451
     452
    437453        }
    438454
     
    505521 * @param   uobj            The UconvObject to use. Ctype is responsible for freeing it.
    506522 * @param   lobj            The LocaleObject to use. Ctype is responsible for freeing it.
     523
    507524 * @param   pszCodeset      The codeset used.
    508525 */
     
    12211238 * @returns negated errno on failure.
    12221239 * @param   pszCodepage     Pointer to where the codepage specifier starts.
     1240
     1241
    12231242 * @param   pucsCodepage    Where to store the code page.
    12241243 * @param   cucCodepage     Number of UniChar's in the buffer.
     
    13961415    {
    13971416        case LC_COLLATE:
    1398             rc = localeCollateDo(&pTemp->Collate, uobj, lobj);
     1417            rc = localeCollateDo(&pTemp->Collate, uobj, lobj);
    13991418            fFree = rc != 0;
    14001419            break;
Note: See TracChangeset for help on using the changeset viewer.