]> arthur.barton.de Git - netatalk.git/commitdiff
Convert all u_int to ISO uint
authorFrank Lahm <franklahm@googlemail.com>
Thu, 2 Jun 2011 20:26:02 +0000 (22:26 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Thu, 2 Jun 2011 20:26:02 +0000 (22:26 +0200)
83 files changed:
bin/afppasswd/afppasswd.c
bin/misc/fce.c
bin/uniconv/uniconv.c
etc/afpd/acl_mappings.h
etc/afpd/acls.c
etc/afpd/afp_dsi.c
etc/afpd/afs.c
etc/afpd/appl.c
etc/afpd/auth.c
etc/afpd/catsearch.c
etc/afpd/desktop.c
etc/afpd/directory.c
etc/afpd/directory.h
etc/afpd/enumerate.c
etc/afpd/file.c
etc/afpd/file.h
etc/afpd/filedir.c
etc/afpd/fork.c
etc/afpd/fork.h
etc/afpd/mangle.c
etc/afpd/messages.c
etc/afpd/nfsquota.c
etc/afpd/ofork.c
etc/afpd/quota.c
etc/afpd/status.c
etc/afpd/uam.c
etc/afpd/unix.c
etc/afpd/unix.h
etc/afpd/volume.c
etc/afpd/volume.h
etc/uams/uams_dhx2_pam.c
etc/uams/uams_dhx2_passwd.c
etc/uams/uams_dhx_pam.c
etc/uams/uams_dhx_passwd.c
etc/uams/uams_gss.c
etc/uams/uams_pam.c
etc/uams/uams_passwd.c
etc/uams/uams_pgp.c
etc/uams/uams_randnum.c
include/atalk/adouble.h
include/atalk/afp.h
include/atalk/cnid.h
include/atalk/cnid_dbd_private.h
include/atalk/dsi.h
include/atalk/globals.h
include/atalk/server_child.h
include/atalk/unicode.h
include/atalk/volinfo.h
include/atalk/volume.h
libatalk/adouble/ad_attr.c
libatalk/adouble/ad_date.c
libatalk/adouble/ad_flush.c
libatalk/adouble/ad_lock.c
libatalk/adouble/ad_open.c
libatalk/adouble/ad_read.c
libatalk/adouble/ad_size.c
libatalk/cnid/cnid.c
libatalk/cnid/tdb/cnid_tdb.h
libatalk/cnid/tdb/cnid_tdb_add.c
libatalk/cnid/tdb/cnid_tdb_lookup.c
libatalk/cnid/tdb/cnid_tdb_open.c
libatalk/dsi/dsi_attn.c
libatalk/dsi/dsi_init.c
libatalk/dsi/dsi_opensess.c
libatalk/dsi/dsi_stream.c
libatalk/dsi/dsi_tcp.c
libatalk/dsi/dsi_tickle.c
libatalk/tdb/tdb_private.h
libatalk/unicode/byteorder.h
libatalk/unicode/charcnv.c
libatalk/unicode/charsets/generic_cjk.c
libatalk/unicode/charsets/generic_cjk.h
libatalk/unicode/charsets/mac_chinese_simp.c
libatalk/unicode/charsets/mac_chinese_simp.h
libatalk/unicode/charsets/mac_chinese_trad.c
libatalk/unicode/charsets/mac_chinese_trad.h
libatalk/unicode/charsets/mac_japanese.c
libatalk/unicode/charsets/mac_japanese.h
libatalk/unicode/charsets/mac_korean.c
libatalk/unicode/charsets/mac_korean.h
libatalk/unicode/utf16_casetable.h
libatalk/unicode/util_unistr.c
libatalk/util/server_ipc.c

index 2d788baa7ee34a1dff54fe1091d244c0d5343d3a..c3e60fb5d8a5888c0a0a9c86d4d68cd78db88aff 100644 (file)
@@ -66,7 +66,7 @@ static char buf[MAXPATHLEN + 1];
 #define unhex(x)  (isdigit(x) ? (x) - '0' : toupper(x) + 10 - 'A')
 static void convert_passwd(char *buf, char *newpwd, const int keyfd)
 {
-  u_int8_t key[HEXPASSWDLEN];
+  uint8_t key[HEXPASSWDLEN];
   Key_schedule schedule;
   unsigned int i, j;
 
index 76ca0a8e6a63505b41d736245b768ae1682345d3..d69699079ff99c63df589f5450fbddc226f3ee3f 100644 (file)
@@ -14,9 +14,7 @@
 #include <netdb.h>
 #include <inttypes.h>
 #include <sys/types.h>
-
 #include <sys/param.h>
-#include <sys/cdefs.h>
 
 #include <atalk/fce_api.h>
 #include <atalk/util.h>
index 5dfc823115bef5ea6f960d7429ce81012d0e559a..8a786a601dd4c1c641bc8c3d4c2bb8730e67eea6 100644 (file)
@@ -60,7 +60,7 @@ char* to_charset;
 static charset_t ch_mac;
 char* mac_charset;
 static int usedots = 0;
-static u_int16_t conv_flags = 0;
+static uint16_t conv_flags = 0;
 static int dry_run = 0;
 static int verbose=0;
 char *cnid_type;
@@ -149,7 +149,7 @@ static char *convert_name(char *name, struct stat *st, cnid_t cur_did)
        size_t outlen = 0;
        unsigned char *p,*q;
        int require_conversion = 0;
-    u_int16_t    flags = conv_flags;
+    uint16_t    flags = conv_flags;
        cnid_t id;
 
        p = (unsigned char *)name;
index b7c4b6d266fdb9863005c61dc889cd66785453e7..87ff5decefdc75d9c09feab9af8c8d971fa54b14 100644 (file)
@@ -31,8 +31,8 @@
 #endif
 
 struct ace_rights_map {
-    u_int32_t from;
-    u_int32_t to;
+    uint32_t from;
+    uint32_t to;
 };
 
 #ifdef HAVE_SOLARIS_ACLS
@@ -71,8 +71,8 @@ struct ace_rights_map darwin_to_nfsv4_rights[] = {
 };
 
 struct nfsv4_to_darwin_flags_map {
-    u_int16_t from;
-    u_int32_t to;
+    uint16_t from;
+    uint32_t to;
 };
 
 struct nfsv4_to_darwin_flags_map nfsv4_to_darwin_flags[] = {
@@ -85,8 +85,8 @@ struct nfsv4_to_darwin_flags_map nfsv4_to_darwin_flags[] = {
 };
 
 struct darwin_to_nfsv4_flags_map {
-    u_int32_t from;
-    u_int16_t to;
+    uint32_t from;
+    uint16_t to;
 };
 
 struct darwin_to_nfsv4_flags_map darwin_to_nfsv4_flags[] = {
index c87ef9a0079cb95f44f1be366d9aad8340e1397e..34a7e92cf9e4bff07ba171401214fba6c8b9ab3d 100644 (file)
@@ -836,7 +836,7 @@ static int get_and_map_acl(char *name, char *rbuf, size_t *rbuflen)
     EC_INIT;
     int mapped_aces = 0;
     int dirflag;
-    uint32_t *darwin_ace_count = (u_int32_t *)rbuf;
+    uint32_t *darwin_ace_count = (uint32_t *)rbuf;
 #ifdef HAVE_SOLARIS_ACLS
     int ace_count = 0;
     ace_t *aces = NULL;
index bde1818bd7a1598ceedb48626671b45de674e9e6..0af1c26fa07d65a11ca27387107bb60933019b1b 100644 (file)
@@ -375,8 +375,8 @@ void afp_over_dsi(AFPObj *obj)
 {
     DSI *dsi = (DSI *) obj->handle;
     int rc_idx;
-    u_int32_t err, cmd;
-    u_int8_t function;
+    uint32_t err, cmd;
+    uint8_t function;
     struct sigaction action;
 
     AFPobj = obj;
index d045cd4ee83abb334bec306b698f164105df0fb5..3b33c1ee3afabac3ca98d31131ed21282fa6acae 100644 (file)
@@ -32,7 +32,7 @@
 int afs_getvolspace( vol, bfree, btotal, bsize )
 struct vol     *vol;
 VolSpace       *bfree, *btotal;
-u_int32_t   *bsize;
+uint32_t   *bsize;
 {
     struct ViceIoctl   vi;
     struct VolumeStatus        *vs;
@@ -81,8 +81,8 @@ int afp_getdiracl(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *r
     struct vol         *vol;
     struct dir         *dir;
     struct path                *path;
-    u_int32_t          did;
-    u_int16_t          vid;
+    uint32_t           did;
+    uint16_t           vid;
 
     ibuf += 2;
     memcpy( &vid, ibuf, sizeof( vid ));
@@ -169,8 +169,8 @@ int afp_setdiracl(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *r
     struct dir         *dir;
     char               *iend;
     struct path                *path;
-    u_int32_t          did;
-    u_int16_t          vid;
+    uint32_t           did;
+    uint16_t           vid;
 
     *rbuflen = 0;
     iend = ibuf + ibuflen;
@@ -235,7 +235,7 @@ int afp_afschangepw(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t
     char       realm[ MAXKTCREALMLEN ];
     char       oldpw[ 9 ], newpw[ 9 ];
     int                len, rc;
-    u_int16_t  clen;
+    uint16_t   clen;
     struct ktc_encryptionKey   oldkey, newkey;
     struct ktc_token           adtok;
     struct ubik_client         *conn;
index 51b64ef283b97d48e3ef826fd25d20a6c3b7a7ed..2f3079f47b6f35fc91af185609c24523789ac615 100644 (file)
@@ -87,8 +87,8 @@ static int copyapplfile(int sfd, int dfd, char *mpath, u_short mplen)
 {
     int                cc;
     char       *p;
-    u_int16_t  len;
-    u_char     appltag[ 4 ];
+    uint16_t   len;
+    unsigned char      appltag[ 4 ];
     char       buf[ MAXPATHLEN ];
 
     while (( cc = read( sfd, buf, sizeof(appltag) + sizeof( u_short ))) > 0 ) {
@@ -199,12 +199,12 @@ int afp_addappl(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, siz
     struct vol         *vol;
     struct dir         *dir;
     int                        tfd, cc;
-    u_int32_t           did;
-    u_int16_t          vid, mplen;
+    uint32_t           did;
+    uint16_t           vid, mplen;
     struct path         *path;
     char                *dtf, *p, *mp;
-    u_char             creator[ 4 ];
-    u_char             appltag[ 4 ];
+    unsigned char              creator[ 4 ];
+    unsigned char              appltag[ 4 ];
     char               *mpath, *tempfile;
 
     *rbuflen = 0;
@@ -286,11 +286,11 @@ int afp_rmvappl(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, siz
     struct vol         *vol;
     struct dir         *dir;
     int                        tfd, cc;
-    u_int32_t           did;
-    u_int16_t          vid, mplen;
+    uint32_t           did;
+    uint16_t           vid, mplen;
     struct path        *path;
     char                *dtf, *mp;
-    u_char             creator[ 4 ];
+    unsigned char              creator[ 4 ];
     char                *tempfile, *mpath;
 
     *rbuflen = 0;
@@ -358,9 +358,9 @@ int afp_getappl(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t
     char               *p, *q;
     int                        cc; 
     size_t             buflen;
-    u_int16_t          vid, aindex, bitmap, len;
-    u_char             creator[ 4 ];
-    u_char             appltag[ 4 ];
+    uint16_t           vid, aindex, bitmap, len;
+    unsigned char              creator[ 4 ];
+    unsigned char              appltag[ 4 ];
     char                *buf, *cbuf;
     struct path         *path;
     
index fef13eb8fc46ac79dad45003e09013b84fa78e74..852fa33f74818c274c6b9754c0c4c30324bcde94 100644 (file)
@@ -91,7 +91,7 @@ static struct uam_obj *afp_uam = NULL;
 void status_versions( char *data, const DSI *dsi)
 {
     char                *start = data;
-    u_int16_t           status;
+    uint16_t           status;
     int         len, num, i, count = 0;
 
     memcpy(&status, start + AFPSTATUS_VERSOFF, sizeof(status));
@@ -118,7 +118,7 @@ void status_versions( char *data, const DSI *dsi)
 void status_uams(char *data, const char *authlist)
 {
     char                *start = data;
-    u_int16_t           status;
+    uint16_t           status;
     struct uam_obj      *uams;
     int         len, num = 0;
 
@@ -475,10 +475,10 @@ int afp_getsession(
     char   *ibuf, size_t ibuflen, 
     char   *rbuf, size_t *rbuflen)
 {
-    u_int16_t           type;
-    u_int32_t           idlen = 0;
-    u_int32_t       boottime;
-    u_int32_t           tklen, tp;
+    uint16_t           type;
+    uint32_t           idlen = 0;
+    uint32_t       boottime;
+    uint32_t           tklen, tp;
     char                *token;
     char                *p;
 
@@ -577,8 +577,8 @@ int afp_getsession(
 int afp_disconnect(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen)
 {
     DSI                 *dsi = (DSI *)obj->handle;
-    u_int16_t           type;
-    u_int32_t           tklen;
+    uint16_t           type;
+    uint32_t           tklen;
     pid_t               token;
     int                 i;
 
@@ -744,7 +744,7 @@ int afp_login_ext(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *r
     size_t  len;
     int     i;
     char        type;
-    u_int16_t   len16;
+    uint16_t   len16;
     char        *username;
 
     *rbuflen = 0;
@@ -976,9 +976,9 @@ int afp_changepw(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rb
 /* FPGetUserInfo */
 int afp_getuserinfo(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t *rbuflen)
 {
-    u_int8_t  thisuser;
-    u_int32_t id;
-    u_int16_t bitmap;
+    uint8_t  thisuser;
+    uint32_t id;
+    uint16_t bitmap;
     char *bitmapp;
 
     LOG(log_debug, logtype_afpd, "begin afp_getuserinfo:");
index a488501e6b67e3c101660b844aa218bb460a1da5..18fca228cf64e77e471ba212e8ce448faea533cf 100644 (file)
 
 
 struct finderinfo {
-       u_int32_t f_type;
-       u_int32_t creator;
-       u_int16_t attrs;    /* File attributes (high 8 bits)*/
-       u_int16_t label;    /* Label (low 8 bits )*/
+       uint32_t f_type;
+       uint32_t creator;
+       uint16_t attrs;    /* File attributes (high 8 bits)*/
+       uint16_t label;    /* Label (low 8 bits )*/
        char reserved[22]; /* Unknown (at least for now...) */
 };
 
@@ -86,14 +86,14 @@ typedef char packed_finder[ADEDLEN_FINDERI];
 
 /* This is our search-criteria structure. */
 struct scrit {
-       u_int32_t rbitmap;          /* Request bitmap - which values should we check ? */
-       u_int16_t fbitmap, dbitmap; /* file & directory bitmap - which values should we return ? */
-       u_int16_t attr;             /* File attributes */
+       uint32_t rbitmap;          /* Request bitmap - which values should we check ? */
+       uint16_t fbitmap, dbitmap; /* file & directory bitmap - which values should we return ? */
+       uint16_t attr;             /* File attributes */
        time_t cdate;               /* Creation date */
        time_t mdate;               /* Last modification date */
        time_t bdate;               /* Last backup date */
-       u_int32_t pdid;             /* Parent DID */
-    u_int16_t offcnt;           /* Offspring count */
+       uint32_t pdid;             /* Parent DID */
+    uint16_t offcnt;           /* Offspring count */
        struct finderinfo finfo;    /* Finder info */
        char lname[64];             /* Long name */ 
        char utf8name[514];         /* UTF8 or UCS2 name */ /* for convert_charset dest_len parameter +2 */
@@ -257,11 +257,11 @@ unpack_finderinfo(struct vol *vol, struct path *path, struct adouble **adp, stru
  */
 static int crit_check(struct vol *vol, struct path *path) {
        int result = 0;
-       u_int16_t attr, flags = CONV_PRECOMPOSE;
+       uint16_t attr, flags = CONV_PRECOMPOSE;
        struct finderinfo *finfo = NULL, finderinfo;
        struct adouble *adp = NULL;
        time_t c_date, b_date;
-       u_int32_t ac_date, ab_date;
+       uint32_t ac_date, ab_date;
        static char convbuf[514]; /* for convert_charset dest_len parameter +2 */
        size_t len;
     int islnk;
@@ -429,7 +429,7 @@ static int rslt_add ( struct vol *vol, struct path *path, char **buf, int ext)
        char            *p = *buf;
        int             ret;
        size_t          tbuf =0;
-       u_int16_t       resultsize;
+       uint16_t        resultsize;
        int             isdir = S_ISDIR(path->st.st_mode); 
 
        /* Skip resultsize */
@@ -502,7 +502,7 @@ static int catsearch(struct vol *vol,
                      int *rsize,
                      int ext)
 {
-    static u_int32_t cur_pos;    /* Saved position index (ID) - used to remember "position" across FPCatSearch calls */
+    static uint32_t cur_pos;    /* Saved position index (ID) - used to remember "position" across FPCatSearch calls */
     static DIR *dirpos;                 /* UNIX structure describing currently opened directory. */
     struct dir *curdir;          /* struct dir of current directory */
        int cidx, r;
@@ -840,17 +840,17 @@ static int catsearch_afp(AFPObj *obj _U_, char *ibuf, size_t ibuflen,
                   char *rbuf, size_t *rbuflen, int ext)
 {
     struct vol *vol;
-    u_int16_t   vid;
-    u_int16_t   spec_len;
-    u_int32_t   rmatches, reserved;
-    u_int32_t  catpos[4];
-    u_int32_t   pdid = 0;
+    uint16_t   vid;
+    uint16_t   spec_len;
+    uint32_t   rmatches, reserved;
+    uint32_t   catpos[4];
+    uint32_t   pdid = 0;
     int ret, rsize;
-    u_int32_t nrecs = 0;
+    uint32_t nrecs = 0;
     unsigned char *spec1, *spec2, *bspec1, *bspec2;
     size_t     len;
-    u_int16_t  namelen;
-    u_int16_t  flags;
+    uint16_t   namelen;
+    uint16_t   flags;
     char           tmppath[256];
     char        *uname;
 
index eda917b10f69e853c504ab5496fe86222dc06fd8..96e2fccf2f04b0e24634a8ddf314cd2af4079a87 100644 (file)
@@ -38,7 +38,7 @@
 int afp_opendt(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t *rbuflen)
 {
     struct vol *vol;
-    u_int16_t  vid;
+    uint16_t   vid;
 
     ibuf += 2;
 
@@ -117,8 +117,8 @@ int afp_addicon(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t
     u_char             fcreator[ 4 ], imh[ 12 ], irh[ 12 ], *p;
     int                        itype, cc = AFP_OK, iovcnt = 0;
     size_t             buflen;
-    u_int32_t           ftype, itag;
-    u_int16_t          bsize, rsize, vid;
+    uint32_t           ftype, itag;
+    uint16_t           bsize, rsize, vid;
 
     buflen = *rbuflen;
     *rbuflen = 0;
@@ -292,8 +292,8 @@ static const u_char uicon[] = {
 int afp_geticoninfo(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t *rbuflen)
 {
     struct vol *vol;
-    u_char     fcreator[ 4 ], ih[ 12 ];
-    u_int16_t  vid, iindex, bsize;
+    unsigned char      fcreator[ 4 ], ih[ 12 ];
+    uint16_t   vid, iindex, bsize;
 
     *rbuflen = 0;
     ibuf += 2;
@@ -366,7 +366,7 @@ int afp_geticon(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t
     off_t       offset;
     ssize_t    rc, buflen;
     u_char     fcreator[ 4 ], ftype[ 4 ], itype, ih[ 12 ];
-    u_int16_t  vid, bsize, rsize;
+    uint16_t   vid, bsize, rsize;
 
     buflen = *rbuflen;
     *rbuflen = 0;
@@ -552,7 +552,7 @@ char *mtoupath(const struct vol *vol, char *mpath, cnid_t did, int utf8)
     char       *m, *u;
     size_t       inplen;
     size_t       outlen;
-    u_int16_t   flags;
+    uint16_t    flags;
         
     if ( *mpath == '\0' ) {
         strcpy(upath, ".");
@@ -591,7 +591,7 @@ char *utompath(const struct vol *vol, char *upath, cnid_t id, int utf8)
 {
     static char  mpath[ MAXPATHLEN + 2]; /* for convert_charset dest_len parameter +2 */
     char        *m, *u;
-    u_int16_t    flags;
+    uint16_t    flags;
     size_t       outlen;
 
     m = mpath;
@@ -679,8 +679,8 @@ int afp_addcomment(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _
     struct vol         *vol;
     struct dir         *dir;
     struct path         *path;
-    u_int32_t           did;
-    u_int16_t          vid;
+    uint32_t           did;
+    uint16_t           vid;
 
     *rbuflen = 0;
     ibuf += 2;
@@ -757,8 +757,8 @@ int afp_getcomment(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf,
     struct vol         *vol;
     struct dir         *dir;
     struct path         *s_path;
-    u_int32_t          did;
-    u_int16_t          vid;
+    uint32_t           did;
+    uint16_t           vid;
     
     *rbuflen = 0;
     ibuf += 2;
@@ -827,8 +827,8 @@ int afp_rmvcomment(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _
     struct vol         *vol;
     struct dir         *dir;
     struct path         *s_path;
-    u_int32_t          did;
-    u_int16_t          vid;
+    uint32_t           did;
+    uint16_t           vid;
 
     *rbuflen = 0;
     ibuf += 2;
index 9d3e18f39ddf4897d9ccf3b2369925e73d267650..c87c9c93e7fbdd8993680d0fbdcb88cce31815d7 100644 (file)
@@ -696,7 +696,7 @@ int caseenumerate(const struct vol *vol, struct path *path, struct dir *dir)
     DIR               *dp;
     struct dirent     *de;
     int               ret;
-    static u_int32_t  did = 0;
+    static uint32_t  did = 0;
     static char       cname[MAXPATHLEN];
     static char       lname[MAXPATHLEN];
     ucs2_t        u2_path[MAXPATHLEN];
@@ -1129,8 +1129,8 @@ struct path *cname(struct vol *vol, struct dir *dir, char **cpath)
     struct dir  *cdir;
     char        *data, *p;
     int         len;
-    u_int32_t   hint;
-    u_int16_t   len16;
+    uint32_t   hint;
+    uint16_t   len16;
     int         size = 0;
     int         toUTF8 = 0;
 
@@ -1442,7 +1442,7 @@ int file_access(struct path *path, int mode)
 }
 
 /* --------------------- */
-void setdiroffcnt(struct dir *dir, struct stat *st,  u_int32_t count)
+void setdiroffcnt(struct dir *dir, struct stat *st,  uint32_t count)
 {
     dir->d_offcnt = count;
     dir->d_ctime = st->st_ctime;
@@ -1464,7 +1464,7 @@ int dirreenumerate(struct dir *dir, struct stat *st)
 */
 
 int getdirparams(const struct vol *vol,
-                 u_int16_t bitmap, struct path *s_path,
+                 uint16_t bitmap, struct path *s_path,
                  struct dir *dir,
                  char *buf, size_t *buflen )
 {
@@ -1472,10 +1472,10 @@ int getdirparams(const struct vol *vol,
     struct adouble  ad;
     char        *data, *l_nameoff = NULL, *utf_nameoff = NULL;
     int         bit = 0, isad = 0;
-    u_int32_t           aint;
-    u_int16_t       ashort;
+    uint32_t           aint;
+    uint16_t       ashort;
     int                 ret;
-    u_int32_t           utf8 = 0;
+    uint32_t           utf8 = 0;
     cnid_t              pdid;
     struct stat *st = &s_path->st;
     char *upath = s_path->u_name;
@@ -1585,13 +1585,13 @@ int getdirparams(const struct vol *vol,
             if (dir->d_m_name) /* root of parent can have a null name */
                 l_nameoff = data;
             else
-                memset(data, 0, sizeof(u_int16_t));
-            data += sizeof( u_int16_t );
+                memset(data, 0, sizeof(uint16_t));
+            data += sizeof( uint16_t );
             break;
 
         case DIRPBIT_SNAME :
-            memset(data, 0, sizeof(u_int16_t));
-            data += sizeof( u_int16_t );
+            memset(data, 0, sizeof(uint16_t));
+            data += sizeof( uint16_t );
             break;
 
         case DIRPBIT_DID :
@@ -1646,8 +1646,8 @@ int getdirparams(const struct vol *vol,
                 if (dir->d_m_name) /* root of parent can have a null name */
                     utf_nameoff = data;
                 else
-                    memset(data, 0, sizeof(u_int16_t));
-                data += sizeof( u_int16_t );
+                    memset(data, 0, sizeof(uint16_t));
+                data += sizeof( uint16_t );
                 aint = 0;
                 memcpy(data, &aint, sizeof( aint ));
                 data += sizeof( aint );
@@ -1730,8 +1730,8 @@ int afp_setdirparams(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_
     struct vol  *vol;
     struct dir  *dir;
     struct path *path;
-    u_int16_t   vid, bitmap;
-    u_int32_t   did;
+    uint16_t   vid, bitmap;
+    uint32_t   did;
     int     rc;
 
     *rbuflen = 0;
@@ -1786,7 +1786,7 @@ int afp_setdirparams(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_
  *
  * assume path == '\0' eg. it's a directory in canonical form
  */
-int setdirparams(struct vol *vol, struct path *path, u_int16_t d_bitmap, char *buf )
+int setdirparams(struct vol *vol, struct path *path, uint16_t d_bitmap, char *buf )
 {
     struct maccess  ma;
     struct adouble  ad;
@@ -1798,16 +1798,16 @@ int setdirparams(struct vol *vol, struct path *path, u_int16_t d_bitmap, char *b
     int         bit, isad = 1;
     int                 cdate, bdate;
     int                 owner, group;
-    u_int16_t       ashort, bshort, oshort;
+    uint16_t       ashort, bshort, oshort;
     int                 err = AFP_OK;
     int                 change_mdate = 0;
     int                 change_parent_mdate = 0;
     int                 newdate = 0;
-    u_int16_t           bitmap = d_bitmap;
+    uint16_t           bitmap = d_bitmap;
     u_char              finder_buf[32];
-    u_int32_t       upriv;
+    uint32_t       upriv;
     mode_t              mpriv = 0;
-    u_int16_t           upriv_bit = 0;
+    uint16_t           upriv_bit = 0;
 
     bit = 0;
     upath = path->u_name;
@@ -1980,7 +1980,7 @@ int setdirparams(struct vol *vol, struct path *path, u_int16_t d_bitmap, char *b
         case DIRPBIT_FINFO :
             if (isad) {
                 /* Fixes #2802236 */
-                u_int16_t *fflags = (u_int16_t *)(finder_buf + FINDERINFO_FRFLAGOFF);
+                uint16_t *fflags = (uint16_t *)(finder_buf + FINDERINFO_FRFLAGOFF);
                 *fflags &= htons(~FINDERINFO_ISHARED);
                 /* #2802236 end */
                 if (  dir->d_did == DIRDID_ROOT ) {
@@ -2125,8 +2125,8 @@ int afp_syncdir(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U_,
     int                  dfd;
     struct vol           *vol;
     struct dir           *dir;
-    u_int32_t            did;
-    u_int16_t            vid;
+    uint32_t            did;
+    uint16_t            vid;
 
     *rbuflen = 0;
     ibuf += 2;
@@ -2214,8 +2214,8 @@ int afp_createdir(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_
     struct dir      *dir;
     char        *upath;
     struct path         *s_path;
-    u_int32_t       did;
-    u_int16_t       vid;
+    uint32_t       did;
+    uint16_t       vid;
     int                 err;
 
     *rbuflen = 0;
@@ -2282,8 +2282,8 @@ int afp_createdir(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_
     ad_close_metadata( &ad);
 
 createdir_done:
-    memcpy( rbuf, &dir->d_did, sizeof( u_int32_t ));
-    *rbuflen = sizeof( u_int32_t );
+    memcpy( rbuf, &dir->d_did, sizeof( uint32_t ));
+    *rbuflen = sizeof( uint32_t );
     setvoltime(obj, vol );
     return( AFP_OK );
 }
@@ -2353,7 +2353,7 @@ int deletecurdir(struct vol *vol)
     struct dir  *fdir, *pdir;
     DIR *dp;
     struct adouble  ad;
-    u_int16_t       ashort;
+    uint16_t       ashort;
     int err;
 
     if ((pdir = dirlookup(vol, curdir->d_pdid)) == NULL) {
@@ -2434,7 +2434,7 @@ int afp_mapid(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t *r
     struct passwd   *pw;
     struct group    *gr;
     char        *name;
-    u_int32_t           id;
+    uint32_t           id;
     int         len, sfunc;
     int         utf8 = 0;
 
@@ -2528,7 +2528,7 @@ int afp_mapid(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t *r
         len = strlen( name );
 
     if (utf8) {
-        u_int16_t tp = htons(len);
+        uint16_t tp = htons(len);
         memcpy(rbuf, &tp, sizeof(tp));
         rbuf += sizeof(tp);
         *rbuflen += 2;
@@ -2551,8 +2551,8 @@ int afp_mapname(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf, siz
     struct passwd   *pw;
     struct group    *gr;
     int             len, sfunc;
-    u_int32_t       id;
-    u_int16_t       ulen;
+    uint32_t       id;
+    uint16_t       ulen;
 
     ibuf++;
     sfunc = (unsigned char) *ibuf++;
@@ -2639,8 +2639,8 @@ int afp_closedir(AFPObj *obj _U_, char *ibuf _U_, size_t ibuflen _U_, char *rbuf
 #if 0
     struct vol   *vol;
     struct dir   *dir;
-    u_int16_t    vid;
-    u_int32_t    did;
+    uint16_t    vid;
+    uint32_t    did;
 #endif /* 0 */
 
     *rbuflen = 0;
@@ -2675,8 +2675,8 @@ int afp_opendir(AFPObj *obj _U_, char *ibuf, size_t ibuflen  _U_, char *rbuf, si
     struct vol      *vol;
     struct dir      *parentdir;
     struct path     *path;
-    u_int32_t       did;
-    u_int16_t       vid;
+    uint32_t       did;
+    uint16_t       vid;
 
     *rbuflen = 0;
     ibuf += 2;
index 82daa86c5b5bf5f7bc11e3afdc88baf3851ed593..533d30f9fe8ba39dc9b1c8034106131cbdfa14eb 100644 (file)
@@ -112,14 +112,14 @@ extern struct path *cname (struct vol *, struct dir *, char **);
 extern int         deletecurdir (struct vol *);
 extern mode_t      mtoumode (struct maccess *);
 extern void        utommode (struct stat *, struct maccess *);
-extern int         getdirparams (const struct vol *, u_int16_t, struct path *,
+extern int         getdirparams (const struct vol *, uint16_t, struct path *,
                                  struct dir *, char *, size_t *);
 
-extern int         setdirparams(struct vol *, struct path *, u_int16_t, char *);
+extern int         setdirparams(struct vol *, struct path *, uint16_t, char *);
 extern int         renamedir(const struct vol *, int, char *, char *, struct dir *,
                              struct dir *, char *);
 extern int         path_error(struct path *, int error);
-extern void        setdiroffcnt(struct dir *dir, struct stat *st,  u_int32_t count);
+extern void        setdiroffcnt(struct dir *dir, struct stat *st,  uint32_t count);
 extern int         dirreenumerate(struct dir *dir, struct stat *st);
 extern int         for_each_dirent(const struct vol *, char *, dir_loop , void *);
 extern int         check_access(char *name , int mode);
index fe5a66d993746610ce45747d347abc1e409036e4..4867640d8d63d9884cb148c2c7360722f80f2a6a 100644 (file)
@@ -40,7 +40,7 @@
  */
 struct savedir {
     u_short     sd_vid;
-    u_int32_t   sd_did;
+    uint32_t    sd_did;
     int                 sd_buflen;
     char        *sd_buf;
     char        *sd_last;
@@ -169,9 +169,9 @@ static int enumerate(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_,
     int                                did, ret, len, first = 1;
     size_t                     esz;
     char                        *data, *start;
-    u_int16_t                  vid, fbitmap, dbitmap, reqcnt, actcnt = 0;
-    u_int16_t                  temp16;
-    u_int32_t                  sindex, maxsz, sz = 0;
+    uint16_t                   vid, fbitmap, dbitmap, reqcnt, actcnt = 0;
+    uint16_t                   temp16;
+    uint32_t                   sindex, maxsz, sz = 0;
     struct path                 *o_path;
     struct path                 s_path;
     int                         header;
@@ -272,8 +272,8 @@ static int enumerate(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_,
     LOG(log_debug, logtype_afpd, "enumerate(\"%s/%s\", f/d:%04x/%04x, rc:%u, i:%u, max:%u)",
         getcwdpath(), o_path->u_name, fbitmap, dbitmap, reqcnt, sindex, maxsz);
 
-    data = rbuf + 3 * sizeof( u_int16_t );
-    sz = 3 * sizeof( u_int16_t );      /* fbitmap, dbitmap, reqcount */
+    data = rbuf + 3 * sizeof( uint16_t );
+    sz = 3 * sizeof( uint16_t );       /* fbitmap, dbitmap, reqcount */
 
     /*
      * Read the directory into a pre-malloced buffer, stored
index 549f19ddfd4e06bebd0634648a406419fcb02587..779b93cabb6c91d854e81246f291b763405a47d1 100644 (file)
@@ -93,7 +93,7 @@ void *get_finderinfo(const struct vol *vol, const char *upath, struct adouble *a
         memcpy(data, ufinderi, ADEDLEN_FINDERI);
         chk_ext = 1;
         if (vol_inv_dots(vol) && *upath == '.') { /* make it invisible */
-            u_int16_t ashort;
+            uint16_t ashort;
             
             ashort = htons(FINDERINFO_INVISIBLE);
             memcpy((char *)data + FINDERINFO_FRFLAGOFF, &ashort, sizeof(ashort));
@@ -101,7 +101,7 @@ void *get_finderinfo(const struct vol *vol, const char *upath, struct adouble *a
     }
 
     if (islink){
-        u_int16_t linkflag;
+        uint16_t linkflag;
         memcpy(&linkflag, (char *)data + FINDERINFO_FRFLAGOFF, 2);
         linkflag |= htons(FINDERINFO_ISALIAS);
         memcpy((char *)data + FINDERINFO_FRFLAGOFF, &linkflag, 2);
@@ -120,9 +120,9 @@ void *get_finderinfo(const struct vol *vol, const char *upath, struct adouble *a
 
 /* ---------------------
 */
-char *set_name(const struct vol *vol, char *data, cnid_t pid, char *name, cnid_t id, u_int32_t utf8) 
+char *set_name(const struct vol *vol, char *data, cnid_t pid, char *name, cnid_t id, uint32_t utf8) 
 {
-    u_int32_t   aint;
+    uint32_t   aint;
     char        *tp = NULL;
     char        *src = name;
     aint = strlen( name );
@@ -149,7 +149,7 @@ char *set_name(const struct vol *vol, char *data, cnid_t pid, char *name, cnid_t
         *data++ = aint;
     }
     else {
-        u_int16_t temp;
+        uint16_t temp;
 
         if (aint > UTF8FILELEN_EARLY)  /* FIXME safeguard, anyway if no ascii char it's game over*/
            aint = UTF8FILELEN_EARLY;
@@ -209,8 +209,8 @@ uint32_t get_id(struct vol *vol,
                 const int len) 
 {
     static int first = 1;       /* mark if this func is called the first time */
-    u_int32_t adcnid;
-    u_int32_t dbcnid = CNID_INVALID;
+    uint32_t adcnid;
+    uint32_t dbcnid = CNID_INVALID;
 
 restart:
     if (vol->v_cdb != NULL) {
@@ -287,18 +287,18 @@ exit:
              
 /* -------------------------- */
 int getmetadata(struct vol *vol,
-                 u_int16_t bitmap,
+                 uint16_t bitmap,
                  struct path *path, struct dir *dir, 
                  char *buf, size_t *buflen, struct adouble *adp)
 {
     char               *data, *l_nameoff = NULL, *upath;
     char                *utf_nameoff = NULL;
     int                        bit = 0;
-    u_int32_t          aint;
+    uint32_t           aint;
     cnid_t              id = 0;
-    u_int16_t          ashort;
+    uint16_t           ashort;
     u_char              achar, fdType[4];
-    u_int32_t           utf8 = 0;
+    uint32_t           utf8 = 0;
     struct stat         *st;
     struct maccess     ma;
 
@@ -394,8 +394,8 @@ int getmetadata(struct vol *vol,
             break;
 
         case FILPBIT_PDID :
-            memcpy(data, &dir->d_did, sizeof( u_int32_t ));
-            data += sizeof( u_int32_t );
+            memcpy(data, &dir->d_did, sizeof( uint32_t ));
+            data += sizeof( uint32_t );
             LOG(log_debug, logtype_afpd, "metadata('%s'):     Parent DID: %u",
                 path->u_name, ntohl(dir->d_did));
             break;
@@ -433,12 +433,12 @@ int getmetadata(struct vol *vol,
 
         case FILPBIT_LNAME :
             l_nameoff = data;
-            data += sizeof( u_int16_t );
+            data += sizeof( uint16_t );
             break;
 
         case FILPBIT_SNAME :
-            memset(data, 0, sizeof(u_int16_t));
-            data += sizeof( u_int16_t );
+            memset(data, 0, sizeof(uint16_t));
+            data += sizeof( uint16_t );
             break;
 
         case FILPBIT_FNUM :
@@ -480,7 +480,7 @@ int getmetadata(struct vol *vol,
             if (afp_version >= 30) { /* UTF8 name */
                 utf8 = kTextEncodingUTF8;
                 utf_nameoff = data;
-                data += sizeof( u_int16_t );
+                data += sizeof( uint16_t );
                 aint = 0;
                 memcpy(data, &aint, sizeof( aint ));
                 data += sizeof( aint );
@@ -602,7 +602,7 @@ int getmetadata(struct vol *vol,
                 
 /* ----------------------- */
 int getfilparams(struct vol *vol,
-                 u_int16_t bitmap,
+                 uint16_t bitmap,
                  struct path *path, struct dir *dir, 
                  char *buf, size_t *buflen )
 {
@@ -653,7 +653,7 @@ int afp_createfile(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_,
     struct ofork        *of = NULL;
     char               *path, *upath;
     int                        creatf, did, openf, retvalue = AFP_OK;
-    u_int16_t          vid;
+    uint16_t           vid;
     struct path                *s_path;
     
     *rbuflen = 0;
@@ -762,7 +762,7 @@ int afp_setfilparams(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_
     struct dir *dir;
     struct path *s_path;
     int                did, rc;
-    u_int16_t  vid, bitmap;
+    uint16_t   vid, bitmap;
 
     *rbuflen = 0;
     ibuf += 2;
@@ -816,17 +816,17 @@ int afp_setfilparams(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_
 extern struct path Cur_Path;
 
 int setfilparams(struct vol *vol,
-                 struct path *path, u_int16_t f_bitmap, char *buf )
+                 struct path *path, uint16_t f_bitmap, char *buf )
 {
     struct adouble     ad, *adp;
     struct extmap      *em;
     int                        bit, isad = 1, err = AFP_OK;
     char                *upath;
     u_char              achar, *fdType, xyy[4]; /* uninitialized, OK 310105 */
-    u_int16_t          ashort, bshort, oshort;
-    u_int32_t          aint;
-    u_int32_t          upriv;
-    u_int16_t           upriv_bit = 0;
+    uint16_t           ashort, bshort, oshort;
+    uint32_t           aint;
+    uint32_t           upriv;
+    uint16_t           upriv_bit = 0;
     
     struct utimbuf     ut;
 
@@ -836,8 +836,8 @@ int setfilparams(struct vol *vol,
     struct timeval      tv;
     uid_t              f_uid;
     gid_t              f_gid;
-    u_int16_t           bitmap = f_bitmap;
-    u_int32_t           cdate,bdate;
+    uint16_t           bitmap = f_bitmap;
+    uint32_t           cdate,bdate;
     u_char              finder_buf[32];
 
 #ifdef DEBUG
@@ -1172,8 +1172,8 @@ int copy_path_name(const struct vol *vol, char *newname, char *ibuf)
 {
 char        type = *ibuf;
 size_t      plen = 0;
-u_int16_t   len16;
-u_int32_t   hint;
+uint16_t   len16;
+uint32_t   hint;
 
     if ( type != 2 && !(afp_version >= 30 && type == 3) ) {
         return -1;
@@ -1231,9 +1231,9 @@ int afp_copyfile(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, si
     struct dir *dir;
     char       *newname, *p, *upath;
     struct path *s_path;
-    u_int32_t  sdid, ddid;
+    uint32_t   sdid, ddid;
     int         err, retvalue = AFP_OK;
-    u_int16_t  svid, dvid;
+    uint16_t   svid, dvid;
 
     struct adouble ad, *adp;
     int denyreadset;
@@ -1575,7 +1575,7 @@ done:
 
 static int check_attrib(struct adouble *adp)
 {
-u_int16_t   bshort = 0;
+uint16_t   bshort = 0;
 
        ad_getattr(adp, &bshort);
     /*
@@ -1817,7 +1817,7 @@ int afp_resolveid(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf, s
     int                 err, retry=0;
     size_t             buflen;
     cnid_t             id, cnid;
-    u_int16_t          vid, bitmap;
+    uint16_t           vid, bitmap;
 
     static char buffer[12 + MAXPATHLEN + 1];
     int len = 12 + MAXPATHLEN + 1;
@@ -2063,8 +2063,8 @@ int afp_exchangefiles(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U
     int                 crossdev;
     
     int                 slen, dlen;
-    u_int32_t          sid, did;
-    u_int16_t          vid;
+    uint32_t           sid, did;
+    uint16_t           vid;
 
     uid_t              uid;
     gid_t              gid;
index 654ce83061a4612f08e35e999fafd3271e5141fd..76485a3f87f23e2abe89e7979c427f4f6f6d99a7 100644 (file)
@@ -103,20 +103,20 @@ typedef enum {
   kTextEncodingMacKeyboardGlyphs = 41,
 } kTextEncoding_t;
 
-extern char *set_name   (const struct vol *, char *, cnid_t, char *, cnid_t, u_int32_t );
+extern char *set_name   (const struct vol *, char *, cnid_t, char *, cnid_t, uint32_t );
 
 extern struct extmap   *getextmap (const char *);
 extern struct extmap   *getdefextmap (void);
 
-extern int getfilparams (struct vol *, u_int16_t, struct path *,
-                                 struct dir *, char *buf, size_t *);
+extern int getfilparams (struct vol *, uint16_t, struct path *,
+                         struct dir *, char *buf, size_t *);
 
-extern int setfilparams (struct vol *, struct path *, u_int16_t, char *);
+extern int setfilparams (struct vol *, struct path *, uint16_t, char *);
 extern int renamefile   (const struct vol *, int, char *, char *, char *, struct adouble *);
 extern int copyfile     (const struct vol *, const struct vol *, int, char *, char *, char *, struct adouble *);
 extern int deletefile   (const struct vol *, int, char *, int);
 
-extern int getmetadata  (struct vol *vol, u_int16_t bitmap, struct path *path, 
+extern int getmetadata  (struct vol *vol, uint16_t bitmap, struct path *path, 
                          struct dir *dir, char *buf, size_t *buflen, struct adouble *adp);
 
 extern void *get_finderinfo (const struct vol *, const char *, struct adouble *, void *, int);
index c6fecadcafd8e733f7daed6a7f86751297b1c3a6..61386d66f4e09064aae40668223458ecff6ed691 100644 (file)
@@ -40,10 +40,10 @@ int afp_getfildirparams(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *r
     struct stat     *st;
     struct vol      *vol;
     struct dir      *dir;
-    u_int32_t           did;
+    uint32_t           did;
     int         ret;
     size_t      buflen;
-    u_int16_t       fbitmap, dbitmap, vid;
+    uint16_t       fbitmap, dbitmap, vid;
     struct path         *s_path;
 
     *rbuflen = 0;
@@ -104,21 +104,21 @@ int afp_getfildirparams(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *r
                 return AFPERR_NOOBJ;
 
             ret = getdirparams(vol, dbitmap, s_path, dir,
-                               rbuf + 3 * sizeof( u_int16_t ), &buflen );
+                               rbuf + 3 * sizeof( uint16_t ), &buflen );
             if (ret != AFP_OK )
                 return( ret );
         }
         /* this is a directory */
-        *(rbuf + 2 * sizeof( u_int16_t )) = (char) FILDIRBIT_ISDIR;
+        *(rbuf + 2 * sizeof( uint16_t )) = (char) FILDIRBIT_ISDIR;
     } else {
         if (fbitmap && AFP_OK != (ret = getfilparams(vol, fbitmap, s_path, curdir,
-                                                     rbuf + 3 * sizeof( u_int16_t ), &buflen )) ) {
+                                                     rbuf + 3 * sizeof( uint16_t ), &buflen )) ) {
             return( ret );
         }
         /* this is a file */
-        *(rbuf + 2 * sizeof( u_int16_t )) = FILDIRBIT_ISFILE;
+        *(rbuf + 2 * sizeof( uint16_t )) = FILDIRBIT_ISFILE;
     }
-    *rbuflen = buflen + 3 * sizeof( u_int16_t );
+    *rbuflen = buflen + 3 * sizeof( uint16_t );
     fbitmap = htons( fbitmap );
     memcpy( rbuf, &fbitmap, sizeof( fbitmap ));
     rbuf += sizeof( fbitmap );
@@ -136,7 +136,7 @@ int afp_setfildirparams(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf
     struct vol  *vol;
     struct dir  *dir;
     struct path *path;
-    u_int16_t   vid, bitmap;
+    uint16_t   vid, bitmap;
     int     did, rc;
 
     *rbuflen = 0;
@@ -301,7 +301,7 @@ static int moveandrename(const struct vol *vol,
         }
     }
     if (!ad_metadata(oldunixname, adflags, adp)) {
-        u_int16_t bshort;
+        uint16_t bshort;
 
         ad_getattr(adp, &bshort);
         
@@ -402,9 +402,9 @@ int afp_rename(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size
     struct dir  *sdir;
     char        *oldname, *newname;
     struct path *path;
-    u_int32_t   did;
+    uint32_t   did;
     int         plen;
-    u_int16_t   vid;
+    uint16_t   vid;
     int         isdir = 0;
     int         rc;
 
@@ -478,7 +478,7 @@ int afp_delete(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size
     struct path         *s_path;
     char        *upath;
     int         did, rc;
-    u_int16_t       vid;
+    uint16_t       vid;
 
     *rbuflen = 0;
     ibuf += 2;
@@ -592,7 +592,7 @@ int afp_moveandrename(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U
     int     did;
     int     pdid;
     int         plen;
-    u_int16_t   vid;
+    uint16_t   vid;
     int         rc;
     int     sdir_fd = -1;
 
index e075945cc5253aa8d796790f029aab97db845aae..f2c42b4f10e8cb9436808630c97f40fd5a56eb1a 100644 (file)
@@ -35,7 +35,7 @@
 struct ofork *writtenfork;
 #endif
 
-static int getforkparams(struct ofork *ofork, u_int16_t bitmap, char *buf, size_t *buflen)
+static int getforkparams(struct ofork *ofork, uint16_t bitmap, char *buf, size_t *buflen)
 {
     struct path         path;
     struct stat     *st;
@@ -89,7 +89,7 @@ static int getforkparams(struct ofork *ofork, u_int16_t bitmap, char *buf, size_
 
 static off_t get_off_t(char **ibuf, int is64)
 {
-    u_int32_t             temp;
+    uint32_t             temp;
     off_t                 ret;
 
     ret = 0;
@@ -110,7 +110,7 @@ static off_t get_off_t(char **ibuf, int is64)
 
 static int set_off_t(off_t offset, char *rbuf, int is64)
 {
-    u_int32_t  temp;
+    uint32_t  temp;
     int        ret;
 
     ret = 0;
@@ -427,10 +427,10 @@ int afp_openfork(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf, si
         goto openfork_err;
     }
 
-    *rbuflen = buflen + 2 * sizeof( u_int16_t );
+    *rbuflen = buflen + 2 * sizeof( uint16_t );
     bitmap = htons( bitmap );
-    memcpy(rbuf, &bitmap, sizeof( u_int16_t ));
-    rbuf += sizeof( u_int16_t );
+    memcpy(rbuf, &bitmap, sizeof( uint16_t ));
+    rbuf += sizeof( uint16_t );
 
     /* check  WriteInhibit bit if we have a ressource fork
      * the test is done here, after some Mac trafic capture
@@ -494,7 +494,7 @@ int afp_setforkparams(AFPObj *obj _U_, char *ibuf, size_t ibuflen, char *rbuf _U
 {
     struct ofork    *ofork;
     off_t       size;
-    u_int16_t       ofrefnum, bitmap;
+    uint16_t       ofrefnum, bitmap;
     int                 err;
     int                 is64;
     int                 eid;
@@ -632,8 +632,8 @@ static int byte_lock(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf
     struct ofork    *ofork;
     off_t               offset, length;
     int                 eid;
-    u_int16_t       ofrefnum;
-    u_int8_t            flags;
+    uint16_t       ofrefnum;
+    uint8_t            flags;
     int                 lockop;
 
     *rbuflen = 0;
@@ -813,7 +813,7 @@ static int read_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, si
     off_t       offset, saveoff, reqcount, savereqcount;
     ssize_t     cc, err;
     int         eid, xlate = 0;
-    u_int16_t       ofrefnum;
+    uint16_t       ofrefnum;
     u_char      nlmask, nlchar;
 
     ibuf += 2;
@@ -977,7 +977,7 @@ int afp_read_ext(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rb
 int afp_flush(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen)
 {
     struct vol *vol;
-    u_int16_t vid;
+    uint16_t vid;
 
     *rbuflen = 0;
     ibuf += 2;
@@ -994,7 +994,7 @@ int afp_flush(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, s
 int afp_flushfork(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen)
 {
     struct ofork    *ofork;
-    u_int16_t       ofrefnum;
+    uint16_t       ofrefnum;
 
     *rbuflen = 0;
     ibuf += 2;
@@ -1026,7 +1026,7 @@ int afp_flushfork(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U
 int afp_syncfork(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen)
 {
     struct ofork        *ofork;
-    u_int16_t           ofrefnum;
+    uint16_t           ofrefnum;
 
     *rbuflen = 0;
     ibuf += 2;
@@ -1097,7 +1097,7 @@ int flushfork(struct ofork *ofork)
 int afp_closefork(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen)
 {
     struct ofork    *ofork;
-    u_int16_t       ofrefnum;
+    uint16_t       ofrefnum;
 
     *rbuflen = 0;
     ibuf += 2;
@@ -1169,7 +1169,7 @@ static int write_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, s
     struct ofork    *ofork;
     off_t               offset, saveoff, reqcount;
     int             endflag, eid, xlate = 0, err = AFP_OK;
-    u_int16_t       ofrefnum;
+    uint16_t       ofrefnum;
     ssize_t             cc;
 
     /* figure out parameters */
@@ -1342,7 +1342,7 @@ int afp_getforkparams(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbu
 {
     struct ofork    *ofork;
     int             ret;
-    u_int16_t       ofrefnum, bitmap;
+    uint16_t       ofrefnum, bitmap;
     size_t          buflen;
     ibuf += 2;
     memcpy(&ofrefnum, ibuf, sizeof( ofrefnum ));
index 7aaff0f5a26acbbae6f115caa4736da5571723d8..9355c5e545d3a3bf3ede322c4af737dcdfed1b40 100644 (file)
@@ -54,11 +54,11 @@ extern struct ofork *writtenfork;
 #define of_name(a) (a)->of_ad->ad_m_name
 /* in ofork.c */
 extern struct ofork *of_alloc    (struct vol *, struct dir *,
-                                                      char *, u_int16_t *, const int,
+                                                      char *, uint16_t *, const int,
                                                       struct adouble *,
                                                       struct stat *);
 extern void         of_dealloc   (struct ofork *);
-extern struct ofork *of_find     (const u_int16_t);
+extern struct ofork *of_find     (const uint16_t);
 extern struct ofork *of_findname (struct path *);
 extern int          of_rename    (const struct vol *,
                                           struct ofork *,
index cb2b60ed0c15e5bd63bb0cb1ca1c66e7a02089ba..e4cbd311d9022094e6f74a109cbc91e509a55e73 100644 (file)
@@ -30,7 +30,7 @@ static size_t mangle_extension(const struct vol *vol, const char* uname,
   char *p = strrchr(uname, '.');
 
   if (p && p != uname) {
-    u_int16_t flags = CONV_FORCE | CONV_UNESCAPEHEX;
+    uint16_t flags = CONV_FORCE | CONV_UNESCAPEHEX;
     size_t len = convert_charset(vol->v_volcharset, charset,
                                 vol->v_maccharset, p, strlen(p),
                                 extension, MAX_EXT_LENGTH, &flags);
@@ -42,7 +42,7 @@ static size_t mangle_extension(const struct vol *vol, const char* uname,
 
 static char *demangle_checks(const struct vol *vol, char* uname, char * mfilename, size_t prefix, char * ext)
 {
-    u_int16_t flags;
+    uint16_t flags;
     static char buffer[MAXPATHLEN +2];  /* for convert_charset dest_len parameter +2 */
     size_t len;
     size_t mfilenamelen;
@@ -136,7 +136,7 @@ private_demangle(const struct vol *vol, char *mfilename, cnid_t did, cnid_t *osx
 {
     char *t;
     char *u_name;
-    u_int32_t id, file_id;
+    uint32_t id, file_id;
     static char buffer[12 + MAXPATHLEN + 1];
     int len = 12 + MAXPATHLEN + 1;
     struct dir *dir;
@@ -266,7 +266,7 @@ mangle(const struct vol *vol, char *filename, size_t filenamelen, char *uname, c
     k = sprintf(mangle_suffix, "%c%X", MANGLE_CHAR, ntohl(id));
 
     if (filenamelen + k + ext_len > maxlen) {
-      u_int16_t opt = CONV_FORCE | CONV_UNESCAPEHEX;
+      uint16_t opt = CONV_FORCE | CONV_UNESCAPEHEX;
       size_t n = convert_charset(vol->v_volcharset,
                                 (flags & 2) ? CH_UTF8_MAC : vol->v_maccharset,
                                 vol->v_maccharset, uname, strlen(uname),
index e48585e353b1d2ab4dff76cc3ebb46812853a8ca..ba72e38206dd0aa7d06c20a49c3111b0cf1b5e15 100644 (file)
@@ -42,7 +42,7 @@ void readmessage(AFPObj *obj)
     int rc;
     static int c;
     uid_t euid;
-    u_int32_t maxmsgsize;
+    uint32_t maxmsgsize;
 
     maxmsgsize = (obj->proto == AFPPROTO_DSI)?MIN(MAX(((DSI*)obj->handle)->attn_quantum, MAXMESGSIZE),MAXPATHLEN):MAXMESGSIZE;
 
@@ -113,8 +113,8 @@ void readmessage(AFPObj *obj)
 int afp_getsrvrmesg(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t *rbuflen)
 {
     char *message;
-    u_int16_t type, bitmap;
-    u_int16_t msgsize;
+    uint16_t type, bitmap;
+    uint16_t msgsize;
     size_t outlen = 0;
     size_t msglen = 0;
     int utf8 = 0;
index 60622733cd79ba3085b6f3003bbf4bd611f25d63..90b84c21e5cf1a16dd7de8724130c1b1dca04f3b 100644 (file)
@@ -91,7 +91,7 @@ callaurpc(struct vol *vol,
 #define GQR_RQUOTA getquota_rslt_u.gqr_rquota
 #endif /* USE_OLD_RQUOTA */
 
-int getnfsquota(struct vol *vol, const int uid, const u_int32_t bsize,
+int getnfsquota(struct vol *vol, const int uid, const uint32_t bsize,
                 struct dqblk *dqp)
 {
 
index 4e0eb886901718f4a0a4f79d183714e1a1f14ea2..02e250a448996d8f0b96e786b7392d03699df4a7 100644 (file)
@@ -115,13 +115,13 @@ struct ofork *
 of_alloc(struct vol *vol,
          struct dir    *dir,
          char      *path,
-         u_int16_t     *ofrefnum,
+         uint16_t     *ofrefnum,
          const int      eid,
          struct adouble *ad,
          struct stat    *st)
 {
     struct ofork        *of;
-    u_int16_t       refnum, of_refnum;
+    uint16_t       refnum, of_refnum;
 
     int         i;
 
@@ -220,7 +220,7 @@ of_alloc(struct vol *vol,
     return( of );
 }
 
-struct ofork *of_find(const u_int16_t ofrefnum )
+struct ofork *of_find(const uint16_t ofrefnum )
 {
     if (!oforks || !nforks)
         return NULL;
index 1a04ada07511050f9ad1bfe847ba0f7ab4ec0f17..66c4948999ce84e00c9a16726afdc5989b12f51f 100644 (file)
@@ -185,13 +185,13 @@ static int get_linux_xfs_quota(int what, char *path, uid_t euser_id, struct dqbl
        if ((ret = quotactl(QCMD(Q_XGETQUOTA,(what ? GRPQUOTA : USRQUOTA)), path, euser_id, (caddr_t)&D)))
                return ret;
 
-       dqb->bsize = (u_int64_t)512;
-        dqb->dqb_bsoftlimit  = (u_int64_t)D.d_blk_softlimit;
-        dqb->dqb_bhardlimit  = (u_int64_t)D.d_blk_hardlimit;
-        dqb->dqb_ihardlimit  = (u_int64_t)D.d_ino_hardlimit;
-        dqb->dqb_isoftlimit  = (u_int64_t)D.d_ino_softlimit;
-        dqb->dqb_curinodes   = (u_int64_t)D.d_icount;
-        dqb->dqb_curblocks   = (u_int64_t)D.d_bcount; 
+       dqb->bsize = (uint64_t)512;
+        dqb->dqb_bsoftlimit  = (uint64_t)D.d_blk_softlimit;
+        dqb->dqb_bhardlimit  = (uint64_t)D.d_blk_hardlimit;
+        dqb->dqb_ihardlimit  = (uint64_t)D.d_ino_hardlimit;
+        dqb->dqb_isoftlimit  = (uint64_t)D.d_ino_softlimit;
+        dqb->dqb_curinodes   = (uint64_t)D.d_icount;
+        dqb->dqb_curblocks   = (uint64_t)D.d_bcount; 
 #endif
        return ret;
 }
@@ -500,12 +500,12 @@ static int getfsquota(struct vol *vol, const int uid, struct dqblk *dq)
     if( 
         /* if overquota, free space is 0 otherwise hard-current */
         ( overquota( dq ) ? 0 : ( dq->dqb_bhardlimit ? dq->dqb_bhardlimit - 
-                                  dq->dqb_curblocks : ~((u_int64_t) 0) ) )
+                                  dq->dqb_curblocks : ~((uint64_t) 0) ) )
 
       >
         
         ( overquota( &dqg ) ? 0 : ( dqg.dqb_bhardlimit ? dqg.dqb_bhardlimit - 
-                                    dqg.dqb_curblocks : ~((u_int64_t) 0) ) )
+                                    dqg.dqb_curblocks : ~((uint64_t) 0) ) )
 
       ) /* if */
     {
@@ -525,7 +525,7 @@ static int getfsquota(struct vol *vol, const int uid, struct dqblk *dq)
 }
 
 
-static int getquota( struct vol *vol, struct dqblk *dq, const u_int32_t bsize)
+static int getquota( struct vol *vol, struct dqblk *dq, const uint32_t bsize)
 {
     char *p;
 
@@ -663,9 +663,9 @@ static int overquota( struct dqblk *dqblk)
 #define tobytes(a, b)  dbtob((VolSpace) (a))
 #endif
 
-int uquota_getvolspace( struct vol *vol, VolSpace *bfree, VolSpace *btotal, const u_int32_t bsize)
+int uquota_getvolspace( struct vol *vol, VolSpace *bfree, VolSpace *btotal, const uint32_t bsize)
 {
-       u_int64_t this_bsize;
+       uint64_t this_bsize;
        struct dqblk dqblk;
 
        this_bsize = bsize;
index 0782228ad952c3b99c31274cea6abacbf44489b0..b24748a14fa018d23a75409d06c04caf328b6e83 100644 (file)
@@ -74,7 +74,7 @@ static int status_server(char *data, const char *server, const struct afp_option
     char                *start = data;
     char                *Obj, *Type, *Zone;
     char               buf[32];
-    u_int16_t           status;
+    uint16_t           status;
     size_t             len;
 
     /* make room for all offsets before server name */
@@ -119,7 +119,7 @@ static int status_server(char *data, const char *server, const struct afp_option
 static void status_machine(char *data)
 {
     char                *start = data;
-    u_int16_t           status;
+    uint16_t           status;
     int                        len;
 #ifdef AFS
     const char         *machine = "afs";
@@ -142,11 +142,11 @@ static void status_machine(char *data)
 }
 
 /* server signature is a 16-byte quantity */
-static u_int16_t status_signature(char *data, int *servoffset,
+static uint16_t status_signature(char *data, int *servoffset,
                                   const struct afp_options *options)
 {
     char                 *status;
-    u_int16_t            offset, sigoff;
+    uint16_t            offset, sigoff;
 
     status = data;
 
@@ -173,7 +173,7 @@ static size_t status_netaddress(char *data, int *servoffset,
                              const struct afp_options *options)
 {
     char               *begin;
-    u_int16_t          offset;
+    uint16_t          offset;
     size_t             addresses_len = 0;
 
     begin = data;
@@ -281,7 +281,7 @@ static size_t status_directorynames(char *data, int *diroffset,
                                 const struct afp_options *options)
 {
     char *begin = data;
-    u_int16_t offset;
+    uint16_t offset;
     memcpy(&offset, data + *diroffset, sizeof(offset));
     offset = ntohs(offset);
     data += offset;
@@ -321,9 +321,9 @@ static size_t status_directorynames(char *data, int *diroffset,
     }
 
     /* Calculate and store offset for UTF8ServerName */
-    *diroffset += sizeof(u_int16_t);
+    *diroffset += sizeof(uint16_t);
     offset = htons(data - begin);
-    memcpy(begin + *diroffset, &offset, sizeof(u_int16_t));
+    memcpy(begin + *diroffset, &offset, sizeof(uint16_t));
 
     /* return length of buffer */
     return (data - begin);
@@ -334,10 +334,10 @@ static size_t status_utf8servername(char *data, int *nameoffset,
                                 const struct afp_options *options)
 {
     char *Obj, *Type, *Zone;
-    u_int16_t namelen;
+    uint16_t namelen;
     size_t len;
     char *begin = data;
-    u_int16_t offset, status;
+    uint16_t offset, status;
 
     memcpy(&offset, data + *nameoffset, sizeof(offset));
     offset = ntohs(offset);
@@ -367,7 +367,7 @@ static size_t status_utf8servername(char *data, int *nameoffset,
        data += sizeof(namelen);
        data += len;
        offset = htons(offset);
-       memcpy(begin + *nameoffset, &offset, sizeof(u_int16_t));
+       memcpy(begin + *nameoffset, &offset, sizeof(uint16_t));
     }
 
     /* return length of buffer */
@@ -381,7 +381,7 @@ static void status_icon(char *data, const unsigned char *icondata,
 {
     char                *start = data;
     char                *sigdata = data + sigoffset;
-    u_int16_t          ret, status;
+    uint16_t           ret, status;
 
     memcpy(&status, start + AFPSTATUS_ICONOFF, sizeof(status));
     if ( icondata == NULL ) {
index 0f5afb41c4a4e0f15e67f771d543e34fa5731a24..2abf36980d601f31ca381fe937fb71a99cbedc77 100644 (file)
@@ -296,7 +296,7 @@ int uam_checkuser(const struct passwd *pwd)
 
 int uam_random_string (AFPObj *obj, char *buf, int len)
 {
-    u_int32_t result;
+    uint32_t result;
     int ret;
     int fd;
 
index 232fb30349e328b366bdfd1758c6b3c1a38645b5..e1358cc6100faa3f8ee8a2502b5bad2631194bd8 100644 (file)
@@ -33,7 +33,7 @@
 /*
  * Get the free space on a partition.
  */
-int ustatfs_getvolspace(const struct vol *vol, VolSpace *bfree, VolSpace *btotal, u_int32_t *bsize)
+int ustatfs_getvolspace(const struct vol *vol, VolSpace *bfree, VolSpace *btotal, uint32_t *bsize)
 {
     VolSpace maxVolSpace = (~(VolSpace)0);
 
index d2987706e3b8beaffdd11c00f06fd27548b15081..a3d234ba9abc378a3442e7635b11313a5f1544fe 100644 (file)
@@ -202,11 +202,11 @@ extern long quotactl (unsigned int, const char *, int, caddr_t);
 
 #endif /* linux */
 
-extern int getnfsquota (struct vol *, const int, const u_int32_t,
-                                struct dqblk *);
+extern int getnfsquota (struct vol *, const int, const uint32_t,
+                        struct dqblk *);
 
 extern int uquota_getvolspace (struct vol *, VolSpace *, VolSpace *,
-                                       const u_int32_t);
+                               const uint32_t);
 #endif /* NO_QUOTA_SUPPORT */
 
 extern struct afp_options default_options;
index 1b442093239c31fc8dc190a65625b591868d0fca..9e09334dc95d7a23b1559bffc07334508aa74756 100644 (file)
@@ -64,7 +64,7 @@ extern int afprun(int root, char *cmd, int *outfd);
 struct vol *current_vol;        /* last volume from getvolbyvid() */
 
 static struct vol *Volumes = NULL;
-static u_int16_t    lastvid = 0;
+static uint16_t    lastvid = 0;
 static char     *Trash = "\02\024Network Trash Folder";
 
 static struct extmap    *Extmap = NULL, *Defextmap = NULL;
@@ -535,7 +535,7 @@ static int creatvol(AFPObj *obj, struct passwd *pwd,
     char        tmpname[AFPVOL_U8MNAMELEN+1];
     ucs2_t      u8mtmpname[(AFPVOL_U8MNAMELEN+1)*2], mactmpname[(AFPVOL_MACNAMELEN+1)*2];
     char        suffix[6]; /* max is #FFFF */
-    u_int16_t   flags;
+    uint16_t   flags;
 
     LOG(log_debug, logtype_afpd, "createvol: Volume '%s'", name);
 
@@ -1404,11 +1404,11 @@ static int getused(struct vol *vol)
 }
 
 static int getvolspace(struct vol *vol,
-                       u_int32_t *bfree, u_int32_t *btotal,
-                       VolSpace *xbfree, VolSpace *xbtotal, u_int32_t *bsize)
+                       uint32_t *bfree, uint32_t *btotal,
+                       VolSpace *xbfree, VolSpace *xbtotal, uint32_t *bsize)
 {
     int         spaceflag, rc;
-    u_int32_t   maxsize;
+    uint32_t   maxsize;
     VolSpace    used;
 #ifndef NO_QUOTA_SUPPORT
     VolSpace    qfree, qtotal;
@@ -1483,7 +1483,7 @@ void vol_fce_tm_event(void)
  * set volume creation date
  * avoid duplicate, well at least it tries
  */
-static void vol_setdate(u_int16_t id, struct adouble *adp, time_t date)
+static void vol_setdate(uint16_t id, struct adouble *adp, time_t date)
 {
     struct vol  *volume;
     struct vol  *vol = Volumes;
@@ -1502,13 +1502,13 @@ static void vol_setdate(u_int16_t id, struct adouble *adp, time_t date)
 }
 
 /* ----------------------- */
-static int getvolparams( u_int16_t bitmap, struct vol *vol, struct stat *st, char *buf, size_t *buflen)
+static int getvolparams( uint16_t bitmap, struct vol *vol, struct stat *st, char *buf, size_t *buflen)
 {
     struct adouble  ad;
     int         bit = 0, isad = 1;
-    u_int32_t       aint;
+    uint32_t       aint;
     u_short     ashort;
-    u_int32_t       bfree, btotal, bsize;
+    uint32_t       bfree, btotal, bsize;
     VolSpace            xbfree, xbtotal; /* extended bytes */
     char        *data, *nameoff = NULL;
     char                *slash;
@@ -1665,7 +1665,7 @@ static int getvolparams( u_int16_t bitmap, struct vol *vol, struct stat *st, cha
 
         case VOLPBIT_NAME :
             nameoff = data;
-            data += sizeof( u_int16_t );
+            data += sizeof( uint16_t );
             break;
 
         case VOLPBIT_BSIZE:  /* block size */
@@ -1704,7 +1704,7 @@ static int getvolparams( u_int16_t bitmap, struct vol *vol, struct stat *st, cha
 }
 
 /* ------------------------- */
-static int stat_vol(u_int16_t bitmap, struct vol *vol, char *rbuf, size_t *rbuflen)
+static int stat_vol(uint16_t bitmap, struct vol *vol, char *rbuf, size_t *rbuflen)
 {
     struct stat st;
     int     ret;
@@ -1874,8 +1874,8 @@ int afp_getsrvrparms(AFPObj *obj, char *ibuf _U_, size_t ibuflen _U_, char *rbuf
         return AFPERR_PARAM;
     }
     tv.tv_sec = AD_DATE_FROM_UNIX(tv.tv_sec);
-    memcpy(data, &tv.tv_sec, sizeof( u_int32_t));
-    data += sizeof( u_int32_t);
+    memcpy(data, &tv.tv_sec, sizeof( uint32_t));
+    data += sizeof( uint32_t);
     *data = vcnt;
     return( AFP_OK );
 }
@@ -2045,7 +2045,7 @@ int afp_openvol(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t
     struct dir  *dir;
     int     len, ret;
     size_t  namelen;
-    u_int16_t   bitmap;
+    uint16_t   bitmap;
     char        path[ MAXPATHLEN + 1];
     char        *vol_uname;
     char        *vol_mname;
@@ -2325,7 +2325,7 @@ static void deletevol(struct vol *vol)
 int afp_closevol(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen)
 {
     struct vol  *vol;
-    u_int16_t   vid;
+    uint16_t   vid;
 
     *rbuflen = 0;
     ibuf += 2;
@@ -2341,7 +2341,7 @@ int afp_closevol(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf _U_
 }
 
 /* ------------------------- */
-struct vol *getvolbyvid(const u_int16_t vid )
+struct vol *getvolbyvid(const uint16_t vid )
 {
     struct vol  *vol;
 
@@ -2461,7 +2461,7 @@ void setvoltime(AFPObj *obj, struct vol *vol)
 int afp_getvolparams(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_,char *rbuf, size_t *rbuflen)
 {
     struct vol  *vol;
-    u_int16_t   vid, bitmap;
+    uint16_t   vid, bitmap;
 
     ibuf += 2;
     memcpy(&vid, ibuf, sizeof( vid ));
@@ -2482,8 +2482,8 @@ int afp_setvolparams(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf
 {
     struct adouble ad;
     struct vol  *vol;
-    u_int16_t   vid, bitmap;
-    u_int32_t   aint;
+    uint16_t   vid, bitmap;
+    uint32_t   aint;
 
     ibuf += 2;
     *rbuflen = 0;
@@ -2556,7 +2556,7 @@ static int create_special_folder (const struct vol *vol, const struct _special_f
 {
     char        *p,*q,*r;
     struct adouble  ad;
-    u_int16_t   attr;
+    uint16_t   attr;
     struct stat st;
     int     ret;
 
index f06dcd7bf2f4c33de5a42dbce9fdd53b5a941c91..0a9f0f01fedba48e3e23fdc8566bee32c67e281f 100644 (file)
 #include <atalk/unicode.h>
 #include <atalk/globals.h>
 
-extern struct vol       *getvolbyvid (const u_int16_t);
+extern struct vol       *getvolbyvid (const uint16_t);
 extern int              ustatfs_getvolspace (const struct vol *,
             VolSpace *, VolSpace *,
-            u_int32_t *);
+            uint32_t *);
 extern void             setvoltime (AFPObj *, struct vol *);
 extern int              pollvoltime (AFPObj *);
 extern void             load_volumes (AFPObj *obj);
index b95e1587f7e81dc56fcaf1fd9039ac3bfb5a90f4..f2976b45fb83d24af1edd6e32577a6bc876315dd 100644 (file)
@@ -46,7 +46,7 @@ static gcry_mpi_t p, g, Ra;
 static gcry_mpi_t serverNonce;
 static char *K_MD5hash = NULL;
 static int K_hash_len;
-static u_int16_t ID;
+static uint16_t ID;
 
 /* The initialization vectors for CAST128 are fixed by Apple. */
 static unsigned char dhx_c2siv[] = { 'L', 'W', 'a', 'l', 'l', 'a', 'c', 'e' };
@@ -267,7 +267,7 @@ static int dhx2_setup(void *obj, char *ibuf _U_, size_t ibuflen _U_,
 
     /* Session ID first */
     ID = dhxhash(obj);
-    *(u_int16_t *)rbuf = htons(ID);
+    *(uint16_t *)rbuf = htons(ID);
     rbuf += 2;
     *rbuflen += 2;
 
@@ -281,7 +281,7 @@ static int dhx2_setup(void *obj, char *ibuf _U_, size_t ibuflen _U_,
     *rbuflen += 4;
 
     /* len = length of p = PRIMEBITS/8 */
-    *(u_int16_t *)rbuf = htons((u_int16_t) PRIMEBITS/8);
+    *(uint16_t *)rbuf = htons((uint16_t) PRIMEBITS/8);
     rbuf += 2;
     *rbuflen += 2;
 
@@ -365,7 +365,7 @@ static int pam_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
 {
     char *username;
     size_t len, ulen;
-    u_int16_t  temp16;
+    uint16_t  temp16;
 
     *rbuflen = 0;
 
@@ -488,7 +488,7 @@ static int logincont1(void *obj _U_, char *ibuf, size_t ibuflen, char *rbuf, siz
     /* ---- Start building reply packet ---- */
 
     /* Session ID + 1 first */
-    *(u_int16_t *)rbuf = htons(ID+1);
+    *(uint16_t *)rbuf = htons(ID+1);
     rbuf += 2;
     *rbuflen += 2;
 
@@ -669,11 +669,11 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
                          char *ibuf, size_t ibuflen,
                          char *rbuf, size_t *rbuflen)
 {
-    u_int16_t retID;
+    uint16_t retID;
     int ret;
 
     /* check for session id */
-    retID = ntohs(*(u_int16_t *)ibuf);
+    retID = ntohs(*(uint16_t *)ibuf);
     if (retID == ID)
         ret = logincont1(obj, ibuf, ibuflen, rbuf, rbuflen);
     else if (retID == ID+1)
index 52c1d16d07ef985a6ac94abfbdabe18b75b1c388..c7ac24342aa80aaead5b50d8d80ae286cc5952d2 100644 (file)
@@ -51,7 +51,7 @@ static gcry_mpi_t p, Ra;
 static gcry_mpi_t serverNonce;
 static char *K_MD5hash = NULL;
 static int K_hash_len;
-static u_int16_t ID;
+static uint16_t ID;
 
 /* The initialization vectors for CAST128 are fixed by Apple. */
 static unsigned char dhx_c2siv[] = { 'L', 'W', 'a', 'l', 'l', 'a', 'c', 'e' };
@@ -207,7 +207,7 @@ static int dhx2_setup(void *obj, char *ibuf _U_, size_t ibuflen _U_,
 
     /* Session ID first */
     ID = dhxhash(obj);
-    *(u_int16_t *)rbuf = htons(ID);
+    *(uint16_t *)rbuf = htons(ID);
     rbuf += 2;
     *rbuflen += 2;
 
@@ -221,7 +221,7 @@ static int dhx2_setup(void *obj, char *ibuf _U_, size_t ibuflen _U_,
     *rbuflen += 4;
 
     /* len = length of p = PRIMEBITS/8 */
-    *(u_int16_t *)rbuf = htons((u_int16_t) PRIMEBITS/8);
+    *(uint16_t *)rbuf = htons((uint16_t) PRIMEBITS/8);
     rbuf += 2;
     *rbuflen += 2;
 
@@ -305,7 +305,7 @@ static int passwd_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
 {
     char *username;
     size_t len, ulen;
-    u_int16_t  temp16;
+    uint16_t  temp16;
 
     *rbuflen = 0;
 
@@ -433,7 +433,7 @@ static int logincont1(void *obj _U_, struct passwd **uam_pwd _U_,
     /* ---- Start building reply packet ---- */
 
     /* Session ID + 1 first */
-    *(u_int16_t *)rbuf = htons(ID+1);
+    *(uint16_t *)rbuf = htons(ID+1);
     rbuf += 2;
     *rbuflen += 2;
 
@@ -580,11 +580,11 @@ static int passwd_logincont(void *obj, struct passwd **uam_pwd,
                             char *ibuf, size_t ibuflen,
                             char *rbuf, size_t *rbuflen)
 {
-    u_int16_t retID;
+    uint16_t retID;
     int ret;
 
     /* check for session id */
-    retID = ntohs(*(u_int16_t *)ibuf);
+    retID = ntohs(*(uint16_t *)ibuf);
     if (retID == ID)
         ret = logincont1(obj, uam_pwd, ibuf, ibuflen, rbuf, rbuflen);
     else if (retID == ID+1)
index bba519de08b50bd5cf3f226063524b22d0087d02..7bad2fa0472ef3a833ca6792c28327158014ac3c 100644 (file)
 /* the secret key */
 static CAST_KEY castkey;
 static struct passwd *dhxpwd;
-static u_int8_t randbuf[KEYSIZE];
+static uint8_t randbuf[KEYSIZE];
 
 /* diffie-hellman bits */
 static unsigned char msg2_iv[] = "CJalbert";
 static unsigned char msg3_iv[] = "LWallace";
-static const u_int8_t p[] = {0xBA, 0x28, 0x73, 0xDF, 0xB0, 0x60, 0x57, 0xD4,
+static const uint8_t p[] = {0xBA, 0x28, 0x73, 0xDF, 0xB0, 0x60, 0x57, 0xD4,
                             0x3F, 0x20, 0x24, 0x74, 0x4C, 0xEE, 0xE7, 0x5B};
-static const u_int8_t g = 0x07;
+static const uint8_t g = 0x07;
 
 
 /* Static variables used to communicate between the conversation function
@@ -187,7 +187,7 @@ static struct pam_conv PAM_conversation = {
 static int dhx_setup(void *obj, char *ibuf, size_t ibuflen _U_, 
                     char *rbuf, size_t *rbuflen)
 {
-    u_int16_t sessid;
+    uint16_t sessid;
     size_t i;
     BIGNUM *bn, *gbn, *pbn;
     DH *dh;
@@ -377,7 +377,7 @@ static int pam_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
     char *username;
     int len;
     size_t ulen;
-    u_int16_t  temp16;
+    uint16_t  temp16;
 
     *rbuflen = 0;
 
@@ -413,7 +413,7 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
 {
     const char *hostname;
     BIGNUM *bn1, *bn2, *bn3;
-    u_int16_t sessid;
+    uint16_t sessid;
     int err, PAM_error;
 
     *rbuflen = 0;
@@ -573,7 +573,7 @@ static int pam_changepw(void *obj, char *username,
     char *hostname;
     pam_handle_t *lpamh;
     uid_t uid;
-    u_int16_t sessid;
+    uint16_t sessid;
     int PAM_error;
 
     if (ibuflen < sizeof(sessid)) {
index 76dd7ddd21e9e6f6bb7a666ed428c9c478326091..8b772b6c449ef465f950f6a82ef9b330090d65c3 100644 (file)
@@ -59,7 +59,7 @@
 /* the secret key */
 static CAST_KEY castkey;
 static struct passwd *dhxpwd;
-static u_int8_t randbuf[16];
+static uint8_t randbuf[16];
 
 #ifdef TRU64
 #include <sia.h>
@@ -74,14 +74,14 @@ static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pw
                        char *rbuf, size_t *rbuflen)
 {
     unsigned char iv[] = "CJalbert";
-    u_int8_t p[] = {0xBA, 0x28, 0x73, 0xDF, 0xB0, 0x60, 0x57, 0xD4,
+    uint8_t p[] = {0xBA, 0x28, 0x73, 0xDF, 0xB0, 0x60, 0x57, 0xD4,
                    0x3F, 0x20, 0x24, 0x74, 0x4C, 0xEE, 0xE7, 0x5B };
-    u_int8_t g = 0x07;
+    uint8_t g = 0x07;
 #ifdef SHADOWPW
     struct spwd *sp;
 #endif /* SHADOWPW */
     BIGNUM *bn, *gbn, *pbn;
-    u_int16_t sessid;
+    uint16_t sessid;
     size_t i;
     DH *dh;
 
@@ -250,7 +250,7 @@ static int passwd_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
 {
     char       *username;
     size_t     len, ulen;
-    u_int16_t  temp16;
+    uint16_t  temp16;
 
     *rbuflen = 0;
     
@@ -280,7 +280,7 @@ static int passwd_logincont(void *obj, struct passwd **uam_pwd,
 #endif /* SHADOWPW */
     unsigned char iv[] = "LWallace";
     BIGNUM *bn1, *bn2, *bn3;
-    u_int16_t sessid;
+    uint16_t sessid;
     char *p;
     int err = AFPERR_NOTAUTH;
 
index 5596497e48d59a02e8ca05e9cb421ebf90de3de1..da0411f949c4ff3e0483a99df2430f4481813405 100644 (file)
@@ -410,7 +410,7 @@ static int do_gss_auth(void *obj, char *ibuf, int ticket_len,
         if (!ret) {
             /* FIXME: Is copying the authenticator really necessary?
                Where is this documented? */
-            u_int16_t auth_len = htons( authenticator_buff.length );
+            uint16_t auth_len = htons( authenticator_buff.length );
 
             /* copy the authenticator length into the reply buffer */
             memcpy( rbuf, &auth_len, sizeof(auth_len) );
@@ -443,7 +443,7 @@ static int gss_login(void *obj, struct passwd **uam_pwd,
                      char *rbuf, size_t *rbuflen)
 {
 
-    u_int16_t  temp16;
+    uint16_t  temp16;
 
     *rbuflen = 0;
 
@@ -461,9 +461,9 @@ static int gss_logincont(void *obj, struct passwd **uam_pwd,
                          char *rbuf, size_t *rbuflen)
 {
     struct passwd *pwd = NULL;
-    u_int16_t login_id;
+    uint16_t login_id;
     char *username;
-    u_int16_t ticket_len;
+    uint16_t ticket_len;
     char *p;
     int rblen;
     size_t userlen;
@@ -472,9 +472,9 @@ static int gss_logincont(void *obj, struct passwd **uam_pwd,
     /* Apple's AFP 3.1 documentation specifies that this command
      * takes the following format:
      * pad (byte)
-     * id returned in LoginExt response (u_int16_t)
+     * id returned in LoginExt response (uint16_t)
      * username (format unspecified) padded, when necessary, to end on an even boundary
-     * ticket length (u_int16_t)
+     * ticket length (uint16_t)
      * ticket
      */
 
@@ -482,14 +482,14 @@ static int gss_logincont(void *obj, struct passwd **uam_pwd,
      * format of this request is as follows:
      * pad (byte) [consumed before login_ext is called]
      * ?? (byte) - always observed to be 0
-     * id returned in LoginExt response (u_int16_t)
+     * id returned in LoginExt response (uint16_t)
      * username, encoding unspecified, null terminated C string,
      *   padded when the terminating null is an even numbered byte.
      *   The packet is formated such that the username begins on an
      *   odd numbered byte. Eg if the username is 3 characters and the
      *   terminating null makes 4, expect to pad the the result.
      *   The encoding of this string is unknown.
-     * ticket length (u_int16_t)
+     * ticket length (uint16_t)
      * ticket
      */
 
@@ -579,7 +579,7 @@ static int gss_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
                          char *ibuf, size_t ibuflen,
                          char *rbuf, size_t *rbuflen)
 {
-    u_int16_t  temp16;
+    uint16_t  temp16;
 
     *rbuflen = 0;
 
index a0e5335ad16a6322d9549812bba203f5f45898a6..6f15ac0a30c660bbdec3939e66b0059e06643f5f 100644 (file)
@@ -239,7 +239,7 @@ static int pam_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
 {
     char *username; 
     size_t  len, ulen;
-    u_int16_t  temp16;
+    uint16_t  temp16;
 
     *rbuflen = 0;
 
index 19571aa77958c30c936b9b9e52facfbda31dfc5d..72d024d2b521dc70b257f2f1e71c3e20d4e1e02a 100644 (file)
@@ -185,7 +185,7 @@ static int passwd_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
 {
     char       *username;
     size_t     len, ulen;
-    u_int16_t  temp16;
+    uint16_t  temp16;
 
     *rbuflen = 0;
 
index e3892573f22ddf7e43cb8c1025dd159755f1100c..22aa8ae4d3edb60b64e63c20ad04c2aa0c5466d2 100644 (file)
@@ -53,7 +53,7 @@
 /* the secret key */
 static struct passwd *pgppwd;
 static CAST_KEY castkey;
-static u_int8_t randbuf[16];
+static uint8_t randbuf[16];
 
 /* pgp passwd */
 static int pgp_login(void *obj, struct passwd **uam_pwd,
@@ -109,7 +109,7 @@ static int pgp_logincont(void *obj, struct passwd **uam_pwd,
 {
        unsigned char iv[] = "RJscorat";
     BIGNUM *bn1, *bn2, *bn3;
-    u_int16_t sessid;
+    uint16_t sessid;
     char *p;
 
     *rbuflen = 0;
index 866e73548dd8cadd2cac5ce66247d8146b3ded0c..301fdd0ff4cb69d48fe7e1f81d7572a954c7dfea 100644 (file)
@@ -37,7 +37,7 @@
 static C_Block         seskey;
 static Key_schedule    seskeysched;
 static struct passwd   *randpwd;
-static u_int8_t         randbuf[8];
+static uint8_t         randbuf[8];
 
 /* hash to a 16-bit number. this will generate completely harmless 
  * warnings on 64-bit machines. */
@@ -123,7 +123,7 @@ static int afppasswd(const struct passwd *pwd,
                     unsigned char *passwd, int len, 
                     const int set)
 {
-  u_int8_t key[DES_KEY_SZ*2];
+  uint8_t key[DES_KEY_SZ*2];
   char buf[MAXPATHLEN + 1], *p;
   Key_schedule schedule;
   FILE *fp;
@@ -284,7 +284,7 @@ static int rand_login(void *obj, char *username, int ulen, struct passwd **uam_p
 {
 
   char *passwdfile;
-  u_int16_t sessid;
+  uint16_t sessid;
   size_t len;
   int err;
  
@@ -329,7 +329,7 @@ static int randnum_logincont(void *obj, struct passwd **uam_pwd,
                             char *ibuf, size_t ibuflen _U_, 
                             char *rbuf _U_, size_t *rbuflen)
 {
-  u_int16_t sessid;
+  uint16_t sessid;
 
   *rbuflen = 0;
 
@@ -368,7 +368,7 @@ static int rand2num_logincont(void *obj, struct passwd **uam_pwd,
                              char *ibuf, size_t ibuflen _U_, 
                              char *rbuf, size_t *rbuflen)
 {
-  u_int16_t sessid;
+  uint16_t sessid;
   unsigned int i;
 
   *rbuflen = 0;
@@ -511,7 +511,7 @@ static int randnum_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
 {
     char       *username;
     size_t     len, ulen;
-    u_int16_t  temp16;
+    uint16_t  temp16;
 
     *rbuflen = 0;
 
index 8e0b11e15a60e13ec935814f382c08fe7d6faf49..5de2b4ebf169fdf6c7794943352e5bbf1408832c 100644 (file)
 
 #define RFORK_EA_ALLOCSIZE (128*1024) /* 128k */
 
-typedef u_int32_t cnid_t;
+typedef uint32_t cnid_t;
 
 struct ad_entry {
     uint32_t   ade_off;
@@ -185,8 +185,8 @@ struct adouble_fops {
 };
 
 struct adouble {
-    u_int32_t           ad_magic;         /* Official adouble magic                   */
-    u_int32_t           ad_version;       /* Official adouble version number          */
+    uint32_t            ad_magic;         /* Official adouble magic                   */
+    uint32_t            ad_version;       /* Official adouble version number          */
     char                ad_filler[16];
     struct ad_entry     ad_eid[ADEID_MAX];
     struct ad_fd        ad_data_fork;     /* the data fork                            */
@@ -441,8 +441,8 @@ extern int       ad_setattr(const struct adouble *, uint16_t);
 extern int       ad_getattr(const struct adouble *, uint16_t *);
 extern int       ad_setname(struct adouble *, const char *);
 extern int       ad_setid(struct adouble *, dev_t dev, ino_t ino, uint32_t, uint32_t, const void *);
-extern u_int32_t ad_getid(struct adouble *, dev_t, ino_t, cnid_t, const void *);
-extern u_int32_t ad_forcegetid(struct adouble *adp);
+extern uint32_t  ad_getid(struct adouble *, dev_t, ino_t, cnid_t, const void *);
+extern uint32_t  ad_forcegetid(struct adouble *adp);
 
 #ifdef WITH_SENDFILE
 extern int ad_readfile_init(const struct adouble *ad, int eid, off_t *off, int end);
index ec9238166933325d7bf3a11b0858daf930bcbabf..1681c23aecc35a54c6975d5d77e3a234c49b45d8 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <sys/types.h>
 
-typedef u_int16_t AFPUserBytes;
+typedef uint16_t AFPUserBytes;
 
 /* protocols */
 #define AFPPROTO_ASP           1
index 2c673fbcccf2c63e77d088982e1203ae3e13e90c..2d3aa062b8b601c4ac016e4aa59d5d672e8e05c6 100644 (file)
@@ -49,7 +49,7 @@
  * This is instance of CNID database object.
  */
 struct _cnid_db {
-    u_int32_t flags;             /* Flags describing some CNID backend aspects. */
+    uint32_t flags;             /* Flags describing some CNID backend aspects. */
     char *volpath;               /* Volume path this particular CNID db refers to. */
     void *_private;              /* back-end speficic data */
 
@@ -91,7 +91,7 @@ struct _cnid_module {
     char *name;
     struct list_head db_list;   /* CNID modules are also stored on a bidirectional list. */
     struct _cnid_db *(*cnid_open)(struct cnid_open_args *args);
-    u_int32_t flags;            /* Flags describing some CNID backend aspects. */
+    uint32_t flags;            /* Flags describing some CNID backend aspects. */
 
 };
 typedef struct _cnid_module cnid_module;
index e1464125559be481d431168b3541f29394bc4200..d7484e42088d7c69ab71326f96d71c1d093bea86 100644 (file)
@@ -56,7 +56,7 @@ struct cnid_dbd_rply {
 };
 
 typedef struct CNID_private {
-    u_int32_t magic;
+    uint32_t magic;
     char      db_dir[MAXPATHLEN + 1]; /* Database directory without /.AppleDB appended */
     char      *cnidserver;
     char      *cnidport;
index baaa960c9f031f838c025f4856231975ee406f23..dbe3eb5b95def90d132f04c3829d630aa508ce29 100644 (file)
@@ -42,12 +42,12 @@ typedef enum {
 
 #define DSI_BLOCKSIZ 16
 struct dsi_block {
-  u_int8_t dsi_flags;       /* packet type: request or reply */
-  u_int8_t dsi_command;     /* command */
-  u_int16_t dsi_requestID;  /* request ID */
-  u_int32_t dsi_code;       /* error code or data offset */
-  u_int32_t dsi_len;        /* total data length */
-  u_int32_t dsi_reserved;   /* reserved field */
+  uint8_t dsi_flags;       /* packet type: request or reply */
+  uint8_t dsi_command;     /* command */
+  uint16_t dsi_requestID;  /* request ID */
+  uint32_t dsi_code;       /* error code or data offset */
+  uint32_t dsi_len;        /* total data length */
+  uint32_t dsi_reserved;   /* reserved field */
 };
 
 #define DSI_CMDSIZ        8192 
@@ -67,10 +67,10 @@ typedef struct DSI {
   int      msg_request;   /* pending message to the client */
   int      down_request;  /* pending SIGUSR1 down in 5 mn */
 
-  u_int32_t attn_quantum, datasize, server_quantum;
-  u_int16_t serverID, clientID;
+  uint32_t attn_quantum, datasize, server_quantum;
+  uint16_t serverID, clientID;
   char      *status;
-  u_int8_t  commands[DSI_CMDSIZ], data[DSI_DATASIZ];
+  uint8_t  commands[DSI_CMDSIZ], data[DSI_DATASIZ];
   size_t statuslen;
   size_t datalen, cmdlen;
   off_t  read_count, write_count;
@@ -162,7 +162,7 @@ extern DSI *dsi_init (const dsi_proto /*protocol*/,
                          const char * /*program*/, 
                          const char * /*host*/, const char * /*address*/,
                          const char * /*port*/, const int /*proxy*/,
-                         const u_int32_t /* server quantum */);
+                         const uint32_t /* server quantum */);
 extern void dsi_setstatus (DSI *, char *, const size_t);
 
 /* in dsi_getsess.c */
index f1b8bd5389a0af63e7f0d3c6490980accccdf487..3f65fbad2f484bb087edc5aeb03b9f95605a6019 100644 (file)
@@ -58,7 +58,7 @@ struct afp_options {
     int disconnected;           /* Maximum time in disconnected state (in tickles) */
     unsigned int tcp_sndbuf, tcp_rcvbuf;
     unsigned char passwdbits, passwdminlen, loginmaxfail;
-    u_int32_t server_quantum;
+    uint32_t server_quantum;
     int dsireadbuf; /* scale factor for sizefof(dsi->buffer) = server_quantum * dsireadbuf */
     char hostname[MAXHOSTNAMELEN + 1], *server, *ipaddr, *port, *configfile;
     char *uampath, *fqdn;
index 6e4575ee5d8876784ace1e08c73bc865a6caaea4..a86a756895b7e63135cc0cd58be8f13d3bca95c3 100644 (file)
@@ -45,7 +45,7 @@ extern void server_child_free (server_child *);
 
 extern void server_child_kill (server_child *, const int, const int);
 extern void server_child_kill_one_by_id (server_child *children, const int forkid, const pid_t pid, const uid_t,
-                                               const u_int32_t len, char *id, u_int32_t boottime);
+                                               const uint32_t len, char *id, uint32_t boottime);
 extern int  server_child_transfer_session(server_child *children, int forkid, pid_t, uid_t, int, uint16_t);
 extern void server_child_setup (server_child *, const int, void (*)(const pid_t));
 extern void server_child_handler (server_child *);
index 27441549e2d803cd3e0f85b147673fb6aa3e51b0..4c4759ef07e061793c3471c24f94b43c3a1bc01f 100644 (file)
@@ -4,7 +4,7 @@
 #include <errno.h>
 #include <sys/param.h>
 
-#define ucs2_t u_int16_t
+#define ucs2_t uint16_t
 
 #ifndef MIN
 #define MIN(a,b)     ((a)<(b)?(a):(b))
@@ -78,7 +78,7 @@ struct charset_functions {
                    char **outbuf, size_t *outbytesleft);
     size_t (*push)(void *, char **inbuf, size_t *inbytesleft,
                    char **outbuf, size_t *outbytesleft);
-    u_int32_t flags;
+    uint32_t flags;
     const char *iname;
     struct charset_functions *prev, *next;
 };
@@ -92,9 +92,9 @@ extern int atalk_register_charset (struct charset_functions *);
 
 /* from utf16_case.c */
 extern ucs2_t    toupper_w  (ucs2_t);
-extern u_int32_t toupper_sp (u_int32_t);
+extern uint32_t  toupper_sp (uint32_t);
 extern ucs2_t    tolower_w  (ucs2_t);
-extern u_int32_t tolower_sp (u_int32_t);
+extern uint32_t  tolower_sp (uint32_t);
 
 /* from util_unistr.c */
 extern int      strupper_w (ucs2_t *);
@@ -138,7 +138,7 @@ extern size_t   ucs2_to_charset_allocate (charset_t, char **dest, const ucs2_t *
 extern size_t   utf8_to_charset_allocate (charset_t, char **dest, const char *src);
 extern size_t   ucs2_to_charset (charset_t, const ucs2_t *src, char *dest, size_t);
 
-extern size_t   convert_charset (charset_t, charset_t, charset_t, const char *, size_t, char *, size_t, u_int16_t *);
+extern size_t   convert_charset (charset_t, charset_t, charset_t, const char *, size_t, char *, size_t, uint16_t *);
 
 extern size_t   charset_precompose ( charset_t, char *, size_t, char *, size_t);
 extern size_t   charset_decompose  ( charset_t, char *, size_t, char *, size_t);
index 1124b1391171689042544a6985fb872424521bde..51bf30fc90a3a908dbdce8973a40ff86a424a830 100644 (file)
@@ -9,7 +9,7 @@
 #define VOLINFOFILE ".volinfo"
 
 typedef struct {
-    const u_int32_t option;
+    const uint32_t option;
     const char      *name;
 } vol_opt_name_t;
 
index 2d8019283bd0760f71fcb9ade7032b114182e4ad..615ecd631428a6c535f1c0e858291fc46841e6df 100644 (file)
 #define AFPVOL_U8MNAMELEN   255 /* AFP3 sepc */
 #define AFPVOL_MACNAMELEN    27 /* AFP2 spec */
 
-typedef u_int64_t VolSpace;
+typedef uint64_t VolSpace;
 
 struct vol {
     struct vol      *v_next;
-    u_int16_t       v_vid;
+    uint16_t        v_vid;
     int             v_flags;
     char            *v_path;
     struct dir      *v_root;
@@ -28,8 +28,8 @@ struct vol {
 
     charset_t       v_volcharset;
     charset_t       v_maccharset;
-    u_int16_t       v_mtou_flags;    /* flags for convert_charset in mtoupath */
-    u_int16_t       v_utom_flags;
+    uint16_t        v_mtou_flags;    /* flags for convert_charset in mtoupath */
+    uint16_t        v_utom_flags;
     long            v_kTextEncoding; /* mac charset encoding in network order
                                       * FIXME: should be a u_int32_t ? */
     size_t          max_filename;
index 37c84e03f685c08cb39d7ed6076c4e0c1edcd82f..6579f0def001973d5e7742c3c382f2a1432812b4 100644 (file)
@@ -15,9 +15,9 @@
    retrieved from the FinderFlags. This fixes Bug #2802236:
    <https://sourceforge.net/tracker/?func=detail&aid=2802236&group_id=8642&atid=108642>
  */
-int ad_getattr(const struct adouble *ad, u_int16_t *attr)
+int ad_getattr(const struct adouble *ad, uint16_t *attr)
 {
-    u_int16_t fflags;
+    uint16_t fflags;
     *attr = 0;
 
     if (ad->ad_version == AD_VERSION2) {
@@ -49,12 +49,12 @@ int ad_getattr(const struct adouble *ad, u_int16_t *attr)
 }
 
 /* ----------------- */
-int ad_setattr(const struct adouble *ad, const u_int16_t attribute)
+int ad_setattr(const struct adouble *ad, const uint16_t attribute)
 {
     uint16_t fflags;
 
     /* we don't save open forks indicator */
-    u_int16_t attr = attribute & ~htons(ATTRBIT_DOPEN | ATTRBIT_ROPEN);
+    uint16_t attr = attribute & ~htons(ATTRBIT_DOPEN | ATTRBIT_ROPEN);
 
     /* Proactively (10.4 does indeed try to set ATTRBIT_MULTIUSER (=ATTRBIT_EXPFLDR)
        for dirs with SetFile -a M <dir> ) disable all flags not defined for dirs. */
@@ -90,7 +90,7 @@ int ad_setattr(const struct adouble *ad, const u_int16_t attribute)
  * save file/folder ID in AppleDoubleV2 netatalk private parameters
  * return 1 if resource fork has been modified
  */
-int ad_setid (struct adouble *adp, const dev_t dev, const ino_t ino , const u_int32_t id, const cnid_t did, const void *stamp)
+int ad_setid (struct adouble *adp, const dev_t dev, const ino_t ino , const uint32_t id, const cnid_t did, const void *stamp)
 {
     if ((adp->ad_flags == AD_VERSION2) && (adp->ad_options & ADVOL_CACHE)) {
 
@@ -119,9 +119,9 @@ int ad_setid (struct adouble *adp, const dev_t dev, const ino_t ino , const u_in
 }
 
 /* ----------------------------- */
-u_int32_t ad_getid (struct adouble *adp, const dev_t st_dev, const ino_t st_ino , const cnid_t did, const void *stamp)
+uint32_t ad_getid (struct adouble *adp, const dev_t st_dev, const ino_t st_ino , const cnid_t did, const void *stamp)
 {
-    u_int32_t aint = 0;
+    uint32_t aint = 0;
     dev_t  dev;
     ino_t  ino;
     cnid_t a_did;
@@ -153,9 +153,9 @@ u_int32_t ad_getid (struct adouble *adp, const dev_t st_dev, const ino_t st_ino
 }
 
 /* ----------------------------- */
-u_int32_t ad_forcegetid (struct adouble *adp)
+uint32_t ad_forcegetid (struct adouble *adp)
 {
-    u_int32_t aint = 0;
+    uint32_t aint = 0;
 
     if (adp && (adp->ad_options & ADVOL_CACHE)) {
         memcpy(&aint, ad_entry(adp, ADEID_PRIVID), sizeof(aint));
index 0a9c7ccc9f02aa04c15e0264adeb1ba2b049363c..304642d55f178b6e33d2ce2c9e1785457d933b18 100644 (file)
@@ -7,7 +7,7 @@
 #include <atalk/adouble.h>
 
 int ad_setdate(struct adouble *ad,
-               unsigned int dateoff, u_int32_t date)
+               unsigned int dateoff, uint32_t date)
 {
     int xlate = (dateoff & AD_DATE_UNIX);
 
@@ -26,7 +26,7 @@ int ad_setdate(struct adouble *ad,
 }
 
 int ad_getdate(const struct adouble *ad,
-               unsigned int dateoff, u_int32_t *date)
+               unsigned int dateoff, uint32_t *date)
 {
     int xlate = (dateoff & AD_DATE_UNIX);
 
@@ -36,7 +36,7 @@ int ad_getdate(const struct adouble *ad,
 
     if (dateoff > AD_DATE_ACCESS)
         return -1;
-    memcpy(date, ad_entry(ad, ADEID_FILEDATESI) + dateoff, sizeof(u_int32_t));
+    memcpy(date, ad_entry(ad, ADEID_FILEDATESI) + dateoff, sizeof(uint32_t));
 
     if (xlate)
         *date = AD_DATE_TO_UNIX(*date);
index 413bb16bffa0a2ae14898a8e38de1ed1d96357b7..ed9aa95deeb41675f4d66a9ff825668ea52f45cc 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "ad_lock.h"
 
-static const u_int32_t set_eid[] = {
+static const uint32_t set_eid[] = {
     0,1,2,3,4,5,6,7,8,
     9,10,11,12,13,14,15,
     AD_DEV, AD_INO, AD_SYN, AD_ID
@@ -53,9 +53,9 @@ static const u_int32_t set_eid[] = {
  */
 int  ad_rebuild_adouble_header(struct adouble *ad)
 {
-    u_int32_t       eid;
-    u_int32_t       temp;
-    u_int16_t       nent;
+    uint32_t       eid;
+    uint32_t       temp;
+    uint16_t       nent;
     char        *buf, *nentp;
     int             len;
 
@@ -116,8 +116,8 @@ int  ad_rebuild_adouble_header(struct adouble *ad)
  */
 int ad_copy_header(struct adouble *add, struct adouble *ads)
 {
-    u_int32_t       eid;
-    u_int32_t       len;
+    uint32_t       eid;
+    uint32_t       len;
 
     for ( eid = 0; eid < ADEID_MAX; eid++ ) {
         if ( ads->ad_eid[ eid ].ade_off == 0 ) {
index 6fab902858965091b11528fa704d38de48f86e1d..5899afa67271411936effcf9cefc87f05c009dba 100644 (file)
@@ -265,7 +265,7 @@ int start = off;
 }
 
 /* ------------------ */
-static int ad_fcntl_lock(struct adouble *ad, const u_int32_t eid, const int locktype,
+static int ad_fcntl_lock(struct adouble *ad, const uint32_t eid, const int locktype,
                          const off_t off, const off_t len, const int fork)
 {
 #if 0
@@ -456,7 +456,7 @@ static int testlock(struct ad_fd *adf, off_t off, off_t len)
 
 /* -------------------------
 */
-static int ad_fcntl_tmplock(struct adouble *ad, const u_int32_t eid, const int locktype,
+static int ad_fcntl_tmplock(struct adouble *ad, const uint32_t eid, const int locktype,
                             const off_t off, const off_t len, const int fork)
 {
   struct flock lock;
@@ -575,7 +575,7 @@ int ad_testlock(struct adouble *ad, int eid, const off_t off)
    - there's no locks held by another process (clients)
    - or we already know the answer and don't need to test.
 */
-uint16_t ad_openforks(struct adouble *ad, u_int16_t attrbits)
+uint16_t ad_openforks(struct adouble *ad, uint16_t attrbits)
 {
     return 0;
 #if 0
@@ -637,7 +637,7 @@ uint16_t ad_openforks(struct adouble *ad, u_int16_t attrbits)
    the fork is opened in Read Write, Deny Read, Deny Write mode
    lock the whole file once   
 */
-int ad_excl_lock(struct adouble *ad, const u_int32_t eid)
+int ad_excl_lock(struct adouble *ad, const uint32_t eid)
 {
     return 0;
 #if 0
index bc4c7c5fa20821eff1b1ce3eab7667d104e7ffea..ea4ee2405b95d09baf7d9af07975b6e0fece4108 100644 (file)
@@ -179,7 +179,7 @@ static uint32_t get_eid(uint32_t eid)
 static int new_ad_header(const char *path, struct adouble *ad, int adflags)
 {
     const struct entry  *eid;
-    u_int16_t           ashort;
+    uint16_t            ashort;
     struct stat         st;
 
     ad->ad_magic = AD_MAGIC;
@@ -276,7 +276,7 @@ static void parse_entries(struct adouble *ad, char *buf, uint16_t nentries)
 static int ad_header_read(struct adouble *ad, struct stat *hst)
 {
     char                *buf = ad->ad_data;
-    u_int16_t           nentries;
+    uint16_t            nentries;
     int                 len;
     ssize_t             header_len;
     struct stat         st;
index 877ab574cff326dc3b70750572fa2577d4bec1ab..e6d2669d403ba3a0a16b4a53aeeb90746f039a4f 100644 (file)
@@ -60,7 +60,7 @@ ssize_t adf_pread(struct ad_fd *ad_fd, void *buf, size_t count, off_t offset)
 /* XXX: locks have to be checked before each stream of consecutive
  *      ad_reads to prevent a denial in the middle from causing
  *      problems. */
-ssize_t ad_read( struct adouble *ad, const u_int32_t eid, off_t off, char *buf, const size_t buflen)
+ssize_t ad_read( struct adouble *ad, const uint32_t eid, off_t off, char *buf, const size_t buflen)
 {
     ssize_t     cc;
 
index 0b45babdb954f6342721e4ba7093ea598590e6d8..337ff6ed3d5f07075ff286dfa58964488c9158f4 100644 (file)
@@ -15,7 +15,7 @@
 #include <atalk/logger.h>
 #include <atalk/adouble.h>
 
-off_t ad_size(const struct adouble *ad, const u_int32_t eid)
+off_t ad_size(const struct adouble *ad, const uint32_t eid)
 {
   if (eid == ADEID_DFORK) {
     struct stat st;
index fae5067cd4a50447de5b0a58a1225b50411b6cc9..ab18f50c6baf4204aee05596a61916bf7f2428ea 100644 (file)
@@ -162,7 +162,7 @@ struct _cnid_db *cnid_open(const char *volpath, mode_t mask, char *type, int fla
 }
 
 /* ------------------- */
-static void block_signal( u_int32_t flags)
+static void block_signal(uint32_t flags)
 {
     if ((flags & CNID_FLAG_BLOCK)) {
         pthread_sigmask(SIG_BLOCK, &sigblockset, NULL);
@@ -170,7 +170,7 @@ static void block_signal( u_int32_t flags)
 }
 
 /* ------------------- */
-static void unblock_signal(u_int32_t flags)
+static void unblock_signal(uint32_t flags)
 {
     if ((flags & CNID_FLAG_BLOCK)) {
         pthread_sigmask(SIG_UNBLOCK, &sigblockset, NULL);
@@ -200,7 +200,7 @@ static cnid_t valide(cnid_t id)
 /* Closes CNID database. Currently it's just a wrapper around db->cnid_close(). */
 void cnid_close(struct _cnid_db *db)
 {
-u_int32_t flags;
+    uint32_t flags;
 
     if (NULL == db) {
         LOG(log_error, logtype_afpd, "Error: cnid_close called with NULL argument !");
index 5d17632420f3e7e968fc6cdf4c63467b3eb0d300..64cc214b65902fb13aa439339ab28e52f2444dca 100644 (file)
@@ -70,6 +70,6 @@ extern int cnid_tdb_delete (struct _cnid_db *, const cnid_t);
 extern cnid_t cnid_tdb_nextid (struct _cnid_db *);
 
 /* construct db_cnid data. NOTE: this is not re-entrant.  */
-extern unsigned char *make_tdb_data(u_int32_t flags, const struct stat *st, const cnid_t did, const char *name, const size_t len);
+extern unsigned char *make_tdb_data(uint32_t flags, const struct stat *st, const cnid_t did, const char *name, const size_t len);
 
 #endif /* include/atalk/cnid_tdb.h */
index e49fdd30cc6ddfa52ce967f99ad014d662f63b84..fcb43fa2f6488d5d725a79ee43cec230571e96a3 100644 (file)
@@ -38,12 +38,12 @@ static void make_devino_data(unsigned char *buf, dev_t dev, ino_t ino)
     buf[CNID_DEV_LEN + CNID_INO_LEN - 8] = ino;    
 }
 
-unsigned char *make_tdb_data(u_int32_t flags, const struct stat *st,const cnid_t did,
+unsigned char *make_tdb_data(uint32_t flags, const struct stat *st,const cnid_t did,
                      const char *name, const size_t len)
 {
     static unsigned char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
     unsigned char *buf = start  +CNID_LEN;
-    u_int32_t i;
+    uint32_t i;
 
     if (len > MAXPATHLEN)
         return NULL;
index 457362bf1b5fc536ebceb445b8e524a3df44fe55..f095cd54b9c989e186e66360177b0c4bc4f8110a 100644 (file)
@@ -15,9 +15,9 @@ cnid_t cnid_tdb_lookup(struct _cnid_db *cdb, const struct stat *st, cnid_t did,
     int devino = 1, didname = 1;
     char dev[CNID_DEV_LEN];
     char ino[CNID_INO_LEN];  
-    u_int32_t type_devino  = (unsigned)-1;
-    u_int32_t type_didname = (unsigned)-1;
-    u_int32_t type;
+    uint32_t type_devino  = (unsigned)-1;
+    uint32_t type_didname = (unsigned)-1;
+    uint32_t type;
     int update = 0;
     cnid_t id_devino = 0, id_didname = 0,id = 0;
 
index 4c2e050b10e348181db7f07a86b66789e0755f5d..d02ef0bcc054caa1da65ab3ccfa5f6c5885a8b5a 100644 (file)
@@ -129,7 +129,7 @@ struct _cnid_db *cnid_tdb_open(struct cnid_open_args *args)
 
     data = tdb_fetch(db->tdb_didname, key);
     if (!data.dptr) {
-        u_int32_t version = htonl(DBVERSION);
+        uint32_t version = htonl(DBVERSION);
 
         data.dptr = (char *)&version;
         data.dsize = sizeof(version);
index 383ff58b51a29c4b98623b15bf02657cd4a479db..5a60c24d5c25d30d223b820b3edf496c89009740 100644 (file)
@@ -31,8 +31,8 @@ int dsi_attention(DSI *dsi, AFPUserBytes flags)
 {
   /* header + AFPUserBytes */
   char block[DSI_BLOCKSIZ + sizeof(AFPUserBytes)];
-  u_int32_t len, nlen;
-  u_int16_t id;
+  uint32_t len, nlen;
+  uint16_t id;
 
   if (dsi->flags & DSI_SLEEPING)
       return 1;
index 547eed997ff815c6379c3423a60a22d2e62a43a3..ee75fcc71ebb26be21a7c3ca40241c352a1d2409 100644 (file)
@@ -17,7 +17,7 @@
 
 DSI *dsi_init(const dsi_proto protocol, const char *program, 
              const char *hostname, const char *address,
-             const char *port, const int proxy, const u_int32_t quantum)
+             const char *port, const int proxy, const uint32_t quantum)
 {
     DSI                *dsi;
 
index 2d7fd23b84c947789f060dfe7b89b3e3ab41f398..e074a1120528f5d44392c4c1a99aedb21ea8f160 100644 (file)
@@ -33,7 +33,7 @@ static void dsi_init_buffer(DSI *dsi)
 /* OpenSession. set up the connection */
 void dsi_opensession(DSI *dsi)
 {
-  u_int32_t i = 0; /* this serves double duty. it must be 4-bytes long */
+  uint32_t i = 0; /* this serves double duty. it must be 4-bytes long */
   int offs;
 
   dsi_init_buffer(dsi);
index 4b92d2259ed7f5ea13a734909ed4c523ef90473d..dd7b9ef680cb6ca1c4baf2f39f38fd9cb7d01410 100644 (file)
@@ -124,7 +124,7 @@ static int dsi_peek(DSI *dsi)
 /* 
  * Return all bytes up to count from dsi->buffer if there are any buffered there
  */
-static size_t from_buf(DSI *dsi, u_int8_t *buf, size_t count)
+static size_t from_buf(DSI *dsi, uint8_t *buf, size_t count)
 {
     size_t nbe = 0;
 
@@ -159,7 +159,7 @@ static size_t from_buf(DSI *dsi, u_int8_t *buf, size_t count)
  *    Note: this may return fewer bytes then requested in count !!
  * 3. If the buffer was empty, read from the socket.
  */
-static ssize_t buf_read(DSI *dsi, u_int8_t *buf, size_t count)
+static ssize_t buf_read(DSI *dsi, uint8_t *buf, size_t count)
 {
     ssize_t len;
 
@@ -183,7 +183,7 @@ static ssize_t buf_read(DSI *dsi, u_int8_t *buf, size_t count)
  * Get "length" bytes from buffer and/or socket. In order to avoid frequent small reads
  * this tries to read larger chunks (8192 bytes) into a buffer.
  */
-static size_t dsi_buffered_stream_read(DSI *dsi, u_int8_t *data, const size_t length)
+static size_t dsi_buffered_stream_read(DSI *dsi, uint8_t *data, const size_t length)
 {
   size_t len;
   size_t buflen;
@@ -269,7 +269,7 @@ ssize_t dsi_stream_write(DSI *dsi, void *data, const size_t length, int mode)
       return -1;
 
   while (written < length) {
-      len = send(dsi->socket, (u_int8_t *) data + written, length - written, flags);
+      len = send(dsi->socket, (uint8_t *) data + written, length - written, flags);
       if (len >= 0) {
           written += len;
           continue;
@@ -380,7 +380,7 @@ size_t dsi_stream_read(DSI *dsi, void *data, const size_t length)
 
   stored = 0;
   while (stored < length) {
-      len = buf_read(dsi, (u_int8_t *) data + stored, length - stored);
+      len = buf_read(dsi, (uint8_t *) data + stored, length - stored);
       if (len == -1 && (errno == EINTR || errno == EAGAIN)) {
           LOG(log_maxdebug, logtype_dsi, "dsi_stream_read: select read loop");
           continue;
@@ -498,7 +498,7 @@ int dsi_stream_receive(DSI *dsi, void *buf, const size_t ilength,
       return 0;
 
   /* read in the header */
-  if (dsi_buffered_stream_read(dsi, (u_int8_t *)block, sizeof(block)) != sizeof(block)) 
+  if (dsi_buffered_stream_read(dsi, (uint8_t *)block, sizeof(block)) != sizeof(block)) 
     return 0;
 
   dsi->header.dsi_flags = block[0];
index b87c253b9c4a0f7e09cac95470235f02e44ca203..c707612607f0d1579e3910f8bc6c4a2faad14cc5 100644 (file)
@@ -117,7 +117,7 @@ static int dsi_tcp_open(DSI *dsi)
     if (0 == (pid = fork()) ) { /* child */
         static struct itimerval timer = {{0, 0}, {DSI_TCPTIMEOUT, 0}};
         struct sigaction newact, oldact;
-        u_int8_t block[DSI_BLOCKSIZ];
+        uint8_t block[DSI_BLOCKSIZ];
         size_t stored;
 
         /* Immediateyl mark globally that we're a child now */
index bdc748c4b436f7da755c6372393f07e6b276a09b..40d0c0ad4cb43376dc0421c4b8fd504708fc15e2 100644 (file)
@@ -21,7 +21,7 @@
 int dsi_tickle(DSI *dsi)
 {
   char block[DSI_BLOCKSIZ];
-  u_int16_t id;
+  uint16_t id;
   
   if ((dsi->flags & DSI_SLEEPING) || dsi->in_write)
       return 1;
index 77951c62da583792d0c93ed8fe8b796b0dab748e..41389c41c97a349acf69d8f1239751295546a518 100644 (file)
@@ -67,6 +67,7 @@
 #define __location__ __FILE__ ":" __LINESTR__
 #endif
 
+#include <atalk/util.h>
 #include "atalk/tdb.h"
 
 /* #define TDB_TRACE 1 */
index b295b54cea367d9d3c9bc2a6299a74f21250956e..cc9a7f02a12bf580216e05fda91ec0c666b3c5f2 100644 (file)
@@ -122,8 +122,8 @@ it also defines lots of intermediate macros, just ignore those :-)
 #define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
 #define SVALS(buf,pos) ((int16)SVAL(buf,pos))
 #define IVALS(buf,pos) ((int32_t)IVAL(buf,pos))
-#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((u_int16_t)(val)))
-#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((u_int32_t)(val)))
+#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16_t)(val)))
+#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32_t)(val)))
 #define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))
 #define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32_t)(val)))
 
@@ -135,8 +135,8 @@ it also defines lots of intermediate macros, just ignore those :-)
 #define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
 #define SVALS(buf,pos) ((int16)SVAL(buf,pos))
 #define IVALS(buf,pos) ((int32_t)IVAL(buf,pos))
-#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((u_int16_t)(val)))
-#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((u_int32_t)(val)))
+#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16_t)(val)))
+#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32_t)(val)))
 #define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))
 #define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32_t)(val)))
 
@@ -152,18 +152,18 @@ it also defines lots of intermediate macros, just ignore those :-)
 */
 
 /* get single value from an SMB buffer */
-#define SVAL(buf,pos) (*(const u_int16_t *)((const char *)(buf) + (pos)))
-#define SVAL_NC(buf,pos) (*(u_int16_t *)((char *)(buf) + (pos))) /* Non const version of above. */
-#define IVAL(buf,pos) (*(const u_int32_t *)((const char *)(buf) + (pos)))
-#define IVAL_NC(buf,pos) (*(u_int32_t *)((char *)(buf) + (pos))) /* Non const version of above. */
+#define SVAL(buf,pos) (*(const uint16_t *)((const char *)(buf) + (pos)))
+#define SVAL_NC(buf,pos) (*(uint16_t *)((char *)(buf) + (pos))) /* Non const version of above. */
+#define IVAL(buf,pos) (*(const uint32_t *)((const char *)(buf) + (pos)))
+#define IVAL_NC(buf,pos) (*(uint32_t *)((char *)(buf) + (pos))) /* Non const version of above. */
 #define SVALS(buf,pos) (*(const int16_t *)((const char *)(buf) + (pos)))
 #define SVALS_NC(buf,pos) (*(int16 *)((char *)(buf) + (pos))) /* Non const version of above. */
 #define IVALS(buf,pos) (*(const int32_t *)((const char *)(buf) + (pos)))
 #define IVALS_NC(buf,pos) (*(int32_t *)((char *)(buf) + (pos))) /* Non const version of above. */
 
 /* store single value in an SMB buffer */
-#define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((u_int16_t)(val))
-#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((u_int32_t)(val))
+#define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((uint16_t)(val))
+#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((uint32_t)(val))
 #define SSVALS(buf,pos,val) SVALS_NC(buf,pos)=((int16)(val))
 #define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((int32_t)(val))
 
index 4a4dda5d5e294fa7f9f0a51c16ef5f27831f444e..7859a228ea1f9756b4a6c5fd72dc585eeff1aadf 100644 (file)
@@ -768,9 +768,9 @@ char * debug_out ( char * seq, size_t len)
  *      for e.g. HFS cdroms.
  */
 
-static size_t pull_charset_flags (charset_t from_set, charset_t cap_set, const char *src, size_t srclen, char* dest, size_t destlen, u_int16_t *flags)
+static size_t pull_charset_flags (charset_t from_set, charset_t cap_set, const char *src, size_t srclen, char* dest, size_t destlen, uint16_t *flags)
 {
-    const u_int16_t option = (flags ? *flags : 0);
+    const uint16_t option = (flags ? *flags : 0);
     size_t i_len, o_len;
     size_t j = 0;
     const char* inbuf = (const char*)src;
@@ -880,9 +880,9 @@ end:
  */
 
 
-static size_t push_charset_flags (charset_t to_set, charset_t cap_set, char* src, size_t srclen, char* dest, size_t destlen, u_int16_t *flags)
+static size_t push_charset_flags (charset_t to_set, charset_t cap_set, char* src, size_t srclen, char* dest, size_t destlen, uint16_t *flags)
 {
-    const u_int16_t option = (flags ? *flags : 0);
+    const uint16_t option = (flags ? *flags : 0);
     size_t i_len, o_len, i;
     size_t j = 0;
     const char* inbuf = (const char*)src;
@@ -1029,7 +1029,7 @@ end:
  * FIXME the size is a mess we really need a malloc/free logic
  *`dest size must be dest_len +2
  */
-size_t convert_charset ( charset_t from_set, charset_t to_set, charset_t cap_charset, const char *src, size_t src_len, char *dest, size_t dest_len, u_int16_t *flags)
+size_t convert_charset ( charset_t from_set, charset_t to_set, charset_t cap_charset, const char *src, size_t src_len, char *dest, size_t dest_len, uint16_t *flags)
 {
     size_t i_len, o_len;
     ucs2_t *u;
index 29358a8c8da043f5235c0d92e65dc0a702b6d9ba..461af345ff65ae1cd55b0a6b4563495f47c5d912 100644 (file)
@@ -36,14 +36,14 @@ static size_t cjk_iconv(void *cd, char **inbuf, char *end,
   return n;
 }
 
-size_t cjk_generic_push(size_t (*char_func)(u_int8_t*, const ucs2_t*, size_t*),
+size_t cjk_generic_push(size_t (*char_func)(uint8_t*, const ucs2_t*, size_t*),
                        void *cd, char **inbuf, size_t *inbytesleft,
                        char **outbuf, size_t *outbytesleft)
 {
   char *in = *inbuf;
 
   while (*inbytesleft >= sizeof(ucs2_t) && *outbytesleft > 0) {
-    u_int8_t buf[CJK_PUSH_BUFFER];
+    uint8_t buf[CJK_PUSH_BUFFER];
     size_t size = *inbytesleft / sizeof(ucs2_t);
     size_t n = (char_func)(buf, (const ucs2_t*)in, &size);
     if (n == 0) {
@@ -78,7 +78,7 @@ size_t cjk_generic_push(size_t (*char_func)(u_int8_t*, const ucs2_t*, size_t*),
   return 0;
 }
 
-size_t cjk_generic_pull(size_t (*char_func)(ucs2_t*, const u_int8_t*, size_t*),
+size_t cjk_generic_pull(size_t (*char_func)(ucs2_t*, const uint8_t*, size_t*),
                        void *cd, char **inbuf, size_t *inbytesleft,
                        char **outbuf, size_t *outbytesleft)
 {
@@ -87,7 +87,7 @@ size_t cjk_generic_pull(size_t (*char_func)(ucs2_t*, const u_int8_t*, size_t*),
   while (*inbytesleft > 0 && *outbytesleft >= sizeof(ucs2_t)) {
     ucs2_t buf[CJK_PULL_BUFFER];
     size_t size = *inbytesleft;
-    size_t n = (char_func)(buf, (const u_int8_t*)in, &size);
+    size_t n = (char_func)(buf, (const uint8_t*)in, &size);
     if (n == 0) {
       in += size;
       *inbytesleft -= size;
@@ -120,30 +120,30 @@ size_t cjk_generic_pull(size_t (*char_func)(ucs2_t*, const u_int8_t*, size_t*),
   return 0;
 }
 
-size_t cjk_char_push(u_int16_t c, u_int8_t *out)
+size_t cjk_char_push(uint16_t c, uint8_t *out)
 {
   if (!c) return 0;
-  if (c == (u_int16_t)-1) {
+  if (c == (uint16_t)-1) {
     errno = EILSEQ;
     return (size_t)-1;
   }
   if (c <= 0xff) {
-    out[0] = (u_int8_t)c;
+    out[0] = (uint8_t)c;
     return 1;
   }
-  out[0] = (u_int8_t)(c >> 8);
-  out[1] = (u_int8_t)c;
+  out[0] = (uint8_t)(c >> 8);
+  out[1] = (uint8_t)c;
   return 2;
 }
 
-size_t cjk_char_pull(ucs2_t wc, ucs2_t* out, const u_int32_t* compose)
+size_t cjk_char_pull(ucs2_t wc, ucs2_t* out, const uint32_t* compose)
 {
   if (!wc) return 0;
   if ((wc & 0xf000) == 0xe000) {
     ucs2_t buf[CJK_PULL_BUFFER];
     size_t i = sizeof(buf) / sizeof(*buf) - 1;
     do {
-      u_int32_t v = compose[wc & 0xfff];
+      uint32_t v = compose[wc & 0xfff];
       buf[i] = (ucs2_t)v;
       wc = (ucs2_t)(v >> 16);
     } while (--i && (wc & 0xf000) == 0xe000);
@@ -155,12 +155,12 @@ size_t cjk_char_pull(ucs2_t wc, ucs2_t* out, const u_int32_t* compose)
   return 1;
 }
 
-u_int16_t cjk_lookup(u_int16_t c, const cjk_index_t *index, const u_int16_t *charset)
+uint16_t cjk_lookup(uint16_t c, const cjk_index_t *index, const uint16_t *charset)
 {
   while (index->summary && c >= index->range[0]) {
     if (c <= index->range[1]) {
-      const u_int16_t* summary = index->summary[(c - index->range[0]) >> 4];
-      u_int16_t used = 1 << (c & 15);
+      const uint16_t* summary = index->summary[(c - index->range[0]) >> 4];
+      uint16_t used = 1 << (c & 15);
 
       if (summary[0] & used) {
        used = summary[0] & (used - 1);
@@ -175,9 +175,9 @@ u_int16_t cjk_lookup(u_int16_t c, const cjk_index_t *index, const u_int16_t *cha
   return 0;
 }
 
-ucs2_t cjk_compose(ucs2_t base, ucs2_t comb, const u_int32_t* table, size_t size)
+ucs2_t cjk_compose(ucs2_t base, ucs2_t comb, const uint32_t* table, size_t size)
 {
-  u_int32_t v = ((u_int32_t)base << 16) | comb;
+  uint32_t v = ((uint32_t)base << 16) | comb;
   size_t low = 0;
   while (size > low) {
     size_t n = (low + size) / 2;
@@ -191,9 +191,9 @@ ucs2_t cjk_compose(ucs2_t base, ucs2_t comb, const u_int32_t* table, size_t size
   return 0;
 }
 
-ucs2_t cjk_compose_seq(const ucs2_t* in, size_t* len, const u_int32_t* table, size_t size)
+ucs2_t cjk_compose_seq(const ucs2_t* in, size_t* len, const uint32_t* table, size_t size)
 {
-  static u_int8_t sz[] = { 3, 4, 5, 5, 5, 5, 5, 3 };
+  static uint8_t sz[] = { 3, 4, 5, 5, 5, 5, 5, 3 };
   ucs2_t wc = in[0];
   size_t n = sz[wc & 7];
   size_t i = 0;
index 8c6cbaaf20a212e10ecaa9afdb8152982ba1e728..5dab15a6284a6ce323a245594a9498e90e2b2ebf 100644 (file)
 #define CJK_PULL_BUFFER 8
 
 typedef struct {
-  u_int16_t range[2];
-  const u_int16_t (*summary)[2];
+  uint16_t range[2];
+  const uint16_t (*summary)[2];
 } cjk_index_t;
 
-extern size_t cjk_generic_push (size_t (*)(u_int8_t*, const ucs2_t*, size_t*),
+extern size_t cjk_generic_push (size_t (*)(uint8_t*, const ucs2_t*, size_t*),
                                   void*, char**, size_t*, char**, size_t*);
-extern size_t cjk_generic_pull (size_t (*)(ucs2_t*, const u_int8_t*, size_t*),
+extern size_t cjk_generic_pull (size_t (*)(ucs2_t*, const uint8_t*, size_t*),
                                   void*, char**, size_t*, char**, size_t*);
 
-extern size_t cjk_char_push (u_int16_t, u_int8_t*);
-extern size_t cjk_char_pull (ucs2_t, ucs2_t*, const u_int32_t*);
+extern size_t cjk_char_push (uint16_t, uint8_t*);
+extern size_t cjk_char_pull (ucs2_t, ucs2_t*, const uint32_t*);
 
-extern u_int16_t cjk_lookup (u_int16_t, const cjk_index_t*, const u_int16_t*);
-extern ucs2_t cjk_compose (ucs2_t, ucs2_t, const u_int32_t*, size_t);
-extern ucs2_t cjk_compose_seq (const ucs2_t*, size_t*, const u_int32_t*, size_t);
+extern uint16_t cjk_lookup (uint16_t, const cjk_index_t*, const uint16_t*);
+extern ucs2_t cjk_compose (ucs2_t, ucs2_t, const uint32_t*, size_t);
+extern ucs2_t cjk_compose_seq (const ucs2_t*, size_t*, const uint32_t*, size_t);
index f0ad4640af2af16e2b108084b593555aa49229b7..2ff6c2a069aa0f5a535d307d6a22b4c7d5ad37fd 100644 (file)
@@ -43,20 +43,20 @@ struct charset_functions charset_mac_chinese_simp = {
   NULL, NULL
 };
 
-static size_t mac_chinese_simp_char_push(u_int8_t* out, const ucs2_t* in, size_t* size)
+static size_t mac_chinese_simp_char_push(uint8_t* out, const ucs2_t* in, size_t* size)
 {
   ucs2_t wc = in[0];
 
   if (wc <= 0x7f) {
     *size = 1;
-    out[0] = (u_int8_t)wc;
+    out[0] = (uint8_t)wc;
     return 1;
   } else if ((wc & 0xf000) == 0xe000) {
     *size = 1;
     return 0;
   } else if (*size >= 2 && (in[1] & ~15) == 0xf870) {
     ucs2_t comp = cjk_compose(wc, in[1], mac_chinese_simp_compose,
-                             sizeof(mac_chinese_simp_compose) / sizeof(u_int32_t));
+                             sizeof(mac_chinese_simp_compose) / sizeof(uint32_t));
     if (comp) {
       wc = comp;
       *size = 2;
@@ -77,9 +77,9 @@ static size_t mac_chinese_simp_push(void *cd, char **inbuf, size_t *inbytesleft,
                          cd, inbuf, inbytesleft, outbuf, outbytesleft);
 }
 
-static size_t mac_chinese_simp_char_pull(ucs2_t* out, const u_int8_t* in, size_t* size)
+static size_t mac_chinese_simp_char_pull(ucs2_t* out, const uint8_t* in, size_t* size)
 {
-  u_int16_t c = in[0];
+  uint16_t c = in[0];
 
   if (c <= 0x7f) {
     *size = 1;
@@ -87,7 +87,7 @@ static size_t mac_chinese_simp_char_pull(ucs2_t* out, const u_int8_t* in, size_t
     return 1;
   } else if (c >= 0xa1 && c <= 0xfc) {
     if (*size >= 2) {
-      u_int8_t c2 = in[1];
+      uint8_t c2 = in[1];
 
       if (c2 >= 0xa1 && c2 <= 0xfe) {
        *size = 2;
index 9e7d8cea88a922d48b07f5f5f06a297aa0118b72..25216256639c9aad9b53d5c2ebfe33746f856357 100644 (file)
@@ -20,7 +20,7 @@
  * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/
  */
 
-static const u_int16_t mac_chinese_simp_uni2_page00[][2] = {
+static const uint16_t mac_chinese_simp_uni2_page00[][2] = {
   /* 0x00a */ { 0x022d,    0 }, { 0x0080,    5 },
   /* 0x00c */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x010 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
@@ -31,42 +31,42 @@ static const u_int16_t mac_chinese_simp_uni2_page00[][2] = {
   /* 0x024 */ { 0x0000,    0 }, { 0x0002,    9 }, { 0x0002,   10 },
 };
 
-static const u_int16_t mac_chinese_simp_uni2_page1e[][2] = {
+static const uint16_t mac_chinese_simp_uni2_page1e[][2] = {
   /* 0x1e3 */ { 0x8000,   11 },
 };
 
-static const u_int16_t mac_chinese_simp_uni2_page20[][2] = {
+static const uint16_t mac_chinese_simp_uni2_page20[][2] = {
   /* 0x201 */ { 0x0070,   12 }, { 0x0040,   15 }, { 0x4000,   16 },
 };
 
-static const u_int16_t mac_chinese_simp_uni2_page21[][2] = {
+static const uint16_t mac_chinese_simp_uni2_page21[][2] = {
   /* 0x212 */ { 0x0004,   17 },
 };
 
-static const u_int16_t mac_chinese_simp_uni2_page22[][2] = {
+static const uint16_t mac_chinese_simp_uni2_page22[][2] = {
   /* 0x22e */ { 0x8000,   18 },
 };
 
-static const u_int16_t mac_chinese_simp_uni2_page30[][2] = {
+static const uint16_t mac_chinese_simp_uni2_page30[][2] = {
   /* 0x301 */ { 0x1000,   19 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x304 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x308 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x30c */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0800,   20 },
 };
 
-static const u_int16_t mac_chinese_simp_uni2_pagee0[][2] = {
+static const uint16_t mac_chinese_simp_uni2_pagee0[][2] = {
   /* 0xe00 */ { 0x07ff,   21 },
 };
 
-static const u_int16_t mac_chinese_simp_uni2_pagef8[][2] = {
+static const uint16_t mac_chinese_simp_uni2_pagef8[][2] = {
   /* 0xf88 */ { 0x0003,   32 },
 };
 
-static const u_int16_t mac_chinese_simp_uni2_pagefe[][2] = {
+static const uint16_t mac_chinese_simp_uni2_pagefe[][2] = {
   /* 0xfe3 */ { 0xfffa,   34 }, { 0x001f,   48 },
 };
 
-static const u_int16_t mac_chinese_simp_uni2_pageff[][2] = {
+static const uint16_t mac_chinese_simp_uni2_pageff[][2] = {
   /* 0xff5 */ { 0x4000,   53 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0xff8 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0xffc */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x002b,   54 },
@@ -86,7 +86,7 @@ static const cjk_index_t mac_chinese_simp_uni2_index[] = {
   { { 0, 0 }, NULL }
 };
 
-static const u_int16_t mac_chinese_simp_uni2_charset[] = {
+static const uint16_t mac_chinese_simp_uni2_charset[] = {
   0x00a0, 0xa1e9, 0xa1ea, 0xa3a4, 0x00fd, 0xa1a4, 0xa8bd, 0xa8be,
   0xa8bf, 0xa8bb, 0xa8c0, 0xa8bc, 0xa1aa, 0xffff, 0xa1ac, 0x00ff,
   0xa3fe, 0x00fe, 0xa1ad, 0xa1ab, 0xffff, 0x0080, 0xa6f3, 0xa6db,
@@ -97,26 +97,26 @@ static const u_int16_t mac_chinese_simp_uni2_charset[] = {
   0xffff, 0xffff,
 };
 
-static const u_int16_t mac_chinese_simp_2uni_page00[][2] = {
+static const uint16_t mac_chinese_simp_2uni_page00[][2] = {
   /* 0x008 */ { 0x0007,    0 }, { 0x0000,    0 }, { 0x0001,    3 }, { 0x0000,    0 },
   /* 0x00c */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0xe000,    4 },
 };
 
-static const u_int16_t mac_chinese_simp_2uni_pagea1[][2] = {
+static const uint16_t mac_chinese_simp_2uni_pagea1[][2] = {
   /* 0xa1a */ { 0x3c10,    7 }, { 0x0000,    0 },
   /* 0xa1c */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0600,   12 },
 };
 
-static const u_int16_t mac_chinese_simp_2uni_pagea3[][2] = {
+static const uint16_t mac_chinese_simp_2uni_pagea3[][2] = {
   /* 0xa3a */ { 0x0010,   14 }, { 0x0000,    0 },
   /* 0xa3c */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x4000,   15 },
 };
 
-static const u_int16_t mac_chinese_simp_2uni_pagea6[][2] = {
+static const uint16_t mac_chinese_simp_2uni_pagea6[][2] = {
   /* 0xa6d */ { 0xfe00,   16 }, { 0xffff,   23 }, { 0x003f,   39 },
 };
 
-static const u_int16_t mac_chinese_simp_2uni_pagea8[][2] = {
+static const uint16_t mac_chinese_simp_2uni_pagea8[][2] = {
   /* 0xa8b */ { 0xf800,   45 }, { 0x0001,   50 },
 };
 
@@ -129,7 +129,7 @@ static const cjk_index_t mac_chinese_simp_2uni_index[] = {
   { { 0, 0 }, NULL }
 };
 
-static const u_int16_t mac_chinese_simp_2uni_charset[] = {
+static const uint16_t mac_chinese_simp_2uni_charset[] = {
   0xe000, 0xf880, 0xf881, 0x00a0, 0x00a9, 0x2122, 0x2026, 0x00b7,
   0x2014, 0x301c, 0x2016, 0x22ef, 0x00a2, 0x00a3, 0x00a5, 0x203e,
   0xe007, 0xe003, 0xe002, 0xe008, 0xe009, 0xe006, 0xe00a, 0xfe35,
@@ -139,7 +139,7 @@ static const u_int16_t mac_chinese_simp_2uni_charset[] = {
   0x0148, 0x01f9, 0x0261,
 };
 
-static const u_int32_t mac_chinese_simp_compose[] = {
+static const uint32_t mac_chinese_simp_compose[] = {
   0x00fcf87f, 0x22eff87e, 0x3001f87e, 0x3002f87e,
   0x3016f87e, 0x3017f87e, 0xff01f87e, 0xff0cf87e,
   0xff1af87e, 0xff1bf87e, 0xff1ff87e,
index 7412beeccb421e1e5527a60f518c530cc36176d6..116e8cd5e3f88d905a50ab0c3e1c181ed3048a95 100644 (file)
@@ -43,7 +43,7 @@ struct charset_functions charset_mac_chinese_trad = {
   NULL, NULL
 };
 
-static size_t mac_chinese_trad_char_push(u_int8_t* out, const ucs2_t* in, size_t* size)
+static size_t mac_chinese_trad_char_push(uint8_t* out, const ucs2_t* in, size_t* size)
 {
   ucs2_t wc = in[0];
 
@@ -53,7 +53,7 @@ static size_t mac_chinese_trad_char_push(u_int8_t* out, const ucs2_t* in, size_t
       out[0] = 0x80;
     } else {
       *size = 1;
-      out[0] = (u_int8_t)wc;
+      out[0] = (uint8_t)wc;
     }
     return 1;
   } else if ((wc & 0xf000) == 0xe000) {
@@ -61,7 +61,7 @@ static size_t mac_chinese_trad_char_push(u_int8_t* out, const ucs2_t* in, size_t
     return 0;
   } else if (*size >= 2 && (in[1] & ~15) == 0xf870) {
     ucs2_t comp = cjk_compose(wc, in[1], mac_chinese_trad_compose,
-                             sizeof(mac_chinese_trad_compose) / sizeof(u_int32_t));
+                             sizeof(mac_chinese_trad_compose) / sizeof(uint32_t));
     if (comp) {
       wc = comp;
       *size = 2;
@@ -82,9 +82,9 @@ static size_t mac_chinese_trad_push(void *cd, char **inbuf, size_t *inbytesleft,
                          cd, inbuf, inbytesleft, outbuf, outbytesleft);
 }
 
-static size_t mac_chinese_trad_char_pull(ucs2_t* out, const u_int8_t* in, size_t* size)
+static size_t mac_chinese_trad_char_pull(ucs2_t* out, const uint8_t* in, size_t* size)
 {
-  u_int16_t c = in[0];
+  uint16_t c = in[0];
 
   if (c <= 0x7f) {
     *size = 1;
@@ -92,7 +92,7 @@ static size_t mac_chinese_trad_char_pull(ucs2_t* out, const u_int8_t* in, size_t
     return 1;
   } else if (c >= 0xa1 && c <= 0xfc) {
     if (*size >= 2) {
-      u_int8_t c2 = in[1];
+      uint8_t c2 = in[1];
 
       if ((c2 >= 0x40 && c2 <= 0x7e) || (c2 >= 0xa1 && c2 <= 0xfe)) {
        *size = 2;
index a5c94eb1f6fdc434d8bf2429177b1ad6caf6d286..00e0c518e62ef593a00bb0f3bc117a568003a5ec 100644 (file)
  * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/
  */
 
-static const u_int16_t mac_chinese_trad_uni2_page00[][2] = {
+static const uint16_t mac_chinese_trad_uni2_page00[][2] = {
   /* 0x00a */ { 0x0201,    0 }, { 0x0080,    2 },
 };
 
-static const u_int16_t mac_chinese_trad_uni2_page20[][2] = {
+static const uint16_t mac_chinese_trad_uni2_page20[][2] = {
   /* 0x202 */ { 0x0044,    3 },
 };
 
-static const u_int16_t mac_chinese_trad_uni2_page21[][2] = {
+static const uint16_t mac_chinese_trad_uni2_page21[][2] = {
   /* 0x212 */ { 0x0004,    5 },
 };
 
-static const u_int16_t mac_chinese_trad_uni2_page22[][2] = {
+static const uint16_t mac_chinese_trad_uni2_page22[][2] = {
   /* 0x229 */ { 0x0020,    6 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x22c */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x8000,    7 },
 };
 
-static const u_int16_t mac_chinese_trad_uni2_page25[][2] = {
+static const uint16_t mac_chinese_trad_uni2_page25[][2] = {
   /* 0x259 */ { 0x0020,    8 },
 };
 
-static const u_int16_t mac_chinese_trad_uni2_page26[][2] = {
+static const uint16_t mac_chinese_trad_uni2_page26[][2] = {
   /* 0x264 */ { 0x0002,    9 },
 };
 
-static const u_int16_t mac_chinese_trad_uni2_pagee0[][2] = {
+static const uint16_t mac_chinese_trad_uni2_pagee0[][2] = {
   /* 0xe00 */ { 0xffff,   10 }, { 0x00ff,   26 },
 };
 
-static const u_int16_t mac_chinese_trad_uni2_pagef8[][2] = {
+static const uint16_t mac_chinese_trad_uni2_pagef8[][2] = {
   /* 0xf88 */ { 0x0003,   34 },
 };
 
-static const u_int16_t mac_chinese_trad_uni2_pagefe[][2] = {
+static const uint16_t mac_chinese_trad_uni2_pagefe[][2] = {
   /* 0xfe4 */ { 0x1000,   36 }, { 0x7ef5,   37 },
 };
 
-static const u_int16_t mac_chinese_trad_uni2_pageff[][2] = {
+static const uint16_t mac_chinese_trad_uni2_pageff[][2] = {
   /* 0xff6 */ { 0x0010,   49 },
 };
 
@@ -75,7 +75,7 @@ static const cjk_index_t mac_chinese_trad_uni2_index[] = {
   { { 0, 0 }, NULL }
 };
 
-static const u_int16_t mac_chinese_trad_uni2_charset[] = {
+static const uint16_t mac_chinese_trad_uni2_charset[] = {
   0x00a0, 0x00fd, 0xa145, 0xffff, 0x00ff, 0x00fe, 0xa1f2, 0xa14b,
   0xffff, 0xffff, 0x0080, 0xa1c3, 0xa279, 0xa14e, 0xa1a3, 0xa1a4,
   0xa2cc, 0xa2ce, 0xa1cb, 0xa154, 0xa17d, 0xa17e, 0xa14d, 0xa14f,
@@ -85,12 +85,12 @@ static const u_int16_t mac_chinese_trad_uni2_charset[] = {
   0xffff, 0xffff,
 };
 
-static const u_int16_t mac_chinese_trad_2uni_page00[][2] = {
+static const uint16_t mac_chinese_trad_2uni_page00[][2] = {
   /* 0x008 */ { 0x0007,    0 }, { 0x0000,    0 }, { 0x0001,    3 }, { 0x0000,    0 },
   /* 0x00c */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0xe000,    4 },
 };
 
-static const u_int16_t mac_chinese_trad_2uni_pagea1[][2] = {
+static const uint16_t mac_chinese_trad_2uni_pagea1[][2] = {
   /* 0xa14 */ { 0xe820,    7 }, { 0x041f,   12 }, { 0x0000,    0 }, { 0x6000,   18 },
   /* 0xa18 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x001e,   20 }, { 0x0000,    0 },
   /* 0xa1c */ { 0x0828,   24 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x4004,   27 },
@@ -106,7 +106,7 @@ static const cjk_index_t mac_chinese_trad_2uni_index[] = {
   { { 0, 0 }, NULL }
 };
 
-static const u_int16_t mac_chinese_trad_2uni_charset[] = {
+static const uint16_t mac_chinese_trad_2uni_charset[] = {
   0xe000, 0xf880, 0xf881, 0x00a0, 0x00a9, 0x2122, 0x2026, 0x00b7,
   0x22ef, 0xe00c, 0xe003, 0xe00d, 0xe00e, 0xe011, 0xe010, 0xe012,
   0xe009, 0xe015, 0xe00a, 0xe00b, 0xe016, 0xe017, 0xe004, 0xe005,
@@ -114,7 +114,7 @@ static const u_int16_t mac_chinese_trad_2uni_charset[] = {
   0xe007,
 };
 
-static const u_int32_t mac_chinese_trad_compose[] = {
+static const uint32_t mac_chinese_trad_compose[] = {
   0x005cf87f, 0x203ef87c, 0x2502f87f, 0x3001f87d,
   0x3014f87f, 0x3015f87f, 0x5341f87f, 0x5345f87f,
   0xfe4bf87c, 0xff01f87d, 0xff08f87f, 0xff09f87f,
index b78ce01416a6453c97761f20c25eafb899387b62..9f32f66246f7fbe0bfcd59dd3d732a853a186a6f 100644 (file)
@@ -43,29 +43,29 @@ struct charset_functions charset_mac_japanese = {
   NULL, NULL
 };
 
-static size_t mac_japanese_char_push(u_int8_t* out, const ucs2_t* in, size_t* size)
+static size_t mac_japanese_char_push(uint8_t* out, const ucs2_t* in, size_t* size)
 {
   ucs2_t wc = in[0];
 
   if (wc <= 0x7f) {
     *size = 1;
-    out[0] = (u_int8_t)(wc == 0x5c ? 0x80 : wc);
+    out[0] = (uint8_t)(wc == 0x5c ? 0x80 : wc);
     return 1;
   } else if ((wc & 0xf000) == 0xe000) { /* user defined */
     *size = 1;
     if (wc > 0xe98b) return 0;
     wc -= 0xe000;
-    out[0] = (u_int8_t)(wc / 188 + 0xf0);
-    out[1] = (u_int8_t)(wc % 188 + 0x40);
+    out[0] = (uint8_t)(wc / 188 + 0xf0);
+    out[1] = (uint8_t)(wc % 188 + 0x40);
     if (out[1] >= 0x7f) ++out[1];
     return 2;
   } else if ((wc & ~7) == 0xf860) {
     wc = cjk_compose_seq(in, size, mac_japanese_compose,
-                        sizeof(mac_japanese_compose) / sizeof(u_int32_t));
+                        sizeof(mac_japanese_compose) / sizeof(uint32_t));
     if (!wc) return (size_t)-1;
   } else if (*size >= 2 && ((in[1] & ~15) == 0xf870 || in[1] == 0x20dd)) {
     ucs2_t comp = cjk_compose(wc, in[1], mac_japanese_compose,
-                             sizeof(mac_japanese_compose) / sizeof(u_int32_t));
+                             sizeof(mac_japanese_compose) / sizeof(uint32_t));
     if (comp) {
       wc = comp;
       *size = 2;
@@ -86,9 +86,9 @@ static size_t mac_japanese_push(void *cd, char **inbuf, size_t *inbytesleft,
                          cd, inbuf, inbytesleft, outbuf, outbytesleft);
 }
 
-static size_t mac_japanese_char_pull(ucs2_t* out, const u_int8_t* in, size_t* size)
+static size_t mac_japanese_char_pull(ucs2_t* out, const uint8_t* in, size_t* size)
 {
-  u_int16_t c = in[0];
+  uint16_t c = in[0];
 
   if (c <= 0x7f) {
     *size = 1;
@@ -96,7 +96,7 @@ static size_t mac_japanese_char_pull(ucs2_t* out, const u_int8_t* in, size_t* si
     return 1;
   } else if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) {
     if (*size >= 2) {
-      u_int8_t c2 = in[1];
+      uint8_t c2 = in[1];
 
       if ((c2 >= 0x40 && c2 <= 0x7e) || (c2 >= 0x80 && c2 <= 0xfc)) {
        *size = 2;
index b0be8697177e07664a20807321b62a2849ef8a4f..e27e450d7fc2f13357f9c479a7b1880d5a4d194e 100644 (file)
  * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/
  */
 
-static const u_int16_t mac_japanese_uni2_page00[][2] = {
+static const uint16_t mac_japanese_uni2_page00[][2] = {
   /* 0x00a */ { 0x0201,    1 },
 };
 
-static const u_int16_t mac_japanese_uni2_page20[][2] = {
+static const uint16_t mac_japanese_uni2_page20[][2] = {
   /* 0x201 */ { 0x0030,    3 }, { 0x0000,    0 }, { 0x4000,    5 },
   /* 0x204 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x208 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
@@ -38,12 +38,12 @@ static const u_int16_t mac_japanese_uni2_page20[][2] = {
   /* 0x228 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x8000,   44 },
 };
 
-static const u_int16_t mac_japanese_uni2_page24[][2] = {
+static const uint16_t mac_japanese_uni2_page24[][2] = {
   /* 0x246 */ { 0xffff,   45 }, { 0xffff,   61 },
   /* 0x248 */ { 0xffff,   77 }, { 0xf001,   93 }, { 0xffff,   98 }, { 0x003f,  114 },
 };
 
-static const u_int16_t mac_japanese_uni2_page26[][2] = {
+static const uint16_t mac_japanese_uni2_page26[][2] = {
   /* 0x260 */ { 0x4000,  120 }, { 0xf000,  121 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x264 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x00ff,  125 }, { 0x0000,    0 },
   /* 0x268 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
@@ -52,14 +52,14 @@ static const u_int16_t mac_japanese_uni2_page26[][2] = {
   /* 0x274 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x7fc0,  133 },
 };
 
-static const u_int16_t mac_japanese_uni2_page30[][2] = {
+static const uint16_t mac_japanese_uni2_page30[][2] = {
   /* 0x300 */ { 0x0010,  142 }, { 0xa000,  143 }, { 0x0001,  145 }, { 0x0000,    0 },
   /* 0x304 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x308 */ { 0x0000,    0 }, { 0x0010,  146 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x30c */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0780,  147 },
 };
 
-static const u_int16_t mac_japanese_uni2_page32[][2] = {
+static const uint16_t mac_japanese_uni2_page32[][2] = {
   /* 0x322 */ { 0xfc00,  151 }, { 0xffff,  157 },
   /* 0x324 */ { 0x000d,  173 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x328 */ { 0x0000,    0 }, { 0x6340,  176 }, { 0x03f0,  181 }, { 0x0000,    0 },
@@ -70,12 +70,12 @@ static const u_int16_t mac_japanese_uni2_page32[][2] = {
   /* 0x33c */ { 0x2810,  242 }, { 0x0010,  245 },
 };
 
-static const u_int16_t mac_japanese_uni2_pagee0[][2] = {
+static const uint16_t mac_japanese_uni2_pagee0[][2] = {
   /* 0xe00 */ { 0xffff,  246 }, { 0xffff,  262 }, { 0x0fff,  278 }, { 0x001f,  290 },
   /* 0xe04 */ { 0x7f00,  295 },
 };
 
-static const u_int16_t mac_japanese_uni2_pagefe[][2] = {
+static const uint16_t mac_japanese_uni2_pagefe[][2] = {
   /* 0xfe3 */ { 0xffeb,  302 },
   /* 0xfe4 */ { 0x001f,  316 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0xfe8 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
@@ -95,7 +95,7 @@ static const cjk_index_t mac_japanese_uni2_index[] = {
   { { 0, 0 }, NULL }
 };
 
-static const u_int16_t mac_japanese_uni2_charset[] = {
+static const uint16_t mac_japanese_uni2_charset[] = {
   0x0080, 0x00a0, 0x00fd, 0x815c, 0xffff, 0xffff, 0x8656, 0x8650,
   0x869b, 0x869d, 0x00fe, 0x859f, 0x85a0, 0x85a1, 0x85a2, 0x85a3,
   0x85a4, 0x85a5, 0x85a6, 0x85a7, 0x85a8, 0x85a9, 0x85aa, 0x85b3,
@@ -139,16 +139,16 @@ static const u_int16_t mac_japanese_uni2_charset[] = {
   0xeb78, 0x815f,
 };
 
-static const u_int16_t mac_japanese_2uni_page00[][2] = {
+static const uint16_t mac_japanese_2uni_page00[][2] = {
   /* 0x008 */ { 0x0001,    0 }, { 0x0000,    0 }, { 0x0001,    1 }, { 0x0000,    0 },
   /* 0x00c */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0xe000,    2 },
 };
 
-static const u_int16_t mac_japanese_2uni_page81[][2] = {
+static const uint16_t mac_japanese_2uni_page81[][2] = {
   /* 0x815 */ { 0x9000,    5 },
 };
 
-static const u_int16_t mac_japanese_2uni_page85[][2] = {
+static const uint16_t mac_japanese_2uni_page85[][2] = {
   /* 0x854 */ { 0xffff,    7 }, { 0xc00f,   23 }, { 0xffff,   29 }, { 0x7003,   45 },
   /* 0x858 */ { 0x003f,   50 }, { 0x87fe,   56 }, { 0x3fff,   67 }, { 0xfff8,   81 },
   /* 0x85c */ { 0x0003,   94 }, { 0xf800,   96 }, { 0xffff,  101 }, { 0x001f,  117 },
@@ -164,7 +164,7 @@ static const u_int16_t mac_japanese_2uni_page85[][2] = {
   /* 0x884 */ { 0x0007,  257 }, { 0x0030,  260 }, { 0x3d00,  262 },
 };
 
-static const u_int16_t mac_japanese_2uni_pageeb[][2] = {
+static const uint16_t mac_japanese_2uni_pageeb[][2] = {
   /* 0xeb4 */ { 0x0006,  267 }, { 0x3803,  269 }, { 0xfe1f,  274 }, { 0x07ff,  286 },
   /* 0xeb8 */ { 0x0002,  297 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0xebc */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
@@ -185,7 +185,7 @@ static const cjk_index_t mac_japanese_2uni_index[] = {
   { { 0, 0 }, NULL }
 };
 
-static const u_int16_t mac_japanese_2uni_charset[] = {
+static const uint16_t mac_japanese_2uni_charset[] = {
   0x005c, 0x00a0, 0x00a9, 0x2122, 0xe003, 0x2014, 0xff3c, 0x2460,
   0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468,
   0x2469, 0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x246f, 0x2470,
@@ -228,7 +228,7 @@ static const u_int16_t mac_japanese_2uni_charset[] = {
   0xe019, 0xe01a, 0xe01b, 0xe01c, 0xe01d, 0xe01e, 0xe01f, 0xe020,
 };
 
-static const u_int32_t mac_japanese_compose[] = {
+static const uint32_t mac_japanese_compose[] = {
   0x2010f87e, 0x2016f87e, 0x2026f87e, 0x2026f87f,
   0x21e6f87a, 0x21e7f87a, 0x21e8f87a, 0x21e9f87a,
   0x3001f87e, 0x3002f87e, 0x301cf87e, 0x3041f87e,
index a16f4a0359997d8bcc166d9cb2331444f318816e..26f387d78fa9bf8e0845d6d49135c9140c8efad5 100644 (file)
@@ -43,13 +43,13 @@ struct charset_functions charset_mac_korean = {
   NULL, NULL
 };
 
-static size_t mac_korean_char_push(u_int8_t* out, const ucs2_t* in, size_t* size)
+static size_t mac_korean_char_push(uint8_t* out, const ucs2_t* in, size_t* size)
 {
   ucs2_t wc = in[0];
 
   if ((wc & ~7) == 0xf860) {
     wc = cjk_compose_seq(in, size, mac_korean_compose,
-                        sizeof(mac_korean_compose) / sizeof(u_int32_t));
+                        sizeof(mac_korean_compose) / sizeof(uint32_t));
     if (!wc) return (size_t)-1;
   } else if ((wc & 0xf000) == 0xe000) {
     *size = 1;
@@ -62,7 +62,7 @@ static size_t mac_korean_char_push(u_int8_t* out, const ucs2_t* in, size_t* size
           (comb >= 0x0300 && comb <= 0x036f) ||
           (comb >= 0x20d0 && comb <= 0x20ea)) {
       ucs2_t comp = cjk_compose(wc, comb, mac_korean_compose,
-                               sizeof(mac_korean_compose) / sizeof(u_int32_t));
+                               sizeof(mac_korean_compose) / sizeof(uint32_t));
       if (!comp) break;
       wc = comp;
       if (++n == *size) break;
@@ -73,7 +73,7 @@ static size_t mac_korean_char_push(u_int8_t* out, const ucs2_t* in, size_t* size
     *size = 1;
   }
   if (wc <= 0x7f) {
-    out[0] = (u_int8_t)wc;
+    out[0] = (uint8_t)wc;
     return 1;
   }
   return cjk_char_push(cjk_lookup(wc, mac_korean_uni2_index,
@@ -87,9 +87,9 @@ static size_t mac_korean_push(void *cd, char **inbuf, size_t *inbytesleft,
                          cd, inbuf, inbytesleft, outbuf, outbytesleft);
 }
 
-static size_t mac_korean_char_pull(ucs2_t* out, const u_int8_t* in, size_t* size)
+static size_t mac_korean_char_pull(ucs2_t* out, const uint8_t* in, size_t* size)
 {
-  u_int16_t c = in[0];
+  uint16_t c = in[0];
 
   if (c <= 0x7f) {
     *size = 1;
@@ -97,7 +97,7 @@ static size_t mac_korean_char_pull(ucs2_t* out, const u_int8_t* in, size_t* size
     return 1;
   } else if (c >= 0xa1 && c <= 0xfe) {
     if (*size >= 2) {
-      u_int8_t c2 = in[1];
+      uint8_t c2 = in[1];
       if ((c2 >= 0x41 && c2 <= 0x7d) || (c2 >= 0x81 && c2 <= 0xfe)) {
        *size = 2;
        c = (c << 8) + c2;
index 4e990533d266f78ed40190a632a5299d716aa6fb..2febaa28779b7c55d42ed29c13edf207dcc5e306 100644 (file)
  * http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/
  */
 
-static const u_int16_t mac_korean_uni2_page00[][2] = {
+static const uint16_t mac_korean_uni2_page00[][2] = {
   /* 0x00a */ { 0x7a2d,    0 }, { 0x0880,    9 },
 };
 
-static const u_int16_t mac_korean_uni2_page02[][2] = {
+static const uint16_t mac_korean_uni2_page02[][2] = {
   /* 0x02b */ { 0x1000,   11 },
   /* 0x02c */ { 0x0000,    0 }, { 0x1001,   12 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x030 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
@@ -33,7 +33,7 @@ static const u_int16_t mac_korean_uni2_page02[][2] = {
   /* 0x03c */ { 0x0000,    0 }, { 0x0020,   14 },
 };
 
-static const u_int16_t mac_korean_uni2_page20[][2] = {
+static const uint16_t mac_korean_uni2_page20[][2] = {
   /* 0x201 */ { 0x8878,   15 }, { 0x0004,   21 }, { 0x5670,   22 },
   /* 0x204 */ { 0x7284,   29 }, { 0x0002,   35 }, { 0x0000,    0 }, { 0x7c00,   36 },
   /* 0x208 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x1200,   41 }, { 0x0000,    0 },
@@ -49,7 +49,7 @@ static const u_int16_t mac_korean_uni2_page20[][2] = {
   /* 0x230 */ { 0x0040,  118 }, { 0x0010,  119 },
 };
 
-static const u_int16_t mac_korean_uni2_page24[][2] = {
+static const uint16_t mac_korean_uni2_page24[][2] = {
   /* 0x246 */ { 0x8000,  120 }, { 0x000f,  121 },
   /* 0x248 */ { 0x00f8,  125 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0xffc0,  130 },
   /* 0x24c */ { 0xffff,  140 }, { 0x0000,    0 }, { 0xf800,  156 }, { 0x001f,  161 },
@@ -66,7 +66,7 @@ static const u_int16_t mac_korean_uni2_page24[][2] = {
   /* 0x278 */ { 0xfc00,  210 }, { 0x581f,  216 }, { 0x0012,  224 }, { 0x0024,  226 },
 };
 
-static const u_int16_t mac_korean_uni2_page29[][2] = {
+static const uint16_t mac_korean_uni2_page29[][2] = {
   /* 0x293 */ { 0x02f0,  228 },
   /* 0x294 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x003c,  233 }, { 0x0000,    0 },
   /* 0x298 */ { 0x0062,  237 }, { 0x0180,  240 }, { 0x0008,  242 }, { 0xc000,  243 },
@@ -77,21 +77,21 @@ static const u_int16_t mac_korean_uni2_page29[][2] = {
   /* 0x2ac */ { 0x1860,  253 }, { 0x0000,    0 }, { 0x0100,  257 },
 };
 
-static const u_int16_t mac_korean_uni2_page30[][2] = {
+static const uint16_t mac_korean_uni2_page30[][2] = {
   /* 0x301 */ { 0xd3c4,  258 }, { 0x0001,  266 }, { 0x0040,  267 },
 };
 
-static const u_int16_t mac_korean_uni2_page32[][2] = {
+static const uint16_t mac_korean_uni2_page32[][2] = {
   /* 0x323 */ { 0x0202,  268 },
   /* 0x324 */ { 0x0000,    0 }, { 0x07fe,  270 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x328 */ { 0xfc00,  280 }, { 0x4011,  286 }, { 0x0020,  289 },
 };
 
-static const u_int16_t mac_korean_uni2_page33[][2] = {
+static const uint16_t mac_korean_uni2_page33[][2] = {
   /* 0x33c */ { 0x0800,  290 },
 };
 
-static const u_int16_t mac_korean_uni2_pagee0[][2] = {
+static const uint16_t mac_korean_uni2_pagee0[][2] = {
   /* 0xe00 */ { 0xffff,  291 }, { 0xffff,  307 }, { 0xffff,  323 }, { 0xffff,  339 },
   /* 0xe04 */ { 0xffff,  355 }, { 0xffff,  371 }, { 0xffff,  387 }, { 0xffff,  403 },
   /* 0xe08 */ { 0xffff,  419 }, { 0xffff,  435 }, { 0xffff,  451 }, { 0xffff,  467 },
@@ -111,12 +111,12 @@ static const u_int16_t mac_korean_uni2_pagee0[][2] = {
   /* 0xe40 */ { 0x0000,    0 }, { 0x1ffc, 1126 },
 };
 
-static const u_int16_t mac_korean_uni2_pagef8[][2] = {
+static const uint16_t mac_korean_uni2_pagef8[][2] = {
   /* 0xf80 */ { 0x1fe0, 1137 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x2000, 1145 },
   /* 0xf84 */ { 0xffff, 1146 },
 };
 
-static const u_int16_t mac_korean_uni2_pagefe[][2] = {
+static const uint16_t mac_korean_uni2_pagefe[][2] = {
   /* 0xfe5 */ { 0x0600, 1162 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0xfe8 */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0xfec */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
@@ -141,7 +141,7 @@ static const cjk_index_t mac_korean_uni2_index[] = {
   { { 0, 0 }, NULL }
 };
 
-static const u_int16_t mac_korean_uni2_charset[] = {
+static const uint16_t mac_korean_uni2_charset[] = {
   0x0080, 0xa1cb, 0xa1cc, 0xa1cd, 0x0083, 0xa65c, 0xa1fe, 0xffff,
   0xffff, 0xa1a4, 0xa65d, 0xa198, 0xa2b0, 0xa2a6, 0xa76a, 0xa1a9,
   0xa1aa, 0xffff, 0xa1ab, 0xa170, 0xa16f, 0xa655, 0xa5de, 0xadad,
@@ -291,12 +291,12 @@ static const u_int16_t mac_korean_uni2_charset[] = {
   0xffff, 0xffff,
 };
 
-static const u_int16_t mac_korean_2uni_page00[][2] = {
+static const uint16_t mac_korean_2uni_page00[][2] = {
   /* 0x008 */ { 0x001f,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 },
   /* 0x00c */ { 0x0000,    0 }, { 0x0000,    0 }, { 0x0000,    0 }, { 0x8000,    5 },
 };
 
-static const u_int16_t mac_korean_2uni_pagea1[][2] = {
+static const uint16_t mac_korean_2uni_pagea1[][2] = {
   /* 0xa14 */ { 0xfffe,    6 }, { 0xffff,   21 }, { 0xffff,   37 }, { 0x3fff,   53 },
   /* 0xa18 */ { 0xfffe,   67 }, { 0xf7ff,   82 }, { 0x2e11,   97 }, { 0x0000,    0 },
   /* 0xa1c */ { 0x3800,  103 }, { 0x0000,    0 }, { 0x3000,  106 }, { 0x4000,  108 },
@@ -355,7 +355,7 @@ static const cjk_index_t mac_korean_2uni_index[] = {
   { { 0, 0 }, NULL }
 };
 
-static const u_int16_t mac_korean_2uni_charset[] = {
+static const uint16_t mac_korean_2uni_charset[] = {
   0x00a0, 0x20a9, 0xe022, 0x00a9, 0xe41c, 0xe02b, 0xe12a, 0xe12e,
   0xe128, 0xe12c, 0xe129, 0xe12d, 0xe130, 0xe132, 0xe125, 0xe126,
   0xe123, 0xe124, 0xfe59, 0xfe5a, 0xe413, 0xe415, 0xe118, 0xe11e,
@@ -503,7 +503,7 @@ static const u_int16_t mac_korean_2uni_charset[] = {
   0x2036, 0xe02e, 0x2035, 0xe02c, 0xe08d, 0xe001,
 };
 
-static const u_int32_t mac_korean_compose[] = {
+static const uint32_t mac_korean_compose[] = {
   0x0021f877, 0x0021f87f, 0x0028f87c, 0x0028f87f,
   0x0029f87c, 0x0029f87f, 0x002af877, 0x002d0308,
   0x003020de, 0x003120de, 0x003220de, 0x003320de,
index 9a1366e32f91f45bea06c72af8b8552355e9de0f..dab605f746f3d872a4312aaa466a094139414651 100644 (file)
@@ -8,7 +8,7 @@ UnicodeData.txt is got from
 http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
 */
 
-static const u_int16_t upper_table_1[704] = {
+static const uint16_t upper_table_1[704] = {
   0x0000, /*U+0000*/ /**/
   0x0001, /*U+0001*/ /**/
   0x0002, /*U+0002*/ /**/
@@ -715,7 +715,7 @@ static const u_int16_t upper_table_1[704] = {
   0x02BF, /*U+02BF*/ /**/
 };
 
-static const u_int16_t upper_table_2[640] = {
+static const uint16_t upper_table_2[640] = {
   0x0340, /*U+0340*/ /**/
   0x0341, /*U+0341*/ /**/
   0x0342, /*U+0342*/ /**/
@@ -1358,7 +1358,7 @@ static const u_int16_t upper_table_2[640] = {
   0x05BF, /*U+05BF*/ /**/
 };
 
-static const u_int16_t upper_table_3[64] = {
+static const uint16_t upper_table_3[64] = {
   0x1D40, /*U+1D40*/ /**/
   0x1D41, /*U+1D41*/ /**/
   0x1D42, /*U+1D42*/ /**/
@@ -1425,7 +1425,7 @@ static const u_int16_t upper_table_3[64] = {
   0x1D7F, /*U+1D7F*/ /**/
 };
 
-static const u_int16_t upper_table_4[512] = {
+static const uint16_t upper_table_4[512] = {
   0x1E00, /*U+1E00*/ /**/
   0x1E00, /*U+1E01*/ /*LATIN SMALL LETTER A WITH RING BELOW*/
   0x1E02, /*U+1E02*/ /**/
@@ -1940,7 +1940,7 @@ static const u_int16_t upper_table_4[512] = {
   0x1FFF, /*U+1FFF*/ /**/
 };
 
-static const u_int16_t upper_table_5[128] = {
+static const uint16_t upper_table_5[128] = {
   0x2140, /*U+2140*/ /**/
   0x2141, /*U+2141*/ /**/
   0x2142, /*U+2142*/ /**/
@@ -2071,7 +2071,7 @@ static const u_int16_t upper_table_5[128] = {
   0x21BF, /*U+21BF*/ /**/
 };
 
-static const u_int16_t upper_table_6[64] = {
+static const uint16_t upper_table_6[64] = {
   0x24C0, /*U+24C0*/ /**/
   0x24C1, /*U+24C1*/ /**/
   0x24C2, /*U+24C2*/ /**/
@@ -2138,7 +2138,7 @@ static const u_int16_t upper_table_6[64] = {
   0x24FF, /*U+24FF*/ /**/
 };
 
-static const u_int16_t upper_table_7[320] = {
+static const uint16_t upper_table_7[320] = {
   0x2C00, /*U+2C00*/ /**/
   0x2C01, /*U+2C01*/ /**/
   0x2C02, /*U+2C02*/ /**/
@@ -2461,7 +2461,7 @@ static const u_int16_t upper_table_7[320] = {
   0x2D3F, /*U+2D3F*/ /**/
 };
 
-static const u_int16_t upper_table_8[128] = {
+static const uint16_t upper_table_8[128] = {
   0xA640, /*U+A640*/ /**/
   0xA640, /*U+A641*/ /*CYRILLIC SMALL LETTER ZEMLYA*/
   0xA642, /*U+A642*/ /**/
@@ -2592,7 +2592,7 @@ static const u_int16_t upper_table_8[128] = {
   0xA6BF, /*U+A6BF*/ /**/
 };
 
-static const u_int16_t upper_table_9[192] = {
+static const uint16_t upper_table_9[192] = {
   0xA700, /*U+A700*/ /**/
   0xA701, /*U+A701*/ /**/
   0xA702, /*U+A702*/ /**/
@@ -2787,7 +2787,7 @@ static const u_int16_t upper_table_9[192] = {
   0xA7BF, /*U+A7BF*/ /**/
 };
 
-static const u_int16_t upper_table_10[64] = {
+static const uint16_t upper_table_10[64] = {
   0xFF40, /*U+FF40*/ /**/
   0xFF21, /*U+FF41*/ /*FULLWIDTH LATIN SMALL LETTER A*/
   0xFF22, /*U+FF42*/ /*FULLWIDTH LATIN SMALL LETTER B*/
@@ -2854,7 +2854,7 @@ static const u_int16_t upper_table_10[64] = {
   0xFF7F, /*U+FF7F*/ /**/
 };
 
-static const u_int32_t upper_table_sp_1[128] = {
+static const uint32_t upper_table_sp_1[128] = {
   0xD801DC00, /*0xD801DC00*/ /*U+010400*/ /*U+010400*/ /**/
   0xD801DC01, /*0xD801DC01*/ /*U+010401*/ /*U+010401*/ /**/
   0xD801DC02, /*0xD801DC02*/ /*U+010402*/ /*U+010402*/ /**/
@@ -2985,7 +2985,7 @@ static const u_int32_t upper_table_sp_1[128] = {
   0xD801DC7F, /*0xD801DC7F*/ /*U+01047F*/ /*U+01047F*/ /**/
 };
 
-static const u_int16_t lower_table_1[128] = {
+static const uint16_t lower_table_1[128] = {
   0x0000, /*U+0000*/ /**/
   0x0001, /*U+0001*/ /**/
   0x0002, /*U+0002*/ /**/
@@ -3116,7 +3116,7 @@ static const u_int16_t lower_table_1[128] = {
   0x007F, /*U+007F*/ /**/
 };
 
-static const u_int16_t lower_table_2[448] = {
+static const uint16_t lower_table_2[448] = {
   0x00E0, /*U+00C0*/ /*LATIN CAPITAL LETTER A WITH GRAVE*/
   0x00E1, /*U+00C1*/ /*LATIN CAPITAL LETTER A WITH ACUTE*/
   0x00E2, /*U+00C2*/ /*LATIN CAPITAL LETTER A WITH CIRCUMFLEX*/
@@ -3567,7 +3567,7 @@ static const u_int16_t lower_table_2[448] = {
   0x027F, /*U+027F*/ /**/
 };
 
-static const u_int16_t lower_table_3[576] = {
+static const uint16_t lower_table_3[576] = {
   0x0340, /*U+0340*/ /**/
   0x0341, /*U+0341*/ /**/
   0x0342, /*U+0342*/ /**/
@@ -4146,7 +4146,7 @@ static const u_int16_t lower_table_3[576] = {
   0x057F, /*U+057F*/ /**/
 };
 
-static const u_int16_t lower_table_4[128] = {
+static const uint16_t lower_table_4[128] = {
   0x1080, /*U+1080*/ /**/
   0x1081, /*U+1081*/ /**/
   0x1082, /*U+1082*/ /**/
@@ -4277,7 +4277,7 @@ static const u_int16_t lower_table_4[128] = {
   0x10FF, /*U+10FF*/ /**/
 };
 
-static const u_int16_t lower_table_5[512] = {
+static const uint16_t lower_table_5[512] = {
   0x1E01, /*U+1E00*/ /*LATIN CAPITAL LETTER A WITH RING BELOW*/
   0x1E01, /*U+1E01*/ /**/
   0x1E03, /*U+1E02*/ /*LATIN CAPITAL LETTER B WITH DOT ABOVE*/
@@ -4792,7 +4792,7 @@ static const u_int16_t lower_table_5[512] = {
   0x1FFF, /*U+1FFF*/ /**/
 };
 
-static const u_int16_t lower_table_6[192] = {
+static const uint16_t lower_table_6[192] = {
   0x2100, /*U+2100*/ /**/
   0x2101, /*U+2101*/ /**/
   0x2102, /*U+2102*/ /**/
@@ -4987,7 +4987,7 @@ static const u_int16_t lower_table_6[192] = {
   0x21BF, /*U+21BF*/ /**/
 };
 
-static const u_int16_t lower_table_7[128] = {
+static const uint16_t lower_table_7[128] = {
   0x2480, /*U+2480*/ /**/
   0x2481, /*U+2481*/ /**/
   0x2482, /*U+2482*/ /**/
@@ -5118,7 +5118,7 @@ static const u_int16_t lower_table_7[128] = {
   0x24FF, /*U+24FF*/ /**/
 };
 
-static const u_int16_t lower_table_8[256] = {
+static const uint16_t lower_table_8[256] = {
   0x2C30, /*U+2C00*/ /*GLAGOLITIC CAPITAL LETTER AZU*/
   0x2C31, /*U+2C01*/ /*GLAGOLITIC CAPITAL LETTER BUKY*/
   0x2C32, /*U+2C02*/ /*GLAGOLITIC CAPITAL LETTER VEDE*/
@@ -5377,7 +5377,7 @@ static const u_int16_t lower_table_8[256] = {
   0x2CFF, /*U+2CFF*/ /**/
 };
 
-static const u_int16_t lower_table_9[128] = {
+static const uint16_t lower_table_9[128] = {
   0xA641, /*U+A640*/ /*CYRILLIC CAPITAL LETTER ZEMLYA*/
   0xA641, /*U+A641*/ /**/
   0xA643, /*U+A642*/ /*CYRILLIC CAPITAL LETTER DZELO*/
@@ -5508,7 +5508,7 @@ static const u_int16_t lower_table_9[128] = {
   0xA6BF, /*U+A6BF*/ /**/
 };
 
-static const u_int16_t lower_table_10[192] = {
+static const uint16_t lower_table_10[192] = {
   0xA700, /*U+A700*/ /**/
   0xA701, /*U+A701*/ /**/
   0xA702, /*U+A702*/ /**/
@@ -5703,7 +5703,7 @@ static const u_int16_t lower_table_10[192] = {
   0xA7BF, /*U+A7BF*/ /**/
 };
 
-static const u_int16_t lower_table_11[64] = {
+static const uint16_t lower_table_11[64] = {
   0xFF00, /*U+FF00*/ /**/
   0xFF01, /*U+FF01*/ /**/
   0xFF02, /*U+FF02*/ /**/
@@ -5770,7 +5770,7 @@ static const u_int16_t lower_table_11[64] = {
   0xFF3F, /*U+FF3F*/ /**/
 };
 
-static const u_int32_t lower_table_sp_1[64] = {
+static const uint32_t lower_table_sp_1[64] = {
   0xD801DC28, /*0xD801DC00*/ /*U+010428*/ /*U+010400*/ /*DESERET CAPITAL LETTER LONG I*/
   0xD801DC29, /*0xD801DC01*/ /*U+010429*/ /*U+010401*/ /*DESERET CAPITAL LETTER LONG E*/
   0xD801DC2A, /*0xD801DC02*/ /*U+01042A*/ /*U+010402*/ /*DESERET CAPITAL LETTER LONG A*/
index 5e4ae8597a42e1b2f73c1fccd0b3f8cd6b3fc249..9b018baa97217b0eddd15f0947c0d40691051a45 100644 (file)
@@ -285,7 +285,7 @@ static ucs2_t do_precomposition(unsigned int base, unsigned int comb)
        int min = 0;
        int max = PRECOMP_COUNT - 1;
        int mid;
-       u_int32_t sought = (base << 16) | comb, that;
+       uint32_t sought = (base << 16) | comb, that;
 
        /* binary search */
        while (max >= min) {
@@ -304,17 +304,17 @@ static ucs2_t do_precomposition(unsigned int base, unsigned int comb)
 }
 
 /* ------------------------ */
-static u_int32_t do_precomposition_sp(unsigned int base_sp, unsigned int comb_sp) 
+static uint32_t do_precomposition_sp(unsigned int base_sp, unsigned int comb_sp) 
 {
        int min = 0;
        int max = PRECOMP_SP_COUNT - 1;
        int mid;
-       u_int64_t sought_sp = ((u_int64_t)base_sp << 32) | (u_int64_t)comb_sp, that_sp;
+       uint64_t sought_sp = ((uint64_t)base_sp << 32) | (uint64_t)comb_sp, that_sp;
 
        /* binary search */
        while (max >= min) {
                mid = (min + max) / 2;
-               that_sp = ((u_int64_t)precompositions_sp[mid].base_sp << 32) | ((u_int64_t)precompositions_sp[mid].comb_sp);
+               that_sp = ((uint64_t)precompositions_sp[mid].base_sp << 32) | ((uint64_t)precompositions_sp[mid].comb_sp);
                if (that_sp < sought_sp) {
                        min = mid + 1;
                } else if (that_sp > sought_sp) {
@@ -328,13 +328,13 @@ static u_int32_t do_precomposition_sp(unsigned int base_sp, unsigned int comb_sp
 }
 
 /* -------------------------- */
-static u_int32_t do_decomposition(ucs2_t base) 
+static uint32_t do_decomposition(ucs2_t base) 
 {
        int min = 0;
        int max = DECOMP_COUNT - 1;
        int mid;
-       u_int32_t sought = base;
-       u_int32_t result, that;
+       uint32_t sought = base;
+       uint32_t result, that;
 
        /* binary search */
        while (max >= min) {
@@ -354,14 +354,14 @@ static u_int32_t do_decomposition(ucs2_t base)
 }
 
 /* -------------------------- */
-static u_int64_t do_decomposition_sp(unsigned int base_sp) 
+static uint64_t do_decomposition_sp(unsigned int base_sp) 
 {
        int min = 0;
        int max = DECOMP_SP_COUNT - 1;
        int mid;
-       u_int32_t sought_sp = base_sp;
-       u_int32_t that_sp;
-       u_int64_t result_sp;
+       uint32_t sought_sp = base_sp;
+       uint32_t that_sp;
+       uint64_t result_sp;
 
        /* binary search */
        while (max >= min) {
@@ -372,7 +372,7 @@ static u_int64_t do_decomposition_sp(unsigned int base_sp)
                } else if (that_sp > sought_sp) {
                        max = mid - 1;
                } else {
-                       result_sp = ((u_int64_t)decompositions_sp[mid].base_sp << 32) | ((u_int64_t)decompositions_sp[mid].comb_sp);
+                       result_sp = ((uint64_t)decompositions_sp[mid].base_sp << 32) | ((uint64_t)decompositions_sp[mid].comb_sp);
                        return result_sp;
                }
        }
@@ -399,11 +399,11 @@ size_t precompose_w (ucs2_t *name, size_t inplen, ucs2_t *comp, size_t *outlen)
 {
        size_t i;
        ucs2_t base, comb;
-       u_int32_t base_sp, comb_sp;
+       uint32_t base_sp, comb_sp;
        ucs2_t *in, *out;
        ucs2_t lindex, vindex;
        ucs2_t result;
-       u_int32_t result_sp;
+       uint32_t result_sp;
        size_t o_len = *outlen;
        
        if (!inplen || (inplen & 1) || inplen > o_len)
@@ -454,9 +454,9 @@ size_t precompose_w (ucs2_t *name, size_t inplen, ucs2_t *comp, size_t *outlen)
                /* Binary Search for Surrogate Pair */
                else if ((0xD800 <= base) && (base < 0xDC00)) {
                        if ((0xDC00 <= comb) && (comb < 0xE000) && (i + 4 <= inplen)) {
-                               base_sp = ((u_int32_t)base << 16) | (u_int32_t)comb;
+                               base_sp = ((uint32_t)base << 16) | (uint32_t)comb;
                                do {
-                                       comb_sp = ((u_int32_t)in[1] << 16) | (u_int32_t)in[2];
+                                       comb_sp = ((uint32_t)in[1] << 16) | (uint32_t)in[2];
                                        if (result_sp = do_precomposition_sp(base_sp, comb_sp)) {
                                                base_sp = result_sp;
                                                i += 4;
@@ -508,11 +508,11 @@ size_t decompose_w (ucs2_t *name, size_t inplen, ucs2_t *comp, size_t *outlen)
        size_t i;
        size_t comblen;
        ucs2_t base, comb[COMBBUFLEN];
-       u_int32_t base_sp;
+       uint32_t base_sp;
        ucs2_t sindex, tjamo;
        ucs2_t *in, *out;
        unsigned int result;
-       u_int64_t result_sp;
+       uint64_t result_sp;
        size_t o_len = *outlen;
 
        if (!inplen || (inplen & 1))
@@ -550,7 +550,7 @@ size_t decompose_w (ucs2_t *name, size_t inplen, ucs2_t *comp, size_t *outlen)
                /* Binary Search for Surrogate Pair */
                else if ((0xD800 <= base) && (base < 0xDC00)) {
                        if (i + 2 < inplen) {
-                               base_sp =  ((u_int32_t)base << 16) | (u_int32_t)in[1];
+                               base_sp =  ((uint32_t)base << 16) | (uint32_t)in[1];
                                do {
                                        if ( !(result_sp = do_decomposition_sp(base_sp))) break;
                                        comblen += 2;
index c258398d847d242944eb989d6348e59c84d2290e..ed4e1261ef0a0fb08c4f7fb371888efee13ad231 100644 (file)
@@ -69,8 +69,8 @@ static int ipc_kill_token(struct ipc_header *ipc, server_child *children)
 /* ----------------- */
 static int ipc_get_session(struct ipc_header *ipc, server_child *children)
 {
-    u_int32_t boottime;
-    u_int32_t idlen;
+    uint32_t boottime;
+    uint32_t idlen;
     char     *clientid, *p;