Changeset 1307


Ignore:
Timestamp:
Mar 16, 2004, 2:51:34 AM (21 years ago)
Author:
bird
Message:

Initial port of FreeBSD nl_types.

Location:
trunk/src/emx/src/lib
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/bsd/nls/msgcat.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1306 r1307  
    5555
    5656#include "msgcat.h"
     57#ifndef __EMX__
    5758#include "../locale/setlocale.h"        /* for ENCODING_LEN */
    58 
     59#else
     60#define ENCODING_LEN    31              /* bird: wonder if this is allright. */
     61#endif
     62
     63#ifndef __EMX__
    5964#define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L"
     65#else /* bird: we use a different separator character. */
     66#define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat;/usr/share/nls/%N/%L;/usr/local/share/nls/%L/%N.cat;/usr/local/share/nls/%N/%L"
     67#endif
    6068
    6169#define TRUE    1
     
    6573#define NLRETERR(errc)  { errno = errc; return (NLERR); }
    6674
     75#ifndef __EMX__
    6776static nl_catd  loadCat();
    6877static int      loadSet();
    6978static void     __nls_free_resources();
     79#else
     80static nl_catd  loadCat(__const char *);
     81static int      loadSet(MCCatT*, MCSetT*);
     82static void     __nls_free_resources(MCCatT*, int);
     83#endif
    7084
    7185nl_catd
     
    112126        }
    113127
     128#ifndef __EMX__
    114129        if ((nlspath = getenv("NLSPATH")) == NULL || issetugid())
     130#else
     131        if ((nlspath = getenv("NLSPATH")) == NULL)
     132#endif
    115133                nlspath = _DEFAULT_NLS_PATH;
    116134
     
    122140        }
    123141
     142#ifndef __EMX__
    124143        while ((nlspath = strsep(&cptr, ":")) != NULL) {
     144#else
     145        while ((nlspath = strsep(&cptr, ";")) != NULL) {
     146#endif
    125147                pathP = path;
    126148                if (*nlspath) {
     
    366388        cat->loadType = MCLoadBySet;
    367389
     390#ifndef __EMX__
    368391        if ((cat->fp = fopen(catpath, "r")) == NULL) {
     392#else
     393        if ((cat->fp = fopen(catpath, "rb")) == NULL) {
     394#endif
    369395                saverr = errno;
    370396                free(cat);
  • trunk/src/emx/src/lib/libc.def

    • Property cvs2svn:cvs-rev changed from 1.51 to 1.52
    r1306 r1307  
    10901090    "_warnc" @1113
    10911091    "_warnx" @1114
    1092 
     1092    "_catclose" @1115
     1093    "_catgets" @1116
     1094    "_catopen" @1117
Note: See TracChangeset for help on using the changeset viewer.