Changeset 4c8f5e7 in mainline for uspace/lib/posix/locale.c


Ignore:
Timestamp:
2011-08-17T17:42:36Z (13 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4419c34
Parents:
903bd436
Message:

Documentation and minor changes

File:
1 edited

Legend:

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

    r903bd436 r4c8f5e7  
    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 {
     
    7579};
    7680
    77 /**
     81/** Set program locale.
    7882 *
    79  * @param category
    80  * @param locale
    81  * @return
     83 * @param category What category to set.
     84 * @param locale Locale name.
     85 * @return Original locale name on success, NULL on failure.
    8286 */
    8387char *posix_setlocale(int category, const char *locale)
     
    9195}
    9296
    93 /**
     97/** Return locale-specific information.
    9498 *
    95  * @return
     99 * @return Information about the current locale.
    96100 */
    97101struct posix_lconv *posix_localeconv(void)
     
    101105}
    102106
    103 /**
     107/** Duplicate locale object.
    104108 *
    105  * @param locobj
    106  * @return
     109 * @param locobj Object to duplicate.
     110 * @return Duplicated object.
    107111 */
    108112posix_locale_t posix_duplocale(posix_locale_t locobj)
     
    121125}
    122126
    123 /**
     127/** Free locale object.
    124128 *
    125  * @param locobj
     129 * @param locobj Object to free.
    126130 */
    127131void posix_freelocale(posix_locale_t locobj)
     
    132136}
    133137
    134 /**
     138/** Create or modify a locale object.
    135139 *
    136  * @param category_mask
    137  * @param locale
    138  * @param base
    139  * @return
     140 * @param category_mask Mask of categories to be set or modified.
     141 * @param locale Locale to be used.
     142 * @param base Object to modify. 0 if new object is to be created.
     143 * @return The new/modified locale object.
    140144 */
    141145posix_locale_t posix_newlocale(int category_mask, const char *locale,
     
    159163}
    160164
    161 /**
     165/** Set locale for the current thread.
    162166 *
    163  * @param newloc
    164  * @return
     167 * @param newloc Locale to use.
     168 * @return The previously set locale or LC_GLOBAL_LOCALE
    165169 */
    166170posix_locale_t posix_uselocale(posix_locale_t newloc)
    167171{
    168172        // TODO
    169         return NULL;
     173        return LC_GLOBAL_LOCALE;
    170174}
    171175
Note: See TracChangeset for help on using the changeset viewer.