Changes in uspace/lib/posix/locale.c [a12f7f1:55b1efd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/locale.c
ra12f7f1 r55b1efd 42 42 #include "string.h" 43 43 44 // TODO: documentation 44 /* Just a very basic dummy implementation. 45 * This should allow code using locales to work properly, but doesn't provide 46 * any localization functionality. 47 * Should be extended/rewritten when or if HelenOS supports locales natively. 48 */ 45 49 46 50 struct __posix_locale { … … 76 80 77 81 /** 82 * Set program locale. 78 83 * 79 * @param category 80 * @param locale 81 * @return 84 * @param category What category to set. 85 * @param locale Locale name. 86 * @return Original locale name on success, NULL on failure. 82 87 */ 83 88 char *posix_setlocale(int category, const char *locale) … … 92 97 93 98 /** 99 * Return locale-specific information. 94 100 * 95 * @return 101 * @return Information about the current locale. 96 102 */ 97 103 struct posix_lconv *posix_localeconv(void) … … 102 108 103 109 /** 110 * Duplicate locale object. 104 111 * 105 * @param locobj 106 * @return 112 * @param locobj Object to duplicate. 113 * @return Duplicated object. 107 114 */ 108 115 posix_locale_t posix_duplocale(posix_locale_t locobj) … … 122 129 123 130 /** 131 * Free locale object. 124 132 * 125 * @param locobj 133 * @param locobj Object to free. 126 134 */ 127 135 void posix_freelocale(posix_locale_t locobj) … … 133 141 134 142 /** 143 * Create or modify a locale object. 135 144 * 136 * @param category_mask 137 * @param locale 138 * @param base 139 * @return 145 * @param category_mask Mask of categories to be set or modified. 146 * @param locale Locale to be used. 147 * @param base Object to modify. 0 if new object is to be created. 148 * @return The new/modified locale object. 140 149 */ 141 150 posix_locale_t posix_newlocale(int category_mask, const char *locale, … … 160 169 161 170 /** 171 * Set locale for the current thread. 162 172 * 163 * @param newloc 164 * @return 173 * @param newloc Locale to use. 174 * @return The previously set locale or LC_GLOBAL_LOCALE 165 175 */ 166 176 posix_locale_t posix_uselocale(posix_locale_t newloc) 167 177 { 168 178 // TODO 169 return NULL;179 return LC_GLOBAL_LOCALE; 170 180 } 171 181
Note:
See TracChangeset
for help on using the changeset viewer.