Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/locale.c

    r55b1efd ra12f7f1  
    4242#include "string.h"
    4343
    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  */
     44// TODO: documentation
    4945
    5046struct __posix_locale {
     
    8076
    8177/**
    82  * Set program locale.
    8378 *
    84  * @param category What category to set.
    85  * @param locale Locale name.
    86  * @return Original locale name on success, NULL on failure.
     79 * @param category
     80 * @param locale
     81 * @return
    8782 */
    8883char *posix_setlocale(int category, const char *locale)
     
    9792
    9893/**
    99  * Return locale-specific information.
    10094 *
    101  * @return Information about the current locale.
     95 * @return
    10296 */
    10397struct posix_lconv *posix_localeconv(void)
     
    108102
    109103/**
    110  * Duplicate locale object.
    111104 *
    112  * @param locobj Object to duplicate.
    113  * @return Duplicated object.
     105 * @param locobj
     106 * @return
    114107 */
    115108posix_locale_t posix_duplocale(posix_locale_t locobj)
     
    129122
    130123/**
    131  * Free locale object.
    132124 *
    133  * @param locobj Object to free.
     125 * @param locobj
    134126 */
    135127void posix_freelocale(posix_locale_t locobj)
     
    141133
    142134/**
    143  * Create or modify a locale object.
    144135 *
    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.
     136 * @param category_mask
     137 * @param locale
     138 * @param base
     139 * @return
    149140 */
    150141posix_locale_t posix_newlocale(int category_mask, const char *locale,
     
    169160
    170161/**
    171  * Set locale for the current thread.
    172162 *
    173  * @param newloc Locale to use.
    174  * @return The previously set locale or LC_GLOBAL_LOCALE
     163 * @param newloc
     164 * @return
    175165 */
    176166posix_locale_t posix_uselocale(posix_locale_t newloc)
    177167{
    178168        // TODO
    179         return LC_GLOBAL_LOCALE;
     169        return NULL;
    180170}
    181171
Note: See TracChangeset for help on using the changeset viewer.