Changeset 1004
- Timestamp:
- Jan 18, 2004, 10:50:25 AM (22 years ago)
- Location:
- trunk/src/emx/src/lib/locale
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/lib/locale/locale_collate.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r1003 r1004 14 14 struct __locale_collate __locale_collate = 15 15 { 16 /* Nothing here; just to make sure ILINK can export it from the DLL */ 17 /*@@@ to be removed when emxomfar is fixed @@@*/ 16 weight: 17 { 18 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19 10, 11, 13, 12, 14, 15, 16, 17, 18, 19, 20 20, 21, 23, 22, 24, 25, 26, 27, 28, 29, 21 30, 31, 33, 32, 34, 35, 36, 37, 38, 39, 22 40, 41, 43, 42, 44, 45, 46, 47, 48, 49, 23 50, 51, 53, 52, 54, 55, 56, 57, 58, 59, 24 60, 61, 63, 62, 64, 65, 66, 67, 68, 69, 25 70, 71, 73, 72, 74, 75, 76, 77, 78, 79, 26 80, 81, 83, 82, 84, 85, 86, 87, 88, 89, 27 90, 91, 93, 92, 94, 95, 96, 97, 98, 99, 28 100, 101, 103, 102, 104, 105, 106, 107, 108, 109, 29 110, 111, 113, 112, 114, 115, 116, 117, 118, 119, 30 120, 121, 123, 122, 124, 125, 126, 127, 128, 129, 31 130, 131, 133, 132, 134, 135, 136, 137, 138, 139, 32 140, 141, 143, 142, 144, 145, 146, 147, 148, 149, 33 150, 151, 153, 152, 154, 155, 156, 157, 158, 159, 34 160, 161, 163, 162, 164, 165, 166, 167, 168, 169, 35 170, 171, 173, 172, 174, 175, 176, 177, 178, 179, 36 180, 181, 183, 182, 184, 185, 186, 187, 188, 189, 37 190, 191, 193, 192, 194, 195, 196, 197, 198, 199, 38 200, 201, 203, 202, 204, 205, 206, 207, 208, 209, 39 210, 211, 213, 212, 214, 215, 216, 217, 218, 219, 40 220, 221, 223, 222, 224, 225, 226, 227, 228, 229, 41 230, 231, 233, 232, 234, 235, 236, 237, 238, 239, 42 240, 241, 243, 242, 244, 245, 246, 247, 248, 249, 43 250, 251, 253, 252, 254, 255 44 }, 45 mbcsprefix: 46 { 47 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 48 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 49 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 50 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 51 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 52 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 53 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 54 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 55 }, 56 uconv: 0, 57 locale: 0, 58 mbcs: 0 18 59 }; 19 60 20 static void __attribute__((constructor)) __locale_collate_init ()21 {22 int i;23 24 memset (&__locale_collate, 0, sizeof (__locale_collate));25 26 /* There are no prefix MBCS codes */27 memset (&__locale_collate.mbcsprefix, 0x55, sizeof (__locale_collate.mbcsprefix));28 29 for (i = 0; i < 256; i++)30 __locale_collate.weight [i] = i;31 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/locale/locale_ctype.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r1003 r1004 109 109 int i; 110 110 setlocale(LC_CTYPE, "en_US"); 111 /*setlocale(LC_CTYPE, "ASCII"); - doesn't work in OS/2 */111 setlocale(LC_CTYPE, "C"); 112 112 printf("/*\n" 113 113 " Locale support implementation through OS/2 Unicode API.\n" -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/locale/locale_glob.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1003 r1004 11 11 #include <sys/locale.h> 12 12 13 const char *__locale_C= "C";13 const char __locale_C[2] = "C"; 14 14 15 15 /* This is the global variable containing basic information 16 about current locale. If there is at least one reference to it, 17 the application will also pull in the __locale_init() function 18 which will automatically run at application start time and will 19 initialize this variable to default "C" locale. */ 16 about current locale. */ 20 17 struct __locale_global __locale = 21 18 { 22 lock: 0 19 lock: 0, 20 name: 21 { 22 (char*)__locale_C, /* LC_ALL */ 23 (char*)__locale_C, /* LC_COLLATE */ 24 (char*)__locale_C, /* LC_CTYPE */ 25 (char*)__locale_C, /* LC_NUMERIC */ 26 (char*)__locale_C, /* LC_MONETARY */ 27 (char*)__locale_C, /* LC_TIME */ 28 (char*)__locale_C, /* LC_MESSAGES */ 29 } 23 30 }; 24 25 static void __attribute__((constructor)) __locale_init ()26 {27 int i;28 29 for (i = LC_ALL; i < __LC_COUNT; i++)30 __locale.name [i + 1] = (char *)__locale_C;31 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/locale/locale_time.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1003 r1004 10 10 #define __INTERNAL_DEFS 11 11 #include <sys/locale.h> 12 #include <string.h>13 12 14 13 struct __locale_time __locale_time = 15 14 { 15 smonths: { "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}, 16 lmonths: { "January","February","March","April","May","June","July","August","September","October","November","December" }, 17 swdays: { "Sun","Mon","Tue","Wed","Thu","Fri","Sat" }, 18 lwdays: { "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" }, 16 19 date_time_fmt: "%a %b %d %H:%M:%S %Y", 17 20 date_fmt: "%m/%d/%y", 18 21 time_fmt: "%H:%M:%S", 19 am: "AM",20 pm: "PM"22 am: "AM", 23 pm: "PM" 21 24 }; 22 25 23 static void init_charptr_array (int count, const char *str, char **array)24 {25 int idx = 0;26 while (count--)27 {28 array [idx++] = (char *)str;29 str = strchr (str, 0) + 1;30 } /* endwhile */31 }32 33 static void __attribute__((constructor)) __locale_time_init ()34 {35 init_charptr_array (12,36 "Jan\0Feb\0Mar\0Apr\0May\0Jun\0Jul\0Aug\0Sep\0Oct\0Nov\0Dec",37 __locale_time.smonths);38 init_charptr_array (12,39 "January\0February\0March\0April\0May\0June\0July\0August\0September\0October\0November\0December",40 __locale_time.lmonths);41 init_charptr_array (7,42 "Sun\0Mon\0Tue\0Wed\0Thu\0Fri\0Sat",43 __locale_time.swdays);44 init_charptr_array (7,45 "Sunday\0Monday\0Tuesday\0Wednesday\0Thursday\0Friday\0Saturday",46 __locale_time.lwdays);47 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.