Changeset 1953 for coreutils/trunk/lib/nl_langinfo.c
- Timestamp:
- Jan 27, 2017, 4:40:38 PM (8 years ago)
- Location:
- coreutils/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
coreutils/trunk ¶
- Property svn:mergeinfo changed
/coreutils/vendor/current merged: 1951
- Property svn:mergeinfo changed
-
TabularUnified coreutils/trunk/lib/nl_langinfo.c ¶
r1648 r1953 35 35 { 36 36 static char buf[2 + 10 + 1]; 37 size_t buflen = 0;38 37 char const *locale = setlocale (LC_CTYPE, NULL); 39 38 char *codeset = buf; … … 100 99 # if GNULIB_defined_T_FMT_AMPM 101 100 case T_FMT_AMPM: 102 return "%I:%M:%S %p";101 return (char *) "%I:%M:%S %p"; 103 102 # endif 104 103 # if GNULIB_defined_ERA … … 107 106 of the form "direction:offset:start_date:end_date:era_name:era_format" 108 107 with an empty string at the end. */ 109 return "";108 return (char *) ""; 110 109 case ERA_D_FMT: 111 110 /* The %Ex conversion in strftime behaves like %x if the locale does not … … 126 125 /* The format is not standardized. In glibc it is a sequence of 10 127 126 strings, appended in memory. */ 128 return "\0\0\0\0\0\0\0\0\0\0";127 return (char *) "\0\0\0\0\0\0\0\0\0\0"; 129 128 # endif 130 129 # if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS 131 130 case YESEXPR: 132 return "^[yY]";131 return (char *) "^[yY]"; 133 132 case NOEXPR: 134 return "^[nN]";133 return (char *) "^[nN]"; 135 134 # endif 136 135 default: … … 164 163 } 165 164 # ifdef __BEOS__ 166 return "UTF-8";165 return (char *) "UTF-8"; 167 166 # else 168 return "ISO-8859-1";167 return (char *) "ISO-8859-1"; 169 168 # endif 170 169 /* nl_langinfo items of the LC_NUMERIC category */ … … 179 178 case D_T_FMT: 180 179 case ERA_D_T_FMT: 181 return "%a %b %e %H:%M:%S %Y";180 return (char *) "%a %b %e %H:%M:%S %Y"; 182 181 case D_FMT: 183 182 case ERA_D_FMT: 184 return "%m/%d/%y";183 return (char *) "%m/%d/%y"; 185 184 case T_FMT: 186 185 case ERA_T_FMT: 187 return "%H:%M:%S";186 return (char *) "%H:%M:%S"; 188 187 case T_FMT_AMPM: 189 return "%I:%M:%S %p";188 return (char *) "%I:%M:%S %p"; 190 189 case AM_STR: 191 190 if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm)) 192 return "AM";191 return (char *) "AM"; 193 192 return nlbuf; 194 193 case PM_STR: 195 194 tmm.tm_hour = 12; 196 195 if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm)) 197 return "PM";196 return (char *) "PM"; 198 197 return nlbuf; 199 198 case DAY_1: … … 275 274 } 276 275 case ERA: 277 return "";276 return (char *) ""; 278 277 case ALT_DIGITS: 279 return "\0\0\0\0\0\0\0\0\0\0";278 return (char *) "\0\0\0\0\0\0\0\0\0\0"; 280 279 /* nl_langinfo items of the LC_MONETARY category. */ 281 280 case CRNCYSTR: … … 312 311 TODO: Really use the locale. */ 313 312 case YESEXPR: 314 return "^[yY]";313 return (char *) "^[yY]"; 315 314 case NOEXPR: 316 return "^[nN]";315 return (char *) "^[nN]"; 317 316 default: 318 return "";317 return (char *) ""; 319 318 } 320 319 }
Note:
See TracChangeset
for help on using the changeset viewer.