Ignore:
File:
1 edited

Legend:

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

    ra12f7f1 r55b1efd  
    4242#include "string.h"
    4343
    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 */
    4549
    4650struct __posix_locale {
     
    7680
    7781/**
     82 * Set program locale.
    7883 *
    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.
    8287 */
    8388char *posix_setlocale(int category, const char *locale)
     
    9297
    9398/**
     99 * Return locale-specific information.
    94100 *
    95  * @return
     101 * @return Information about the current locale.
    96102 */
    97103struct posix_lconv *posix_localeconv(void)
     
    102108
    103109/**
     110 * Duplicate locale object.
    104111 *
    105  * @param locobj
    106  * @return
     112 * @param locobj Object to duplicate.
     113 * @return Duplicated object.
    107114 */
    108115posix_locale_t posix_duplocale(posix_locale_t locobj)
     
    122129
    123130/**
     131 * Free locale object.
    124132 *
    125  * @param locobj
     133 * @param locobj Object to free.
    126134 */
    127135void posix_freelocale(posix_locale_t locobj)
     
    133141
    134142/**
     143 * Create or modify a locale object.
    135144 *
    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.
    140149 */
    141150posix_locale_t posix_newlocale(int category_mask, const char *locale,
     
    160169
    161170/**
     171 * Set locale for the current thread.
    162172 *
    163  * @param newloc
    164  * @return
     173 * @param newloc Locale to use.
     174 * @return The previously set locale or LC_GLOBAL_LOCALE
    165175 */
    166176posix_locale_t posix_uselocale(posix_locale_t newloc)
    167177{
    168178        // TODO
    169         return NULL;
     179        return LC_GLOBAL_LOCALE;
    170180}
    171181
Note: See TracChangeset for help on using the changeset viewer.