Ignore:
Timestamp:
Nov 5, 2016, 8:37:35 PM (9 years ago)
Author:
bird
Message:

fts-nt.c: Wide char support, part 1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/nt/fts-nt.h

    r2997 r2998  
    6767        char *fts_path;                 /* path for this descent */
    6868        size_t fts_pathlen;             /* sizeof(path) */
     69        wchar_t *fts_wcspath;           /* NT: UTF-16 path for this descent. */
     70        size_t fts_cwcpath;             /* NT: size of fts_wcspath buffer */
    6971        size_t fts_nitems;              /* elements in the sort array */
    7072        int (FTSCALL *fts_compar)       /* compare function */
     
    8587#define FTS_NAMEONLY    0x100           /* (private) child names only */
    8688#define FTS_STOP        0x200           /* (private) unrecoverable error */
     89#define FTS_NO_ANSI     0x40000000      /* NT: No ansi name or access path. */
    8790        int fts_options;                /* fts_open options, global flags */
    8891        void *fts_clientptr;            /* thunk for sort function */
     
    97100        void *fts_pointer;              /* local address value */
    98101        char *fts_accpath;              /* access path */
     102        wchar_t *fts_wcsaccpath;        /* NT: UTF-16 access path */
    99103        char *fts_path;                 /* root path */
     104        wchar_t *fts_wcspath;           /* NT: UTF-16 root path */
    100105        int fts_errno;                  /* errno for this node */
    101106        fts_fd_t fts_symfd;             /* NT: Normally -1; -2 we followed this symlinked dir */
    102107        fts_fd_t fts_dirfd;             /* NT: Handle to the directory (NT_FTS_)INVALID_HANDLE_VALUE if not valid */
    103108        size_t fts_pathlen;             /* strlen(fts_path) */
     109        size_t fts_cwcpath;             /* NT: length of fts_wcspath. */
    104110        size_t fts_namelen;             /* strlen(fts_name) */
     111        size_t fts_cwcname;             /* NT: length of fts_wcsname. */
    105112
     113        fts_nlink_t fts_nlink;          /* link count */
    106114        fts_ino_t fts_ino;              /* inode */
    107115        fts_dev_t fts_dev;              /* device */
    108         fts_nlink_t fts_nlink;          /* link count */
    109116
    110117#define FTS_ROOTPARENTLEVEL     -1
     
    141148        struct stat *fts_statp;         /* stat(2) information */
    142149        char *fts_name;                 /* file name */
     150        wchar_t *fts_wcsname;           /* NT: UTF-16 file name. */
    143151        FTS *fts_fts;                   /* back pointer to main FTS */
    144152        BirdStat_T fts_stat;            /* NT: We always got stat info. */
     
    156164FTS     *FTSCALL nt_fts_get_stream(FTSENT *);
    157165#define  fts_get_stream(ftsent) ((ftsent)->fts_fts)
    158 FTS     *FTSCALL nt_fts_open(char * const *, int,
    159             int (FTSCALL*)(const FTSENT * const *, const FTSENT * const *));
     166FTS     *FTSCALL nt_fts_open(char * const *, int, int (FTSCALL*)(const FTSENT * const *, const FTSENT * const *));
     167FTS     *FTSCALL nt_fts_openw(wchar_t * const *, int, int (FTSCALL*)(const FTSENT * const *, const FTSENT * const *));
    160168FTSENT  *FTSCALL nt_fts_read(FTS *);
    161169int      FTSCALL nt_fts_set(FTS *, FTSENT *, int);
Note: See TracChangeset for help on using the changeset viewer.