]> arthur.barton.de Git - netatalk.git/commitdiff
Remove a lot of warning, from cvs HEAD
authordidg <didg>
Tue, 27 Sep 2005 10:40:40 +0000 (10:40 +0000)
committerdidg <didg>
Tue, 27 Sep 2005 10:40:40 +0000 (10:40 +0000)
87 files changed:
bin/aecho/aecho.c
bin/cnid/cnid_index.c
bin/megatron/asingle.c
bin/megatron/asingle.h
bin/megatron/hqx.c
bin/megatron/megatron.c
bin/uniconv/iso8859_1_adapted.c
bin/uniconv/uniconv.c
configure.in
etc/afpd/afp_asp.c
etc/afpd/afp_config.c
etc/afpd/afp_dsi.c
etc/afpd/appl.c
etc/afpd/auth.c
etc/afpd/catsearch.c
etc/afpd/desktop.c
etc/afpd/directory.c
etc/afpd/enumerate.c
etc/afpd/file.c
etc/afpd/filedir.c
etc/afpd/fork.c
etc/afpd/mangle.c
etc/afpd/mangle.h
etc/afpd/messages.c
etc/afpd/ofork.c
etc/afpd/status.c
etc/afpd/switch.c
etc/afpd/uam.c
etc/afpd/unix.c
etc/afpd/volume.c
etc/atalkd/atserv.h
etc/atalkd/config.c
etc/atalkd/main.c
etc/cnid_dbd/cnid_metad.c
etc/cnid_dbd/db_param.c
etc/cnid_dbd/dbd_getstamp.c
etc/cnid_dbd/dbd_lookup.c
etc/cnid_dbd/dbd_update.c
etc/cnid_dbd/dbif.c
etc/cnid_dbd/pack.c
etc/cnid_dbd/pack.h
etc/cnid_dbd/usockfd.c
etc/papd/headers.c
etc/papd/magics.c
etc/papd/print_cups.c
etc/papd/uam.c
etc/uams/uams_dhx_pam.c
etc/uams/uams_dhx_passwd.c
etc/uams/uams_guest.c
etc/uams/uams_pam.c
etc/uams/uams_passwd.c
etc/uams/uams_randnum.c
include/atalk/cnid.h
include/atalk/dsi.h
libatalk/cnid/cdb/cnid_cdb.h
libatalk/cnid/cdb/cnid_cdb_add.c
libatalk/cnid/cdb/cnid_cdb_get.c
libatalk/cnid/cdb/cnid_cdb_lookup.c
libatalk/cnid/cdb/cnid_cdb_open.c
libatalk/cnid/cdb/cnid_cdb_private.h
libatalk/cnid/cdb/cnid_cdb_resolve.c
libatalk/cnid/cdb/cnid_cdb_update.c
libatalk/cnid/cnid.c
libatalk/cnid/db3/cnid_db3.h
libatalk/cnid/db3/cnid_db3_add.c
libatalk/cnid/db3/cnid_db3_get.c
libatalk/cnid/db3/cnid_db3_lookup.c
libatalk/cnid/db3/cnid_db3_private.h
libatalk/cnid/db3/cnid_db3_resolve.c
libatalk/cnid/db3/cnid_db3_update.c
libatalk/cnid/dbd/cnid_dbd.c
libatalk/cnid/dbd/cnid_dbd.h
libatalk/cnid/last/cnid_last.c
libatalk/cnid/last/cnid_last.h
libatalk/cnid/tdb/cnid_tdb.h
libatalk/cnid/tdb/cnid_tdb_add.c
libatalk/cnid/tdb/cnid_tdb_get.c
libatalk/cnid/tdb/cnid_tdb_lookup.c
libatalk/cnid/tdb/cnid_tdb_update.c
libatalk/dsi/dsi_init.c
libatalk/dsi/dsi_stream.c
libatalk/dsi/dsi_write.c
libatalk/unicode/charsets/generic_mb.c
libatalk/unicode/charsets/mac_hebrew.c
libatalk/unicode/iconv.c
libatalk/unicode/utf8.c
libatalk/util/server_ipc.c

index 410888b5395484c8ff4ef530676ee43a213e7c7c..507a660d3658abf370ef3d47241f71d0aaf37209 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: aecho.c,v 1.5.10.1 2003-07-21 05:50:53 didg Exp $
+ * $Id: aecho.c,v 1.5.10.1.4.1 2005-09-27 10:40:40 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
 #endif /* ! SOCKLEN_T */
 
 struct sockaddr_at     target;
-int                    s, nsent = 0, nrecv = 0;
+int                    sock;
+unsigned int           nsent = 0, nrecv = 0;
 time_t                 totalms = 0, minms = -1, maxms = -1;
-static unsigned int     pings = 0;
+unsigned int           pings = 0;
 
 void usage(char *);
 
 void done()
 {
-    if ( nsent > 0 ) {
+    if ( nsent) {
        printf( "\n----%d.%d AEP Statistics----\n",
                ntohs( target.sat_addr.s_net ), target.sat_addr.s_node );
        printf( "%d packets sent, %d packets received, %d%% packet loss\n",
                nsent, nrecv, (( nsent - nrecv ) * 100 ) / nsent );
-       if ( nrecv > 0 ) {
+       if ( nrecv ) {
            printf( "round-trip (ms)  min/avg/max = %ld/%ld/%ld\n",
                    minms, totalms / nrecv, maxms );
        }       
@@ -101,7 +102,7 @@ void aep_send()
     memcpy( p, &tv, sizeof( struct timeval ));
     p += sizeof( struct timeval );
 
-    if ( netddp_sendto( s, buf, p - buf, 0, (struct sockaddr *) &target,
+    if ( netddp_sendto( sock, buf, p - buf, 0, (struct sockaddr *) &target,
            sizeof( struct sockaddr_at )) < 0 ) {
        perror( "sendto" );
        exit( 1 );
@@ -182,7 +183,7 @@ int main( ac, av )
     }
     target.sat_port = port;
 
-    if ((s = netddp_open(saddr.sat_addr.s_net || saddr.sat_addr.s_node ? 
+    if ((sock = netddp_open(saddr.sat_addr.s_net || saddr.sat_addr.s_node ? 
                         &saddr : NULL, NULL)) < 0) {
        perror("ddp_open");
        exit(1);
@@ -218,7 +219,7 @@ int main( ac, av )
 
     for (;;) {
        satlen = sizeof( struct sockaddr_at );
-       if (( cc = netddp_recvfrom( s, buf, sizeof( buf ), 0, 
+       if (( cc = netddp_recvfrom( sock, buf, sizeof( buf ), 0, 
                                    (struct sockaddr *) &sat,
                                    &satlen )) < 0 ) {
            if ( errno == EINTR ) {
index d81be2e1baa5cbe65c762fb9ca3fc30a73dd6b27..45ebe57860897ffd2601baa3ad498ef1bf7e9616 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_index.c,v 1.1.2.5 2005-09-13 16:57:44 didg Exp $
+ * $Id: cnid_index.c,v 1.1.2.6 2005-09-27 10:40:40 didg Exp $
  *
  * All Rights Reserved.  See COPYING.
  */
@@ -73,8 +73,8 @@ static char *old_dbfiles[] = {"cnid.db", NULL};
 
 /* --------------- */
 int didname(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
 DBT *skey;
 {
 int len;
@@ -91,8 +91,8 @@ int len;
  
 /* --------------- */
 int devino(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
 DBT *skey;
 {
     memset(skey, 0, sizeof(DBT));
index 9d21f2123e8ace25d27d1d9ee27659ce0d4bc005..57448f5f6d993849ee682d073a9440cc71d7cf96 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asingle.c,v 1.8.6.1.4.1 2005-02-06 10:16:00 didg Exp $
+ * $Id: asingle.c,v 1.8.6.1.4.2 2005-09-27 10:40:40 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -64,7 +64,7 @@ u_char                header_buf[ AD_HEADER_LEN ];
 
 int single_open( singlefile, flags, fh, options )
     char               *singlefile;
-    int                        flags, options;
+    int                        flags, options _U_;
     struct FHeader     *fh;
 {
     int                        rc;
@@ -268,7 +268,7 @@ int single_header_read( fh, version )
  * Unless I can't get the current date, in which case use time zero.
  */
     if (( date_entry < 7 ) || ( date_entry > 8 )) {
-       if (( time_seconds = time( NULL )) == -1 ) {
+       if (( time_seconds = time( NULL )) == (u_int32_t)-1 ) {
            time_seconds = AD_DATE_START;
        } else {
            time_seconds = AD_DATE_FROM_UNIX(time_seconds);
@@ -344,11 +344,11 @@ u_char            sixteennulls[] = { 0, 0, 0, 0, 0, 0, 0, 0,
 
 int single_header_test(void)
 {
-    int                        cc;
+    ssize_t            cc;
     u_int32_t          templong;
 
     cc = read( single.filed, (char *)header_buf, sizeof( header_buf ));
-    if ( cc < sizeof( header_buf )) {
+    if ( cc < (ssize_t)sizeof( header_buf )) {
        perror( "Premature end of file :" );
        return( -1 );
     }
@@ -398,7 +398,7 @@ int single_header_test(void)
 int single_read( fork, buffer, length )
     int                        fork;
     char               *buffer;
-    int                        length;
+    u_int32_t          length;
 {
     u_int32_t          entry_id;
     char               *buf_ptr;
index 44a3ab124b67843046e9b1a30a820a324f7ebf8e..6f8121ffd2b825261240d132abc9c70d31206a89 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asingle.h,v 1.2 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: asingle.h,v 1.2.16.1 2005-09-27 10:40:40 didg Exp $
  */
 
 #ifndef _ASINGLE_H
@@ -12,6 +12,6 @@ int single_open(char *singlefile, int flags, struct FHeader *fh, int options);
 int single_close(int readflag);
 int single_header_read(struct FHeader *fh, int version);
 int single_header_test(void);
-int single_read(int fork, char *buffer, int length);
+int single_read(int fork, char *buffer, u_int32_t length);
 
 #endif /* _ASINGLE_H */
index 2631898bfbc25566f1366491ec4d003c6c65722b..7510a13c9f81a640183cecd0fd4bce0dc5a033e0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: hqx.c,v 1.12.4.1.4.1 2005-02-06 10:16:00 didg Exp $
+ * $Id: hqx.c,v 1.12.4.1.4.2 2005-09-27 10:40:40 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -393,7 +393,7 @@ int hqx_header_read( fh )
  */
 
 int hqx_header_write( fh )
-    struct FHeader     *fh;
+    struct FHeader     *fh _U_;
 {
     return( -1 );
 }
index 49223d203bbb83041c137ada48f1dc7738846515..202e1d89de846487a35659e9f6ba0ed1fc0d105d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: megatron.c,v 1.9 2002-04-29 01:52:49 morgana Exp $
+ * $Id: megatron.c,v 1.9.10.1 2005-09-27 10:40:40 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -191,7 +191,7 @@ int megatron( path, module, newname, flags )
     struct FHeader     fh;
     int                        bufc;
     int                        fork;
-    int                        forkred;
+    unsigned int       forkred;
 
 /*
  * If the source file is not stdin, make sure it exists and
index 70a895a59eb8418f730a6a09b48b50dd07b3d22c..1ec5735c73f887fc5e6a8bca0a126288c0d18561 100644 (file)
@@ -48,7 +48,7 @@ struct charset_functions charset_iso8859_adapted =
  * from unicode to iso8859_adapted code page
 */
 
-static size_t iso8859_adapted_push( void *cd, char **inbuf, size_t *inbytesleft,
+static size_t iso8859_adapted_push( void *cd _U_, char **inbuf, size_t *inbytesleft,
                          char **outbuf, size_t *outbytesleft)
 {
     int len = 0;
@@ -102,7 +102,7 @@ static size_t iso8859_adapted_push( void *cd, char **inbuf, size_t *inbytesleft,
 }
 
 /* ------------------------ */
-static size_t iso8859_adapted_pull ( void *cd, char **inbuf, size_t *inbytesleft,
+static size_t iso8859_adapted_pull ( void *cd _U_, char **inbuf, size_t *inbytesleft,
                          char **outbuf, size_t *outbytesleft)
 {
     unsigned char  *inptr;
index b3c8ee91b2677e3e6e27235f55308b33d954f6b6..9955c2dca904d57cbd8c87a111f32fdba00f057f 100644 (file)
@@ -242,7 +242,7 @@ static int check_dirent(char** name, cnid_t cur_did)
        return ret;
 }
 
-static int check_adouble(DIR *curdir, char * path)
+static int check_adouble(DIR *curdir, char * path _U_)
 {
        DIR *adouble;
        struct dirent* entry;
index bed9a6ef37605415887fc0c17203be98225195a5..5a1b5176e783fbca66a1d58602b01ce651df3607 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.179.2.3.2.37.2.4 2005-04-13 10:21:09 bfernhomberg Exp $
+dnl $Id: configure.in,v 1.179.2.3.2.37.2.5 2005-09-27 10:40:40 didg Exp $
 dnl configure.in for netatalk
 
 AC_INIT(etc/afpd/main.c)
@@ -554,6 +554,16 @@ AC_ARG_WITH(uams-path,
 
 NETATALK_AC_CUPS
 
+dnl check if we can use attribute unused (gcc only) from ethereal
+AC_MSG_CHECKING(to see if we can add '__attribute__((unused))' to CFLAGS)
+if test x$GCC != x ; then
+  CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
+  AC_MSG_RESULT(yes)
+else
+  CFLAGS="-D_U_=\"\" $CFLAGS"
+  AC_MSG_RESULT(no)
+fi
+
 dnl --------------------------------------------------------------------------
 dnl FHS stuff has to be done last because it overrides other defaults
 dnl --------------------------------------------------------------------------
index 51288efec71a4706d2eb1288477e7321cc131635..c167e53611a723177c995262d06a0a76c8d65803 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_asp.c,v 1.18.6.6 2004-05-04 15:38:23 didg Exp $
+ * $Id: afp_asp.c,v 1.18.6.6.2.1 2005-09-27 10:40:40 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -196,7 +196,7 @@ static void afp_asp_reload()
 
 /* ---------------------- */
 #ifdef SERVERTEXT
-static void afp_asp_getmesg (int sig)
+static void afp_asp_getmesg (int sig _U_)
 {
     readmessage(child);
     asp_attention(child->handle, AFPATTN_MESG | AFPATTN_TIME(5));
index 28ffd514c345e2d181a830971c38109d2eaef283..a289edb2ee5d1ccb601ebfcd0b42f0e166b2bf94 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_config.c,v 1.22.6.9.2.2 2005-01-31 17:00:38 didg Exp $
+ * $Id: afp_config.c,v 1.22.6.9.2.3 2005-09-27 10:40:40 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
@@ -96,7 +96,7 @@ void configfree(AFPConfig *configs, const AFPConfig *config)
 }
 
 #ifdef USE_SRVLOC
-static void SRVLOC_callback(SLPHandle hslp, SLPError errcode, void *cookie) {
+static void SRVLOC_callback(SLPHandle hslp _U_, SLPError errcode, void *cookie) {
     *(SLPError*)cookie = errcode;
 }
 
@@ -535,7 +535,7 @@ AFPConfig *configinit(struct afp_options *cmdline)
     FILE *fp;
     char buf[LINESIZE + 1], *p, have_option = 0;
     struct afp_options options;
-    AFPConfig *config, *first = NULL; /* uninitialized, OK 310105 */
+    AFPConfig *config=NULL, *first = NULL; 
 
     status_reset();
     /* if config file doesn't exist, load defaults */
index a34a664e3fc770b868a0b326b16050a329d0b755..c480b1cac3957e96fd9693e89273bbb51266a150 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_dsi.c,v 1.27.2.3.2.4.2.1 2005-03-31 00:25:55 didg Exp $
+ * $Id: afp_dsi.c,v 1.27.2.3.2.4.2.2 2005-09-27 10:40:40 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -166,7 +166,7 @@ static void afp_dsi_reload()
 
 /* ---------------------- */
 #ifdef SERVERTEXT
-static void afp_dsi_getmesg (int sig)
+static void afp_dsi_getmesg (int sig _U_)
 {
     readmessage(child.obj);
     dsi_attention(child.obj->handle, AFPATTN_MESG | AFPATTN_TIME(5));
index 855c4a9191b357df3f9ff40dc37793b6eee0cda8..6fd2abb15c4679166a5196741ded95ccad50516d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: appl.c,v 1.12.2.1.2.2.2.1 2005-02-06 10:16:00 didg Exp $
+ * $Id: appl.c,v 1.12.2.1.2.2.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -160,9 +160,9 @@ char        *path;
 
 
 int afp_addappl(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -250,9 +250,9 @@ int         ibuflen, *rbuflen;
 }
 
 int afp_rmvappl(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -324,9 +324,9 @@ int         ibuflen, *rbuflen;
 }
 
 int afp_getappl(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol         *vol;
     char               *p, *q;
index b1002139e285b02f1bb18fd845b3250afee10d10..09b809728f39a958995ce02bd08e66f42fccb037 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: auth.c,v 1.44.2.3.2.15.2.3 2005-03-11 15:36:58 didg Exp $
+ * $Id: auth.c,v 1.44.2.3.2.15.2.4 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -154,18 +154,17 @@ static int send_reply(const AFPObj *obj, const int err)
     return AFP_OK;
 }
 
-
 static int afp_errpwdexpired(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj _U_;
+char   *ibuf _U_, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     *rbuflen = 0;
     return AFPERR_PWDEXPR;
 }
 
 
-static int set_auth_switch(AFPObj *obj, int expired)
+static int set_auth_switch(int expired)
 {
     int i;
 
@@ -364,7 +363,7 @@ static int login(AFPObj *obj, struct passwd *pwd, void (*logout)(void), int expi
 #endif /* ADMIN_GRP */
         uuid = pwd->pw_uid;
 
-    set_auth_switch(obj, expired);
+    set_auth_switch(expired);
 
     obj->logout = logout;
 
@@ -379,8 +378,8 @@ static int login(AFPObj *obj, struct passwd *pwd, void (*logout)(void), int expi
 /* ---------------------- */
 int afp_zzz (obj, ibuf, ibuflen, rbuf, rbuflen ) /* Function 122 */
 AFPObj       *obj;
-char         *ibuf, *rbuf;
-unsigned int ibuflen, *rbuflen;
+char         *ibuf  _U_, *rbuf;
+unsigned int ibuflen  _U_, *rbuflen;
 {
     u_int32_t  retdata;
 
@@ -530,9 +529,9 @@ unsigned int ibuflen, *rbuflen;
 
 /* ---------------------- */
 int afp_disconnect(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj  _U_;
+char   *ibuf, *rbuf  _U_;
+int    ibuflen  _U_, *rbuflen;
 {
     u_int16_t           type;
 
@@ -827,8 +826,8 @@ int         ibuflen, *rbuflen;
 
 int afp_logout(obj, ibuf, ibuflen, rbuf, rbuflen)
 AFPObj     *obj;
-char       *ibuf, *rbuf;
-int        ibuflen, *rbuflen;
+char       *ibuf _U_, *rbuf  _U_;
+int        ibuflen  _U_, *rbuflen  _U_;
 {
     LOG(log_info, logtype_afpd, "logout %s", obj->username);
     close_all_vol();
@@ -906,7 +905,7 @@ int         ibuflen, *rbuflen;
         (ret == AFPERR_AUTHCONT) ? "continued" :
         (ret ? "failed" : "succeeded"));
     if ( ret == AFP_OK )
-       set_auth_switch(obj, 0);
+       set_auth_switch(0);
        
     return ret;
 }
@@ -914,9 +913,9 @@ int         ibuflen, *rbuflen;
 
 /* FPGetUserInfo */
 int afp_getuserinfo(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     u_int8_t  thisuser;
     u_int32_t id;
index 96e3124eb88805d6912aa440f149d2d8190c48fd..1f0a27b03b34cb78deb0e0a8a7c6d1986b8e47cd 100644 (file)
@@ -663,7 +663,7 @@ catsearch_end: /* Exiting catsearch: error condition */
 } /* catsearch() */
 
 /* -------------------------- */
-int catsearch_afp(AFPObj *obj, char *ibuf, int ibuflen,
+int catsearch_afp(AFPObj *obj _U_, char *ibuf, int ibuflen,
                   char *rbuf, int *rbuflen, int ext)
 {
     struct vol *vol;
index e6ab34ca6959b40dd9bc88b24411a33e5065c50d..19ebfede24ff37c92c1c35ba5626104e69b355ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: desktop.c,v 1.26.2.4.2.18.2.2 2005-02-10 01:23:10 didg Exp $
+ * $Id: desktop.c,v 1.26.2.4.2.18.2.3 2005-09-27 10:40:41 didg Exp $
  *
  * See COPYRIGHT.
  *
@@ -41,9 +41,9 @@
 
 
 int afp_opendt(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol *vol;
     u_int16_t  vid;
@@ -62,9 +62,9 @@ int           ibuflen, *rbuflen;
 }
 
 int afp_closedt(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj _U_;
+char   *ibuf _U_, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     *rbuflen = 0;
     return( AFP_OK );
@@ -127,9 +127,9 @@ int mode;
 }
 
 int afp_addicon(obj, ibuf, ibuflen, rbuf, rbuflen)
-AFPObj      *obj;
+AFPObj  *obj;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol         *vol;
 #ifndef NO_DDP
@@ -311,11 +311,11 @@ addicon_err:
     return( AFP_OK );
 }
 
-static u_char  utag[] = { 0, 0, 0, 0 };
-static u_char  ucreator[] = { 0, 0, 0, 0 };/* { 'U', 'N', 'I', 'X' };*/
-static u_char  utype[] = { 0, 0, 0, 0 };/* { 'T', 'E', 'X', 'T' };*/
-static short   usize = 256;
-static u_char  uicon[] = {
+static const u_char    utag[] = { 0, 0, 0, 0 };
+static const u_char    ucreator[] = { 0, 0, 0, 0 };/* { 'U', 'N', 'I', 'X' };*/
+static const u_char    utype[] = { 0, 0, 0, 0 };/* { 'T', 'E', 'X', 'T' };*/
+static const short     usize = 256;
+static const u_char    uicon[] = {
     0x1F, 0xFF, 0xFC, 0x00, 0x10, 0x00, 0x06, 0x00,
     0x10, 0x00, 0x05, 0x00, 0x10, 0x00, 0x04, 0x80,
     0x10, 0x00, 0x04, 0x40, 0x10, 0x00, 0x04, 0x20,
@@ -351,9 +351,9 @@ static u_char       uicon[] = {
 };
 
 int afp_geticoninfo(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol *vol;
     u_char     fcreator[ 4 ], ih[ 12 ];
@@ -425,9 +425,9 @@ int         ibuflen, *rbuflen;
 
 
 int afp_geticon(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol *vol;
     off_t       offset;
@@ -574,7 +574,7 @@ geticon_exit:
 }
 
 /* ---------------------- */
-static char            hexdig[] = "0123456789abcdef";
+static const char              hexdig[] = "0123456789abcdef";
 char *dtfile(const struct vol *vol, u_char creator[], char *ext )
 {
     static char        path[ MAXPATHLEN + 1];
@@ -757,9 +757,9 @@ static int ad_addcomment(struct vol *vol, struct path *path, char *ibuf)
 
 /* ----------------------------- */
 int afp_addcomment(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj      *obj _U_;
+char   *ibuf, *rbuf _U_;
+int            ibuflen _U_, *rbuflen;
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -837,9 +837,9 @@ static int ad_getcomment(struct vol *vol, struct path *path, char *rbuf, int *rb
 
 /* -------------------- */
 int afp_getcomment(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj      *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int            ibuflen _U_, *rbuflen;
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -912,9 +912,9 @@ static int ad_rmvcomment(struct vol *vol, struct path *path)
 
 /* ----------------------- */
 int afp_rmvcomment(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj      *obj _U_;
+char   *ibuf, *rbuf _U_;
+int            ibuflen _U_, *rbuflen;
 {
     struct vol         *vol;
     struct dir         *dir;
index 2ed3dcbb6459209bb51d28b719e8bd4ecd5c352c..af57b41751eb878dd86ba96c7ed728f603b01e50 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: directory.c,v 1.71.2.4.2.15.2.7 2005-09-23 19:03:27 didg Exp $
+ * $Id: directory.c,v 1.71.2.4.2.15.2.8 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -1116,7 +1116,7 @@ char      **cpath;
                     static char        temp[ MAXPATHLEN + 1];
 
                     /* not an UTF8 name */
-                    if (mtoUTF8(vol, path, strlen(path), temp, MAXPATHLEN) == -1) {
+                    if (mtoUTF8(vol, path, strlen(path), temp, MAXPATHLEN) == (size_t)-1) {
                         afp_errno = AFPERR_PARAM;
                         return( NULL );
                     }
@@ -1542,9 +1542,9 @@ int path_error(struct path *path, int error)
 
 /* ----------------------------- */
 int afp_setdirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol *vol;
     struct dir *dir;
@@ -1639,7 +1639,7 @@ int setdirparams(const struct vol *vol,
 
     char                *upath;
     struct dir          *dir;
-    int                        bit, aint, isad = 1;
+    int                        bit, isad = 1;
     int                 cdate, bdate;
     int                 owner, group;
     u_int16_t          ashort, bshort;
@@ -1959,9 +1959,9 @@ setdirparam_done:
 }
 
 int afp_createdir(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct adouble     ad;
     struct vol         *vol;
@@ -2253,9 +2253,9 @@ delete_done:
 }
 
 int afp_mapid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct passwd      *pw;
     struct group       *gr;
@@ -2326,9 +2326,9 @@ int               ibuflen, *rbuflen;
 }
 
 int afp_mapname(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct passwd      *pw;
     struct group       *gr;
@@ -2390,9 +2390,9 @@ int               ibuflen, *rbuflen;
   variable DID support 
 */
 int afp_closedir(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj _U_;
+char   *ibuf _U_, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
 #if 0
     struct vol   *vol;
@@ -2429,9 +2429,9 @@ int               ibuflen, *rbuflen;
  * there's a pb again with case but move it to cname
 */
 int afp_opendir(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen  _U_, *rbuflen;
 {
     struct vol         *vol;
     struct dir         *parentdir;
index 0121fb423a876388009aecc09ad84f8e04b3724d..3f7869d255e559781fa417974d88cf2a977d21cb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: enumerate.c,v 1.39.2.2.2.5 2004-06-20 15:10:14 bfernhomberg Exp $
+ * $Id: enumerate.c,v 1.39.2.2.2.5.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -110,7 +110,7 @@ struct savedir {
 };
 #define SDBUFBRK       2048
 
-static int enumerate_loop(struct dirent *de, char *mname, void *data)
+static int enumerate_loop(struct dirent *de, char *mname _U_, void *data)
 {
     struct savedir *sd = data; 
     char *start, *end;
@@ -221,9 +221,9 @@ for_each_dirent(const struct vol *vol, char *name, dir_loop fn, void *data)
 
 /* ----------------------------- */
 static int enumerate(obj, ibuf, ibuflen, rbuf, rbuflen, ext )
-AFPObj       *obj;
+AFPObj       *obj _U_;
 char        *ibuf, *rbuf;
-unsigned int ibuflen, *rbuflen;
+unsigned int ibuflen _U_, *rbuflen;
 int     ext;
 {
     static struct savedir      sd = { 0, 0, 0, NULL, NULL, 0 };
index 30186e85e12e7efdf8ddd45ab198c969d71b768b..74fdc0349414c87da6a6c31c09ca43fea147635f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.92.2.2.2.31.2.14 2005-05-26 11:49:55 didg Exp $
+ * $Id: file.c,v 1.92.2.2.2.31.2.15 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -584,9 +584,9 @@ int getfilparams(struct vol *vol,
 
 /* ----------------------------- */
 int afp_createfile(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct adouble     ad, *adp;
     struct vol         *vol;
@@ -710,9 +710,9 @@ createfile_done:
 }
 
 int afp_setfilparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol *vol;
     struct dir *dir;
@@ -1199,9 +1199,9 @@ u_int32_t   hint;
 /* -----------------------------------
 */
 int afp_copyfile(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol *s_vol, *d_vol;
     struct dir *dir;
@@ -1647,9 +1647,9 @@ int         checkAttrib;
 /* ------------------------------------ */
 /* return a file id */
 int afp_createid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct stat         *st;
     struct vol         *vol;
@@ -1785,9 +1785,9 @@ reenumerate_id(const struct vol *vol, char *name, cnid_t did)
 /* ------------------------------
    resolve a file id */
 int afp_resolveid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj      *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int            ibuflen _U_, *rbuflen;
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -1897,9 +1897,9 @@ retry:
 
 /* ------------------------------ */
 int afp_deleteid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj _U_;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct stat         st;
     struct vol         *vol;
@@ -2033,9 +2033,9 @@ static struct adouble *find_adouble(struct path *path, struct ofork **of, struct
 #define APPLETEMP ".AppleTempXXXXXX"
 
 int afp_exchangefiles(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf, *rbuf _U_ ;
+int    ibuflen _U_, *rbuflen;
 {
     struct stat         srcst, destst;
     struct vol         *vol;
index 5ede4df63a2efc59e22ddbb686b5509bb89742d0..e74b2f3a5962cb207b7ad562845cee0ca9ac21cd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: filedir.c,v 1.45.2.2.2.14.2.3 2005-06-02 12:49:41 didg Exp $
+ * $Id: filedir.c,v 1.45.2.2.2.14.2.4 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -130,9 +130,9 @@ more information */
 #endif
 
 int afp_getfildirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct stat                *st;
     struct vol         *vol;
@@ -225,9 +225,9 @@ int         ibuflen, *rbuflen;
 }
 
 int afp_setfildirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct stat        *st;
     struct vol *vol;
@@ -440,9 +440,9 @@ int         isdir;
 
 /* -------------------------------------------- */
 int afp_rename(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol *vol;
     struct dir *sdir;
@@ -526,9 +526,9 @@ int         ibuflen, *rbuflen;
 
 /* ------------------------------- */
 int afp_delete(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -643,9 +643,9 @@ char        *name;
 
 /* ------------------------- */
 int afp_moveandrename(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf, *rbuf _U_;
+int    ibuflen  _U_, *rbuflen;
 {
     struct vol *vol;
     struct dir *sdir, *ddir;
index abf40696b04db7c11ebc150085fee42ad391c32f..ca548aec1f2a9e867016a2ed3a34cf34850e9db3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: fork.c,v 1.51.2.2.2.10.2.3 2005-07-20 21:17:57 didg Exp $
+ * $Id: fork.c,v 1.51.2.2.2.10.2.4 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -259,9 +259,9 @@ static int fork_setmode(struct adouble *adp, int eid, int access, int ofrefnum)
 
 /* ----------------------- */
 int afp_openfork(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -536,9 +536,9 @@ openfork_err:
 }
 
 int afp_setforkparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj _U_;
+char   *ibuf, *rbuf _U_;
+int    ibuflen, *rbuflen;
 {
     struct ofork       *ofork;
     off_t              size;
@@ -676,9 +676,9 @@ afp_setfork_err:
 
 /* ---------------------- */
 static int byte_lock(obj, ibuf, ibuflen, rbuf, rbuflen, is64 )
-AFPObj  *obj;
+AFPObj  *obj _U_;
 char   *ibuf, *rbuf;
-int    ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 int     is64;
 {
     struct ofork       *ofork;
@@ -867,10 +867,10 @@ static __inline__ ssize_t read_file(struct ofork *ofork, int eid,
  * with dsi, should we check that reqcount < server quantum? 
 */
 static int read_fork(obj, ibuf, ibuflen, rbuf, rbuflen, is64)
-AFPObj      *obj;
+AFPObj  *obj;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
-int is64;
+int    ibuflen _U_, *rbuflen;
+int     is64;
 {
     struct ofork       *ofork;
     off_t              offset, saveoff, reqcount, savereqcount;
@@ -1059,9 +1059,9 @@ int       ibuflen, *rbuflen;
 
 /* ---------------------- */
 int afp_flush(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj _U_;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct vol *vol;
     u_int16_t vid;
@@ -1079,9 +1079,9 @@ int               ibuflen, *rbuflen;
 }
 
 int afp_flushfork(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj _U_;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     struct ofork       *ofork;
     u_int16_t          ofrefnum;
@@ -1146,9 +1146,9 @@ struct ofork      *ofork;
 }
 
 int afp_closefork(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj      *obj _U_;
+char   *ibuf, *rbuf _U_;
+int            ibuflen _U_, *rbuflen;
 {
     struct ofork       *ofork;
     struct timeval      tv;
@@ -1240,7 +1240,7 @@ static __inline__ ssize_t write_file(struct ofork *ofork, int eid,
 static int write_fork(obj, ibuf, ibuflen, rbuf, rbuflen, is64)
 AFPObj              *obj;
 char                *ibuf, *rbuf;
-int                 ibuflen, *rbuflen;
+int                 ibuflen _U_, *rbuflen;
 int                 is64;
 {
     struct ofork       *ofork;
@@ -1441,9 +1441,9 @@ int                 ibuflen, *rbuflen;
 
 /* ---------------------------- */
 int afp_getforkparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj  *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int    ibuflen _U_, *rbuflen;
 {
     struct ofork       *ofork;
     int                        buflen, ret;
index 1a0b16df5e87d6e683e99caa1c49c33bdc01630b..f8b4c854239a887966965317f6472a69046686cd 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: mangle.c,v 1.16.2.1.2.12.2.3 2005-02-14 16:01:54 didg Exp $ 
+ * $Id: mangle.c,v 1.16.2.1.2.12.2.4 2005-09-27 10:40:41 didg Exp $ 
  *
  * Copyright (c) 2002. Joe Marcus Clarke (marcus@marcuscom.com)
  * All Rights Reserved.  See COPYRIGHT.
@@ -206,10 +206,10 @@ demangle_osx(const struct vol *vol, char *mfilename, cnid_t did, cnid_t *fileid)
 /* -------------------------------------------------------
  * find the start of a utf8 character
  */
-static unsigned char *
-utf8_mangle_validate(unsigned char *path, size_t len)
+static char *
+utf8_mangle_validate(char *path, size_t len)
 {
-    unsigned char *p = path + len;
+    unsigned char *p = (unsigned char *)path + len;
     int           dec = 0;
 
     /* char matches with 10xxxxxx ? */
@@ -231,12 +231,12 @@ utf8_mangle_validate(unsigned char *path, size_t len)
    id         file/folder ID or 0
    
 */
-unsigned char *
-mangle(const struct vol *vol, unsigned char *filename, size_t filenamelen, unsigned char *uname, cnid_t id, int flags) {
-    unsigned char *ext = NULL;
-    unsigned char *m = NULL;
-    static unsigned char mfilename[MAXPATHLEN + 1];
-    unsigned char mangle_suffix[MANGLE_LENGTH + 1];
+char *
+mangle(const struct vol *vol _U_, char *filename, size_t filenamelen, char *uname, cnid_t id, int flags) {
+    char *ext = NULL;
+    char *m = NULL;
+    static char mfilename[MAXPATHLEN + 1];
+    char mangle_suffix[MANGLE_LENGTH + 1];
     size_t ext_len = 0;
     size_t maxlen;
     int k;
index 0b658b8e3af71b2d33a64983940dcc2df59e87b6..1826701dc9642c875ada9b4fcf83756a388b46f0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: mangle.h,v 1.4.2.1.2.3.2.1 2005-01-31 19:50:37 didg Exp $
+ * $Id: mangle.h,v 1.4.2.1.2.3.2.2 2005-09-27 10:40:41 didg Exp $
  *
  */
 
@@ -24,7 +24,7 @@
 #define MANGLE_LENGTH  9 /* #ffffffff This really can't be changed. */
 #define MAX_LENGTH MACFILELEN 
 
-extern unsigned char *mangle __P((const struct vol *, unsigned char *, size_t, unsigned char *, cnid_t, int));
+extern char *mangle __P((const struct vol *, char *, size_t, char *, cnid_t, int));
 extern char *demangle __P((const struct vol *, char *, cnid_t did));
 extern char *demangle_osx __P((const struct vol *, char *, cnid_t did, cnid_t *fileid));
 
index c30842ffa06e2dda3ce5adf29f9474332f90c7c4..bee6dca7d7312b8023012c7b1fdff476ecfde2df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: messages.c,v 1.16.6.1.2.7 2004-02-14 00:30:50 didg Exp $
+ * $Id: messages.c,v 1.16.6.1.2.7.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
@@ -116,7 +116,7 @@ AFPObj *obj;
 int afp_getsrvrmesg(obj, ibuf, ibuflen, rbuf, rbuflen)
 AFPObj *obj;
 char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
 {
     char *message;
     u_int16_t type, bitmap;
index 16d2743eea1f54b1f543c449e3a9d87ea89f54fe..50773b00da41cf4ef1b57f72e4d2fa38129136c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ofork.c,v 1.20.6.6.2.3 2005-07-21 17:00:09 didg Exp $
+ * $Id: ofork.c,v 1.20.6.6.2.4 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1996 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -106,7 +106,7 @@ int of_rename(vol, s_of, olddir, oldpath, newdir, newpath)
 const struct vol *vol;
 struct ofork *s_of;
 struct dir *olddir, *newdir;
-const char *oldpath, *newpath;
+const char *oldpath _U_, *newpath;
 {
     struct ofork *of, *next, *d_ofork;
 
index 093da937dcb56869edd1f37d6c3e67d67e41c6c0..3aab571123a72363c5039e7c3d168ce1d7f6fd55 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: status.c,v 1.13.6.11.2.1 2005-01-31 19:50:38 didg Exp $
+ * $Id: status.c,v 1.13.6.11.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 #include "afp_config.h"
 #include "icon.h"
 
-static   int maxstatuslen = 0;
+static   size_t maxstatuslen = 0;
 
 static void status_flags(char *data, const int notif, const int ipok,
-                         const unsigned char passwdbits, const int dirsrvcs)
+                         const unsigned char passwdbits, const int dirsrvcs _U_)
 {
     u_int16_t           status;
 
@@ -228,7 +228,7 @@ server_signature_done:
     return sigoff;
 }
 
-static int status_netaddress(char *data, int *servoffset,
+static size_t status_netaddress(char *data, int *servoffset,
                              const ASP asp, const DSI *dsi,
                              const struct afp_options *options)
 {
@@ -282,7 +282,7 @@ static int status_netaddress(char *data, int *servoffset,
 
     /* handle DNS names */
     if (options->fqdn && dsi) {
-        int len = strlen(options->fqdn);
+        size_t len = strlen(options->fqdn);
         if ( len + 2 + addresses_len < maxstatuslen - offset) {
             *data++ = len +2;
             *data++ = 0x04;
@@ -333,8 +333,8 @@ static int status_netaddress(char *data, int *servoffset,
     return (data - begin);
 }
 
-static int status_directorynames(char *data, int *diroffset, 
-                                const DSI *dsi, 
+static size_t status_directorynames(char *data, int *diroffset, 
+                                const DSI *dsi _U_
                                 const struct afp_options *options)
 {
     char *begin = data;
@@ -352,7 +352,7 @@ static int status_directorynames(char *data, int *diroffset,
      */
     if (options->k5service && options->k5realm && options->fqdn) {
        /* should k5princ be utf8 encoded? */
-       u_int8_t len;
+       size_t len;
        char *p = strchr( options->fqdn, ':' );
        if (p) 
            *p = '\0';
@@ -360,7 +360,7 @@ static int status_directorynames(char *data, int *diroffset,
                        + strlen( options->fqdn )
                        + strlen( options->k5realm );
        len+=2; /* '/' and '@' */
-       if ( len+2 > maxstatuslen - offset) {
+       if ( len > 255 || len+2 > maxstatuslen - offset) {
            *data++ = 0;
            LOG ( log_error, logtype_afpd, "status: could not set directory service list, no more room");
        }        
@@ -386,8 +386,8 @@ static int status_directorynames(char *data, int *diroffset,
     return (data - begin);
 }
 
-static int status_utf8servername(char *data, int *nameoffset,
-                                const DSI *dsi,
+static size_t status_utf8servername(char *data, int *nameoffset,
+                                const DSI *dsi _U_,
                                 const struct afp_options *options)
 {
     char *Obj, *Type, *Zone;
@@ -481,8 +481,9 @@ void status_init(AFPConfig *aspconfig, AFPConfig *dsiconfig,
 {
     ASP asp;
     DSI *dsi;
-    u_int8_t *status = NULL;
-    int statuslen, c, sigoff;
+    char *status = NULL;
+    size_t statuslen;
+    int c, sigoff;
 
     if (!(aspconfig || dsiconfig) || !options)
         return;
@@ -570,9 +571,9 @@ void status_init(AFPConfig *aspconfig, AFPConfig *dsiconfig,
 
 /* this is the same as asp/dsi_getstatus */
 int afp_getsrvrinfo(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj;
+char   *ibuf _U_, *rbuf;
+int    ibuflen _U_, *rbuflen;
 {
     AFPConfig *config = obj->config;
 
index c58c8ecfb436f622efbcaa80222d082ba38c84b1..7fa024252fa6b7daeebf325a7a4f81dd0d2b4b86 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: switch.c,v 1.12 2002-11-15 10:59:11 srittau Exp $
+ * $Id: switch.c,v 1.12.8.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -48,9 +48,9 @@
 #include "misc.h"
 
 static int afp_null(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj  *obj _U_;
+char   *ibuf, *rbuf _U_;
+int    ibuflen _U_, *rbuflen;
 {
     LOG(log_info, logtype_afpd, "afp_null handle %d", *ibuf );
     *rbuflen = 0;
index 49cefec4b16e26d1fdab12ea82d27450a69564f6..2d3ba040a5c56ee2ed7d22904f54ba1052240ec4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uam.c,v 1.24.6.7.2.3 2005-02-01 11:33:48 didg Exp $
+ * $Id: uam.c,v 1.24.6.7.2.4 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
@@ -622,7 +622,7 @@ int uam_sia_validate_user(sia_collect_func_t * collect, int argc, char **argv,
 #endif /* TRU64 */
 
 /* --- papd-specific functions (just placeholders) --- */
-void append(void *pf, char *data, int len)
+void append(void *pf  _U_, char *data _U_, int len _U_)
 {
     return;
 }
index b55b530ed9cfc05decf739aa5e71886175b8c1a9..680a51619ff65ae2dee51a562a1babbc46a9f7e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: unix.c,v 1.43.2.1.2.10.2.2 2005-06-02 12:49:41 didg Exp $
+ * $Id: unix.c,v 1.43.2.1.2.10.2.3 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -170,11 +170,13 @@ mode_t mode;
  * Note: the previous method, using access(), does not work correctly
  * over NFS.
  * FIXME what about ACL?
+ *
+ * dir parameter is used by AFS
  */
 void accessmode( path, ma, dir, st )
 char           *path;
 struct maccess *ma;
-struct dir     *dir;
+struct dir     *dir _U_;
 struct stat     *st;
 
 {
index 0773cce4e3b5fd2dabf9896e2b5f9c16a8bb5caf..71c9c1170b8d512ee9db3f3c1ffa5844230bc65a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.51.2.7.2.33.2.8 2005-07-20 21:09:22 didg Exp $
+ * $Id: volume.c,v 1.51.2.7.2.33.2.9 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -244,7 +244,7 @@ static char *volxlate(AFPObj *obj, char *dest, size_t destlen,
         return ret;
 
     /* first part of the path. just forward to the next variable. */
-    len = MIN(p - src, destlen);
+    len = MIN((size_t)(p - src), destlen);
     if (len > 0) {
         destlen -= len;
         dest += len;
@@ -340,7 +340,7 @@ static char *volxlate(AFPObj *obj, char *dest, size_t destlen,
         /* stuff up to next $ */
         src = p + 2;
         p = strchr(src, '$');
-        len = p ? MIN(p - src, destlen) : destlen;
+        len = p ? MIN((size_t)(p - src), destlen) : destlen;
         if (len > 0) {
             strncpy(dest, src, len);
             dest += len;
@@ -539,7 +539,7 @@ static int validupath_adouble(const struct vol *vol, const char *name)
 }                                           
 
 /* ----------------- */
-static int validupath_osx(const struct vol *vol, const char *name) 
+static int validupath_osx(const struct vol *vol _U_, const char *name) 
 {
     return strncasecmp(name,".Apple", 6) && strncasecmp(name,"._", 2);
 }             
@@ -1508,8 +1508,8 @@ void load_volumes(AFPObj *obj)
 /* ------------------------------- */
 int afp_getsrvrparms(obj, ibuf, ibuflen, rbuf, rbuflen )
 AFPObj      *obj;
-char   *ibuf, *rbuf;
-int    ibuflen, *rbuflen;
+char   *ibuf _U_, *rbuf;
+int    ibuflen _U_, *rbuflen;
 {
     struct timeval     tv;
     struct stat                st;
@@ -1585,7 +1585,7 @@ int       ibuflen, *rbuflen;
 int afp_openvol(obj, ibuf, ibuflen, rbuf, rbuflen )
 AFPObj      *obj;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int            ibuflen _U_, *rbuflen;
 {
     struct stat        st;
     char       *volname;
@@ -1856,9 +1856,9 @@ void close_all_vol(void)
 
 /* ------------------------- */
 int afp_closevol(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj      *obj _U_;
+char   *ibuf, *rbuf _U_;
+int            ibuflen _U_, *rbuflen;
 {
     struct vol *vol, *ovol;
     u_int16_t  vid;
@@ -2011,9 +2011,9 @@ struct vol        *vol;
 
 /* ------------------------- */
 int afp_getvolparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
+AFPObj      *obj _U_;
 char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+int            ibuflen _U_, *rbuflen;
 {
     struct vol *vol;
     u_int16_t  vid, bitmap;
@@ -2034,9 +2034,9 @@ int               ibuflen, *rbuflen;
 
 /* ------------------------- */
 int afp_setvolparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj      *obj;
-char   *ibuf, *rbuf;
-int            ibuflen, *rbuflen;
+AFPObj      *obj _U_;
+char   *ibuf, *rbuf _U_;
+int            ibuflen _U_, *rbuflen;
 {
     struct adouble ad;
     struct vol *vol;
index e66ccadd96e7eb3843974ec9832656497c34e358..14750ec9a15c425c900f5e8ff76cc071657f6f39 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atserv.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ * $Id: atserv.h,v 1.2.16.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1992 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -19,5 +19,3 @@ struct atport {
     int                        (*ap_packet)();
 };
 
-extern struct atserv   atserv[];
-extern int             atservNATSERV;
index 8a32cbb58cece96b28566b1aac1c473db49f4ed5..2989bb1429967c3bdeb0c06081be6233de23c20d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: config.c,v 1.13.6.5.2.3 2005-02-06 10:16:02 didg Exp $
+ * $Id: config.c,v 1.13.6.5.2.4 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -476,7 +476,7 @@ read_conf_err:
 
 int noallmulti( iface, av )
     struct interface   *iface;
-    char               **av;
+    char               **av _U_;
 {
     /* Linux specific, no effect on other platforms */
     iface->i_flags &= !IFACE_ALLMULTI;
@@ -487,7 +487,7 @@ int noallmulti( iface, av )
 /*ARGSUSED*/
 int router( iface, av )
     struct interface   *iface;
-    char               **av;
+    char               **av _U_;
 {
     /* make sure "-router" and "-dontroute" aren't both on the same line. */
     if (iface->i_flags & IFACE_DONTROUTE) {
@@ -511,7 +511,7 @@ int router( iface, av )
 /*ARGSUSED*/
 int dontroute( iface, av )
     struct interface   *iface;
-    char               **av;
+    char               **av _U_;
 {
     /* make sure "-router" and "-dontroute" aren't both on the same line. */
     if (iface->i_flags & IFACE_RSEED) {
@@ -526,7 +526,7 @@ int dontroute( iface, av )
 /*ARGSUSED*/
 int seed( iface, av )
     struct interface   *iface;
-    char               **av;
+    char               **av _U_;
 {
     /*
      * Check to be sure "-seed" is before "-zone". we keep the old
index f43fb5e55359f5e53dc3a8640323964c417fe69c..cb720664e7c587ee38c33a624a39a3cb9e08779f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.c,v 1.17.8.6.2.1 2005-01-31 17:01:04 didg Exp $
+ * $Id: main.c,v 1.17.8.6.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -108,13 +108,13 @@ extern int        zip_packet();
 
 int            rtfd;
 
-struct atserv  atserv[] = {
+static struct atserv   atserv[] = {
     { "rtmp",          1,      rtmp_packet },          /* 0 */
     { "nbp",           2,      nbp_packet },           /* 1 */
     { "echo",          4,      aep_packet },           /* 2 */
     { "zip",           6,      zip_packet },           /* 3 */
 };
-int            atservNATSERV = elements( atserv );
+static int             atservNATSERV = elements( atserv );
 
 struct interface       *interfaces = NULL, *ciface = NULL;
 
@@ -168,7 +168,7 @@ static void atalkd_exit(const int i)
 }
 
 
-static void as_timer(int sig)
+static void as_timer(int sig _U_)
 {
     struct sockaddr_at sat;
     struct ziphdr      zh;
index d5c44d028d597305cc233532519e51386a11d6c0..28dd5e6b96cbcedef661ea5d7acd32f58245ce1e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_metad.c,v 1.1.4.15 2004-09-06 07:19:21 didg Exp $
+ * $Id: cnid_metad.c,v 1.1.4.15.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -114,7 +114,7 @@ struct server {
 
 static struct server srv[MAXSRV +1];
 
-static struct server *test_usockfn(char *dir, char *fn)
+static struct server *test_usockfn(char *dir, char *fn _U_)
 {
 int i;
     for (i = 1; i <= MAXSRV; i++) {
index a397be5300862daac075b4d9f737f4a455abeef9..269808443b92af76dd01cbf8a804b68152f80eac 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: db_param.c,v 1.1.4.4.2.1 2004-12-21 13:36:12 didg Exp $
+ * $Id: db_param.c,v 1.1.4.4.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
 static struct db_param params;
 static int parse_err;
 
-static int usock_maxlen()
+static size_t usock_maxlen()
 {
     struct sockaddr_un addr;
 
     return sizeof(addr.sun_path) - 1;
 }
 
-static int make_pathname(char *path, char *dir, char *fn, int maxlen)
+static int make_pathname(char *path, char *dir, char *fn, size_t maxlen)
 {
     size_t len;
 
index 460e0ce52ec90334720994b0c31a50ba30bb558e..ea7babe79c0ea558d05e60742148cf33636ab815 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dbd_getstamp.c,v 1.1.2.3 2004-02-07 19:46:08 didg Exp $
+ * $Id: dbd_getstamp.c,v 1.1.2.3.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -21,7 +21,7 @@
 
 /* Return the unique stamp associated with this database */
 
-int dbd_getstamp(struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
+int dbd_getstamp(struct cnid_dbd_rqst *rqst _U_, struct cnid_dbd_rply *rply)
 {
     DBT key, data;
     int rc;
index 8b2380656d4e0590e8f4c6c5ed69f64748d8c771..7b75328577db02af5087f25d4e254e37932406f3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dbd_lookup.c,v 1.1.4.7 2004-02-07 19:46:08 didg Exp $
+ * $Id: dbd_lookup.c,v 1.1.4.7.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -29,7 +29,7 @@
 
 int dbd_lookup(struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
 {
-    char *buf;
+    unsigned char *buf;
     DBT key, devdata, diddata;
     char dev[CNID_DEV_LEN];
     char ino[CNID_INO_LEN];
index c5edb8f84a8b59862e24e6f11a0d08acb7110ebf..08d2c57ca8ef2549e02e75167c99f962538e136b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dbd_update.c,v 1.1.4.12 2004-03-21 23:04:07 lenneis Exp $
+ * $Id: dbd_update.c,v 1.1.4.12.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -36,7 +36,7 @@ int dbd_update(struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
 {
     DBT key,pkey, data;
     int rc;
-    char *buf;                            
+    unsigned char *buf;                            
     int notfound = 0;
     char getbuf[CNID_HEADER_LEN + MAXPATHLEN +1];
 #ifdef DEBUG
index 05377055d77b1c606135363d148419843992db6a..5916ca58395407f85b80df28f15a96ce1ce0c1c0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dbif.c,v 1.1.4.15.2.2 2005-09-13 16:57:45 didg Exp $
+ * $Id: dbif.c,v 1.1.4.15.2.3 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -233,7 +233,7 @@ int dbif_env_init(struct db_param *dbp)
 }
 
 /* --------------- */
-int dbif_open(struct db_param *dbp, int do_truncate)
+int dbif_open(struct db_param *dbp _U_, int do_truncate)
 {
     int ret;
     int i;
index a4ebcd75456150c25a6447b7ee36cd830e02e928..a57fd70c1c1ef0dabda86f5dd02f647ad6697ae0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pack.c,v 1.1.4.9 2004-02-07 19:46:08 didg Exp $
+ * $Id: pack.c,v 1.1.4.9.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -57,8 +57,8 @@ static void pack_devino(unsigned char *buf, dev_t dev, ino_t ino)
 
 /* --------------- */
 int didname(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
 DBT *skey;
 {
 int len;
@@ -75,8 +75,8 @@ int len;
  
 /* --------------- */
 int devino(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
 DBT *skey;
 {
     memset(skey, 0, sizeof(DBT));
@@ -89,10 +89,10 @@ DBT *skey;
    differ from make_cnid_data in that we never return NULL, rqst->name cannot
    ever cause start[] to overflow because name length is checked in libatalk. */
 
-char *pack_cnid_data(struct cnid_dbd_rqst *rqst)
+unsigned char *pack_cnid_data(struct cnid_dbd_rqst *rqst)
 {
-    static char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
-    char *buf = start +CNID_LEN;
+    static unsigned char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
+    unsigned char *buf = start +CNID_LEN;
     u_int32_t i;
 
     pack_devino(buf, rqst->dev, rqst->ino);
index cacd45547676e112e04ee35358c1cecd68ee1fa1..c22d9cec05f965518b31e495e406cc1c30f60d12 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pack.h,v 1.1.4.3 2004-01-21 21:28:42 lenneis Exp $
+ * $Id: pack.h,v 1.1.4.3.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -38,7 +38,7 @@
 #define CNID_DBD_HEADER_LEN          (CNID_DBD_DEVINO_LEN + CNID_DBD_DID_LEN)
 #endif
 
-extern char      *pack_cnid_data  __P((struct cnid_dbd_rqst *));
+extern unsigned char *pack_cnid_data  __P((struct cnid_dbd_rqst *));
 
 #ifdef DEBUG
 extern char      *stringify_devino  __P((dev_t dev, ino_t ino));
index bedd603438f2509b69672cdf5d6cd077b54a8f31..f0494e24d423e5daaa60cfe12de658f0aad78e34 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: usockfd.c,v 1.1.4.4 2004-09-06 07:19:21 didg Exp $
+ * $Id: usockfd.c,v 1.1.4.4.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -141,7 +141,7 @@ int tsockfd_create(char *host, u_int16_t ipport, int backlog)
 int usockfd_check(int sockfd, unsigned long ndelay)
 {
     int fd;
-    int size;
+    socklen_t size;
     fd_set readfds;
     struct timeval tv;
     int ret;
index bc1c887fb514ccf9e601494fe6786ec8e559c8a7..6e05be9ca40c6bd3d5eac82388568ddf1ebfbff8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: headers.c,v 1.9.10.1.2.1 2005-02-06 10:16:02 didg Exp $
+ * $Id: headers.c,v 1.9.10.1.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -25,7 +25,7 @@ int ch_for( struct papfile *, struct papfile * );
 
 
 int ch_for( in, out )
-       struct papfile  *in, *out;
+       struct papfile  *in, *out _U_;
 {
     char                *start, *stop, *p, *q, c;
     int                 linelength, crlflength;
@@ -74,7 +74,7 @@ int ch_for( in, out )
 }
 
 int ch_title( in, out )
-    struct papfile     *in, *out;
+    struct papfile     *in, *out _U_;
 {
     char               *start, *stop, *p, *q, c;
     int                        linelength, crlflength;
@@ -138,7 +138,7 @@ static int guess_creator ( char *creator )
 
 
 int ch_creator( in, out )
-    struct papfile     *in, *out;
+    struct papfile     *in, *out _U_;
 {
     char               *start, *stop, *p, *q, c;
     int                        linelength, crlflength;
@@ -188,7 +188,7 @@ int ch_creator( in, out )
 }
 
 int ch_endcomm( in, out )
-    struct papfile     *in, *out;
+    struct papfile     *in, *out _U_;
 {
     char                *start;
     int                 linelength, crlflength;
@@ -215,7 +215,7 @@ int ch_endcomm( in, out )
 }
 
 int ch_starttranslate(in,out)
-    struct papfile      *in, *out;
+    struct papfile      *in, *out _U_;
 {
     char                *start;
     int                 linelength, crlflength;
@@ -240,7 +240,7 @@ int ch_starttranslate(in,out)
 }
 
 int ch_endtranslate(in,out)
-    struct papfile      *in, *out;
+    struct papfile      *in, *out _U_;
 {
     char                *start;
     int                 linelength, crlflength;
@@ -265,7 +265,7 @@ int ch_endtranslate(in,out)
 }
 
 int ch_translateone(in,out)
-    struct papfile      *in, *out;
+    struct papfile      *in, *out _U_;
 {
     char                *start;
     int                 linelength, crlflength;
index c939060bbee3972ac2622ff01634a67d11dac9e7..c1c96f0f9eaf6765b89b1ae76e1b518180c64747 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: magics.c,v 1.11.6.2.2.1 2005-02-06 10:16:02 didg Exp $
+ * $Id: magics.c,v 1.11.6.2.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -89,7 +89,7 @@ int ps( infile, outfile, sat )
 
 int cm_psquery( in, out, sat )
     struct papfile     *in, *out;
-    struct sockaddr_at *sat;
+    struct sockaddr_at *sat _U_;
 {
     struct papd_comment        *comment;
     char               *start;
@@ -122,7 +122,7 @@ int cm_psquery( in, out, sat )
 
 int cm_psadobe( in, out, sat )
     struct papfile     *in, *out;
-    struct sockaddr_at *sat;
+    struct sockaddr_at *sat _U_;
 {
     char               *start;
     int                        linelength, crlflength;
@@ -163,7 +163,7 @@ char        *Query = "Query";
 
 int cm_psswitch( in, out, sat )
     struct papfile     *in, *out;
-    struct sockaddr_at *sat;
+    struct sockaddr_at *sat _U_;
 {
     char               *start, *stop, *p;
     int                        linelength, crlflength;
index 07148d3b83d98f75c033230f6282e8c39f228b84..1b5568a4122c52593ecaa9204fa9a9658fd63382 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: print_cups.c,v 1.1.2.1.2.1 2005-01-11 23:00:40 didg Exp $
+ * $Id: print_cups.c,v 1.1.2.1.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright 2004 Bjoern Fernhomberg.
  *
@@ -79,7 +79,7 @@ char * cups_get_language ()
  */
 
 static const char *                            /* O - Password or NULL */
-cups_passwd_cb(const char *prompt)      /* I - Prompt */
+cups_passwd_cb(const char *prompt _U_)      /* I - Prompt */
 {
  /*
   * Always return NULL to indicate that no password is available...
index f1b368076e7c59c8572c824742e0b89dbd71d62c..e9b25abb3f7f73b85603112acf774a96f4758e30 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uam.c,v 1.9.6.4 2004-02-14 00:30:51 didg Exp $
+ * $Id: uam.c,v 1.9.6.4.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
@@ -183,15 +183,15 @@ void uam_unregister(const int type, const char *name)
 }
 
 /* Crap to support uams which call this afpd function */
-int uam_afpserver_option(void *private, const int what, void *option,
-                         int *len)
+int uam_afpserver_option(void *private _U_, const int what _U_, void *option _U_,
+                         int *len _U_)
 {
        return(0);
 }
 
 /* --- helper functions for plugin uams --- */
 
-struct passwd *uam_getname(void *dummy, char *name, const int len)
+struct passwd *uam_getname(void *dummy _U_, char *name, const int len)
 {
   struct passwd *pwent;
   char *user;
index 51f99e579ab231316e444f44ab556a90b33b1675..249cc7318b96885abb5436d95dc749ed9f8257bd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_dhx_pam.c,v 1.24.6.5 2004-06-24 01:20:12 bfernhomberg Exp $
+ * $Id: uams_dhx_pam.c,v 1.24.6.5.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -83,7 +83,7 @@ static char *PAM_password;
 static int PAM_conv (int num_msg,
                      const struct pam_message **msg,
                      struct pam_response **resp,
-                     void *appdata_ptr) {
+                     void *appdata_ptr _U_) {
   int count = 0;
   struct pam_response *reply;
   
@@ -185,7 +185,7 @@ static struct pam_conv PAM_conversation = {
 };
 
 
-static int dhx_setup(void *obj, char *ibuf, int ibuflen, 
+static int dhx_setup(void *obj, char *ibuf, int ibuflen _U_
                     char *rbuf, int *rbuflen)
 {
     u_int16_t sessid;
@@ -316,7 +316,7 @@ pam_fail:
 }
 
 /* -------------------------------- */
-static int login(void *obj, char *username, int ulen,  struct passwd **uam_pwd,
+static int login(void *obj, char *username, int ulen,  struct passwd **uam_pwd _U_,
                     char *ibuf, int ibuflen,
                     char *rbuf, int *rbuflen)
 {
@@ -404,7 +404,7 @@ static int pam_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
 /* -------------------------------- */
 
 static int pam_logincont(void *obj, struct passwd **uam_pwd,
-                        char *ibuf, int ibuflen, 
+                        char *ibuf, int ibuflen _U_
                         char *rbuf, int *rbuflen)
 {
     char *hostname;
@@ -561,7 +561,7 @@ static void pam_logout() {
 /* change pw for dhx needs a couple passes to get everything all
  * right. basically, it's like the login/logincont sequence */
 static int pam_changepw(void *obj, char *username,
-                       struct passwd *pwd, char *ibuf, int ibuflen,
+                       struct passwd *pwd _U_, char *ibuf, int ibuflen,
                        char *rbuf, int *rbuflen)
 {
     BIGNUM *bn1, *bn2, *bn3;
index 2ff57e08f8d8e7a20b51be87d9349f24c047e96b..e2fc4b9bcd4f1bfd603c445c7e5fabc54941140d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_dhx_passwd.c,v 1.18.6.6 2004-03-18 02:56:32 bfernhomberg Exp $
+ * $Id: uams_dhx_passwd.c,v 1.18.6.6.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -74,8 +74,8 @@ static char *clientname;
 #endif /* TRU64 */
 
 /* dhx passwd */
-static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pwd,
-                       char *ibuf, int ibuflen,
+static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pwd _U_,
+                       char *ibuf, int ibuflen _U_,
                        char *rbuf, int *rbuflen)
 {
     unsigned char iv[] = "CJalbert";
@@ -277,7 +277,7 @@ static int passwd_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
 }
                        
 static int passwd_logincont(void *obj, struct passwd **uam_pwd,
-                           char *ibuf, int ibuflen, 
+                           char *ibuf, int ibuflen _U_
                            char *rbuf, int *rbuflen)
 {
 #ifdef SHADOWPW
index 4dc0883ecedf52ec60bf8c2e59bb78bcfeefc2ee..739151f2024c3e094bcd3ee31faf9db2e88f87f8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_guest.c,v 1.12.6.2 2004-02-14 02:47:15 didg Exp $
+ * $Id: uams_guest.c,v 1.12.6.2.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * (c) 2001 (see COPYING)
  */
@@ -43,8 +43,8 @@ extern void append(void *, const char *, int);
 
 /* login and login_ext are almost the same */
 static int noauth_login(void *obj, struct passwd **uam_pwd,
-                       char *ibuf, int ibuflen
-                       char *rbuf, int *rbuflen)
+                       char *ibuf _U_, int ibuflen _U_
+                       char *rbuf _U_, int *rbuflen)
 {
     struct passwd *pwent;
     char *guest, *username;
@@ -78,7 +78,7 @@ static int noauth_login(void *obj, struct passwd **uam_pwd,
     return( AFP_OK );
 }
 
-static int noauth_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
+static int noauth_login_ext(void *obj, char *uname _U_, struct passwd **uam_pwd,
                      char *ibuf, int ibuflen,
                      char *rbuf, int *rbuflen)
 {
index c44789ac68690d1aa3c2b8c81d071f14406af02b..0c2359ca9855b6cb6ded2549ccffcfc2be8a0a93 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_pam.c,v 1.15.2.1.2.5 2004-02-14 02:47:15 didg Exp $
+ * $Id: uams_pam.c,v 1.15.2.1.2.5.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -69,7 +69,7 @@ extern void append(void *, const char *, int);
 static int PAM_conv (int num_msg,
                      const struct pam_message **msg,
                      struct pam_response **resp,
-                     void *appdata_ptr) 
+                     void *appdata_ptr _U_
 {
   struct pam_response *reply;
   int count;
@@ -139,8 +139,8 @@ static struct pam_conv PAM_conversation = {
 };
 
 static int login(void *obj, char *username, int ulen,  struct passwd **uam_pwd,
-                    char *ibuf, int ibuflen,
-                    char *rbuf, int *rbuflen)
+                    char *ibuf, int ibuflen _U_,
+                    char *rbuf _U_, int *rbuflen _U_)
 {
     struct passwd *pwd;
     int err, PAM_error;
@@ -282,9 +282,9 @@ static void pam_logout() {
 }
 
 /* change passwd */
-static int pam_changepw(void *obj, char *username,
-                       struct passwd *pwd, char *ibuf, int ibuflen,
-                       char *rbuf, int *rbuflen)
+static int pam_changepw(void *obj _U_, char *username,
+                       struct passwd *pwd _U_, char *ibuf, int ibuflen _U_,
+                       char *rbuf _U_, int *rbuflen _U_)
 {
     char pw[PASSWDLEN + 1];
     pam_handle_t *lpamh;
index 86c303fbc975a1f434c4ca6e1c768987938ee445..b5e561fbe3fbcf5b45f95ea60ccc800a5ed5b78e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_passwd.c,v 1.19.2.1.2.9 2004-06-15 00:52:09 bfernhomberg Exp $
+ * $Id: uams_passwd.c,v 1.19.2.1.2.9.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -75,7 +75,7 @@ extern void append(void *, const char *, int);
 
 static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pwd,
                         char *ibuf, int ibuflen,
-                        char *rbuf, int *rbuflen)
+                        char *rbuf _U_, int *rbuflen _U_)
 {
     char  *p;
     struct passwd *pwd;
index 5cb51265187f358670d39f2ce47aceb258794358..b2be7f231464a04f5f88db181d99d0d10ad2162a 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: uams_randnum.c,v 1.12.6.4 2004-10-08 00:54:40 bfernhomberg Exp $
+ * $Id: uams_randnum.c,v 1.12.6.4.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -72,8 +72,8 @@ static u_int8_t         randbuf[8];
 
 /* handle ~/.passwd. courtesy of shirsch@ibm.net. */
 static  __inline__ int home_passwd(const struct passwd *pwd, 
-                                  const char *path, const int pathlen, 
-                                  char *passwd, const int len,
+                                  const char *path, const int pathlen _U_
+                                  unsigned char *passwd, const int len,
                                   const int set)
 {
   struct stat st;
@@ -145,7 +145,7 @@ home_passwd_fail:
 #define unhex(x)  (isdigit(x) ? (x) - '0' : toupper(x) + 10 - 'A')
 static int afppasswd(const struct passwd *pwd, 
                     const char *path, const int pathlen, 
-                    char *passwd, int len, 
+                    unsigned char *passwd, int len, 
                     const int set)
 {
   u_int8_t key[DES_KEY_SZ*2];
@@ -264,7 +264,7 @@ afppasswd_done:
  * depending upon whether or not the password is in ~/.passwd
  * or in a global location */
 static int randpass(const struct passwd *pwd, const char *file,
-                   char *passwd, const int len, const int set) 
+                   unsigned char *passwd, const int len, const int set) 
 {
   int i;
   uid_t uid = geteuid();
@@ -303,8 +303,8 @@ static int randpass(const struct passwd *pwd, const char *file,
 
 /* randnum sends an 8-byte number and uses the user's password to
  * check against the encrypted reply. */
-static int rand_login(void *obj, char *username, int ulen, struct passwd **uam_pwd,
-                        char *ibuf, int ibuflen,
+static int rand_login(void *obj, char *username, int ulen, struct passwd **uam_pwd _U_,
+                        char *ibuf _U_, int ibuflen _U_,
                         char *rbuf, int *rbuflen)
 {
 
@@ -350,8 +350,8 @@ static int rand_login(void *obj, char *username, int ulen, struct passwd **uam_p
 /* check encrypted reply. we actually setup the encryption stuff
  * here as the first part of randnum and rand2num are identical. */
 static int randnum_logincont(void *obj, struct passwd **uam_pwd,
-                            char *ibuf, int ibuflen, 
-                            char *rbuf, int *rbuflen)
+                            char *ibuf, int ibuflen _U_
+                            char *rbuf _U_, int *rbuflen)
 {
   u_int16_t sessid;
 
@@ -389,7 +389,7 @@ static int randnum_logincont(void *obj, struct passwd **uam_pwd,
  *    and sends it back as part of the reply.
  */
 static int rand2num_logincont(void *obj, struct passwd **uam_pwd,
-                             char *ibuf, int ibuflen, 
+                             char *ibuf, int ibuflen _U_
                              char *rbuf, int *rbuflen)
 {
   u_int16_t sessid;
@@ -437,9 +437,9 @@ static int rand2num_logincont(void *obj, struct passwd **uam_pwd,
  * NOTE: an FPLogin must already have completed successfully for this
  *       to work. 
  */
-static int randnum_changepw(void *obj, const char *username, 
+static int randnum_changepw(void *obj, const char *username _U_
                            struct passwd *pwd, char *ibuf,
-                           int ibuflen, char *rbuf, int *rbuflen)
+                           int ibuflen _U_, char *rbuf _U_, int *rbuflen _U_)
 {
     char *passwdfile;
     int err, len;
index 6943760bfb64b01eb3d7229510bcdc566f6a0360..39a4323b604d00fdf11f3cb7bddb662888674ff7 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: cnid.h,v 1.9.6.6.2.1 2005-01-30 20:56:21 didg Exp $
+ * $Id: cnid.h,v 1.9.6.6.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 2003 the Netatalk Team
  * Copyright (c) 2003 Rafal Lewczuk <rlewczuk@pronet.pl>
@@ -51,18 +51,17 @@ struct _cnid_db {
        void *_private;              /* back-end speficic data */
 
        cnid_t (*cnid_add)(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, 
-                       char *name, const int len, cnid_t hint);
+                       char *name, const size_t, cnid_t hint);
        int (*cnid_delete)(struct _cnid_db *cdb, cnid_t id);
-       cnid_t (*cnid_get)(struct _cnid_db *cdb, const cnid_t did, char *name,
-                       const int len);
+       cnid_t (*cnid_get)(struct _cnid_db *cdb, const cnid_t did, char *name, const  size_t);
        cnid_t (*cnid_lookup)(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
-                       char *name, const int len);
+                       char *name, const size_t);
        cnid_t (*cnid_nextid)(struct _cnid_db *cdb);
-       char *(*cnid_resolve)(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len);
+       char *(*cnid_resolve)(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len);
        int (*cnid_update)(struct _cnid_db *cdb, const cnid_t id, const struct stat *st, 
-                       const cnid_t did, char *name, const int len);   
+                       const cnid_t did, char *name, const size_t len);        
        void (*cnid_close)(struct _cnid_db *cdb);
-       int  (*cnid_getstamp)(struct _cnid_db *cdb, void *buffer, const int len);
+       int  (*cnid_getstamp)(struct _cnid_db *cdb, void *buffer, const size_t len);
 };
 typedef struct _cnid_db cnid_db;
 
@@ -88,62 +87,28 @@ void cnid_register(struct _cnid_module *module);
 struct _cnid_db *cnid_open(const char *volpath, mode_t mask, char *type, int flags);
 
 cnid_t cnid_add(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, 
-                       char *name, const int len, cnid_t hint);
+                       char *name, const size_t len, cnid_t hint);
 
 int    cnid_delete(struct _cnid_db *cdb, cnid_t id);
 
-cnid_t cnid_get   (struct _cnid_db *cdb, const cnid_t did, char *name,const int len);
+cnid_t cnid_get   (struct _cnid_db *cdb, const cnid_t did, char *name,const size_t len);
 
-int    cnid_getstamp(struct _cnid_db *cdb, void *buffer, const int len);
+int    cnid_getstamp(struct _cnid_db *cdb, void *buffer, const size_t len);
 
 cnid_t cnid_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
-                       char *name, const int len);
+                       char *name, const size_t len);
 
-char *cnid_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len);
+char *cnid_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len);
 
 int cnid_update   (struct _cnid_db *cdb, const cnid_t id, const struct stat *st, 
-                       const cnid_t did, char *name, const int len);   
+                       const cnid_t did, char *name, const size_t len);
+
+cnid_t cnid_rebuild_add(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
+                        char *name, const size_t len, cnid_t hint);
+
 
 /* This function closes a CNID database and frees all resources assigned to it. */ 
 void cnid_close(struct _cnid_db *db);
 
 #endif
 
-/*
- * $Log: cnid.h,v $
- * Revision 1.9.6.6.2.1  2005-01-30 20:56:21  didg
- *
- * Olaf Hering at suse.de warning fixes.
- *
- * Revision 1.9.6.6  2004/02/22 18:36:37  didg
- *
- * small clean up
- *
- * Revision 1.9.6.5  2004/01/14 23:15:19  lenneis
- * Check if we can get a DB stamp sucessfully in afs_openvol and fail
- * the open if not.
- *
- * Revision 1.9.6.4  2004/01/10 07:19:31  bfernhomberg
- * add cnid_init prototype
- *
- * Revision 1.9.6.3  2004/01/03 22:42:55  didg
- *
- * better errors handling in afpd for dbd cnid.
- *
- * Revision 1.9.6.2  2004/01/03 22:21:09  didg
- *
- * add nodev volume option (always use 0 for device number).
- *
- * Revision 1.9.6.1  2003/09/09 16:42:20  didg
- *
- * big merge for db frontend and unicode.
- *
- * Revision 1.9.4.2  2003/06/11 15:29:11  rlewczuk
- * Removed obsolete parameter from cnid_add. Spotted by Didier.
- *
- * Revision 1.9.4.1  2003/05/29 07:53:19  rlewczuk
- * Selectable CNIDs. Some refactoring. Propably needs more of refactoring, mainly
- * a well designed API (current API is just an old cnid_* API enclosed in VMT).
- *
- */
-
index 2c4566d56340ffc911a49f8a06002dfbc15dde4c..13609048191226e6e972d15409b7bf163899d23d 100644 (file)
@@ -64,8 +64,9 @@ typedef struct DSI {
   
   u_int32_t attn_quantum, datasize, server_quantum;
   u_int16_t serverID, clientID;
-  u_int8_t *status, commands[DSI_CMDSIZ], data[DSI_DATASIZ];
-  int statuslen;
+  char      *status;
+  u_int8_t  commands[DSI_CMDSIZ], data[DSI_DATASIZ];
+  size_t statuslen;
   size_t datalen, cmdlen;
   size_t read_count, write_count;
   int asleep; /* client won't reply AFP 0x7a ? */
@@ -142,7 +143,7 @@ extern DSI *dsi_init __P((const dsi_proto /*protocol*/,
                          const char * /*host*/, const char * /*address*/,
                          const int /*port*/, const int /*proxy*/,
                          const u_int32_t /* server quantum */));
-extern void dsi_setstatus __P((DSI *, u_int8_t *, const int));
+extern void dsi_setstatus __P((DSI *, char *, const size_t));
 
 /* in dsi_getsess.c */
 extern DSI *dsi_getsession __P((DSI *, server_child *, const int));
index 624003b3fc634fed22502ad8919f1d883a67614d..4da6be1e7780f81bb8e38853498995b304c7a852 100644 (file)
@@ -23,18 +23,18 @@ extern void cnid_cdb_close __P((struct _cnid_db *));
 
 /* cnid_add.c */
 extern cnid_t cnid_cdb_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                           char *, const int, cnid_t));
-extern int cnid_cdb_getstamp __P((struct _cnid_db *, void *, const int ));
+                           char *, const size_t, cnid_t));
+extern int cnid_cdb_getstamp __P((struct _cnid_db *, void *, const size_t ));
 
 /* cnid_get.c */
-extern cnid_t cnid_cdb_get __P((struct _cnid_db *, const cnid_t, char *, const int)); 
-extern char *cnid_cdb_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t )); 
+extern cnid_t cnid_cdb_get __P((struct _cnid_db *, const cnid_t, char *, const size_t)); 
+extern char *cnid_cdb_resolve __P((struct _cnid_db *, cnid_t *, void *, size_t )); 
 extern cnid_t cnid_cdb_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                              char *, const int));
+                              char *, const size_t));
 
 /* cnid_update.c */
 extern int cnid_cdb_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
-                           const cnid_t, char *, int));
+                           const cnid_t, char *, size_t));
 
 /* cnid_delete.c */
 extern int cnid_cdb_delete __P((struct _cnid_db *, const cnid_t));
index d9bad55bfb310c01272fb006a60dd7aa70703d8b..6b9924aad8f9e27194ac9be8fd2d4c78670139b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_cdb_add.c,v 1.1.4.6.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_cdb_add.c,v 1.1.4.6.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -40,11 +40,11 @@ static void make_devino_data(unsigned char *buf, dev_t dev, ino_t ino)
     buf[CNID_DEV_LEN + CNID_INO_LEN - 8] = ino;    
 }
 
-char *make_cnid_data(const struct stat *st,const cnid_t did,
-                     const char *name, const int len)
+unsigned char *make_cnid_data(const struct stat *st,const cnid_t did,
+                     const char *name, const size_t len)
 {
-    static char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
-    char *buf = start  +CNID_LEN;
+    static unsigned char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
+    unsigned char *buf = start  +CNID_LEN;
     u_int32_t i;
 
     if (len > MAXPATHLEN)
@@ -70,7 +70,7 @@ char *make_cnid_data(const struct stat *st,const cnid_t did,
 #endif
 
 extern int cnid_cdb_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
-                const cnid_t did, char *name, const int len);
+                const cnid_t did, char *name, const size_t len);
 
 /* --------------- */
 int db_stamp(void *buffer, size_t size)
@@ -169,7 +169,7 @@ cleanup:
 
 /* ------------------------ */
 cnid_t cnid_cdb_add(struct _cnid_db *cdb, const struct stat *st,
-                const cnid_t did, char *name, const int len,
+                const cnid_t did, char *name, const size_t len,
                 cnid_t hint)
 {
     CNID_private *db;
@@ -246,7 +246,7 @@ cnid_t cnid_cdb_add(struct _cnid_db *cdb, const struct stat *st,
 
 /* cnid_cbd_getstamp */
 /*-----------------------*/
-int cnid_cdb_getstamp(struct _cnid_db *cdb, void *buffer, const int len)
+int cnid_cdb_getstamp(struct _cnid_db *cdb, void *buffer, const size_t len)
 {
     DBT key, data;
     int rc;
index 1b41dc274fcd4ef439e6277501494b4a4afc4ab0..5eea4db0e394a9f3b23b8958daf0c4032b2c4142 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_cdb_get.c,v 1.1.4.2.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_cdb_get.c,v 1.1.4.2.2.2 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -11,7 +11,7 @@
 
 /* Return CNID for a given did/name. */
 cnid_t cnid_cdb_get(struct _cnid_db *cdb, const cnid_t did, char *name,
-                const int len)
+                const size_t len)
 {
     char start[CNID_DID_LEN + MAXPATHLEN + 1], *buf;
     CNID_private *db;
index a23776555618c9bd49033b2405ce1d5ff714274d..258e3613441271e57cee14eae0875462a1ae77a6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_cdb_lookup.c,v 1.1.4.5.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_cdb_lookup.c,v 1.1.4.5.2.2 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -15,9 +15,9 @@
 /* This returns the CNID corresponding to a particular file.  It will
  * also fix up the various databases if there's a problem. */
 cnid_t cnid_cdb_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
-                   char *name, const int len)
+                   char *name, const size_t len)
 {
-    char *buf;
+    unsigned char *buf;
     CNID_private *db;
     DBT key, devdata, diddata;
     char dev[CNID_DEV_LEN];
index 6342c0099cc1637db958bbaeda8a9e740c936f24..3b76c9b65a83464ca0b8c4137905f0d0b8762106 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cnid_cdb_open.c,v 1.1.4.10 2004-03-22 04:38:51 bfernhomberg Exp $
+ * $Id: cnid_cdb_open.c,v 1.1.4.10.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -86,8 +86,8 @@ static int my_yield(void)
 
 /* --------------- */
 static int didname(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
 DBT *skey;
 {
 int len;
@@ -101,8 +101,8 @@ int len;
  
 /* --------------- */
 static int devino(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
 DBT *skey;
 {
     memset(skey, 0, sizeof(DBT));
index 60f79dc25c6e06ad4a33b2cb29f5fd27a35369dd..a59ae84f44cfa6c93f7cd0b9492c1c29e42888d3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_cdb_private.h,v 1.1.4.7 2004-03-22 04:38:51 bfernhomberg Exp $
+ * $Id: cnid_cdb_private.h,v 1.1.4.7.2.1 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifndef LIBATALK_CDB_PRIVATE_H
@@ -195,12 +195,12 @@ static void make_devino_data(unsigned char *buf, dev_t dev, ino_t ino)
     buf[CNID_DEV_LEN + CNID_INO_LEN - 8] = ino;    
 }
 
-static __inline__ char *make_cnid_data(const struct stat *st,
+static __inline__ unsigned char *make_cnid_data(const struct stat *st,
                                        const cnid_t did,
-                                       const char *name, const int len)
+                                       const char *name, const size_t len)
 {
-    static char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
-    char *buf = start  +CNID_LEN;
+    static unsigned char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
+    unsigned char *buf = start  +CNID_LEN;
     u_int32_t i;
 
     if (len > MAXPATHLEN)
@@ -224,8 +224,8 @@ static __inline__ char *make_cnid_data(const struct stat *st,
     return start;
 }
 #else
-extern char *make_cnid_data __P((const struct stat *,const cnid_t ,
-                                       const char *, const int ));
+extern unsigned char *make_cnid_data __P((const struct stat *,const cnid_t ,
+                                       const char *, const size_t ));
 #endif
 
 #endif /* atalk/cnid/cnid_private.h */
index 98fea10d9c48282262694677d440e06b565e084f..62e47d0ea0cf390bcfdcbc851641738c873d75cc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_cdb_resolve.c,v 1.1.4.2 2003-10-21 16:23:54 didg Exp $
+ * $Id: cnid_cdb_resolve.c,v 1.1.4.2.2.1 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -10,7 +10,7 @@
 #include "cnid_cdb_private.h"
 
 /* Return the did/name pair corresponding to a CNID. */
-char *cnid_cdb_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len) {
+char *cnid_cdb_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len) {
     CNID_private *db;
     DBT key, data;
     int rc;
index e162edafa6c7c0463991d36e213228a07f6a7638..e07954b378ab90cb14455a8fe50e7cdea90ab0e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_cdb_update.c,v 1.1.4.4.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_cdb_update.c,v 1.1.4.4.2.2 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
  * handle the did/name data, there are a bunch of functions to get
  * and set the various fields. */
 int cnid_cdb_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
-                const cnid_t did, char *name, const int len
+                const cnid_t did, char *name, const size_t len
                 /*, const char *info, const int infolen*/)
 {
-    char *buf;
+    unsigned char *buf;
     CNID_private *db;
     DBT key, pkey, data;
     int rc;
index ede99c8978cfdcbe75eb8ca611f92b626ac58127..79244d300d085e98133e911030e7785315f186c1 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: cnid.c,v 1.1.4.11.2.2 2005-01-31 17:01:16 didg Exp $
+ * $Id: cnid.c,v 1.1.4.11.2.3 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 2003 the Netatalk Team
  * Copyright (c) 2003 Rafal Lewczuk <rlewczuk@pronet.pl>
@@ -196,7 +196,7 @@ u_int32_t flags;
 
 /* --------------- */
 cnid_t cnid_add(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, 
-                       char *name, const int len, cnid_t hint)
+                       char *name, const size_t len, cnid_t hint)
 {
 cnid_t ret;
 
@@ -219,7 +219,7 @@ int ret;
 
 
 /* --------------- */
-cnid_t cnid_get(struct _cnid_db *cdb, const cnid_t did, char *name,const int len)
+cnid_t cnid_get(struct _cnid_db *cdb, const cnid_t did, char *name,const size_t len)
 {
 cnid_t ret;
 
@@ -230,7 +230,7 @@ cnid_t ret;
 }
 
 /* --------------- */
-int cnid_getstamp(struct _cnid_db *cdb,  void *buffer, const int len)
+int cnid_getstamp(struct _cnid_db *cdb,  void *buffer, const size_t len)
 {
 cnid_t ret;
 time_t t;
@@ -252,7 +252,7 @@ time_t t;
 
 /* --------------- */
 cnid_t cnid_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
-                       char *name, const int len)
+                       char *name, const size_t len)
 {
 cnid_t ret;
 
@@ -263,7 +263,7 @@ cnid_t ret;
 }
 
 /* --------------- */
-char *cnid_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len)
+char *cnid_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len)
 {
 char *ret;
 
@@ -275,7 +275,7 @@ char *ret;
 
 /* --------------- */
 int cnid_update   (struct _cnid_db *cdb, const cnid_t id, const struct stat *st, 
-                       const cnid_t did, char *name, const int len)
+                       const cnid_t did, char *name, const size_t len)
 {
 int ret;
 
index dec9597e76ed27c96654501bd5e8495c26b6a386..9986544c9737119dab9573284fbdf7aa09606ba0 100644 (file)
@@ -60,17 +60,17 @@ extern void cnid_db3_close __P((struct _cnid_db *));
 
 /* cnid_add.c */
 extern cnid_t cnid_db3_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                           char *, const int, cnid_t));
+                           char *, const size_t, cnid_t));
 
 /* cnid_get.c */
-extern cnid_t cnid_db3_get __P((struct _cnid_db *, const cnid_t, char *, const int)); 
-extern char *cnid_db3_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t )); 
+extern cnid_t cnid_db3_get __P((struct _cnid_db *, const cnid_t, char *, const size_t)); 
+extern char *cnid_db3_resolve __P((struct _cnid_db *, cnid_t *, void *, size_t )); 
 extern cnid_t cnid_db3_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                              char *, const int));
+                              char *, const size_t));
 
 /* cnid_update.c */
 extern int cnid_db3_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
-                           const cnid_t, char *, int));
+                           const cnid_t, char *, size_t));
 
 /* cnid_delete.c */
 extern int cnid_db3_delete __P((struct _cnid_db *, const cnid_t));
index adf30f392f473ebedbd8dfa7b83375ad3b2ded18..c7f6b8003c5d4ea07188a51de6652e728f8cd2ec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_db3_add.c,v 1.1.4.2.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_db3_add.c,v 1.1.4.2.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -118,7 +118,6 @@ static cnid_t get_cnid(CNID_private *db)
     DBT rootinfo_key, rootinfo_data;
     DB_TXN *tid;
     int rc;
-    int flag;
     cnid_t hint,id;
 
     memset(&rootinfo_key, 0, sizeof(rootinfo_key));
@@ -203,7 +202,7 @@ cleanup_abort:
 
 /* ------------------------ */
 cnid_t cnid_db3_add(struct _cnid_db *cdb, const struct stat *st,
-                const cnid_t did, char *name, const int len,
+                const cnid_t did, char *name, const size_t len,
                 cnid_t hint)
 {
     CNID_private *db;
index 0efdfd00851226e2f67c498549bd2146bd4b241b..4ac4bf81b2806f84af87e6a789c4594503c48530 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_db3_get.c,v 1.1.4.2.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_db3_get.c,v 1.1.4.2.2.2 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -27,8 +27,7 @@
 #include "cnid_db3_private.h"
 
 /* Return CNID for a given did/name. */
-cnid_t cnid_db3_get(struct _cnid_db *cdb, const cnid_t did, char *name,
-                const int len)
+cnid_t cnid_db3_get(struct _cnid_db *cdb, const cnid_t did, char *name, const size_t len)
 {
     char start[CNID_DID_LEN + MAXPATHLEN + 1], *buf;
     CNID_private *db;
index 0d484f88ab463c8a962e7368d53e1f6f2b141c8c..a9327c645db0ed8d77723cdc28299b37d74eb4cb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cnid_db3_lookup.c,v 1.1.4.2.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_db3_lookup.c,v 1.1.4.2.2.2 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -32,9 +32,9 @@
 
 /* This returns the CNID corresponding to a particular file.  It will
  * also fix up the various databases if there's a problem. */
-cnid_t cnid_db3_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const int len)
+cnid_t cnid_db3_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const size_t len)
 {
-    char *buf;
+    unsigned char *buf;
     CNID_private *db;
     DBT key, devdata, diddata;
     int devino = 1, didname = 1;
index 183d1d8704a5452c9e425fc2710f6197b4ac9793..7769f59bd9f290c30730b20f0ae71ecd52c5778e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_db3_private.h,v 1.1.4.3 2003-10-30 09:38:47 bfernhomberg Exp $
+ * $Id: cnid_db3_private.h,v 1.1.4.3.2.1 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifndef LIBATALK_CNID_PRIVATE_H
@@ -106,12 +106,12 @@ typedef struct CNID_private {
 #endif /* __inline__ */
 
 /* construct db_cnid data. NOTE: this is not re-entrant.  */
-static __inline__ char *make_cnid_data(const struct stat *st,
+static __inline__ unsigned char *make_cnid_data(const struct stat *st,
                                        const cnid_t did,
-                                       const char *name, const int len)
+                                       const char *name, const size_t len)
 {
-    static char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
-    char *buf = start;
+    static unsigned char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
+    unsigned char *buf = start;
     u_int32_t i;
 
     if (len > MAXPATHLEN)
index 394c63806af82b09a8045d60568a830ed2794f19..3283d5a63458bea9d8daa1e34b854425df4b0540 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_db3_resolve.c,v 1.1.4.2 2003-10-21 16:23:54 didg Exp $
+ * $Id: cnid_db3_resolve.c,v 1.1.4.2.2.1 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -27,7 +27,7 @@
 #include "cnid_db3_private.h"
 
 /* Return the did/name pair corresponding to a CNID. */
-char *cnid_db3_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len) {
+char *cnid_db3_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len) {
     CNID_private *db;
     DBT key, data;
     int rc;
index 1dd0eda76229406e8f23a695587e884a0a453017..cb100ae1c5e20c845d368e7a1ab1bbb01fe3ac07 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_db3_update.c,v 1.1.4.2.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_db3_update.c,v 1.1.4.2.2.2 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -30,7 +30,7 @@
  * handle the did/name data, there are a bunch of functions to get
  * and set the various fields. */
 int cnid_db3_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
-                const cnid_t did, char *name, const int len
+                const cnid_t did, char *name, const size_t len
                 /*, const char *info, const int infolen*/)
 {
     CNID_private *db;
index 9f32950b4a4ab033bfc208904bedd7744ffe268a..deee39ead2e51f0ec525dede5995e260ac688db0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_dbd.c,v 1.1.4.18.2.2 2005-02-06 10:16:03 didg Exp $
+ * $Id: cnid_dbd.c,v 1.1.4.18.2.3 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -375,7 +375,7 @@ static struct _cnid_db *cnid_dbd_new(const char *volpath)
 }
 
 /* ---------------------- */
-struct _cnid_db *cnid_dbd_open(const char *dir, mode_t mask)
+struct _cnid_db *cnid_dbd_open(const char *dir, mode_t mask _U_)
 {
     CNID_private *db = NULL;
     struct _cnid_db *cdb = NULL;
@@ -446,8 +446,8 @@ void cnid_dbd_close(struct _cnid_db *cdb)
 
 /* ---------------------- */
 cnid_t cnid_dbd_add(struct _cnid_db *cdb, const struct stat *st,
-                const cnid_t did, char *name, const int len,
-                cnid_t hint)
+                const cnid_t did, char *name, const size_t len,
+                cnid_t hint _U_)
 {
     CNID_private *db;
     struct cnid_dbd_rqst rqst;
@@ -479,6 +479,7 @@ cnid_t cnid_dbd_add(struct _cnid_db *cdb, const struct stat *st,
     rqst.name = name;
     rqst.namelen = len;
 
+    rply.namelen = 0;
     if (transmit(db, &rqst, &rply) < 0) {
         errno = CNID_ERR_DB;
         return CNID_INVALID;
@@ -504,8 +505,7 @@ cnid_t cnid_dbd_add(struct _cnid_db *cdb, const struct stat *st,
 }
 
 /* ---------------------- */
-cnid_t cnid_dbd_get(struct _cnid_db *cdb, const cnid_t did, char *name,
-                const int len)
+cnid_t cnid_dbd_get(struct _cnid_db *cdb, const cnid_t did, char *name, const size_t len)
 {
     CNID_private *db;
     struct cnid_dbd_rqst rqst;
@@ -531,6 +531,7 @@ cnid_t cnid_dbd_get(struct _cnid_db *cdb, const cnid_t did, char *name,
     rqst.name = name;
     rqst.namelen = len;
 
+    rply.namelen = 0;
     if (transmit(db, &rqst, &rply) < 0) {
         errno = CNID_ERR_DB;
         return CNID_INVALID;
@@ -555,7 +556,7 @@ cnid_t cnid_dbd_get(struct _cnid_db *cdb, const cnid_t did, char *name,
 }
 
 /* ---------------------- */
-char *cnid_dbd_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len)
+char *cnid_dbd_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len)
 {
     CNID_private *db;
     struct cnid_dbd_rqst rqst;
@@ -630,7 +631,7 @@ static int dbd_getstamp(CNID_private *db, void *buffer, const size_t len)
 }
 
 /* ---------------------- */
-int cnid_dbd_getstamp(struct _cnid_db *cdb, void *buffer, const int len)
+int cnid_dbd_getstamp(struct _cnid_db *cdb, void *buffer, const size_t len)
 {
     CNID_private *db;
     int ret;
@@ -650,7 +651,7 @@ int cnid_dbd_getstamp(struct _cnid_db *cdb, void *buffer, const int len)
 
 /* ---------------------- */
 cnid_t cnid_dbd_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
-                   char *name, const int len)
+                   char *name, const size_t len)
 {
     CNID_private *db;
     struct cnid_dbd_rqst rqst;
@@ -682,6 +683,7 @@ cnid_t cnid_dbd_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t
     rqst.name = name;
     rqst.namelen = len;
 
+    rply.namelen = 0;
     if (transmit(db, &rqst, &rply) < 0) {
         errno = CNID_ERR_DB;
         return CNID_INVALID;
@@ -707,7 +709,7 @@ cnid_t cnid_dbd_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t
 
 /* ---------------------- */
 int cnid_dbd_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
-                const cnid_t did, char *name, const int len)
+                const cnid_t did, char *name, const size_t len)
 {
     CNID_private *db;
     struct cnid_dbd_rqst rqst;
@@ -738,6 +740,7 @@ int cnid_dbd_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st
     rqst.name = name;
     rqst.namelen = len;
 
+    rply.namelen = 0;
     if (transmit(db, &rqst, &rply) < 0) {
         errno = CNID_ERR_DB;
         return -1;
@@ -773,6 +776,7 @@ int cnid_dbd_delete(struct _cnid_db *cdb, const cnid_t id)
     rqst.op = CNID_DBD_OP_DELETE;
     rqst.cnid = id;
 
+    rply.namelen = 0;
     if (transmit(db, &rqst, &rply) < 0) {
         errno = CNID_ERR_DB;
         return -1;
@@ -790,6 +794,7 @@ int cnid_dbd_delete(struct _cnid_db *cdb, const cnid_t id)
     }
 }
 
+
 struct _cnid_module cnid_dbd_module = {
     "dbd",
     {NULL, NULL},
index 489519f926097ce1f89f5aef488227a9e363de46..241d1c769d7fbf470ad01bd98b1bfea40fd3b36c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_dbd.h,v 1.1.4.3.2.1 2005-01-30 20:56:23 didg Exp $
+ * $Id: cnid_dbd.h,v 1.1.4.3.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -21,14 +21,14 @@ extern struct _cnid_module cnid_dbd_module;
 extern struct _cnid_db *cnid_dbd_open __P((const char *, mode_t));
 extern void cnid_dbd_close __P((struct _cnid_db *));
 extern cnid_t cnid_dbd_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                           char *, const int, cnid_t));
-extern cnid_t cnid_dbd_get __P((struct _cnid_db *, const cnid_t, char *, const int)); 
-extern char *cnid_dbd_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t )); 
-extern int cnid_dbd_getstamp __P((struct _cnid_db *, void *, const int )); 
+                           char *, const size_t, cnid_t));
+extern cnid_t cnid_dbd_get __P((struct _cnid_db *, const cnid_t, char *, const size_t)); 
+extern char *cnid_dbd_resolve __P((struct _cnid_db *, cnid_t *, void *, size_t )); 
+extern int cnid_dbd_getstamp __P((struct _cnid_db *, void *, const size_t )); 
 extern cnid_t cnid_dbd_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                              char *, const int));
+                              char *, const size_t));
 extern int cnid_dbd_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
-                           const cnid_t, char *, int));
+                           const cnid_t, char *, size_t));
 extern int cnid_dbd_delete __P((struct _cnid_db *, const cnid_t));
 
 #endif /* include/atalk/cnid_dbd.h */
index 64160e300793c05e08c353796610c7e743bc2e44..3cf877c6b2d4b07ba851162427a69a7186644faa 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cnid_last.c,v 1.1.4.1.2.2 2005-02-06 10:16:03 didg Exp $
+ * $Id: cnid_last.c,v 1.1.4.1.2.3 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -23,7 +23,7 @@
 
 /* ------------------------ */
 cnid_t cnid_last_add(struct _cnid_db *cdb, const struct stat *st,
-                     const cnid_t did, char *name, const int len, cnid_t hint)
+                     const cnid_t did _U_, char *name _U_, const size_t len _U_, cnid_t hint _U_)
 {
 
     /* FIXME: it relies on fact, that this is never called twice for the same file/dir. */
@@ -80,7 +80,7 @@ void cnid_last_close(struct _cnid_db *cdb)
 
 
 
-int cnid_last_delete(struct _cnid_db *cdb, const cnid_t id)
+int cnid_last_delete(struct _cnid_db *cdb _U_, const cnid_t id _U_)
 {
     return CNID_INVALID;
 }
@@ -88,7 +88,7 @@ int cnid_last_delete(struct _cnid_db *cdb, const cnid_t id)
 
 
 /* Return CNID for a given did/name. */
-cnid_t cnid_last_get(struct _cnid_db *cdb, const cnid_t did, char *name, const int len)
+cnid_t cnid_last_get(struct _cnid_db *cdb _U_, const cnid_t did _U_, char *name _U_, const size_t len _U_)
 {
     /* FIXME: it relies on fact, that this is never called twice for the same file/dir. */
     /* Propably we should look through DID tree. */
@@ -98,7 +98,8 @@ cnid_t cnid_last_get(struct _cnid_db *cdb, const cnid_t did, char *name, const i
 
 
 /* */
-cnid_t cnid_last_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const int len)
+cnid_t cnid_last_lookup(struct _cnid_db *cdb _U_, const struct stat *st _U_, const cnid_t did _U_, 
+    char *name _U_, const size_t len _U_)
 {
     /* FIXME: this function doesn't work in [last] scheme ! */
     /* Should be never called or CNID should be somewhat refactored again. */
@@ -143,7 +144,7 @@ static struct _cnid_db *cnid_last_new(const char *volpath)
     return cdb;
 }
 
-struct _cnid_db *cnid_last_open(const char *dir, mode_t mask)
+struct _cnid_db *cnid_last_open(const char *dir, mode_t mask _U_)
 {
     struct _cnid_db *cdb;
 
@@ -167,16 +168,15 @@ struct _cnid_module cnid_last_module = {
 };
 
 /* Return the did/name pair corresponding to a CNID. */
-char *cnid_last_resolve(struct _cnid_db *cdb, cnid_t * id, void *buffer, u_int32_t len)
+char *cnid_last_resolve(struct _cnid_db *cdb _U_, cnid_t * id _U_, void *buffer _U_, size_t len _U_)
 {
     /* FIXME: frankly, it does not work. As get, add and other functions. */
     return NULL;
 }
 
 
-int cnid_last_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
-                     const cnid_t did, char *name, const int len
-                     /*, const char *info, const int infolen */ )
+int cnid_last_update(struct _cnid_db *cdb _U_, const cnid_t id _U_, const struct stat *st _U_,
+                     const cnid_t did  _U_, char *name  _U_, const size_t len _U_)
 {
     return 0;
 }
index 2a32527d4bb43aa1461ca4efb5f81bfc7cb86d7c..33f561e10c8191c512f0e0c021a688140ab46dc2 100644 (file)
@@ -23,12 +23,12 @@ extern struct _cnid_module cnid_last_module;
 extern struct _cnid_db *cnid_last_open __P((const char *, mode_t));
 extern void cnid_last_close __P((struct _cnid_db *));
 extern cnid_t cnid_last_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                                 char *, const int, cnid_t));
-extern cnid_t cnid_last_get __P((struct _cnid_db *, const cnid_t, char *, const int));
-extern char *cnid_last_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t));
-extern cnid_t cnid_last_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const int));
+                                 char *, const size_t, cnid_t));
+extern cnid_t cnid_last_get __P((struct _cnid_db *, const cnid_t, char *, const size_t));
+extern char *cnid_last_resolve __P((struct _cnid_db *, cnid_t *, void *, size_t));
+extern cnid_t cnid_last_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const size_t));
 extern int cnid_last_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
-                                 const cnid_t, char *, int));
+                                 const cnid_t, char *, size_t));
 extern int cnid_last_delete __P((struct _cnid_db *, const cnid_t));
 
 #endif /* include/atalk/cnid_last.h */
index fb12dc0724660265da572c1e49826113425a87b1..29bed97715dafcc8e249e3ef4d8cefd37f2ca878 100644 (file)
@@ -70,16 +70,16 @@ extern void cnid_tdb_close __P((struct _cnid_db *));
 
 /* cnid_add.c */
 extern cnid_t cnid_tdb_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                                 char *, const int, cnid_t));
+                                 char *, const size_t, cnid_t));
 
 /* cnid_get.c */
-extern cnid_t cnid_tdb_get __P((struct _cnid_db *, const cnid_t, char *, const int));
-extern char *cnid_tdb_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t));
-extern cnid_t cnid_tdb_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const int));
+extern cnid_t cnid_tdb_get __P((struct _cnid_db *, const cnid_t, char *, const size_t));
+extern char *cnid_tdb_resolve __P((struct _cnid_db *, cnid_t *, void *, size_t));
+extern cnid_t cnid_tdb_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const size_t));
 
 /* cnid_update.c */
 extern int cnid_tdb_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
-                                 const cnid_t, char *, int));
+                                 const cnid_t, char *, size_t));
 
 /* cnid_delete.c */
 extern int cnid_tdb_delete __P((struct _cnid_db *, const cnid_t));
@@ -90,7 +90,7 @@ extern cnid_t cnid_tdb_nextid __P((struct _cnid_db *));
 /* construct db_cnid data. NOTE: this is not re-entrant.  */
 static __inline__ char *make_tdb_data(const struct stat *st,
                                        const cnid_t did,
-                                       const char *name, const int len)
+                                       const char *name, const size_t len)
 {
     static char start[TDB_HEADER_LEN + MAXPATHLEN + 1];
     char *buf = start;
index 5796e33ed15a147f0f6522edf673116a2fa1d118..571dba8e9e14e859e321645e2fcf6ad638a1e76b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_tdb_add.c,v 1.1.2.1.2.2 2005-01-31 17:01:16 didg Exp $
+ * $Id: cnid_tdb_add.c,v 1.1.2.1.2.3 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -103,7 +103,7 @@ cleanup:
 
 /* ------------------------ */
 cnid_t cnid_tdb_add(struct _cnid_db *cdb, const struct stat *st,
-                     const cnid_t did, char *name, const int len, cnid_t hint)
+                     const cnid_t did, char *name, const size_t len, cnid_t hint)
 {
     const struct stat *lstp;
     cnid_t id;
index 1d17f9a29cab8da1065ed063b89347db0994d7a9..a313a1eb44aecc6c301816717d9a556d91ed1869 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_tdb_get.c,v 1.1.2.1.2.1 2005-01-30 20:56:23 didg Exp $
+ * $Id: cnid_tdb_get.c,v 1.1.2.1.2.2 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -11,7 +11,7 @@
 #include "cnid_tdb.h"
 
 /* Return CNID for a given did/name. */
-cnid_t cnid_tdb_get(struct _cnid_db *cdb, const cnid_t did, char *name, const int len)
+cnid_t cnid_tdb_get(struct _cnid_db *cdb, const cnid_t did, char *name, const size_t len)
 {
     char start[TDB_DID_LEN + MAXPATHLEN + 1], *buf;
     struct _cnid_tdb_private *db;
index 48e4bb7a687da20d7ce3eda4e9a570fb8c9c8526..dbd74ea8c15bb1534232962a0659086485ced606 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_tdb_lookup.c,v 1.1.2.1.2.1 2005-01-30 20:56:23 didg Exp $
+ * $Id: cnid_tdb_lookup.c,v 1.1.2.1.2.2 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -11,7 +11,7 @@
 #include "cnid_tdb.h"
 #include <atalk/logger.h>
 
-cnid_t cnid_tdb_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const int len)
+cnid_t cnid_tdb_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const size_t len)
 {
     char *buf;
     struct _cnid_tdb_private *db;
index 12fc4ad3d6c218f64169ac67f951967f841e8dec..4aa4f993d164c6f17d5a054976979207b4754c4f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_tdb_update.c,v 1.1.2.1.2.1 2005-01-30 20:56:23 didg Exp $
+ * $Id: cnid_tdb_update.c,v 1.1.2.1.2.2 2005-09-27 10:40:41 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -12,7 +12,7 @@
 #include <atalk/logger.h>
 
 int cnid_tdb_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
-                     const cnid_t did, char *name, const int len
+                     const cnid_t did, char *name, const size_t len
                      /*, const char *info, const int infolen */ )
 {
     struct _cnid_tdb_private *db;
index 6c5363480e9b434e4099c95d30b5af163b8d4662..ba7b3531bcbcf9fbc567a6ccad51b4ac008509dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dsi_init.c,v 1.3.14.1 2004-04-27 22:45:37 didg Exp $
+ * $Id: dsi_init.c,v 1.3.14.1.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
@@ -55,7 +55,7 @@ DSI *dsi_init(const dsi_proto protocol, const char *program,
     return dsi;
 }
 
-void dsi_setstatus(DSI *dsi, u_int8_t *status, const int slen)
+void dsi_setstatus(DSI *dsi, char *status, const size_t slen)
 {
     dsi->status = status;
     dsi->statuslen = slen;
index cbfdb2fbcf6fe40860987d105f9b3e6f407a987b..1017caae4a8a2ebebf144bfd551e1fdf9ebd0d88 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dsi_stream.c,v 1.11.6.5.2.1 2005-01-31 19:50:53 didg Exp $
+ * $Id: dsi_stream.c,v 1.11.6.5.2.2 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1998 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
@@ -112,7 +112,7 @@ void dsi_buffer(DSI *dsi)
  * write raw data. return actual bytes read. checks against EINTR
  * aren't necessary if all of the signals have SA_RESTART
  * specified. */
-size_t dsi_stream_write(DSI *dsi, void *data, const size_t length, int mode)
+size_t dsi_stream_write(DSI *dsi, void *data, const size_t length, int mode _U_)
 {
   size_t written;
   ssize_t len;
index 603b2e1d5906be9ce7cb278a4b96deb4dcb246c3..c522ee6be2030215a9788cdbecd1b94e34eb1a9e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dsi_write.c,v 1.3.14.2 2004-05-04 14:26:14 didg Exp $
+ * $Id: dsi_write.c,v 1.3.14.2.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
@@ -34,7 +34,7 @@
 /* initialize relevant things for dsi_write. this returns the amount
  * of data in the data buffer. the interface has been reworked to allow
  * for arbitrary buffers. */
-size_t dsi_writeinit(DSI *dsi, void *buf, const size_t buflen)
+size_t dsi_writeinit(DSI *dsi, void *buf, const size_t buflen _U_)
 {
 #ifdef TIMER_ON_READ
   const struct itimerval none = {{0, 0}, {0, 0}};
index 11f82c884d97e8a1691fc9cc09c6b9847b5f514f..0fc36b758cc544e94d269b34af4e3771b956bea7 100644 (file)
@@ -42,8 +42,8 @@
 
 /* ------------------------ */
 
-size_t mb_generic_push( int (*char_func)(unsigned char *, ucs2_t), void *cd, char **inbuf, size_t *inbytesleft,
-                         char **outbuf, size_t *outbytesleft)
+size_t mb_generic_push( int (*char_func)(unsigned char *, ucs2_t), void *cd _U_, char **inbuf, 
+                       size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
 {
         int len = 0;
        unsigned char *tmpptr = (unsigned char *) *outbuf;
@@ -76,8 +76,8 @@ size_t mb_generic_push( int (*char_func)(unsigned char *, ucs2_t), void *cd, cha
 
 /* ------------------------ */
 
-size_t mb_generic_pull ( int (*char_func)(ucs2_t *, const unsigned char *), void *cd, char **inbuf, size_t *inbytesleft,
-                         char **outbuf, size_t *outbytesleft)
+size_t mb_generic_pull ( int (*char_func)(ucs2_t *, const unsigned char *), void *cd _U_, 
+                       char **inbuf, size_t *inbytesleft,char **outbuf, size_t *outbytesleft)
 {
        ucs2_t          temp;
        unsigned char   *inptr;
index 589a43bb394c2f28dcd1ac2eddfd890bc324f5d9..2830458885cc5f6621174f1c75815da172f3532f 100644 (file)
@@ -80,7 +80,7 @@ char_ucs2_to_mac_hebrew ( unsigned char *r, ucs2_t wc)
     return 0;
 }
 
-static size_t mac_hebrew_push( void *cd, char **inbuf, size_t *inbytesleft,
+static size_t mac_hebrew_push( void *cd _U_, char **inbuf, size_t *inbytesleft,
                          char **outbuf, size_t *outbytesleft)
 {
     unsigned char c = 0;
@@ -152,7 +152,7 @@ char_mac_hebrew_to_ucs2 (ucs2_t *pwc, const unsigned char *s)
        return 0;
 }
 
-static size_t mac_hebrew_pull ( void *cd, char **inbuf, size_t *inbytesleft,
+static size_t mac_hebrew_pull ( void *cd _U_, char **inbuf, size_t *inbytesleft,
                          char **outbuf, size_t *outbytesleft)
 {
     ucs2_t         temp;
index 21f9d4f82a43a95cdb2467063e4f8242c26c5853..6dec20af64f038fbb9cf5dbb7bb033d0627b5cb9 100644 (file)
@@ -349,7 +349,7 @@ int atalk_iconv_close (atalk_iconv_t cd)
  the following functions implement the builtin character sets in Netatalk
 *************************************************************************/
 
-static size_t ascii_pull(void *cd, char **inbuf, size_t *inbytesleft,
+static size_t ascii_pull(void *cd _U_, char **inbuf, size_t *inbytesleft,
                         char **outbuf, size_t *outbytesleft)
 {
        ucs2_t curchar;
@@ -377,7 +377,7 @@ static size_t ascii_pull(void *cd, char **inbuf, size_t *inbytesleft,
        return 0;
 }
 
-static size_t ascii_push(void *cd, char **inbuf, size_t *inbytesleft,
+static size_t ascii_push(void *cd _U_, char **inbuf, size_t *inbytesleft,
                         char **outbuf, size_t *outbytesleft)
 {
        int ir_count=0;
@@ -412,7 +412,7 @@ static size_t ascii_push(void *cd, char **inbuf, size_t *inbytesleft,
 }
 
 
-static size_t iconv_copy(void *cd, char **inbuf, size_t *inbytesleft,
+static size_t iconv_copy(void *cd _U_, char **inbuf, size_t *inbytesleft,
                         char **outbuf, size_t *outbytesleft)
 {
        int n;
index bc448c7aa77a0aa7967a01472e6b28e30df03b4d..12aed01379ee09d944d78ec78478137c59923cc0 100644 (file)
@@ -61,7 +61,7 @@ struct charset_functions charset_utf8_mac =
 };
 
 /* ------------------------ */
-static size_t utf8_pull(void *cd, char **inbuf, size_t *inbytesleft,
+static size_t utf8_pull(void *cd _U_, char **inbuf, size_t *inbytesleft,
                         char **outbuf, size_t *outbytesleft)
 {
        ucs2_t uc = 0;
@@ -113,7 +113,7 @@ badseq:
 }
 
 /* ------------------------ */
-static size_t utf8_push(void *cd, char **inbuf, size_t *inbytesleft,
+static size_t utf8_push(void *cd _U_, char **inbuf, size_t *inbytesleft,
                         char **outbuf, size_t *outbytesleft)
 {
        ucs2_t uc=0;
index a630b93b365be1696947121e85a2c87ba2067e77..61942e7bb1dfd80c0d278b65ac13bca55cbbcfa2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: server_ipc.c,v 1.1.4.1.2.2 2004-07-01 01:27:34 didg Exp $
+ * $Id: server_ipc.c,v 1.1.4.1.2.2.2.1 2005-09-27 10:40:41 didg Exp $
  *
  * All rights reserved. See COPYRIGHT.
  *
@@ -42,7 +42,7 @@ void *server_ipc_create(void)
 }
 
 /* ----------------- */
-int server_ipc_child(void *obj)
+int server_ipc_child(void *obj _U_)
 {
     /* close input */
     close(pipe_fd[0]);
@@ -50,7 +50,7 @@ int server_ipc_child(void *obj)
 }
 
 /* ----------------- */
-int server_ipc_parent(void *obj)
+int server_ipc_parent(void *obj _U_)
 {
     return pipe_fd[0];
 }