]> arthur.barton.de Git - netatalk.git/commitdiff
remove pre ansi declarations
authordidg <didg>
Tue, 13 Oct 2009 22:55:36 +0000 (22:55 +0000)
committerdidg <didg>
Tue, 13 Oct 2009 22:55:36 +0000 (22:55 +0000)
164 files changed:
bin/aecho/aecho.c
bin/afile/achfile.c
bin/afile/afile.c
bin/cnid/ad.c
bin/cnid/ad_cp.c
bin/cnid/ad_ls.c
bin/getzones/getzones.c
bin/megatron/asingle.c
bin/megatron/hqx.c
bin/megatron/macbin.c
bin/megatron/macbin.h
bin/megatron/megatron.c
bin/megatron/megatron.h
bin/megatron/nad.c
bin/megatron/updcrc.c
bin/megatron/updcrc.h [new file with mode: 0644]
bin/nbp/nbplkup.c
bin/nbp/nbprgstr.c
bin/nbp/nbpunrgstr.c
bin/pap/pap.c
bin/pap/papstatus.c
bin/psorder/pa.c
bin/psorder/pa.h
bin/psorder/psorder.c
bin/psorder/psorder.h
bin/uniconv/uniconv.c
etc/afpd/afp_asp.c
etc/afpd/afp_config.h
etc/afpd/afp_dsi.c
etc/afpd/afp_options.c
etc/afpd/appl.c
etc/afpd/auth.c
etc/afpd/auth.h
etc/afpd/catsearch.c
etc/afpd/desktop.c
etc/afpd/desktop.h
etc/afpd/directory.c
etc/afpd/directory.h
etc/afpd/enumerate.c
etc/afpd/file.c
etc/afpd/file.h
etc/afpd/filedir.c
etc/afpd/filedir.h
etc/afpd/fork.c
etc/afpd/fork.h
etc/afpd/gettok.c
etc/afpd/globals.h
etc/afpd/main.c
etc/afpd/mangle.h
etc/afpd/messages.c
etc/afpd/misc.h
etc/afpd/nfsquota.c
etc/afpd/ofork.c
etc/afpd/quota.c
etc/afpd/status.c
etc/afpd/status.h
etc/afpd/switch.c
etc/afpd/switch.h
etc/afpd/uam_auth.h
etc/afpd/unix.c
etc/afpd/unix.h
etc/afpd/volume.c
etc/afpd/volume.h
etc/atalkd/aep.c
etc/atalkd/atserv.h
etc/atalkd/config.c
etc/atalkd/interface.h
etc/atalkd/main.c
etc/atalkd/main.h
etc/atalkd/multicast.c
etc/atalkd/multicast.h
etc/atalkd/nbp.c
etc/atalkd/nbp.h
etc/atalkd/route.c
etc/atalkd/route.h
etc/atalkd/rtmp.c
etc/atalkd/rtmp.h
etc/atalkd/zip.c
etc/atalkd/zip.h
etc/cnid_dbd/cmd_dbd.c
etc/cnid_dbd/cnid_metad.c
etc/cnid_dbd/comm.c
etc/cnid_dbd/comm.h
etc/cnid_dbd/db_param.c
etc/cnid_dbd/db_param.h
etc/cnid_dbd/dbif.c
etc/cnid_dbd/pack.c
etc/cnid_dbd/usockfd.h
etc/papd/auth.c
etc/papd/comment.c
etc/papd/comment.h
etc/papd/file.c
etc/papd/file.h
etc/papd/headers.c
etc/papd/lp.c
etc/papd/lp.h
etc/papd/magics.c
etc/papd/main.c
etc/papd/ppd.c
etc/papd/ppd.h
etc/papd/print_cups.c
etc/papd/print_cups.h
etc/papd/printcap.c
etc/papd/printcap.h
etc/papd/queries.c
etc/papd/session.c
etc/papd/showppd.c
etc/papd/uam_auth.h
etc/psf/psa.c
etc/psf/psf.c
etc/uams/uams_dhx2_pam.c
etc/uams/uams_dhx_pam.c
etc/uams/uams_guest.c
etc/uams/uams_pam.c
etc/uams/uams_passwd.c
include/atalk/adouble.h
include/atalk/asp.h
include/atalk/atp.h
include/atalk/compat.h
include/atalk/dsi.h
include/atalk/nbp.h
include/atalk/netddp.h
include/atalk/server_child.h
include/atalk/uam.h
include/atalk/unicode.h
include/atalk/util.h
libatalk/adouble/ad_flush.c
libatalk/adouble/ad_open.c
libatalk/adouble/ad_read.c
libatalk/adouble/ad_write.c
libatalk/asp/asp_close.c
libatalk/asp/asp_cmdreply.c
libatalk/asp/asp_getsess.c
libatalk/asp/asp_init.c
libatalk/asp/asp_shutdown.c
libatalk/atp/atp_bufs.c
libatalk/atp/atp_close.c
libatalk/atp/atp_internals.h
libatalk/atp/atp_packet.c
libatalk/atp/atp_rreq.c
libatalk/atp/atp_rresp.c
libatalk/atp/atp_rsel.c
libatalk/atp/atp_sresp.c
libatalk/cnid/cdb/cnid_cdb.h
libatalk/cnid/cdb/cnid_cdb_open.c
libatalk/cnid/cdb/cnid_cdb_private.h
libatalk/cnid/cnid_init.c
libatalk/cnid/db3/cnid_db3.h
libatalk/cnid/dbd/cnid_dbd.h
libatalk/cnid/hash/cnid_hash.h
libatalk/cnid/last/cnid_last.h
libatalk/cnid/mtab/cnid_mtab.h
libatalk/cnid/tdb/cnid_tdb.h
libatalk/dsi/dsi_private.h
libatalk/dsi/dsi_tcp.c
libatalk/nbp/nbp_conf.h
libatalk/nbp/nbp_lkup.c
libatalk/nbp/nbp_rgstr.c
libatalk/nbp/nbp_unrgstr.c
libatalk/nbp/nbp_util.c
libatalk/unicode/charsets/generic_cjk.h
libatalk/util/atalk_addr.c
libatalk/util/getiface.c
libatalk/util/logger.c

index fef8bc2b901c61d51525effba86a3fbfbf5930db..e1210e660cb36f9cb7e37dafea393e6836f35a03 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: aecho.c,v 1.7 2005-04-28 20:49:18 bfernhomberg Exp $
+ * $Id: aecho.c,v 1.8 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -67,7 +67,7 @@ unsigned int          pings = 0;
 
 void usage(char *);
 
-void done()
+void done(int sig _U_)
 {
     if ( nsent) {
        printf( "\n----%d.%d AEP Statistics----\n",
@@ -82,7 +82,7 @@ void done()
     exit( 0 );
 }
   
-void aep_send()
+void aep_send(int sig _U_)
 {
     struct timeval     tv;
     char               *p, buf[ 1024 ];
@@ -108,12 +108,10 @@ void aep_send()
        exit( 1 );
     }
     nsent++;
-    if (pings && nsent > pings) done();
+    if (pings && nsent > pings) done(0);
 }
 
-int main( ac, av )
-    int                ac;
-    char       **av;
+int main(int ac, char **av)
 {
     struct servent     *se;
     struct sigaction   sv;
@@ -255,7 +253,7 @@ int main( ac, av )
        printf( "%d bytes from %u.%u: aep_seq=%d. time=%ld. ms\n",
                cc, ntohs( sat.sat_addr.s_net ), sat.sat_addr.s_node,
                seq, ms );
-        if (pings && seq + 1 >= pings) done();
+        if (pings && seq + 1 >= pings) done(0);
     }
 }
 
index 31fc3be85735ac9d3a62f3398a6ba99a3ae52346..db8bfad3b99ce4cab51f091c5d7dd1ff8b4a7515 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: achfile.c,v 1.5 2001-10-19 02:39:07 jmarcus Exp $
+ * $Id: achfile.c,v 1.6 2009-10-13 22:55:36 didg Exp $
  *
     afile - determine the MacOS creator/type of files
 
@@ -81,7 +81,7 @@ void help(char *prog)
 }
 
 /* Print the version. */
-void version()
+void version(void)
 {
   fprintf(stderr, "achfile (netatalk " VERSION ")\n");
 }
index 2a7bbbadd525f1b014c2971820bbe488adf8dd70..4cf8a353515b257da01e288748f374b23286bc5f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afile.c,v 1.5 2001-09-05 18:38:23 srittau Exp $
+ * $Id: afile.c,v 1.6 2009-10-13 22:55:36 didg Exp $
  *
     afile - determine the MacOS creator/type of files
 
@@ -92,7 +92,7 @@ void help(char *prog)
 }
 
 /* Print the version. */
-void version()
+void version(void)
 {
   fprintf(stderr, "afile (netatalk " VERSION ")\n");
 }
index a569659cfe1e1ac36f2872c872659c483bd38241..95faece79ed4a070bfb7c53b31b144f62c6ba4de 100644 (file)
@@ -1,5 +1,5 @@
 /* 
-   $Id: ad.c,v 1.1 2009-09-01 14:28:07 franklahm Exp $
+   $Id: ad.c,v 1.2 2009-10-13 22:55:36 didg Exp $
 
    Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
    
@@ -32,7 +32,7 @@
 #include <atalk/volinfo.h>
 #include "ad.h"
 
-static void usage_main()
+static void usage_main(void)
 {
 /*
     printf("Usage: ad ls|rm|cp|mv|set [file|dir, ...]\n");
index e2f2472b8c25abab56b859c51cbdf8a6ba9a5a10..ae158361bcfbd6e4ea9963ce35d0e88d195e5342 100644 (file)
@@ -1,5 +1,5 @@
 /* 
-   $Id: ad_cp.c,v 1.1 2009-09-01 14:28:07 franklahm Exp $
+   $Id: ad_cp.c,v 1.2 2009-10-13 22:55:36 didg Exp $
 
    Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
    
@@ -73,7 +73,7 @@ static const char *check_netatalk_dirs(const char *name)
 }
 
 
-static void usage_cp()
+static void usage_cp(void)
 {
     printf(
         "Usage: ad cp [-R [-L | -P]] [-pv] <source_file> <target_file>\n"
index ab1385a6a367d5bf03bf60b903c039ebe30c46c4..4b6092953330b7baa0ba2d5f10251ca5c14a6680 100644 (file)
@@ -1,5 +1,5 @@
 /* 
-   $Id: ad_ls.c,v 1.2 2009-09-14 01:24:40 didg Exp $
+   $Id: ad_ls.c,v 1.3 2009-10-13 22:55:36 didg Exp $
 
    Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
    
@@ -88,7 +88,7 @@ static const char *check_netatalk_dirs(const char *name)
 }
 
 
-static void usage_ls()
+static void usage_ls(void)
 {
     printf(
         "Usage: ad ls [-dRl[u]] [file|dir, ...]\n\n"
index 7b717386811baf2280d7bec8f7b5e46fd0102b7a..6d8a5eefd62fa721843addab9a77e98388b3871a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: getzones.c,v 1.7 2005-04-28 20:49:19 bfernhomberg Exp $
+ * $Id: getzones.c,v 1.8 2009-10-13 22:55:36 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
 
 void print_zones(short n, char *buf);
 
-void usage( s )
-    char *s;
+void usage( char *s)
 {
     fprintf( stderr, "usage:\t%s [-m | -l] [address]\n", s );
     exit( 1 );
 }
 
-int main( argc, argv )
-    int                argc;
-    char       *argv[];
+int main( int argc, char *argv[])
 {
     struct atp_handle  *ah;
     struct atp_block   atpb;
index 818c198aead473077679ce45cb0f895762e0720d..b9756e82e91dc43f6d2168a5b570f2b81bd3548e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asingle.c,v 1.11 2006-02-26 22:45:05 didg Exp $
+ * $Id: asingle.c,v 1.12 2009-10-13 22:55:36 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -62,10 +62,7 @@ u_char               header_buf[ AD_HEADER_LEN ];
  * somewhat initialized; single_filed is set.
  */
 
-int single_open( singlefile, flags, fh, options )
-    char               *singlefile;
-    int                        flags, options _U_;
-    struct FHeader     *fh;
+int single_open(char *singlefile, int flags, struct FHeader *fh, int options _U_)
 {
     int                        rc;
 
@@ -96,8 +93,7 @@ int single_open( singlefile, flags, fh, options )
  * Otherwise, a value of -1 is returned.
  */
 
-int single_close( keepflag )
-    int                        keepflag;
+int single_close( int keepflag)
 {
     if ( keepflag == KEEP ) {
        return( close( single.filed ));
@@ -116,9 +112,7 @@ int single_close( keepflag )
  * bytes of the other two forks can be read, as well.
  */
 
-int single_header_read( fh, version )
-    struct FHeader     *fh;
-    int                        version;
+int single_header_read( struct FHeader *fh, int version)
 {
 /*
  * entry_buf is used for reading in entry descriptors, and for reading in
@@ -395,10 +389,7 @@ int single_header_test(void)
  *
  */
 
-int single_read( fork, buffer, length )
-    int                        fork;
-    char               *buffer;
-    u_int32_t          length;
+int single_read( int fork, char *buffer, u_int32_t length)
 {
     u_int32_t          entry_id;
     char               *buf_ptr;
index 3f0406d55ade78b48eb394a5e24dff28b45e8787..9656141362e482186dc062ba25e04db68e6f3b1f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: hqx.c,v 1.14 2005-04-28 20:49:19 bfernhomberg Exp $
+ * $Id: hqx.c,v 1.15 2009-10-13 22:55:36 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -30,6 +30,7 @@
 #include "megatron.h"
 #include "nad.h"
 #include "hqx.h"
+#include "updcrc.h"
 
 #define HEXOUTPUT      0
 
@@ -65,8 +66,6 @@
 #define BHH_CRCSIZ             2
 #define BHH_HEADSIZ            21
 
-u_short                updcrc();
-
 /*     Forward declarations.
  */
 int skip_junk(int line);
@@ -101,10 +100,7 @@ somewhat initialized; hqx_fd is set.  skip_junk is called from
 here; skip_junk leaves hqx7_first and hqx7_last set.
  */
 
-int hqx_open( hqxfile, flags, fh, options )
-    char               *hqxfile;
-    int                        flags, options;
-    struct FHeader     *fh;
+int hqx_open(char *hqxfile, int flags, struct FHeader *fh, int options)
 {
     int                        maxlen;
 
@@ -166,8 +162,7 @@ int hqx_open( hqxfile, flags, fh, options )
  * Otherwise, a value of -1 is returned.
  */
 
-int hqx_close( keepflag )
-    int                        keepflag;
+int hqx_close(int keepflag)
 {
     if ( keepflag == KEEP ) {
        return( close( hqx.filed ));
@@ -188,10 +183,7 @@ int hqx_close( keepflag )
  * return zero and no more than that.
  */
 
-int hqx_read( fork, buffer, length )
-    int                        fork;
-    char               *buffer;
-    int                        length;
+int hqx_read(int fork, char *buffer, int length)
 {
     u_short            storedcrc;
     int                        readlen;
@@ -258,8 +250,7 @@ int hqx_read( fork, buffer, length )
  * to fill the hqx_header fields.
  */
 
-int hqx_header_read( fh )
-    struct FHeader     *fh;
+int hqx_header_read(struct FHeader *fh)
 {
     char               *headerbuf, *headerptr;
     u_int32_t          time_seconds;
@@ -392,8 +383,7 @@ int hqx_header_read( fh )
  * hqx_header_write.
  */
 
-int hqx_header_write( fh )
-    struct FHeader     *fh _U_;
+int hqx_header_write(struct FHeader *fh _U_)
 {
     return( -1 );
 }
@@ -405,8 +395,7 @@ int hqx_header_write( fh )
  * it sets the pointers to the hqx7 buffer up to point to the valid data.
  */
 
-int hqx7_fill( hqx7_ptr )
-    u_char             *hqx7_ptr;
+int hqx7_fill(u_char *hqx7_ptr)
 {
     int                        cc;
     int                        cs;
@@ -476,8 +465,7 @@ u_char hqxlookup[] = {
  * OTHER when looking for any subsequent line.
  */
 
-int skip_junk( line )
-int                    line;
+int skip_junk(int line)
 {
     int                        found = NOWAY;
     int                        stopflag;
@@ -578,9 +566,7 @@ int                 line;
  * file is reached.
  */
 
-int hqx_7tobin( outbuf, datalen ) 
-    char               *outbuf;
-    int                        datalen;
+int hqx_7tobin( char *outbuf, int datalen)
 {
     static u_char      hqx8[3];
     static int         hqx8i;
index bf85a080b2fffc27e0e177e3e6e11709c4b6fab1..d43bb37d41142a570b92f9cc1c67bc12fbab3fb3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: macbin.c,v 1.12 2005-04-28 20:49:19 bfernhomberg Exp $
+ * $Id: macbin.c,v 1.13 2009-10-13 22:55:36 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -26,6 +26,7 @@
 #include <netatalk/endian.h>
 #include "megatron.h"
 #include "macbin.h"
+#include "updcrc.h"
 
 /* This allows megatron to generate .bin files that won't choke other
    well-known converter apps. It also makes sure that checksums
@@ -69,10 +70,7 @@ u_char               head_buf[HEADBUFSIZ];
  * somewhat initialized; bin_filed is set.
  */
 
-int bin_open( binfile, flags, fh, options )
-    char               *binfile;
-    int                        flags, options;
-    struct FHeader     *fh;
+int bin_open(char *binfile, int flags, struct FHeader *fh, int options)
 {
     int                        maxlen;
     int                        rc;
@@ -145,8 +143,7 @@ int bin_open( binfile, flags, fh, options )
  * Otherwise, a value of -1 is returned.
  */
 
-int bin_close( keepflag )
-    int                        keepflag;
+int bin_close(int keepflag)
 {
 #if DEBUG
     fprintf( stderr, "entering bin_close\n" );
@@ -170,10 +167,7 @@ int bin_close( keepflag )
  * return zero and no more than that.
  */
 
-int bin_read( fork, buffer, length )
-    int                        fork;
-    char               *buffer;
-    int                        length;
+int bin_read( int fork, char *buffer, int length)
 {
     char               *buf_ptr;
     int                        readlen;
@@ -242,10 +236,7 @@ int bin_read( fork, buffer, length )
  * bin_write 
  */
 
-int bin_write( fork, buffer, length )
-    int                        fork;
-    char               *buffer;
-    int                        length;
+int bin_write(int fork, char *buffer, int length)
 {
     char               *buf_ptr;
     int                        writelen;
@@ -329,9 +320,7 @@ int bin_write( fork, buffer, length )
  * of the bytes of the other two forks can be read, as well.
  */
 
-int bin_header_read( fh, revision )
-    struct FHeader     *fh;
-    int                        revision;
+int bin_header_read(struct FHeader *fh, int revision)
 {
     u_short            mask;
 
@@ -431,8 +420,7 @@ int bin_header_read( fh, revision )
  * bin_header_write and bin_header_read are opposites.
  */
 
-int bin_header_write( fh )
-    struct FHeader     *fh;
+int bin_header_write(struct FHeader *fh)
 {
     char               *write_ptr;
     u_int32_t           t;
index d84f74111d004a071dc9943549382b2e2610e1ed..e9ec2834b14c642fb5c1fd15edd68f80471755ba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: macbin.h,v 1.2 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: macbin.h,v 1.3 2009-10-13 22:55:36 didg Exp $
  */
 
 #ifndef _MACBIN_H
@@ -15,6 +15,5 @@ int bin_write(int fork, char *buffer, int length);
 int bin_header_read(struct FHeader *fh, int revision);
 int bin_header_write(struct FHeader *fh);
 int test_header(void);
-u_short updcrc();
 
 #endif /* _MACBIN_H */
index 09035f4c09050d24447c058402e87b76162dcacc..48810abdaab7f72acf9f374576137e76adc0955e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: megatron.c,v 1.10 2005-04-28 20:49:20 bfernhomberg Exp $
+ * $Id: megatron.c,v 1.11 2009-10-13 22:55:36 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -36,10 +36,7 @@ char         *name[] = { "unhex",
                            "binheader",
                            "megatron" };
 
-int from_open( un, file, fh, flags )
-    int                        un, flags;
-    char               *file;
-    struct FHeader     *fh;
+int from_open(int un, char *file, struct FHeader *fh, int flags)
 {
     switch ( un ) {
        case MEGATRON :
@@ -64,11 +61,7 @@ int from_open( un, file, fh, flags )
     }
 }
 
-int from_read( un, fork, buf, len )
-    int                        un;
-    int                        fork;
-    char               *buf;
-    int                        len;
+int from_read(int un, int fork, char *buf, int len)
 {
     switch ( un ) {
        case MEGATRON :
@@ -91,8 +84,7 @@ int from_read( un, fork, buf, len )
     }
 }
 
-int from_close( un )
-    int                        un;
+int from_close(int un)
 {
     switch ( un ) {
        case MEGATRON :
@@ -115,10 +107,7 @@ int from_close( un )
     }
 }
 
-int to_open( to, file, fh, flags )
-    int                        to, flags;
-    char               *file;
-    struct FHeader     *fh;
+int to_open(int to, char *file, struct FHeader *fh, int flags)
 {
     switch ( to ) {
        case MEGATRON :
@@ -138,10 +127,7 @@ int to_open( to, file, fh, flags )
     }
 }
 
-int to_write( to, fork, bufc )
-    int                        to;
-    int                        fork;
-    int                        bufc;
+int to_write(int to, int fork, int bufc)
 {
     switch ( to ) {
        case MEGATRON :
@@ -161,9 +147,7 @@ int to_write( to, fork, bufc )
     }
 }
 
-int to_close( to, keepflag )
-    int                        to;
-    int                        keepflag;
+int to_close(int to, int keepflag)
 {
     switch ( to ) {
        case MEGATRON :
@@ -183,9 +167,7 @@ int to_close( to, keepflag )
     }
 }
 
-int megatron( path, module, newname, flags )
-    char       *path, *newname;
-    int                module, flags;
+int megatron( char *path, int module, char *newname, int flags)
 {
     struct stat                st;
     struct FHeader     fh;
@@ -293,9 +275,7 @@ int megatron( path, module, newname, flags )
     return( from_close( module ));
 }
 
-int main( argc, argv )
-    int                argc;
-    char       **argv;
+int main(int argc, char **argv)
 {
     int                rc, c;
     int                rv = 0;
index ec36053b408b7cffa533942a54dddcdff5fdb215..259c26425628729517dd146d3c0f64964206758e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: megatron.h,v 1.3 2002-04-29 01:52:50 morgana Exp $
+ * $Id: megatron.h,v 1.4 2009-10-13 22:55:36 didg Exp $
  */
 
 #ifndef _MEGATRON_H
@@ -92,8 +92,8 @@ struct FHeader {
 #      define S_ISDIR(s)       (( s & S_IFMT ) == S_IFDIR )
 #endif /* ! S_ISDIR */
 
-extern char     *(*_mtoupath) __P(( char *));
-extern char     *(*_utompath) __P(( char *));
+extern char     *(*_mtoupath) ( char *);
+extern char     *(*_utompath) ( char *);
 #define mtoupath(s) (*_mtoupath)(s)
 #define utompath(s) (*_utompath)(s)
 
index f9aab5d5335c9bc9134c11fd5f13d4e8c0959d9d..2e105675de2d9473de2248045bb1292409cfee26 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nad.c,v 1.15 2006-09-29 09:39:16 didg Exp $
+ * $Id: nad.c,v 1.16 2009-10-13 22:55:36 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -31,8 +31,7 @@ struct volinfo        vol;
 static char            hexdig[] = "0123456789abcdef";
 
 static char mtou_buf[MAXPATHLEN + 1], utom_buf[MAXPATHLEN + 1];
-static char *mtoupathcap( mpath )
-    char       *mpath;
+static char *mtoupathcap(char *mpath)
 {
     char       *m, *u, *umax;
     int                i = 0;
@@ -67,8 +66,7 @@ static char *mtoupathcap( mpath )
 #define hextoint( c )  ( isdigit( c ) ? c - '0' : c + 10 - 'a' )
 #define islxdigit(x)   (!isupper(x)&&isxdigit(x))
 
-static char *utompathcap( upath )
-    char       *upath;
+static char *utompathcap( char *upath)
 {
     char       *m, *u;
     int h;
@@ -431,10 +429,7 @@ static void initvol(char *path)
 }
 
 
-int nad_open( path, openflags, fh, options )
-    char               *path;
-    int                        openflags, options;
-    struct FHeader     *fh;
+int nad_open( char *path, int openflags, struct FHeader *fh, int options)
 {
     struct stat                st;
     int                        fork;
@@ -499,8 +494,7 @@ int nad_open( path, openflags, fh, options )
     }
 }
 
-int nad_header_read( fh )
-    struct FHeader     *fh;
+int nad_header_read(struct FHeader *fh)
 {
     u_int32_t          temptime;
     struct stat                st;
@@ -611,8 +605,7 @@ int nad_header_read( fh )
 
 }
 
-int nad_header_write( fh )
-    struct FHeader     *fh;
+int nad_header_write(struct FHeader *fh)
 {
     u_int32_t          temptime;
 
@@ -698,10 +691,7 @@ int nad_header_write( fh )
 
 int                    forkeid[] = { ADEID_DFORK, ADEID_RFORK };
 
-int nad_read( fork, forkbuf, bufc )
-    int                        fork;
-    char               *forkbuf;
-    int                        bufc;
+int nad_read(int fork, char *forkbuf, int bufc)
 {
     int                        cc = 0;
 
@@ -723,10 +713,7 @@ int nad_read( fork, forkbuf, bufc )
     return( cc );
 }
 
-int nad_write( fork, forkbuf, bufc )
-    int                        fork;
-    char               *forkbuf;
-    int                        bufc;
+int nad_write(int fork, char *forkbuf, int bufc)
 {
     char               *buf_ptr;
     int                        writelen;
@@ -758,8 +745,7 @@ int nad_write( fork, forkbuf, bufc )
     return( bufc );
 }
 
-int nad_close( status )
-int                    status;
+int nad_close(int status)
 {
     int                        rv;
     if ( status == KEEP ) {
index 250905057a983a58fc0ca13f6f117c551418b346..d327571dc20d6cc41f9ca215082564403da036ae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: updcrc.c,v 1.4 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: updcrc.c,v 1.5 2009-10-13 22:55:36 didg Exp $
  *
  * updcrc(3), crc(1) - calculate crc polynomials
  *
@@ -32,6 +32,8 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#include "updcrc.h"
+
 /* The CRC polynomial.
  * These 4 values define the crc-polynomial.
  * If you change them, you must change crctab[]'s initial value to what is
 #if 0
 #define SWAPPED        /* bit order:   undef   defined defined */
 #endif /* 0 */
-#define W      16      /* bits in CRC:16       16      16      */
-
-    /* data type that holds a W-bit unsigned integer */
-#if W <= 16
-#  define WTYPE        unsigned short
-#else /* W <= 16 */
-#  define WTYPE   u_int32_t
-#endif /* W <= 16 */
-
     /* the number of bits per char: don't change it. */
 #define B      8
 
@@ -91,10 +84,7 @@ static WTYPE crctab[1<<B] = /* as calculated by initcrctab() */ {
 } ;
 
 WTYPE
-updcrc( icrc, icp, icnt )
-    WTYPE icrc;
-    unsigned char *icp;
-    int icnt;
+updcrc(WTYPE icrc, unsigned char *icp, int icnt)
 {
     register WTYPE crc = icrc;
     register unsigned char *cp = icp;
@@ -114,12 +104,12 @@ updcrc( icrc, icp, icnt )
 #ifdef MAKETAB
 
 #include <stdio.h>
-main()
+int main(void)
 {
     initcrctab();
 }
 
-initcrctab()
+void initcrctab(void)
 {
     register  int b, i;
     WTYPE v;
@@ -153,8 +143,7 @@ initcrctab()
 
 
 
-main( ac, av )
-    int ac; char **av;
+main( int ac, char **av)
 {
     int fd;
     int nr;
diff --git a/bin/megatron/updcrc.h b/bin/megatron/updcrc.h
new file mode 100644 (file)
index 0000000..0b6039e
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * $Id: updcrc.h,v 1.1 2009-10-13 22:55:36 didg Exp $
+ */
+
+#ifndef _UPDCRC_H
+#define _UPDCRC_H 1
+
+#define W      16      /* bits in CRC:16       16      16      */
+
+    /* data type that holds a W-bit unsigned integer */
+#if W <= 16
+#  define WTYPE        unsigned short
+#else /* W <= 16 */
+#  define WTYPE   u_int32_t
+#endif /* W <= 16 */
+
+WTYPE updcrc(WTYPE icrc, unsigned char *icp, int icnt);
+
+#endif /* _UPDCRC_H */
index 932b9e0f19948a2367ce278f1a28197700a2809d..821f0e0870acfdaddb855641956b209f3df3fa92 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbplkup.c,v 1.5 2005-04-28 20:49:20 bfernhomberg Exp $
+ * $Id: nbplkup.c,v 1.6 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -45,8 +45,7 @@ char *Obj = "=";
 char *Type = "=";
 char *Zone = "*";
 
-void Usage( av0 )
-    char       *av0;
+void Usage(char *av0)
 {
     char       *p;
 
@@ -60,9 +59,7 @@ void Usage( av0 )
     exit( 1 );
 }
 
-int main( ac, av )
-    int                ac;
-    char       **av;
+int main(int ac, char **av)
 {
     struct nbpnve      *nn;
     char               *name;
index ca740577a64f55dc11ff7af3c8e56243fbc8c4ef..7b9bd4b06bbf95df1916b4a62f3372662e0b09e2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbprgstr.c,v 1.5 2005-04-28 20:49:20 bfernhomberg Exp $
+ * $Id: nbprgstr.c,v 1.6 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -22,8 +22,7 @@
 #include <atalk/util.h>
 #include <atalk/unicode.h>
 
-void Usage( av0 )
-    char       *av0;
+void Usage(char *av0)
 {
     char       *p;
 
@@ -37,9 +36,7 @@ void Usage( av0 )
     exit( 1 );
 }
 
-int main( ac, av )
-    int                ac;
-    char       **av;
+int main(int ac, char **av)
 {
     struct sockaddr_at addr;
     struct at_addr      ataddr;
index aa69ae3b66f41ac656a1053e9c4f2c23492df996..b9cd23478144ceda9513c920afebd2ce4ef9061a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbpunrgstr.c,v 1.6 2005-04-28 20:49:20 bfernhomberg Exp $
+ * $Id: nbpunrgstr.c,v 1.7 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -41,8 +41,7 @@
 
 #include <atalk/unicode.h>
 
-void Usage( av0 )
-    char       *av0;
+void Usage(char *av0)
 {
     char       *p;
 
@@ -56,9 +55,7 @@ void Usage( av0 )
     exit( 1 );
 }
 
-int main( ac, av )
-    int                ac;
-    char       **av;
+int main(int ac, char **av)
 {
     char               *Obj = 0, *Type = 0, *Zone = 0;
     char               *convname = 0;
index 9679614da6f39a062fb70f807c0cbcf92d64b1ef..3649547fbb381ae78774e8b2f0c6f1a80a1246a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pap.c,v 1.10 2005-04-28 20:49:20 bfernhomberg Exp $
+ * $Id: pap.c,v 1.11 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -36,8 +36,7 @@ char  *nbpfailure = "AppleTalk printer offline";
 void updatestatus(char *s, int len);
 int send_file(int fd, ATP atp, int lastfile);
 
-void usage( path )
-    char       *path;
+void usage(char *path)
 {
     char       *p;
 
@@ -64,7 +63,7 @@ void usage( path )
 }
 
 char *
-paprc()
+paprc(void)
 {
     static char        s[ 32 + 1 + 32 + 1 + 32 ];
     char       *name = NULL;
@@ -148,9 +147,7 @@ struct iovec        sfiov[ PAP_MAXQUANTUM ] = {
 
 int debug;
 
-int main( ac, av )
-    int                ac;
-    char       **av;
+int main( int ac, char **av)
 {
     ATP                        atp;
     struct atp_block   atpb;
@@ -468,10 +465,7 @@ int                data = 0;
 unsigned char  port;
 u_int16_t       seq = 0, rseq = 1;
 
-int send_file( fd, atp, lastfile )
-    int                        fd;
-    ATP                        atp;
-    int                        lastfile;
+int send_file( int fd, ATP atp, int lastfile)
 {
     struct timeval     stv, tv;
     struct sockaddr_at ssat;
@@ -845,9 +839,7 @@ int send_file( fd, atp, lastfile )
     }
 }
 
-void updatestatus( s, len )
-    char       *s;
-    int                len;
+void updatestatus(char *s, int len)
 {
     int                        fd = -1;
     struct iovec       iov[ 3 ];
index 940463aa00f35a31f28e94313730c35e6ce19292..ed51580a952e7eaea5592a984cefc3a9dfcb2e62 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: papstatus.c,v 1.5 2005-04-28 20:49:20 bfernhomberg Exp $
+ * $Id: papstatus.c,v 1.6 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -47,8 +47,7 @@
 /* Forward Declaration */
 void getstatus(ATP atp, struct sockaddr_at *sat);
 
-void usage( path )
-    char       *path;
+void usage(char *path)
 {
     char       *p;
 
@@ -63,7 +62,7 @@ void usage( path )
 }
 
 char *
-paprc()
+paprc(void)
 {
     static char        s[ 32 + 1 + 32 + 1 + 32 ];
     char       *name = NULL;
@@ -89,9 +88,7 @@ char                  *printer = NULL;
 char                   cbuf[ 8 ];
 struct nbpnve          nn;
 
-int main( ac, av )
-    int                ac;
-    char       **av;
+int main( int ac, char **av)
 {
     ATP                        atp;
     int                        wait, c, err = 0;
@@ -167,9 +164,7 @@ int main( ac, av )
     return 0;
 }
 
-void getstatus( atp, sat )
-    ATP                        atp;
-    struct sockaddr_at *sat;
+void getstatus(ATP atp, struct sockaddr_at *sat)
 {
     struct iovec       iov;
     struct atp_block   atpb;
index f5a25ececd049b56d55c7b02e7cfe50c0324f3f8..ef72fd5dd2b36be3bef3d764cb20e67fb045b20f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pa.c,v 1.4 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: pa.c,v 1.5 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -37,8 +37,7 @@
 
 #include "pa.h"
 
-pa_buf_t *pa_init( fd )
-       int fd;
+pa_buf_t *pa_init(int fd)
 {
        pa_buf_t *h;
        int rc;
@@ -59,8 +58,7 @@ pa_buf_t *pa_init( fd )
        return( h );
 }
 
-char *pa_gettok( h )
-       pa_buf_t *h;
+char *pa_gettok(pa_buf_t *h)
 {
        h->state = PA_NORMAL;
        h->tmp = *(h->cur);
@@ -68,8 +66,7 @@ char *pa_gettok( h )
        return( h->mark );
 }
 
-char _pa_fixbuf( h )
-       pa_buf_t *h;
+char _pa_fixbuf(pa_buf_t *h)
 {
        int rc;
        char *t;
index e86636765b00ea57cd251466ad80773fcd9c01bd..78399705cb5add296ab1c67c6f16f648ccb22fa1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pa.h,v 1.2 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: pa.h,v 1.3 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -63,9 +63,9 @@ typedef struct pa_buf_t {
        char tmp;
 } pa_buf_t;
 
-extern pa_buf_t *pa_init();
-extern char _pa_fixbuf();
-extern char *pa_gettok();
+extern pa_buf_t *pa_init(int fd);
+extern char _pa_fixbuf(pa_buf_t *h);
+extern char *pa_gettok(pa_buf_t *h);
 
 #define pa_getchar(h)  (((h)->cur==(h)->end)?(_pa_fixbuf(h)):\
                        (*(++((h)->cur))))
index 7d514862fd85f63526b47b9820bec0b227a1d616..37c5fc4a9a509d091f39584b48e01b18ad4f4a1d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: psorder.c,v 1.6 2008-12-03 18:35:44 didg Exp $
+ * $Id: psorder.c,v 1.7 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -57,70 +57,30 @@ u_char                      psbuf[ 8192 ];
 struct psinfo_st       psinfo;
 int                    orderflag, forceflag;
 
-int main( argc, argv )
-    int                argc;
-    char       **argv;
+void
+filecleanup( int errorcode, int tfd, char *tfile)
 {
-    extern int optind;
-    char       *progname;
-    int                errflag = 0;
-    int                c;
 
-    while (( c = getopt( argc, argv, OPTSTR )) != -1 ) {
-       switch ( c ) {
-       case REVCHAR:
-           if ( orderflag ) errflag++;
-           else orderflag = REVERSE;
-           break;
-       case FORWCHAR:
-           if ( orderflag ) errflag++;
-           else orderflag = FORWARD;
-           break;
-       case FORCECHAR:
-           if ( forceflag ) errflag++;
-           else forceflag++;
-           break;
-       }
-    }
-    if ( errflag ) {
-       if (( progname = strrchr( argv[ 0 ], '/' )) == NULL ) {
-           progname = argv[ 0 ];
-       } else progname++;
-       fprintf( stderr, "usage: %s [-duf] [sourcefile]\n", progname );
-       return( -1 );
-    } else if ( !orderflag ) orderflag = FORWARD;
+/*
+       Close and unlink the temporary file.
+ */
 
-    if ( optind >= argc ) {
-       return( psorder( STDIN ));
+    if ( tfd != 0 ) {
+       if ( close( tfd ) != 0 ) {
+           perror( tfile );
+           exit( errorcode );
+       }
+       if ( unlink( tfile ) != 0 ) {
+           perror( tfile );
+           exit( errorcode );
+       }
     }
-    return( psorder( argv[ optind ] ));
-}
-
-int
-psorder( path )
-    char       *path;
-{
-    int                        tempfd;
-    int                        inputfd;
-    char               tempfile[MAXNAMLEN];
 
-    filesetup( path, &inputfd, tempfile, &tempfd );
-    readps( inputfd, tempfd, tempfile );
-    if ( lseek( tempfd, REWIND, SEEK_SET ) < 0 ) {
-       perror( tempfile );
-       filecleanup( -1, tempfd, tempfile );
-    }
-    writeps( tempfd, tempfile );
-    filecleanup( 0, tempfd, tempfile );
-    return( 0 );
+    exit( errorcode );
 }
 
 void
-filesetup( inputfile, infd, tfile, tfd )
-    char       *inputfile;
-    int                *infd;
-    char       *tfile;
-    int                *tfd;
+filesetup( char *inputfile, int *infd, char *tfile, int *tfd)
 {
     struct stat                st;
     char               *template = _PATH_TMPPAGEORDER;
@@ -173,11 +133,111 @@ filesetup( inputfile, infd, tfile, tfd )
     return;
 }
 
+struct pspage_st
+*getpspage(off_t off)
+{
+    struct pspage_st   *newpspage;
+
+    newpspage = (struct pspage_st *)malloc( sizeof( struct pspage_st )); 
+    if ( newpspage != NULL ) {
+       newpspage->offset = off;
+       newpspage->nextpage = NULL;
+       *newpspage->lable = '\0';
+       *newpspage->ord = '\0';
+    }
+    return( newpspage );
+}
+
+int
+handletok(off_t count, char *token)
+{
+    int                        incdoc = 0;
+    struct pspage_st   *newpage;
+    char               *tmp;
+
+    if (( strncmp( PENDDOC, token, strlen( PENDDOC )) == 0 ) && incdoc ) {
+       incdoc--;
+#if DEBUG
+       fprintf( stderr, "found an EndDoc\n" );
+#endif /* DEBUG */
+
+    } else if ( strncmp( PBEGINDOC, token, strlen( PBEGINDOC )) == 0 ) {
+       incdoc++;
+#if DEBUG
+       fprintf( stderr, "found a BeginDoc\n" );
+#endif /* DEBUG */
+
+    } else if ( !incdoc && 
+           ( strncmp( PPAGE, token, strlen( PPAGE )) == 0 )) {
+#if DEBUG
+       fprintf( stderr, "found a Page\n" );
+#endif /* DEBUG */
+       if (( newpage = getpspage( count )) == NULL ) {
+           return( -1 );
+       }
+       if ( psinfo.firstpage == NULL ) {
+           newpage->prevpage = NULL;
+           psinfo.firstpage = newpage;
+       } else {
+           newpage->prevpage = psinfo.lastpage;
+           psinfo.lastpage->nextpage = newpage;
+       }
+       psinfo.lastpage = newpage;
+       while ( *token++ != ':' );
+       if (( tmp = strtok( token, WHITESPACE )) != NULL ) {
+           (void)strncpy( newpage->lable, tmp, NUMLEN );
+           if (( tmp = strtok( NULL, WHITESPACE )) != NULL ) {
+               (void)strncpy( newpage->ord, tmp, ORDLEN );
+           }
+       }
+#if DEBUG
+       fprintf( stderr, "page lable %s, page ord %s\n", newpage->lable,
+               newpage->ord );
+#endif /* DEBUG */
+
+    } else if ( !incdoc && 
+           ( strncmp( PPAGES, token, strlen( PPAGES )) == 0 )) {
+#if DEBUG
+       fprintf( stderr, "found a Pages\n" );
+#endif /* DEBUG */
+       psinfo.pages.offset = count;
+       psinfo.pages.end = strlen( token ) + count;
+       while ( *token++ != ':' );
+       while ( isspace( *token )) token++;
+       if ( strncmp( ATEND, token, strlen( ATEND )) == 0 ) {
+#if DEBUG
+           fprintf( stderr, "it is a Pages: (atend)\n" );
+#endif /* DEBUG */
+           psinfo.pages.offset = 0;
+           psinfo.pages.end = 0;
+       } else {
+           if (( tmp = strtok( token, WHITESPACE )) != NULL ) {
+               (void)strncpy( psinfo.pages.num, tmp, NUMLEN );
+               if (( tmp = strtok( NULL, WHITESPACE )) != NULL ) {
+                   (void)strncpy( psinfo.pages.order, tmp, ORDERLEN );
+               }
+           }
+#if DEBUG
+           fprintf( stderr, "number of pages %s\n", psinfo.pages.num );
+           fprintf( stderr, "order control number %s\n", psinfo.pages.order );
+#endif /* DEBUG */
+       }
+
+    } else if ( !incdoc && 
+           ( strncmp( PTRAILER, token, strlen( PTRAILER )) == 0 )) {
+#if DEBUG
+       fprintf( stderr, "found the Trailer\n" );
+#endif /* DEBUG */
+       if  ( psinfo.trailer == 0 ) {
+           psinfo.trailer = count;
+       }
+    }
+
+    return( 0 );
+}
+
 void
-readps( inputfd, tempfd, tempfile )
-    int                        inputfd;
-    int                        tempfd;
-    char               *tempfile;
+readps(int inputfd, int tempfd, char *tempfile)
 {
     off_t              ccread = 0;
     off_t              ccmatch;
@@ -276,100 +336,66 @@ readps( inputfd, tempfd, tempfile )
     return;
 }
 
-int
-handletok( count, token )
-    off_t              count;
-    char               *token;
+void
+temp2out(int tempfd, char *tempfile, off_t length)
 {
-    int                        incdoc = 0;
-    struct pspage_st   *newpage;
-    char               *tmp;
-
-    if (( strncmp( PENDDOC, token, strlen( PENDDOC )) == 0 ) && incdoc ) {
-       incdoc--;
-#if DEBUG
-       fprintf( stderr, "found an EndDoc\n" );
-#endif /* DEBUG */
-
-    } else if ( strncmp( PBEGINDOC, token, strlen( PBEGINDOC )) == 0 ) {
-       incdoc++;
-#if DEBUG
-       fprintf( stderr, "found a BeginDoc\n" );
-#endif /* DEBUG */
-
-    } else if ( !incdoc && 
-           ( strncmp( PPAGE, token, strlen( PPAGE )) == 0 )) {
-#if DEBUG
-       fprintf( stderr, "found a Page\n" );
-#endif /* DEBUG */
-       if (( newpage = getpspage( count )) == NULL ) {
-           return( -1 );
-       }
-       if ( psinfo.firstpage == NULL ) {
-           newpage->prevpage = NULL;
-           psinfo.firstpage = newpage;
-       } else {
-           newpage->prevpage = psinfo.lastpage;
-           psinfo.lastpage->nextpage = newpage;
-       }
-       psinfo.lastpage = newpage;
-       while ( *token++ != ':' );
-       if (( tmp = strtok( token, WHITESPACE )) != NULL ) {
-           (void)strncpy( newpage->lable, tmp, NUMLEN );
-           if (( tmp = strtok( NULL, WHITESPACE )) != NULL ) {
-               (void)strncpy( newpage->ord, tmp, ORDLEN );
-           }
-       }
-#if DEBUG
-       fprintf( stderr, "page lable %s, page ord %s\n", newpage->lable,
-               newpage->ord );
-#endif /* DEBUG */
+    int                        ccread;
+    int                        ccwrite;
+    int                        size;
 
-    } else if ( !incdoc && 
-           ( strncmp( PPAGES, token, strlen( PPAGES )) == 0 )) {
-#if DEBUG
-       fprintf( stderr, "found a Pages\n" );
-#endif /* DEBUG */
-       psinfo.pages.offset = count;
-       psinfo.pages.end = strlen( token ) + count;
-       while ( *token++ != ':' );
-       while ( isspace( *token )) token++;
-       if ( strncmp( ATEND, token, strlen( ATEND )) == 0 ) {
-#if DEBUG
-           fprintf( stderr, "it is a Pages: (atend)\n" );
-#endif /* DEBUG */
-           psinfo.pages.offset = 0;
-           psinfo.pages.end = 0;
-       } else {
-           if (( tmp = strtok( token, WHITESPACE )) != NULL ) {
-               (void)strncpy( psinfo.pages.num, tmp, NUMLEN );
-               if (( tmp = strtok( NULL, WHITESPACE )) != NULL ) {
-                   (void)strncpy( psinfo.pages.order, tmp, ORDERLEN );
+    while ( length > 0 ) {
+       if ( length > sizeof( psbuf )) {
+           size = sizeof( psbuf );
+       } else size = length;
+       if (( ccread = read( tempfd, psbuf, size )) > 0 ) {
+           size = ccread;
+           while ( ccread > 0 ) {
+               ccwrite = write( 1, psbuf, ccread );
+               if ( ccwrite < 0 ) {
+                   perror( "stdout" );
+                   filecleanup( ccwrite, tempfd, tempfile );
+               } else {
+                   ccread -= ccwrite;
                }
            }
-#if DEBUG
-           fprintf( stderr, "number of pages %s\n", psinfo.pages.num );
-           fprintf( stderr, "order control number %s\n", psinfo.pages.order );
-#endif /* DEBUG */
        }
-
-    } else if ( !incdoc && 
-           ( strncmp( PTRAILER, token, strlen( PTRAILER )) == 0 )) {
-#if DEBUG
-       fprintf( stderr, "found the Trailer\n" );
-#endif /* DEBUG */
-       if  ( psinfo.trailer == 0 ) {
-           psinfo.trailer = count;
+       if ( ccread < 0 ) {
+           perror( "temporary file" );
+           filecleanup( ccread, tempfd, tempfile );
        }
+       length -= size;
     }
+}
 
-    return( 0 );
+void
+writelable(int tempfd, char *tempfile, char *lable)
+{
+    char               line[256];
+    int                        ccwrite;
+    int                        linelen;
+    char               *argone;
+    char               *argtwo;
+
+    if ( strcmp( lable, PPAGES ) == 0 ) {
+       argone = psinfo.pages.num;
+       argtwo = psinfo.pages.order;
+    } else {
+       argone = argtwo = NULL;
+    }
+    (void)sprintf( line, "%s %s %s", lable, argone, argtwo );
+    linelen = strlen( line );
+
+    ccwrite = write( 1, line, linelen );
+    if ( ccwrite < 0 ) {
+       perror( "stdout" );
+       filecleanup( ccwrite, tempfd, tempfile );
+    } else {
+       linelen -= ccwrite;
+    }
 }
 
 void
-writeps( tempfd, tempfile )
-    int                        tempfd;
-    char               *tempfile;
+writeps(int tempfd, char *tempfile)
 {
     struct stat                st;
     off_t              endofpage;
@@ -463,107 +489,58 @@ writeps( tempfd, tempfile )
     return;
 }
 
-void
-writelable( tempfd, tempfile, lable )
-    int                        tempfd;
-    char               *tempfile;
-    char               *lable;
+int
+psorder(char *path)
 {
-    char               line[256];
-    int                        ccwrite;
-    int                        linelen;
-    char               *argone;
-    char               *argtwo;
-
-    if ( strcmp( lable, PPAGES ) == 0 ) {
-       argone = psinfo.pages.num;
-       argtwo = psinfo.pages.order;
-    } else {
-       argone = argtwo = NULL;
-    }
-    (void)sprintf( line, "%s %s %s", lable, argone, argtwo );
-    linelen = strlen( line );
+    int                        tempfd;
+    int                        inputfd;
+    char               tempfile[MAXNAMLEN];
 
-    ccwrite = write( 1, line, linelen );
-    if ( ccwrite < 0 ) {
-       perror( "stdout" );
-       filecleanup( ccwrite, tempfd, tempfile );
-    } else {
-       linelen -= ccwrite;
+    filesetup( path, &inputfd, tempfile, &tempfd );
+    readps( inputfd, tempfd, tempfile );
+    if ( lseek( tempfd, REWIND, SEEK_SET ) < 0 ) {
+       perror( tempfile );
+       filecleanup( -1, tempfd, tempfile );
     }
+    writeps( tempfd, tempfile );
+    filecleanup( 0, tempfd, tempfile );
+    return( 0 );
 }
 
-void
-temp2out( tempfd, tempfile, length )
-    int                        tempfd;
-    char               *tempfile;
-    off_t              length;
+int main(int argc, char **argv)
 {
-    int                        ccread;
-    int                        ccwrite;
-    int                        size;
+    extern int optind;
+    char       *progname;
+    int                errflag = 0;
+    int                c;
 
-    while ( length > 0 ) {
-       if ( length > sizeof( psbuf )) {
-           size = sizeof( psbuf );
-       } else size = length;
-       if (( ccread = read( tempfd, psbuf, size )) > 0 ) {
-           size = ccread;
-           while ( ccread > 0 ) {
-               ccwrite = write( 1, psbuf, ccread );
-               if ( ccwrite < 0 ) {
-                   perror( "stdout" );
-                   filecleanup( ccwrite, tempfd, tempfile );
-               } else {
-                   ccread -= ccwrite;
-               }
-           }
-       }
-       if ( ccread < 0 ) {
-           perror( "temporary file" );
-           filecleanup( ccread, tempfd, tempfile );
+    while (( c = getopt( argc, argv, OPTSTR )) != -1 ) {
+       switch ( c ) {
+       case REVCHAR:
+           if ( orderflag ) errflag++;
+           else orderflag = REVERSE;
+           break;
+       case FORWCHAR:
+           if ( orderflag ) errflag++;
+           else orderflag = FORWARD;
+           break;
+       case FORCECHAR:
+           if ( forceflag ) errflag++;
+           else forceflag++;
+           break;
        }
-       length -= size;
     }
-}
-
-struct pspage_st
-*getpspage( off )
-    off_t              off;
-{
-    struct pspage_st   *newpspage;
+    if ( errflag ) {
+       if (( progname = strrchr( argv[ 0 ], '/' )) == NULL ) {
+           progname = argv[ 0 ];
+       } else progname++;
+       fprintf( stderr, "usage: %s [-duf] [sourcefile]\n", progname );
+       return( -1 );
+    } else if ( !orderflag ) orderflag = FORWARD;
 
-    newpspage = (struct pspage_st *)malloc( sizeof( struct pspage_st )); 
-    if ( newpspage != NULL ) {
-       newpspage->offset = off;
-       newpspage->nextpage = NULL;
-       *newpspage->lable = '\0';
-       *newpspage->ord = '\0';
+    if ( optind >= argc ) {
+       return( psorder( STDIN ));
     }
-    return( newpspage );
+    return( psorder( argv[ optind ] ));
 }
 
-void
-filecleanup( errorcode, tfd, tfile )
-    int                        errorcode;
-    int                        tfd;
-    char               *tfile;
-{
-
-/*
-       Close and unlink the temporary file.
- */
-
-    if ( tfd != 0 ) {
-       if ( close( tfd ) != 0 ) {
-           perror( tfile );
-           exit( errorcode );
-       }
-       if ( unlink( tfile ) != 0 ) {
-           perror( tfile );
-           exit( errorcode );
-       }
-    }
-
-    exit( errorcode );
-}
index bc09943ba44708a140d1bb2a16eb9757ac4147c7..5d810b457e41ece717fea94fd7cbdd88510e3f65 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: psorder.h,v 1.2 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: psorder.h,v 1.3 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -77,29 +77,3 @@ struct psinfo_st {
     struct pages_st    pages;
 };
 
-int
-psorder();
-
-void
-filesetup();
-
-void
-readps();
-
-int
-handletok();
-
-void
-writeps();
-
-void
-writelable();
-
-void
-temp2out();
-
-struct pspage_st
-*getpspage();
-
-void
-filecleanup();
index f75225b9dc92aa9c697392a16c8986383d90abc5..081c4493dfb630c1b3ab60f93043051a45cddfd9 100644 (file)
@@ -411,12 +411,12 @@ static void usage( char * name )
     exit( 1 );
 }
 
-static void print_version ()
+static void print_version (void)
 {
     fprintf( stderr, "uniconv - Netatalk %s\n", VERSION );
 }
 
-static void help ()
+static void help (void)
 {
     fprintf (stdout, "\nuniconv, a tool to convert between various Netatalk volume encodings\n");
     fprintf (stdout, "\nUsage:  uniconv [-ndv] -c cnid -f fromcode -t tocode [-m maccode] path\n\n");
index cb40d1d5597c53039be8bb589d1af612a4723646..5a5a0b3f1bcfcb393f1ef28959c9a0eb71dbd055 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_asp.c,v 1.23 2008-12-03 18:35:44 didg Exp $
+ * $Id: afp_asp.c,v 1.24 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -145,7 +145,7 @@ static void afp_asp_die(const int sig)
 /* -----------------------------
  * SIGUSR1
  */
-static void afp_asp_timedown()
+static void afp_asp_timedown(int sig _U_)
 {
     struct sigaction   sv;
     struct itimerval   it;
@@ -189,7 +189,7 @@ static void afp_asp_timedown()
 */
 extern volatile int reload_request;
 
-static void afp_asp_reload()
+static void afp_asp_reload(int sig _U_)
 {
     reload_request = 1;
 }
index cb54af027f8187af188bfc8188dda274d6d4c16f..1a0d08ef8859426a5e7fa8d113046d95308ff2c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_config.h,v 1.4 2005-04-28 20:49:39 bfernhomberg Exp $
+ * $Id: afp_config.h,v 1.5 2009-10-13 22:55:36 didg Exp $
  */
 
 #ifndef AFPD_CONFIG_H
@@ -19,13 +19,13 @@ typedef struct AFPConfig {
     unsigned char *optcount;
     char status[1400];
     const void *defoptions, *signature;
-    int (*server_start) __P((struct AFPConfig *, struct AFPConfig *,
-                             server_child *));
-    void (*server_cleanup) __P((const struct AFPConfig *));
+    int (*server_start) (struct AFPConfig *, struct AFPConfig *,
+                             server_child *);
+    void (*server_cleanup) (const struct AFPConfig *);
     struct AFPConfig *next;
 } AFPConfig;
 
-extern AFPConfig *configinit __P((struct afp_options *));
-extern void configfree __P((AFPConfig *, const AFPConfig *));
+extern AFPConfig *configinit (struct afp_options *);
+extern void configfree (AFPConfig *, const AFPConfig *);
 
 #endif
index b9f45706c5a4e6a33c35d9396abc6a2cef177022..789d81a8e6b1bcbdead8e2770496e30808bd885b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_dsi.c,v 1.37 2009-07-21 13:41:16 didg Exp $
+ * $Id: afp_dsi.c,v 1.38 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -108,7 +108,7 @@ static void afp_dsi_sleep(void)
 }
 
 /* ------------------- */
-static void afp_dsi_timedown()
+static void afp_dsi_timedown(int sig _U_)
 {
     struct sigaction   sv;
     struct itimerval   it;
@@ -156,7 +156,7 @@ static void afp_dsi_timedown()
 */
 volatile int reload_request = 0;
 
-static void afp_dsi_reload()
+static void afp_dsi_reload(int sig _U_)
 {
     reload_request = 1;
 }
@@ -170,7 +170,7 @@ static void afp_dsi_getmesg (int sig _U_)
 }
 #endif /* SERVERTEXT */
 
-static void alarm_handler()
+static void alarm_handler(int sig _U_)
 {
     int err;
 
index c078108c7bdd826df3f30afc7c7c23096c5233bb..d1e85bc51722a4b926da27946b938d0c5c33b671 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_options.c,v 1.45 2009-09-04 15:27:21 franklahm Exp $
+ * $Id: afp_options.c,v 1.46 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -448,7 +448,7 @@ int afp_options_parseline(char *buf, struct afp_options *options)
  * Show version information about afpd.
  * Used by "afp -v".
  */
-void show_version( )
+void show_version( void )
 {
        printf( "afpd %s - Apple Filing Protocol (AFP) daemon of Netatalk\n\n", VERSION );
 
@@ -506,7 +506,7 @@ void show_version( )
  * Show extended version information about afpd and Netatalk.
  * Used by "afp -V".
  */
-void show_version_extended( )
+void show_version_extended(void )
 {
        show_version( );
 
index 3189ab5fa8f81a9bb8ff37e12a88b1b10fb0b41e..16a268cad8ef0fcfa9f5526829438c7c954d1086 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: appl.c,v 1.16 2008-12-03 18:35:44 didg Exp $
+ * $Id: appl.c,v 1.17 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 
 static struct savedt   sa = { { 0, 0, 0, 0 }, -1, 0, 0};
 
-static int pathcmp( p, plen, q, qlen )
-char   *p;
-int    plen;
-char   *q;
-int    qlen;
+static int pathcmp(char *p, int plen, char *q, int qlen)
 {
     return (( plen == qlen && memcmp( p, q, plen ) == 0 ) ? 0 : 1 );
 }
 
-static int applopen( vol, creator, flags, mode )
-struct vol     *vol;
-u_char creator[ 4 ];
-int flags;
-int mode;
+static int applopen(struct vol *vol, u_char creator[ 4 ], int flags, int mode)
 {
     char       *dtf, *adt, *adts;
 
@@ -89,11 +81,7 @@ int mode;
 /*
  * copy appls to new file, deleting any matching (old) appl entries
  */
-static int copyapplfile( sfd, dfd, mpath, mplen )
-int            sfd;
-int            dfd;
-char   *mpath;
-u_short        mplen;
+static int copyapplfile(int sfd, int dfd, char *mpath, u_short mplen)
 {
     int                cc;
     char       *p;
@@ -134,11 +122,7 @@ u_short    mplen;
  * See afp_getappl() for the backward compatiblity code.
  */
 static char *
-makemacpath( mpath, mpathlen, dir, path )
-char   *mpath;
-int            mpathlen;
-struct dir     *dir;
-char   *path;
+makemacpath(char *mpath, int mpathlen, struct dir *dir, char *path)
 {
     char       *p;
 
@@ -159,10 +143,7 @@ char       *path;
 }
 
 
-int afp_addappl(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_addappl(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -249,10 +230,7 @@ int        ibuflen _U_, *rbuflen;
     return( AFP_OK );
 }
 
-int afp_rmvappl(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_rmvappl(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -323,10 +301,7 @@ int        ibuflen _U_, *rbuflen;
     return( AFP_OK );
 }
 
-int afp_getappl(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_getappl(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct vol         *vol;
     char               *p, *q;
index e86e0ffd23f19799e5fd6a5445edbe49e1daaaa8..eee06dfe66f9bbba4449bad708988ff6480b25bd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: auth.c,v 1.66 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: auth.c,v 1.67 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -94,8 +94,7 @@ static struct uam_obj uam_changepw = {"", "", 0, {{NULL, NULL, NULL, NULL}}, &ua
 static struct uam_obj *afp_uam = NULL;
 
 
-void status_versions( data )
-    char    *data;
+void status_versions( char *data)
 {
     char                *start = data;
     u_int16_t           status;
@@ -159,19 +158,13 @@ static int send_reply(const AFPObj *obj, const int err)
     return AFP_OK;
 }
 
-static int afp_errpwdexpired(obj, ibuf, ibuflen, rbuf, rbuflen )
-    AFPObj  *obj _U_;
-    char    *ibuf _U_, *rbuf _U_;
-    int ibuflen _U_, *rbuflen;
+static int afp_errpwdexpired(AFPObj *obj _U_, char *ibuf _U_, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     *rbuflen = 0;
     return AFPERR_PWDEXPR;
 }
 
-static int afp_null_nolog(obj, ibuf, ibuflen, rbuf, rbuflen )
-    AFPObj  *obj _U_;
-    char    *ibuf _U_, *rbuf _U_;
-    int ibuflen _U_, *rbuflen;
+static int afp_null_nolog(AFPObj *obj _U_, char *ibuf _U_, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     *rbuflen = 0;
     return( AFPERR_NOOP );
@@ -401,10 +394,10 @@ 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  _U_, *rbuf;
-    unsigned int ibuflen  _U_, *rbuflen;
+int afp_zzz ( /* Function 122 */
+    AFPObj       *obj,
+    char         *ibuf _U_, unsigned int ibuflen _U_, 
+    char *rbuf, unsigned int *rbuflen)
 {
     u_int32_t   retdata;
 
@@ -459,10 +452,10 @@ static int create_session_key(AFPObj *obj)
 
 
 /* ---------------------- */
-int afp_getsession(obj, ibuf, ibuflen, rbuf, rbuflen )
-    AFPObj       *obj;
-    char         *ibuf, *rbuf;
-    unsigned int ibuflen, *rbuflen;
+int afp_getsession(
+    AFPObj *obj,
+    char   *ibuf, unsigned int ibuflen, 
+    char   *rbuf, unsigned int *rbuflen)
 {
     u_int16_t           type;
     u_int32_t           idlen = 0;
@@ -553,10 +546,7 @@ int afp_getsession(obj, ibuf, ibuflen, rbuf, rbuflen )
 }
 
 /* ---------------------- */
-int afp_disconnect(obj, ibuf, ibuflen, rbuf, rbuflen )
-    AFPObj  *obj  _U_;
-    char    *ibuf, *rbuf  _U_;
-    int ibuflen  _U_, *rbuflen;
+int afp_disconnect(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     u_int16_t           type;
 
@@ -608,11 +598,7 @@ int afp_disconnect(obj, ibuf, ibuflen, rbuf, rbuflen )
 }
 
 /* ---------------------- */
-static int get_version(obj, ibuf, ibuflen, len)
-    AFPObj  *obj;
-    char    *ibuf;
-    int     ibuflen;
-    int     len;
+static int get_version(AFPObj *obj, char *ibuf, int ibuflen, int len)
 {
     int num,i;
 
@@ -643,10 +629,7 @@ static int get_version(obj, ibuf, ibuflen, len)
 }
 
 /* ---------------------- */
-int afp_login(obj, ibuf, ibuflen, rbuf, rbuflen )
-    AFPObj      *obj;
-    char    *ibuf, *rbuf;
-    int     ibuflen, *rbuflen;
+int afp_login(AFPObj *obj, char *ibuf, int ibuflen, char *rbuf, int *rbuflen)
 {
     struct passwd *pwd = NULL;
     int     len, i;
@@ -696,10 +679,7 @@ int afp_login(obj, ibuf, ibuflen, rbuf, rbuflen )
 }
 
 /* ---------------------- */
-int afp_login_ext(obj, ibuf, ibuflen, rbuf, rbuflen )
-    AFPObj  *obj;
-    char    *ibuf, *rbuf;
-    unsigned int    ibuflen, *rbuflen;
+int afp_login_ext(AFPObj *obj, char *ibuf, unsigned int ibuflen, char *rbuf, unsigned int *rbuflen)
 {
     struct passwd *pwd = NULL;
     unsigned int  len;
@@ -826,10 +806,7 @@ int afp_login_ext(obj, ibuf, ibuflen, rbuf, rbuflen )
 }
 
 /* ---------------------- */
-int afp_logincont(obj, ibuf, ibuflen, rbuf, rbuflen)
-    AFPObj      *obj;
-    char    *ibuf, *rbuf;
-    int     ibuflen, *rbuflen;
+int afp_logincont(AFPObj *obj, char *ibuf, int ibuflen, char *rbuf, int *rbuflen)
 {
     struct passwd *pwd = NULL;
     int err;
@@ -849,10 +826,7 @@ int afp_logincont(obj, ibuf, ibuflen, rbuf, rbuflen)
 }
 
 
-int afp_logout(obj, ibuf, ibuflen, rbuf, rbuflen)
-    AFPObj     *obj;
-    char       *ibuf _U_, *rbuf  _U_;
-    int        ibuflen  _U_, *rbuflen  _U_;
+int afp_logout(AFPObj *obj, char *ibuf _U_, int ibuflen  _U_, char *rbuf  _U_, int *rbuflen  _U_)
 {
     LOG(log_info, logtype_afpd, "logout %s", obj->username);
     close_all_vol();
@@ -867,10 +841,7 @@ int afp_logout(obj, ibuf, ibuflen, rbuf, rbuflen)
  *       to work. this also does a little pre-processing before it hands
  *       it off to the uam.
  */
-int afp_changepw(obj, ibuf, ibuflen, rbuf, rbuflen )
-    AFPObj      *obj;
-    char    *ibuf, *rbuf;
-    int     ibuflen, *rbuflen;
+int afp_changepw(AFPObj *obj, char *ibuf, int ibuflen, char *rbuf, int *rbuflen)
 {
     char username[MACFILELEN + 1], *start = ibuf;
     struct uam_obj *uam;
@@ -937,10 +908,7 @@ int afp_changepw(obj, ibuf, ibuflen, rbuf, rbuflen )
 
 
 /* FPGetUserInfo */
-int afp_getuserinfo(obj, ibuf, ibuflen, rbuf, rbuflen )
-    AFPObj  *obj _U_;
-    char    *ibuf, *rbuf;
-    int ibuflen _U_, *rbuflen;
+int afp_getuserinfo(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     u_int8_t  thisuser;
     u_int32_t id;
@@ -1091,7 +1059,7 @@ int auth_load(const char *path, const char *list)
 }
 
 /* get rid of all of the uams */
-void auth_unload()
+void auth_unload(void)
 {
     struct uam_mod *mod, *prev, *start = &uam_modules;
 
index a473757da317d39fdde3f5e18af051ead7abd6dd..69ed23f7d8b3e86bb8ece322a7de4ae9e13c7b9a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: auth.h,v 1.7 2009-02-02 11:55:00 franklahm Exp $
+ * $Id: auth.h,v 1.8 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -38,14 +38,14 @@ extern gid_t        *groups;
 extern int     ngroups;
 
 /* FP functions */
-extern int     afp_login __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_login_ext __P((AFPObj *, char *, unsigned int, char *, unsigned int *));
-extern int     afp_logincont __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_changepw __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_logout __P((AFPObj *, char *, int, char *, int *));
-extern int      afp_getuserinfo __P((AFPObj *, char *, int, char *, int *));
-extern int      afp_getsession __P((AFPObj *, char *, unsigned int, char *, unsigned int *));
-extern int      afp_disconnect __P((AFPObj *, char *, int, char *, int *));
-extern int      afp_zzz __P((AFPObj *, char *, unsigned int, char *, unsigned int *));
+extern int     afp_login (AFPObj *, char *, int, char *, int *);
+extern int     afp_login_ext (AFPObj *, char *, unsigned int, char *, unsigned int *);
+extern int     afp_logincont (AFPObj *, char *, int, char *, int *);
+extern int     afp_changepw (AFPObj *, char *, int, char *, int *);
+extern int     afp_logout (AFPObj *, char *, int, char *, int *);
+extern int      afp_getuserinfo (AFPObj *, char *, int, char *, int *);
+extern int      afp_getsession (AFPObj *, char *, unsigned int, char *, unsigned int *);
+extern int      afp_disconnect (AFPObj *, char *, int, char *, int *);
+extern int      afp_zzz (AFPObj *, char *, unsigned int, char *, unsigned int *);
 
 #endif /* auth.h */
index 99636cba6aca95469ebb5015b37de3215c34277e..73a8a94fc9c0e881178fee334dc722dbefaa43f1 100644 (file)
@@ -160,7 +160,7 @@ static int addstack(char *uname, struct dir *dir, int pidx)
 }
 
 /* Removes checked items from top of directory stack. Returns index of the first unchecked elements or -1. */
-static int reducestack()
+static int reducestack(void)
 {
        int r;
        if (save_cidx != -1) {
@@ -180,7 +180,7 @@ static int reducestack()
 } 
 
 /* Clears directory stack. */
-static void clearstack() 
+static void clearstack(void
 {
        save_cidx = -1;
        while (dsidx > 0) {
index 927be9d4d66ef3d896d7761d604e2d5e33972315..c594480a9819768ee712a900c0bd1f6877c4279d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: desktop.c,v 1.37 2006-09-29 09:39:16 didg Exp $
+ * $Id: desktop.c,v 1.38 2009-10-13 22:55:36 didg Exp $
  *
  * See COPYRIGHT.
  *
 #include "mangle.h"
 
 
-int afp_opendt(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_opendt(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct vol *vol;
     u_int16_t  vid;
@@ -61,10 +58,7 @@ int  ibuflen _U_, *rbuflen;
     return( AFP_OK );
 }
 
-int afp_closedt(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf _U_, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_closedt(AFPObj *obj _U_, char *ibuf _U_, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     *rbuflen = 0;
     return( AFP_OK );
@@ -77,11 +71,7 @@ static char *icon_dtfile(struct vol *vol, u_char creator[ 4 ])
     return dtfile( vol, creator, ".icon" );
 }
 
-static int iconopen( vol, creator, flags, mode )
-struct vol     *vol;
-u_char creator[ 4 ];
-int flags;
-int mode;
+static int iconopen(struct vol *vol, u_char creator[ 4 ], int flags, int mode)
 {
     char       *dtf, *adt, *adts;
 
@@ -126,10 +116,7 @@ int mode;
     return 0;
 }
 
-int afp_addicon(obj, ibuf, ibuflen, rbuf, rbuflen)
-AFPObj  *obj;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_addicon(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct vol         *vol;
 #ifndef NO_DDP
@@ -353,10 +340,7 @@ static const u_char        uicon[] = {
 };
 #endif
 
-int afp_geticoninfo(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_geticoninfo(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct vol *vol;
     u_char     fcreator[ 4 ], ih[ 12 ];
@@ -427,10 +411,7 @@ int        ibuflen _U_, *rbuflen;
 }
 
 
-int afp_geticon(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_geticon(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct vol *vol;
     off_t       offset;
@@ -765,10 +746,7 @@ static int ad_addcomment(struct vol *vol, struct path *path, char *ibuf)
 }
 
 /* ----------------------------- */
-int afp_addcomment(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_addcomment(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -846,10 +824,7 @@ static int ad_getcomment(struct vol *vol, struct path *path, char *rbuf, int *rb
 }
 
 /* -------------------- */
-int afp_getcomment(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_getcomment(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -919,10 +894,7 @@ static int ad_rmvcomment(struct vol *vol, struct path *path)
 }
 
 /* ----------------------- */
-int afp_rmvcomment(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_rmvcomment(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol         *vol;
     struct dir         *dir;
index 3f80b9f7a3a39857e05060e209581ba419f71b9c..fdd290e752a08fb88546311de86f4b3614d39bbb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: desktop.h,v 1.4 2005-04-28 20:49:41 bfernhomberg Exp $
+ * $Id: desktop.h,v 1.5 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -39,21 +39,21 @@ struct savedt {
 
 typedef unsigned char CreatorType[4];
 
-extern char    *dtfile __P((const struct vol *, u_char [], char *));
-extern char    *mtoupath __P((const struct vol *, char *, cnid_t, int utf8));
-extern char    *utompath __P((const struct vol *, char *, cnid_t, int utf8));
+extern char    *dtfile (const struct vol *, u_char [], char *);
+extern char    *mtoupath (const struct vol *, char *, cnid_t, int utf8);
+extern char    *utompath (const struct vol *, char *, cnid_t, int utf8);
 
 /* FP functions */
-extern int     afp_opendt __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_addcomment __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_getcomment __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_rmvcomment __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_addappl __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_rmvappl __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_getappl __P((AFPObj *, char *, int, char *, int *));
-extern int      afp_closedt __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_addicon __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_geticoninfo __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_geticon __P((AFPObj *, char *, int, char *, int *));
+extern int     afp_opendt (AFPObj *, char *, int, char *, int *);
+extern int     afp_addcomment (AFPObj *, char *, int, char *, int *);
+extern int     afp_getcomment (AFPObj *, char *, int, char *, int *);
+extern int     afp_rmvcomment (AFPObj *, char *, int, char *, int *);
+extern int     afp_addappl (AFPObj *, char *, int, char *, int *);
+extern int     afp_rmvappl (AFPObj *, char *, int, char *, int *);
+extern int     afp_getappl (AFPObj *, char *, int, char *, int *);
+extern int      afp_closedt (AFPObj *, char *, int, char *, int *);
+extern int     afp_addicon (AFPObj *, char *, int, char *, int *);
+extern int     afp_geticoninfo (AFPObj *, char *, int, char *, int *);
+extern int     afp_geticon (AFPObj *, char *, int, char *, int *);
 
 #endif
index e847a9d7d4c9f80447a8642f0535b49837b1b46e..148ec2179782e386d086aac4b763f909d9c0f6d3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: directory.c,v 1.105 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: directory.c,v 1.106 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -95,9 +95,7 @@ static struct dir rootpar  = { SENTINEL, SENTINEL, NULL, 0,
  * how exciting.
  */
 struct dir *
-            dirsearch( vol, did )
-            const struct vol   *vol;
-u_int32_t      did;
+            dirsearch(const struct vol *vol, u_int32_t did)
 {
     struct dir *dir;
 
@@ -169,9 +167,7 @@ struct dir *dir = NULL;
  * and we are really bad in this case.
  */
 struct dir *
-            dirlookup( vol, did )
-            const struct vol   *vol;
-u_int32_t      did;
+            dirlookup( const struct vol *vol, u_int32_t did)
 {
     struct dir   *ret;
     char        *upath;
@@ -285,9 +281,7 @@ static void dirchildremove(struct dir *a,struct dir *b)
 
 /* --------------------------- */
 /* rotate the tree to the left */
-static void dir_leftrotate(vol, dir)
-struct vol *vol;
-struct dir *dir;
+static void dir_leftrotate(struct vol *vol, struct dir *dir)
 {
     struct dir *right = dir->d_right;
 
@@ -316,9 +310,7 @@ struct dir *dir;
 
 
 /* rotate the tree to the right */
-static void dir_rightrotate(vol, dir)
-struct vol *vol;
-struct dir *dir;
+static void dir_rightrotate(struct vol *vol, struct dir *dir)
 {
     struct dir *left = dir->d_left;
 
@@ -346,9 +338,7 @@ struct dir *dir;
 
 #if 0
 /* recolor after a removal */
-static struct dir *dir_rmrecolor(vol, dir)
-            struct vol *vol;
-struct dir *dir;
+static struct dir *dir_rmrecolor(struct vol *vol, struct dir *dir)
 {
     struct dir *leaf;
 
@@ -552,9 +542,7 @@ static void dir_remove( const struct vol *vol _U_, struct dir       *dir)
  * process. It's fixable within afpd if fnctl_lock, doable with smb and
  * next to impossible for nfs and local filesystem access.
  */
-static void dir_invalidate( vol, dir )
-const struct vol *vol;
-struct dir *dir;
+static void dir_invalidate( const struct vol *vol, struct dir *dir)
 {
     if (curdir == dir) {
         /* v_root can't be deleted */
@@ -568,9 +556,7 @@ struct dir *dir;
 }
 
 /* ------------------------------------ */
-static struct dir *dir_insert(vol, dir)
-            const struct vol *vol;
-struct dir *dir;
+static struct dir *dir_insert(const struct vol *vol, struct dir *dir)
 {
     struct dir *pdir;
 
@@ -683,10 +669,7 @@ caseenumerate(const struct vol *vol, struct path *path, struct dir *dir)
  * as a side-effect, movecwd to that point and return the new dir
  */
 static struct dir *
-            extenddir( vol, dir, path )
-struct vol     *vol;
-struct dir     *dir;
-struct path *path;
+            extenddir(struct vol *vol, struct dir *dir, struct path *path)
 {
     path->d_dir = NULL;
 
@@ -887,9 +870,7 @@ copydir_done:
 /* --- public functions follow --- */
 
 /* NOTE: we start off with at least one node (the root directory). */
-static struct dir *dirinsert( vol, dir )
-            struct vol *vol;
-struct dir     *dir;
+static struct dir *dirinsert(struct vol *vol, struct dir *dir)
 {
     struct dir *node;
 
@@ -947,10 +928,7 @@ struct dir *dir;
 
 /* ---------------------------- */
 struct dir *
-            adddir( vol, dir, path)
-struct vol     *vol;
-struct dir     *dir;
-struct path     *path;
+            adddir(struct vol *vol, struct dir *dir, struct path *path)
 {
     struct dir *cdir, *edir;
     int                upathlen;
@@ -1034,8 +1012,7 @@ void dirfreename(struct dir *dir)
     free(dir->d_m_name);
 }
 
-void dirfree( dir )
-struct dir     *dir;
+void dirfree(struct dir *dir)
 {
     if (!dir || (dir == SENTINEL))
         return;
@@ -1207,10 +1184,7 @@ static struct path *invalidate (const struct vol *vol, struct dir *dir, struct p
                  
 */
 struct path *
-cname( vol, dir, cpath )
-const struct vol       *vol;
-struct dir     *dir;
-char   **cpath;
+cname(const struct vol *vol, struct dir *dir, char **cpath)
 {
     struct dir            *cdir, *scdir=NULL;
     static char                   path[ MAXPATHLEN + 1];
@@ -1444,9 +1418,7 @@ noucsfallback:
 /*
  * Move curdir to dir, with a possible chdir()
  */
-int movecwd( vol, dir)
-const struct vol       *vol;
-struct dir     *dir;
+int movecwd(const struct vol *vol, struct dir *dir)
 {
     char path[MAXPATHLEN + 1];
     struct dir *d;
@@ -1825,10 +1797,7 @@ int path_error(struct path *path, int error)
 }
 
 /* ----------------------------- */
-int afp_setdirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_setdirparams(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol *vol;
     struct dir *dir;
@@ -2246,10 +2215,7 @@ setdirparam_done:
     return err;
 }
 
-int afp_syncdir(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char    *ibuf, *rbuf _U_;
-int     ibuflen _U_, *rbuflen;
+int afp_syncdir(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
 #ifdef HAVE_DIRFD
     DIR                  *dp;
@@ -2339,10 +2305,7 @@ int     ibuflen _U_, *rbuflen;
     return ( AFP_OK );
 }
 
-int afp_createdir(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_createdir(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct adouble     ad;
     struct vol         *vol;
@@ -2430,10 +2393,10 @@ createdir_done:
  * newparent curdir
  *
 */
-int renamedir(vol, src, dst, dir, newparent, newname)
-const struct vol *vol;
-char   *src, *dst, *newname;
-struct dir     *dir, *newparent;
+int renamedir(const struct vol *vol, char *src, char *dst, 
+    struct dir *dir, 
+    struct dir *newparent, 
+    char *newname)
 {
     struct adouble     ad;
     struct dir         *parent;
@@ -2530,8 +2493,7 @@ struct dir        *dir, *newparent;
 }
 
 /* delete an empty directory */
-int deletecurdir( vol)
-const struct vol       *vol;
+int deletecurdir(const struct vol *vol)
 {
     struct dirent *de;
     struct stat st;
@@ -2603,10 +2565,7 @@ delete_done:
     return err;
 }
 
-int afp_mapid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_mapid(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct passwd      *pw;
     struct group       *gr;
@@ -2719,10 +2678,7 @@ int      ibuflen _U_, *rbuflen;
     return( AFP_OK );
 }
 
-int afp_mapname(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_mapname(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct passwd      *pw;
     struct group       *gr;
@@ -2814,10 +2770,7 @@ int      ibuflen _U_, *rbuflen;
 /* ------------------------------------
   variable DID support 
 */
-int afp_closedir(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf _U_, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_closedir(AFPObj *obj _U_, char *ibuf _U_, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
 #if 0
     struct vol   *vol;
@@ -2853,10 +2806,7 @@ int      ibuflen _U_, *rbuflen;
 /* did creation gets done automatically 
  * there's a pb again with case but move it to cname
 */
-int afp_opendir(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen  _U_, *rbuflen;
+int afp_opendir(AFPObj *obj _U_, char *ibuf, int ibuflen  _U_, char *rbuf, int *rbuflen)
 {
     struct vol         *vol;
     struct dir         *parentdir;
index 5d0b75f49eeae21a62f6e67c130719cd77c8c48a..ee8978d6cb6cb39c272e67ec82cd8bc9ee4b9a64 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: directory.h,v 1.28 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: directory.h,v 1.29 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -113,63 +113,63 @@ struct maccess {
 #define        AR_UWRITE       (1<<2)
 #define        AR_UOWN         (1<<7)
 
-extern struct dir       *dirnew __P((const char *, const char *));
-extern void             dirfreename __P((struct dir *));
-extern void             dirfree __P((struct dir *));
-extern struct dir      *dirsearch __P((const struct vol *, u_int32_t));
-extern struct dir      *dirlookup __P((const struct vol *, u_int32_t));
-extern struct dir       *dirsearch_byname __P((const struct vol *, struct dir *,char *));
-
-extern struct dir      *adddir __P((struct vol *, struct dir *, 
-                                               struct path *));
-
-extern int              movecwd __P((const struct vol *, struct dir *));
-extern int              deletecurdir __P((const struct vol *));
-extern struct path      *cname __P((const struct vol *, struct dir *,
-                             char **));
-extern mode_t           mtoumode __P((struct maccess *));
-extern void             utommode __P((struct stat *, struct maccess *));
-extern int getdirparams __P((const struct vol *, u_int16_t, struct path *,
-                                 struct dir *, char *, int *));
-extern int setdirparams __P((const struct vol *, struct path *, u_int16_t, char *));
-extern int renamedir __P((const struct vol *, char *, char *, struct dir *,
-                              struct dir *, char *));
-extern int path_error __P((struct path *, int error));
-
-extern void setdiroffcnt __P((struct dir *dir, struct stat *st,  u_int32_t count));
-extern int dirreenumerate __P((struct dir *dir, struct stat *st));
+extern struct dir       *dirnew (const char *, const char *);
+extern void             dirfreename (struct dir *);
+extern void             dirfree (struct dir *);
+extern struct dir      *dirsearch (const struct vol *, u_int32_t);
+extern struct dir      *dirlookup (const struct vol *, u_int32_t);
+extern struct dir       *dirsearch_byname (const struct vol *, struct dir *,char *);
+
+extern struct dir      *adddir (struct vol *, struct dir *, 
+                                               struct path *);
+
+extern int              movecwd (const struct vol *, struct dir *);
+extern int              deletecurdir (const struct vol *);
+extern struct path      *cname (const struct vol *, struct dir *,
+                             char **);
+extern mode_t           mtoumode (struct maccess *);
+extern void             utommode (struct stat *, struct maccess *);
+extern int getdirparams (const struct vol *, u_int16_t, struct path *,
+                                 struct dir *, char *, int *);
+extern int setdirparams (const struct vol *, struct path *, u_int16_t, char *);
+extern int renamedir (const struct vol *, char *, char *, struct dir *,
+                              struct dir *, char *);
+extern int path_error (struct path *, int error);
+
+extern void setdiroffcnt (struct dir *dir, struct stat *st,  u_int32_t count);
+extern int dirreenumerate (struct dir *dir, struct stat *st);
 
 typedef int (*dir_loop)(struct dirent *, char *, void *);
 
-extern int  for_each_dirent __P((const struct vol *, char *, dir_loop , void *));
+extern int  for_each_dirent (const struct vol *, char *, dir_loop , void *);
 
-extern int  check_access __P((char *name , int mode));
-extern int file_access   __P((struct path *path, int mode));
+extern int  check_access (char *name , int mode);
+extern int file_access   (struct path *path, int mode);
 
-extern int netatalk_unlink __P((const char *name));
+extern int netatalk_unlink (const char *name);
 
-extern int caseenumerate __P((const struct vol *, struct path *, struct dir *));
+extern int caseenumerate (const struct vol *, struct path *, struct dir *);
 
-extern hash_t *dirhash __P((void));
+extern hash_t *dirhash (void);
 /* from enumerate.c */
-extern char *check_dirent __P((const struct vol *, char *));
+extern char *check_dirent (const struct vol *, char *);
 
 /* FP functions */
-extern int     afp_createdir __P((AFPObj *, char *, int, char *, int *));
-extern int      afp_opendir __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_setdirparams __P((AFPObj *, char *, int, char *, int *));
-extern int      afp_closedir __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_mapid __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_mapname __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_syncdir __P((AFPObj *, char *, int, char *, int *));
+extern int     afp_createdir (AFPObj *, char *, int, char *, int *);
+extern int      afp_opendir (AFPObj *, char *, int, char *, int *);
+extern int     afp_setdirparams (AFPObj *, char *, int, char *, int *);
+extern int      afp_closedir (AFPObj *, char *, int, char *, int *);
+extern int     afp_mapid (AFPObj *, char *, int, char *, int *);
+extern int     afp_mapname (AFPObj *, char *, int, char *, int *);
+extern int     afp_syncdir (AFPObj *, char *, int, char *, int *);
 
 /* from enumerate.c */
-extern int     afp_enumerate __P((AFPObj *, char *, unsigned int, char *, unsigned int *));
-extern int     afp_enumerate_ext __P((AFPObj *, char *, unsigned int, char *, unsigned int *));
-extern int     afp_enumerate_ext2 __P((AFPObj *, char *, unsigned int, char *, unsigned int *));
+extern int     afp_enumerate (AFPObj *, char *, unsigned int, char *, unsigned int *);
+extern int     afp_enumerate_ext (AFPObj *, char *, unsigned int, char *, unsigned int *);
+extern int     afp_enumerate_ext2 (AFPObj *, char *, unsigned int, char *, unsigned int *);
 
 /* from catsearch.c */
-extern int     afp_catsearch __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_catsearch_ext __P((AFPObj *, char *, int, char *, int *));
+extern int     afp_catsearch (AFPObj *, char *, int, char *, int *);
+extern int     afp_catsearch_ext (AFPObj *, char *, int, char *, int *);
 
 #endif
index c994f03c7eab1371b329f51aec4153b6851991c3..e029a877e3db609d50fe44ebe35c3e4ae94c4ec3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: enumerate.c,v 1.44 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: enumerate.c,v 1.45 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -155,11 +155,10 @@ for_each_dirent(const struct vol *vol, char *name, dir_loop fn, void *data)
 #define REPLY_PARAM_MAXLEN (4 + 104 + 1 + MACFILELEN + 4 + 2 + 255 + 1)
 
 /* ----------------------------- */
-static int enumerate(obj, ibuf, ibuflen, rbuf, rbuflen, ext )
-AFPObj       *obj _U_;
-char        *ibuf, *rbuf;
-unsigned int ibuflen _U_, *rbuflen;
-int     ext;
+static int enumerate(AFPObj *obj _U_, char *ibuf, unsigned int ibuflen _U_, 
+    char *rbuf, 
+    unsigned int *rbuflen, 
+    int ext)
 {
     static struct savedir      sd = { 0, 0, 0, NULL, NULL, 0 };
     struct vol                 *vol;
@@ -451,28 +450,25 @@ int     ext;
 }
 
 /* ----------------------------- */
-int afp_enumerate(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj       *obj;
-char        *ibuf, *rbuf;
-unsigned int ibuflen, *rbuflen;
+int afp_enumerate(AFPObj *obj, char *ibuf, unsigned int ibuflen, 
+    char *rbuf, 
+    unsigned int *rbuflen)
 {
     return enumerate(obj, ibuf,ibuflen ,rbuf,rbuflen , 0);
 }
 
 /* ----------------------------- */
-int afp_enumerate_ext(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj       *obj;
-char        *ibuf, *rbuf;
-unsigned int ibuflen, *rbuflen;
+int afp_enumerate_ext(AFPObj *obj, char *ibuf, unsigned int ibuflen, 
+    char *rbuf, 
+    unsigned int *rbuflen)
 {
     return enumerate(obj, ibuf,ibuflen ,rbuf,rbuflen , 1);
 }
 
 /* ----------------------------- */
-int afp_enumerate_ext2(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj       *obj;
-char        *ibuf, *rbuf;
-unsigned int ibuflen, *rbuflen;
+int afp_enumerate_ext2(AFPObj *obj, char *ibuf, unsigned int ibuflen, 
+    char *rbuf, 
+    unsigned int *rbuflen)
 {
     return enumerate(obj, ibuf,ibuflen ,rbuf,rbuflen , 2);
 }
index f2b97209cfb820a557687568295b6b768da7d2c9..a7498983c6d06ef60e75619067a3f45447e86832 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.111 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: file.c,v 1.112 2009-10-13 22:55:36 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -563,10 +563,7 @@ int getfilparams(struct vol *vol,
 }
 
 /* ----------------------------- */
-int afp_createfile(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_createfile(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct adouble     ad, *adp;
     struct vol         *vol;
@@ -689,10 +686,7 @@ createfile_done:
     return (retvalue);
 }
 
-int afp_setfilparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_setfilparams(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol *vol;
     struct dir *dir;
@@ -1007,10 +1001,7 @@ setfilparam_done:
  * adp         adouble struct of src file, if open, or & zeroed one
  *
  */
-int renamefile(vol, src, dst, newname, adp )
-const struct vol *vol;
-char   *src, *dst, *newname;
-struct adouble    *adp;
+int renamefile(const struct vol *vol, char *src, char *dst, char *newname, struct adouble *adp)
 {
     int                rc;
 
@@ -1155,10 +1146,7 @@ u_int32_t   hint;
 
 /* -----------------------------------
 */
-int afp_copyfile(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_copyfile(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol *s_vol, *d_vol;
     struct dir *dir;
@@ -1382,10 +1370,8 @@ static int copy_fork(int eid, struct adouble *add, struct adouble *ads)
  * because we are doing it elsewhere.
  * currently if newname is NULL then adp is NULL. 
  */
-int copyfile(s_vol, d_vol, src, dst, newname, adp )
-const struct vol *s_vol, *d_vol;
-char   *src, *dst, *newname;
-struct adouble *adp;
+int copyfile(const struct vol *s_vol, const struct vol*d_vol, 
+    char *src, char *dst, char *newname, struct adouble *adp)
 {
     struct adouble     ads, add;
     int                        err = 0;
@@ -1522,10 +1508,7 @@ u_int16_t   bshort = 0;
        return 0;
 }
 
-int deletefile( vol, file, checkAttrib )
-const struct vol      *vol;
-char           *file;
-int         checkAttrib;
+int deletefile(const struct vol *vol, char *file, int checkAttrib)
 {
     struct adouble     ad;
     struct adouble      *adp = &ad;
@@ -1610,10 +1593,7 @@ int         checkAttrib;
 
 /* ------------------------------------ */
 /* return a file id */
-int afp_createid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_createid(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct stat         *st;
     struct vol         *vol;
@@ -1774,10 +1754,7 @@ reenumerate_id(struct vol *vol, char *name, struct dir *dir)
 
 /* ------------------------------
    resolve a file id */
-int afp_resolveid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_resolveid(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -1890,10 +1867,7 @@ retry:
 }
 
 /* ------------------------------ */
-int afp_deleteid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_deleteid(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct stat         st;
     struct vol         *vol;
@@ -2027,10 +2001,7 @@ 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 _U_ ;
-int    ibuflen _U_, *rbuflen;
+int afp_exchangefiles(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct stat         srcst, destst;
     struct vol         *vol;
index f0aa5084e7aaee0d9f09cf888ca66c5b7ef1a757..37c65d0333d41e445b61c90ee4745ec9d34a23c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.h,v 1.21 2009-06-10 08:37:25 franklahm Exp $
+ * $Id: file.h,v 1.22 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -106,34 +106,34 @@ typedef enum {
   kTextEncodingMacKeyboardGlyphs = 41,
 } kTextEncoding_t;
 
-extern char *set_name   __P((const struct vol *, char *, cnid_t, char *, cnid_t, u_int32_t ) );
+extern char *set_name   (const struct vol *, char *, cnid_t, char *, cnid_t, u_int32_t );
 
-extern struct extmap   *getextmap __P((const char *));
-extern struct extmap   *getdefextmap __P((void));
+extern struct extmap   *getextmap (const char *);
+extern struct extmap   *getdefextmap (void);
 
-extern int getfilparams __P((struct vol *, u_int16_t, struct path *,
-                                 struct dir *, char *buf, int *));
+extern int getfilparams (struct vol *, u_int16_t, struct path *,
+                                 struct dir *, char *buf, int *);
 
-extern int setfilparams __P((struct vol *, struct path *, u_int16_t, char *));
-extern int renamefile   __P((const struct vol *, char *, char *, char *, struct adouble *));
-extern int copyfile     __P((const struct vol *, const struct vol *, char *, char *, char *, struct adouble *));
-extern int deletefile   __P((const struct vol *, char *, int));
+extern int setfilparams (struct vol *, struct path *, u_int16_t, char *);
+extern int renamefile   (const struct vol *, char *, char *, char *, struct adouble *);
+extern int copyfile     (const struct vol *, const struct vol *, char *, char *, char *, struct adouble *);
+extern int deletefile   (const struct vol *, char *, int);
 
-extern void *get_finderinfo __P((const struct vol *, const char *, struct adouble *, void *));
+extern void *get_finderinfo (const struct vol *, const char *, struct adouble *, void *);
 
-extern size_t mtoUTF8   __P((const struct vol *, const char *, size_t , char *, size_t ));
-extern int  copy_path_name __P((const struct vol *, char *, char *i));
+extern size_t mtoUTF8   (const struct vol *, const char *, size_t , char *, size_t );
+extern int  copy_path_name (const struct vol *, char *, char *i);
 
-extern u_int32_t get_id  __P((struct vol *, struct adouble *, const struct stat *,
-                                const cnid_t , char *, const int ));
+extern u_int32_t get_id  (struct vol *, struct adouble *, const struct stat *,
+                                const cnid_t , char *, const int );
 
 /* FP functions */
-extern int      afp_exchangefiles __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_setfilparams __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_copyfile __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_createfile __P((AFPObj *, char *, int, char *, int *));
-extern int      afp_createid __P((AFPObj *, char *, int, char *, int *));
-extern int      afp_resolveid __P((AFPObj *, char *, int, char *, int *));
-extern int      afp_deleteid __P((AFPObj *, char *, int, char *, int *));
+extern int      afp_exchangefiles (AFPObj *, char *, int, char *, int *);
+extern int     afp_setfilparams (AFPObj *, char *, int, char *, int *);
+extern int     afp_copyfile (AFPObj *, char *, int, char *, int *);
+extern int     afp_createfile (AFPObj *, char *, int, char *, int *);
+extern int      afp_createid (AFPObj *, char *, int, char *, int *);
+extern int      afp_resolveid (AFPObj *, char *, int, char *, int *);
+extern int      afp_deleteid (AFPObj *, char *, int, char *, int *);
 
 #endif
index 8c602b0875b285c3f0b4383ce488d9092ae35779..ddc2fad64712a327a94ba7c77dc04a6162787d53 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: filedir.c,v 1.55 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: filedir.c,v 1.56 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -50,12 +50,12 @@ char *strchr (), *strrchr ();
 #include "unix.h"
 
 #ifdef DROPKLUDGE
-int matchfile2dirperms(upath, vol, did)
+int matchfile2dirperms(
 /* Since it's kinda' big; I decided against an
 inline function */
-char   *upath;
-struct vol  *vol;
-int            did;
+    char       *upath,
+    struct vol  *vol,
+    int                did)
 /* The below code changes the way file ownership is determined in the name of
 fixing dropboxes.  It has known security problem.  See the netatalk FAQ for
 more information */
@@ -130,10 +130,7 @@ more information */
 }
 #endif
 
-int afp_getfildirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_getfildirparams(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct stat                *st;
     struct vol         *vol;
@@ -228,10 +225,7 @@ int        ibuflen _U_, *rbuflen;
     return( AFP_OK );
 }
 
-int afp_setfildirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_setfildirparams(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct stat        *st;
     struct vol *vol;
@@ -333,12 +327,7 @@ int check_name(const struct vol *vol, char *name)
    
     special care is needed for lock   
 */
-static int moveandrename(vol, sdir, oldname, newname, isdir)
-const struct vol       *vol;
-struct dir     *sdir;
-char        *oldname;
-char        *newname;
-int         isdir;
+static int moveandrename(const struct vol *vol, struct dir *sdir, char *oldname, char *newname, int isdir)
 {
     char            *p;
     char            *upath;
@@ -445,10 +434,7 @@ int         isdir;
 }
 
 /* -------------------------------------------- */
-int afp_rename(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_rename(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol *vol;
     struct dir *sdir;
@@ -531,10 +517,7 @@ int        ibuflen _U_, *rbuflen;
 }
 
 /* ------------------------------- */
-int afp_delete(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_delete(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -594,10 +577,7 @@ int        ibuflen _U_, *rbuflen;
     return( rc );
 }
 /* ------------------------ */
-char *absupath( vol, dir, u )
-const struct vol       *vol;
-struct dir     *dir;
-char   *u;
+char *absupath(const struct vol *vol, struct dir *dir, char *u)
 {
     struct dir *d;
     static char        path[ MAXPATHLEN + 1];
@@ -639,19 +619,13 @@ char      *u;
 /* ------------------------
  * FIXME dir could be NULL
 */
-char *ctoupath( vol, dir, name )
-const struct vol       *vol;
-struct dir     *dir;
-char   *name;
+char *ctoupath(const struct vol *vol, struct dir *dir, char *name)
 {
     return absupath(vol, dir, mtoupath(vol, name, dir->d_did, utf8_encoding()));
 }
 
 /* ------------------------- */
-int afp_moveandrename(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf _U_;
-int    ibuflen  _U_, *rbuflen;
+int afp_moveandrename(AFPObj *obj, char *ibuf, int ibuflen  _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol *vol;
     struct dir *sdir, *ddir;
index 26613edda2093a61d699370c764cd9e03550a105..bd4da87d3c223b98010c6caae1f0c62dba131019 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: filedir.h,v 1.9 2002-10-11 14:18:32 didg Exp $
+ * $Id: filedir.h,v 1.10 2009-10-13 22:55:37 didg Exp $
  */
 
 #ifndef AFPD_FILEDIR_H
 
 extern struct afp_options default_options;
 
-extern char            *ctoupath __P((const struct vol *, struct dir *,
-                                char *));
-extern char            *absupath __P((const struct vol *, struct dir *,
-                                char *));
-extern int             veto_file __P((const char *veto_str, const char *path));
-extern int             check_name __P((const struct vol *vol, char *name));
+extern char            *ctoupath (const struct vol *, struct dir *,
+                                char *);
+extern char            *absupath (const struct vol *, struct dir *,
+                                char *);
+extern int             veto_file (const char *veto_str, const char *path);
+extern int             check_name (const struct vol *vol, char *name);
 
 /* FP functions */
-extern int     matchfile2dirperms __P((char *, struct vol *, int));
-extern int     afp_moveandrename __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_rename __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_delete __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_getfildirparams __P((AFPObj *, char *, int, char *,
-                                        int *));
-extern int     afp_setfildirparams __P((AFPObj *, char *, int, char *,
-                                        int *));
+extern int     matchfile2dirperms (char *, struct vol *, int);
+extern int     afp_moveandrename (AFPObj *, char *, int, char *, int *);
+extern int     afp_rename (AFPObj *, char *, int, char *, int *);
+extern int     afp_delete (AFPObj *, char *, int, char *, int *);
+extern int     afp_getfildirparams (AFPObj *, char *, int, char *,
+                                        int *);
+extern int     afp_setfildirparams (AFPObj *, char *, int, char *,
+                                        int *);
 
 #endif
index 0374601a45b90d6dcd7638e603edd99e0890e003..5e58b326cce993ec1251757d0760591bf74ba5fd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: fork.c,v 1.62 2009-09-11 09:14:16 franklahm Exp $
+ * $Id: fork.c,v 1.63 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -50,11 +50,7 @@ extern int getmetadata(struct vol *vol,
                  struct path *path, struct dir *dir, char *buf, 
                  int *buflen, struct adouble *adp);
 
-static int getforkparams(ofork, bitmap, buf, buflen )
-struct ofork   *ofork;
-u_int16_t              bitmap;
-char           *buf;
-int                    *buflen;
+static int getforkparams(struct ofork *ofork, u_int16_t bitmap, char *buf, int *buflen)
 {
     struct path         path;
     struct stat                *st;
@@ -105,9 +101,7 @@ int                 *buflen;
 }
 
 /* ---------------------------- */
-static off_t get_off_t(ibuf, is64)
-char   **ibuf;
-int     is64;
+static off_t get_off_t(char **ibuf, int is64)
 {
     u_int32_t             temp;
     off_t                 ret;
@@ -129,10 +123,7 @@ int     is64;
 }
 
 /* ---------------------- */
-static int set_off_t(offset, rbuf, is64)
-off_t   offset;
-char   *rbuf;
-int     is64;
+static int set_off_t(off_t offset, char *rbuf, int is64)
 {
     u_int32_t  temp;
     int        ret;
@@ -257,10 +248,7 @@ static int fork_setmode(struct adouble *adp, int eid, int access, int ofrefnum)
 }
 
 /* ----------------------- */
-int afp_openfork(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_openfork(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct vol         *vol;
     struct dir         *dir;
@@ -531,10 +519,7 @@ openfork_err:
     return ret;
 }
 
-int afp_setforkparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf _U_;
-int    ibuflen, *rbuflen;
+int afp_setforkparams(AFPObj *obj _U_, char *ibuf, int ibuflen, char *rbuf _U_, int *rbuflen)
 {
     struct ofork       *ofork;
     off_t              size;
@@ -671,11 +656,7 @@ afp_setfork_err:
 
 
 /* ---------------------- */
-static int byte_lock(obj, ibuf, ibuflen, rbuf, rbuflen, is64 )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
-int     is64;
+static int byte_lock(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen, int is64)
 {
     struct ofork       *ofork;
     off_t               offset, length;
@@ -754,19 +735,13 @@ int     is64;
 }
 
 /* --------------------------- */
-int afp_bytelock(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf;
-int    ibuflen, *rbuflen;
+int afp_bytelock(AFPObj *obj, char *ibuf, int ibuflen, char *rbuf, int *rbuflen)
 {
    return byte_lock ( obj, ibuf, ibuflen, rbuf, rbuflen , 0);
 }
 
 /* --------------------------- */
-int afp_bytelock_ext(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf;
-int    ibuflen, *rbuflen;
+int afp_bytelock_ext(AFPObj *obj, char *ibuf, int ibuflen, char *rbuf, int *rbuflen)
 {
    return byte_lock ( obj, ibuf, ibuflen, rbuf, rbuflen , 1);
 }
@@ -774,8 +749,7 @@ int ibuflen, *rbuflen;
 #undef UNLOCKBIT
 
 /* --------------------------- */
-static int crlf( of )
-struct ofork   *of;
+static int crlf(struct ofork *of)
 {
     struct extmap      *em;
 
@@ -862,11 +836,7 @@ static 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;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
-int     is64;
+static int read_fork(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen, int is64)
 {
     struct ofork       *ofork;
     off_t              offset, saveoff, reqcount, savereqcount;
@@ -1036,28 +1006,19 @@ afp_read_err:
 }
 
 /* ---------------------- */
-int afp_read(obj, ibuf, ibuflen, rbuf, rbuflen)
-AFPObj  *obj;
-char   *ibuf, *rbuf;
-int    ibuflen, *rbuflen;
+int afp_read(AFPObj *obj, char *ibuf, int ibuflen, char *rbuf, int *rbuflen)
 {
     return read_fork(obj, ibuf, ibuflen, rbuf, rbuflen, 0);
 }
 
 /* ---------------------- */
-int afp_read_ext(obj, ibuf, ibuflen, rbuf, rbuflen)
-AFPObj  *obj;
-char   *ibuf, *rbuf;
-int    ibuflen, *rbuflen;
+int afp_read_ext(AFPObj *obj, char *ibuf, int ibuflen, char *rbuf, int *rbuflen)
 {
     return read_fork(obj, ibuf, ibuflen, rbuf, rbuflen, 1);
 }
 
 /* ---------------------- */
-int afp_flush(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_flush(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol *vol;
     u_int16_t vid;
@@ -1074,10 +1035,7 @@ int      ibuflen _U_, *rbuflen;
     return( AFP_OK );
 }
 
-int afp_flushfork(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_flushfork(AFPObj *obj _U_, char        *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct ofork       *ofork;
     u_int16_t          ofrefnum;
@@ -1104,10 +1062,7 @@ int      ibuflen _U_, *rbuflen;
   fsync(2) on OSX is implemented differently than on other platforms.
   see: http://mirror.linux.org.au/pub/linux.conf.au/2007/video/talks/278.pdf.
  */
-int afp_syncfork(obj, ibuf, ibuflen, rbuf, rbuflen )
-    AFPObj  *obj _U_;
-    char    *ibuf, *rbuf _U_;
-    int     ibuflen _U_, *rbuflen;
+int afp_syncfork(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct ofork        *ofork;
     u_int16_t           ofrefnum;
@@ -1132,8 +1087,7 @@ int afp_syncfork(obj, ibuf, ibuflen, rbuf, rbuflen )
 }
 
 /* this is very similar to closefork */
-int flushfork( ofork )
-struct ofork   *ofork;
+int flushfork(struct ofork *ofork)
 {
     struct timeval tv;
 
@@ -1174,10 +1128,7 @@ struct ofork     *ofork;
     return( err );
 }
 
-int afp_closefork(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_closefork(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct ofork       *ofork;
     u_int16_t          ofrefnum;
@@ -1239,11 +1190,7 @@ static ssize_t write_file(struct ofork *ofork, int eid,
 /* FPWrite. NOTE: on an error, we always use afp_write_err as
  * the client may have sent us a bunch of data that's not reflected 
  * in reqcount et al. */
-static int write_fork(obj, ibuf, ibuflen, rbuf, rbuflen, is64)
-AFPObj              *obj;
-char                *ibuf, *rbuf;
-int                 ibuflen _U_, *rbuflen;
-int                 is64;
+static int write_fork(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen, int is64)
 {
     struct ofork       *ofork;
     off_t              offset, saveoff, reqcount;
@@ -1422,10 +1369,7 @@ afp_write_err:
 }
 
 /* ---------------------------- */
-int afp_write(obj, ibuf, ibuflen, rbuf, rbuflen)
-AFPObj              *obj;
-char                *ibuf, *rbuf;
-int                 ibuflen, *rbuflen;
+int afp_write(AFPObj *obj, char *ibuf, int ibuflen, char *rbuf, int *rbuflen)
 {
     return write_fork(obj, ibuf, ibuflen, rbuf, rbuflen, 0);
 }
@@ -1433,19 +1377,13 @@ int                 ibuflen, *rbuflen;
 /* ---------------------------- 
  * FIXME need to deal with SIGXFSZ signal
 */
-int afp_write_ext(obj, ibuf, ibuflen, rbuf, rbuflen)
-AFPObj              *obj;
-char                *ibuf, *rbuf;
-int                 ibuflen, *rbuflen;
+int afp_write_ext(AFPObj *obj, char *ibuf, int ibuflen, char *rbuf, int *rbuflen)
 {
     return write_fork(obj, ibuf, ibuflen, rbuf, rbuflen, 1);
 }
 
 /* ---------------------------- */
-int afp_getforkparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_getforkparams(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct ofork       *ofork;
     int                        buflen, ret;
index 3804f742355da4f1ae64fb9a44a4878eb486f2dd..267c184dff72f638d7155d35e6a26f0a25fc6dc2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: fork.h,v 1.13 2009-09-11 09:14:16 franklahm Exp $
+ * $Id: fork.h,v 1.14 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -53,41 +53,41 @@ struct ofork {
 
 #define of_name(a) (a)->of_ad->ad_m_name
 /* in ofork.c */
-extern struct ofork *of_alloc    __P((struct vol *, struct dir *,
+extern struct ofork *of_alloc    (struct vol *, struct dir *,
                                                       char *, u_int16_t *, const int,
                                                       struct adouble *,
-                                                      struct stat *));
-extern void         of_dealloc   __P((struct ofork *));
-extern struct ofork *of_find     __P((const u_int16_t));
-extern struct ofork *of_findname __P((struct path *));
-extern int          of_rename    __P((const struct vol *,
+                                                      struct stat *);
+extern void         of_dealloc   (struct ofork *);
+extern struct ofork *of_find     (const u_int16_t);
+extern struct ofork *of_findname (struct path *);
+extern int          of_rename    (const struct vol *,
                                           struct ofork *,
                                           struct dir *, const char *,
-                                          struct dir *, const char *));
-extern int          of_flush     __P((const struct vol *));
-extern void         of_pforkdesc __P((FILE *));
-extern int          of_stat      __P((struct path *));
-extern int          of_statdir   __P((const struct vol *vol, struct path *));
-extern int          of_closefork __P((struct ofork *ofork));
-extern void         of_closevol  __P((const struct vol *vol));
-extern struct adouble *of_ad     __P((const struct vol *, struct path *, struct adouble *));
+                                          struct dir *, const char *);
+extern int          of_flush     (const struct vol *);
+extern void         of_pforkdesc (FILE *);
+extern int          of_stat      (struct path *);
+extern int          of_statdir   (const struct vol *vol, struct path *);
+extern int          of_closefork (struct ofork *ofork);
+extern void         of_closevol  (const struct vol *vol);
+extern struct adouble *of_ad     (const struct vol *, struct path *, struct adouble *);
 /* in fork.c */
-extern int          flushfork    __P((struct ofork *));
-extern int          getforkmode  __P((struct adouble *, int , int ));
+extern int          flushfork    (struct ofork *);
+extern int          getforkmode  (struct adouble *, int , int );
 
 /* FP functions */
-extern int     afp_openfork __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_bytelock __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_getforkparams __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_setforkparams __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_read __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_write __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_flushfork __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_flush __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_closefork __P((AFPObj *, char *, int, char *, int *));
+extern int     afp_openfork (AFPObj *, char *, int, char *, int *);
+extern int     afp_bytelock (AFPObj *, char *, int, char *, int *);
+extern int     afp_getforkparams (AFPObj *, char *, int, char *, int *);
+extern int     afp_setforkparams (AFPObj *, char *, int, char *, int *);
+extern int     afp_read (AFPObj *, char *, int, char *, int *);
+extern int     afp_write (AFPObj *, char *, int, char *, int *);
+extern int     afp_flushfork (AFPObj *, char *, int, char *, int *);
+extern int     afp_flush (AFPObj *, char *, int, char *, int *);
+extern int     afp_closefork (AFPObj *, char *, int, char *, int *);
 
-extern int     afp_bytelock_ext __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_read_ext __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_write_ext __P((AFPObj *, char *, int, char *, int *));
-extern int  afp_syncfork __P((AFPObj *, char *, int, char *, int *));
+extern int     afp_bytelock_ext (AFPObj *, char *, int, char *, int *);
+extern int     afp_read_ext (AFPObj *, char *, int, char *, int *);
+extern int     afp_write_ext (AFPObj *, char *, int, char *, int *);
+extern int  afp_syncfork (AFPObj *, char *, int, char *, int *);
 #endif
index ce413af3c24803a4b5ec1a1eecc0f68882201fa3..d4e4d8f58e30f6cac089ed11d07cdb6d03dd5296 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: gettok.c,v 1.5 2001-12-03 05:03:38 jmarcus Exp $
+ * $Id: gettok.c,v 1.6 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -34,9 +34,7 @@ char *strchr (), *strrchr ();
 static char    *l_curr;
 static char    *l_end;
 
-void initline( len, line )
-int            len;
-char   *line;
+void initline( int len, char *line)
 {
     l_curr = line;
     l_end = line + len;
@@ -47,9 +45,7 @@ char  *line;
 #define ST_BEGIN       2
 
 int
-parseline( len, token )
-int            len;
-char   *token;
+parseline(int len, char *token)
 {
     char       *p, *e;
     int                state;
@@ -103,8 +99,7 @@ char *token;
 }
 
 #ifdef notdef
-void parseline( token, user )
-char   *token, *user;
+void parseline(char *token, char *user)
 {
     char               *p = pos, *t = token, *u, *q, buf[ MAXPATHLEN ];
     struct passwd      *pwent;
index d5aa7b61273d816b09db683010534c9adf181733..2439e3115058a3073b232b082a8939a8ebb1ab23 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: globals.h,v 1.26 2009-03-16 13:59:12 franklahm Exp $
+ * $Id: globals.h,v 1.27 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -118,25 +118,25 @@ extern char               getwdbuf[];
 extern char             Cnid_srv[MAXHOSTNAMELEN + 1];
 extern int              Cnid_port;
 
-extern int  get_afp_errno   __P((const int param));
-extern void afp_options_init __P((struct afp_options *));
-extern int afp_options_parse __P((int, char **, struct afp_options *));
-extern int afp_options_parseline __P((char *, struct afp_options *));
-extern void afp_options_free __P((struct afp_options *,
-                                      const struct afp_options *));
-extern void setmessage __P((const char *));
-extern void readmessage __P((AFPObj *));
+extern int  get_afp_errno   (const int param);
+extern void afp_options_init (struct afp_options *);
+extern int afp_options_parse (int, char **, struct afp_options *);
+extern int afp_options_parseline (char *, struct afp_options *);
+extern void afp_options_free (struct afp_options *,
+                                      const struct afp_options *);
+extern void setmessage (const char *);
+extern void readmessage (AFPObj *);
 
 /* gettok.c */
-extern void initline   __P((int, char *));
-extern int  parseline  __P((int, char *));
+extern void initline   (int, char *);
+extern int  parseline  (int, char *);
 
 /* afp_util.c */
-const char *AfpNum2name __P((int ));
+const char *AfpNum2name (int );
 
 #ifndef NO_DDP
-extern void afp_over_asp __P((AFPObj *));
+extern void afp_over_asp (AFPObj *);
 #endif /* NO_DDP */
-extern void afp_over_dsi __P((AFPObj *));
+extern void afp_over_dsi (AFPObj *);
 
 #endif /* globals.h */
index f7ec2f684d30d76bc014e39ddd32bc37629076fa..5fa895c5b2ab229911ac9aa466213322971f569f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.c,v 1.24 2009-02-27 09:14:40 franklahm Exp $
+ * $Id: main.c,v 1.25 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -147,14 +147,12 @@ static void afp_goaway(int sig)
     return;
 }
 
-static void child_handler()
+static void child_handler(int sig _U_)
 {
     server_child_handler(server_children);
 }
 
-int main( ac, av )
-int            ac;
-char   **av;
+int main(int ac, char **av)
 {
     AFPConfig           *config;
     fd_set              rfds;
index 8d944d133eeb6f948e0051ca2f23bf543ec231cf..6c6ed75dceefdd55ecbb7195d09a83426e93330d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: mangle.h,v 1.6 2005-04-28 20:49:44 bfernhomberg Exp $
+ * $Id: mangle.h,v 1.7 2009-10-13 22:55:37 didg Exp $
  *
  */
 
@@ -24,8 +24,8 @@
 #define MANGLE_LENGTH  9 /* #ffffffff This really can't be changed. */
 #define MAX_LENGTH MACFILELEN 
 
-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));
+extern char *mangle (const struct vol *, char *, size_t, char *, cnid_t, int);
+extern char *demangle (const struct vol *, char *, cnid_t did);
+extern char *demangle_osx (const struct vol *, char *, cnid_t did, cnid_t *fileid);
 
 #endif /* AFPD_MANGLE_H */
index 00c6c327257586df0fbf798f35d4d1c626dde829..d5afefd9f5f385e38560d5d99425a00b28b94fb2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: messages.c,v 1.18 2005-04-28 20:49:44 bfernhomberg Exp $
+ * $Id: messages.c,v 1.19 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
@@ -35,8 +35,7 @@ void setmessage(const char *message)
     strlcpy(servermesg, message, MAXMESGSIZE);
 }
 
-void readmessage(obj)
-AFPObj *obj;
+void readmessage(AFPObj *obj)
 {
     /* Read server message from file defined as SERVERTEXT */
 #ifdef SERVERTEXT
@@ -113,10 +112,7 @@ AFPObj *obj;
 #endif /* SERVERTEXT */
 }
 
-int afp_getsrvrmesg(obj, ibuf, ibuflen, rbuf, rbuflen)
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen _U_, *rbuflen;
+int afp_getsrvrmesg(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     char *message;
     u_int16_t type, bitmap;
index 2e5c25a66baa884aac52cd187d568b087dcef980..d5c44007063d022703a91dee0012ee8507071909 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: misc.h,v 1.3 2001-12-03 05:03:38 jmarcus Exp $
+ * $Id: misc.h,v 1.4 2009-10-13 22:55:37 didg Exp $
  */
 
 #ifndef AFPD_MISC_H
 
 /* FP functions */
 /* messages.c */
-extern int     afp_getsrvrmesg __P((AFPObj *, char *, int, char *, int *));
+extern int     afp_getsrvrmesg (AFPObj *, char *, int, char *, int *);
 
 /* afs.c */
 #ifdef AFS
-extern int     afp_getdiracl __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_setdiracl __P((AFPObj *, char *, int, char *, int *));
+extern int     afp_getdiracl (AFPObj *, char *, int, char *, int *);
+extern int     afp_setdiracl (AFPObj *, char *, int, char *, int *);
 #else /* AFS */
 #define afp_getdiracl  NULL
 #define afp_setdiracl  NULL
 #endif /* AFS */
 
 #if defined( AFS ) && defined( UAM_AFSKRB )
-extern int     afp_afschangepw __P((AFPObj *, char *, int, char *, int *));
+extern int     afp_afschangepw (AFPObj *, char *, int, char *, int *);
 #else /* AFS && UAM_AFSKRB */
 #define afp_afschangepw        NULL
 #endif /* AFS && UAM_AFSKRB */
index d7c1125959fa006409da99073a6d4a6f221f608a..e3ad5ddc164a0c2725f4e841552cc6a03024a95d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nfsquota.c,v 1.12 2005-04-28 20:49:44 bfernhomberg Exp $
+ * $Id: nfsquota.c,v 1.13 2009-10-13 22:55:37 didg Exp $
  *
  * parts of this are lifted from the bsd quota program and are
  * therefore under the following copyright:
@@ -57,11 +57,10 @@ char *strchr (), *strrchr ();
 
 /* lifted (with modifications) from the bsd quota program */
 static int
-callaurpc(vol, prognum, versnum, procnum, inproc, in, outproc, out)
-struct vol *vol;
-u_long prognum, versnum, procnum;
-xdrproc_t inproc, outproc;
-char *in, *out;
+callaurpc(struct vol *vol,
+    u_long prognum, u_long versnum, u_long procnum,
+    xdrproc_t inproc, char *in, 
+    xdrproc_t outproc, char *out)
 {
     enum clnt_stat clnt_stat;
     struct timeval tottimeout;
index 130a3cfa29580949c82469837529b8a0dfe5c98c..fd269e78d9bd924d85053938807e17bcb2c9129b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ofork.c,v 1.27 2008-12-03 18:35:44 didg Exp $
+ * $Id: ofork.c,v 1.28 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1996 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -70,8 +70,7 @@ static void of_unhash(struct ofork *of)
 }
 
 #ifdef DEBUG1
-void of_pforkdesc( f )
-FILE   *f;
+void of_pforkdesc( FILE *f)
 {
     int        ofrefnum;
 
@@ -102,11 +101,11 @@ int of_flush(const struct vol *vol)
     return( 0 );
 }
 
-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 _U_, *newpath;
+int of_rename(
+    const struct vol *vol,
+    struct ofork *s_of,
+    struct dir *olddir, const char *oldpath _U_,
+    struct dir *newdir, const char *newpath)
 {
     struct ofork *of, *next, *d_ofork;
     int done = 0;
@@ -151,14 +150,13 @@ const char *oldpath _U_, *newpath;
 #define min(a,b)       ((a)<(b)?(a):(b))
 
 struct ofork *
-            of_alloc(vol, dir, path, ofrefnum, eid, ad, st)
-struct vol      *vol;
-struct dir     *dir;
-char           *path;
-u_int16_t      *ofrefnum;
-const int       eid;
-struct adouble  *ad;
-struct stat     *st;
+of_alloc(struct vol *vol,
+    struct dir    *dir,
+    char          *path,
+    u_int16_t     *ofrefnum,
+    const int      eid,
+    struct adouble *ad,
+    struct stat    *st)
 {
     struct ofork        *of, *d_ofork;
     u_int16_t          refnum, of_refnum;
@@ -349,8 +347,7 @@ struct ofork *
     return NULL;
 }
 
-void of_dealloc( of )
-struct ofork   *of;
+void of_dealloc( struct ofork *of)
 {
     if (!oforks)
         return;
index 39ad23cfecad00f17da6647f6bd6fd0bdafc0db1..b5d52375c5c2f1e936c0f648185094cb05402d1e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: quota.c,v 1.30 2008-05-16 04:19:41 didg Exp $
+ * $Id: quota.c,v 1.31 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -190,11 +190,7 @@ static int get_linux_quota(int what, char *path, uid_t euser_id, struct dqblk *d
  Abstract out the XFS Quota Manager quota get call.
 ****************************************************************************/
 
-static int get_linux_xfs_quota(what, path, euser_id, dqb)
-int what;
-char *path;
-uid_t euser_id;
-struct dqblk *dqb;
+static int get_linux_xfs_quota(int what, char *path, uid_t euser_id, struct dqblk *dqb)
 {
        int ret = -1;
 #ifdef HAVE_LINUX_XQM_H
@@ -221,11 +217,7 @@ struct dqblk *dqb;
 ** For API v2 the results are copied back into a v1 structure.
 ** Taken from quota-1.4.8 perl module
 */
-static int get_linux_fs_quota( what, path, euser_id, dqb)
-int what;
-char *path;
-uid_t euser_id;
-struct dqblk *dqb;
+static int get_linux_fs_quota(int what, char *path, uid_t euser_id, struct dqblk *dqb)
 {
        int ret;
 
@@ -297,9 +289,7 @@ struct dqblk *dqb;
  * on which "file" resides.  Returns NULL on failure.
  */
 static char *
-mountp( file, nfs)
-char   *file;
-int         *nfs;
+mountp( char *file, int *nfs)
 {
     struct stat                        sb;
     FILE                       *mtab;
@@ -344,9 +334,7 @@ int         *nfs;
 */
 
 static char *
-special( file, nfs )
-char *file;
-int  *nfs;
+special( char *file, int *nfs)
 {
     static struct fs_data      fsd;
 
@@ -365,9 +353,7 @@ int  *nfs;
 #if (defined(HAVE_SYS_MOUNT_H) && !defined(__linux__)) || defined(BSD4_4) || defined(_IBMR2)
 
 static char *
-special( file, nfs )
-char   *file;
-int         *nfs;
+special(char *file, int *nfs)
 {
     static struct statfs       sfs;
 
@@ -390,9 +376,7 @@ int         *nfs;
 #else /* BSD4_4 */
 
 static char *
-special( file, nfs )
-char *file;
-int *nfs;
+special(char *file, int *nfs)
 {
     struct stat                sb;
     FILE               *mtab;
@@ -443,10 +427,7 @@ int *nfs;
 #endif /* __svr4__ */
 
 
-static int getfsquota(vol, uid, dq)
-struct vol             *vol;
-const int              uid;
-struct dqblk           *dq;
+static int getfsquota(struct vol *vol, const int uid, struct dqblk *dq)
 
 {
        struct dqblk dqg;
@@ -560,10 +541,7 @@ struct dqblk               *dq;
 }
 
 
-static int getquota( vol, dq, bsize)
-struct vol             *vol;
-struct dqblk           *dq;
-const u_int32_t                bsize;
+static int getquota( struct vol *vol, struct dqblk *dq, const u_int32_t bsize)
 {
     char *p;
 
@@ -646,8 +624,7 @@ const u_int32_t             bsize;
 #endif /* TRU64 */
 }
 
-static int overquota( dqblk )
-struct dqblk     *dqblk;
+static int overquota( struct dqblk *dqblk)
 {
     struct timeval     tv;
 
@@ -702,10 +679,7 @@ struct dqblk         *dqblk;
 #define tobytes(a, b)  dbtob((VolSpace) (a))
 #endif
 
-int uquota_getvolspace( vol, bfree, btotal, bsize)
-struct vol     *vol;
-VolSpace       *bfree, *btotal;
-const u_int32_t bsize;
+int uquota_getvolspace( struct vol *vol, VolSpace *bfree, VolSpace *btotal, const u_int32_t bsize)
 {
        u_int64_t this_bsize;
        struct dqblk dqblk;
index 389fdba1d67f17fb6216821a1885746533df2d97..8c61af9652294d6e58cd415485613ba5ae0ceaec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: status.c,v 1.23 2009-04-05 07:22:06 franklahm Exp $
+ * $Id: status.c,v 1.24 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -471,7 +471,7 @@ static void status_icon(char *data, const unsigned char *icondata,
 
 /* ---------------------
 */
-void status_reset()
+void status_reset(void)
 {
     Id = 0;
 }
@@ -574,10 +574,7 @@ 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 _U_, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_getsrvrinfo(AFPObj *obj, char *ibuf _U_, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     AFPConfig *config = obj->config;
 
index e67c30a0a27b981fd5eb55817bb84b20e60a830e..4b927fad07e62daef83c55714e2e7fc36d839cb7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: status.h,v 1.7 2005-04-28 20:49:44 bfernhomberg Exp $
+ * $Id: status.h,v 1.8 2009-10-13 22:55:37 didg Exp $
  */
 
 #ifndef AFPD_STATUS_H
 #define PASSWD_NOSAVE  (1 << 1)
 #define PASSWD_ALL     (PASSWD_SET | PASSWD_NOSAVE)
 
-extern void status_versions __P((char * /*status*/));
-extern void status_uams __P((char * /*status*/, const char * /*authlist*/));
-extern void status_reset __P((void ));
-extern void status_init __P((AFPConfig *, AFPConfig *,
-                                 const struct afp_options *));
-extern int      afp_getsrvrinfo __P((AFPObj *, char *, int, char *, int *));
+extern void status_versions (char * /*status*/);
+extern void status_uams (char * /*status*/, const char * /*authlist*/);
+extern void status_reset (void );
+extern void status_init (AFPConfig *, AFPConfig *,
+                                 const struct afp_options *);
+extern int      afp_getsrvrinfo (AFPObj *, char *, int, char *, int *);
 
 #endif
index 9e286c72ab8109cb33ea0a651c1add0c1b6bbac6..3a8855da72d484b1205f5f6e9a6b6eb3bfaac7d6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: switch.c,v 1.17 2009-09-11 09:14:16 franklahm Exp $
+ * $Id: switch.c,v 1.18 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
 #include "acls.h"
 #endif
 
-static int afp_null(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+static int afp_null(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     LOG(log_info, logtype_afpd, "afp_null handle %d", *ibuf );
     *rbuflen = 0;
index 27e104f648b6eaf6f25c739e089d9d265a9d416a..3ca8d2a9942a83359b947cebfc61d57843126152 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: switch.h,v 1.2 2001-06-20 18:33:04 rufustfirefly Exp $
+ * $Id: switch.h,v 1.3 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -26,7 +26,7 @@
 #ifndef AFPD_SWITCH_H
 #define AFPD_SWITCH_H 1
 
-extern int     (**afp_switch)();
+extern int     (**afp_switch)(AFPObj *, char *ibuf, int ilen, char *rbuf, int *rlen);
 extern int     (*postauth_switch[])();
 
 #endif
index 7f663f81336c93ed5273aa3cda60daf71db6a4dd..07669b0fcb950536331ec0c8695e42d3ca2e680e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uam_auth.h,v 1.5 2005-04-28 20:49:45 bfernhomberg Exp $
+ * $Id: uam_auth.h,v 1.6 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
@@ -28,16 +28,16 @@ struct uam_obj {
     int uam_count;
     union {
         struct {
-            int (*login) __P((void *, struct passwd **,
-                              char *, int, char *, int *));
-            int (*logincont) __P((void *, struct passwd **, char *,
-                                  int, char *, int *));
-            void (*logout) __P((void));
-            int (*login_ext) __P((void *, char *, struct passwd **,
-                              char *, int, char *, int *));
+            int (*login) (void *, struct passwd **,
+                              char *, int, char *, int *);
+            int (*logincont) (void *, struct passwd **, char *,
+                                  int, char *, int *);
+            void (*logout) (void);
+            int (*login_ext) (void *, char *, struct passwd **,
+                              char *, int, char *, int *);
         } uam_login;
-        int (*uam_changepw) __P((void *, char *, struct passwd *, char *,
-                                 int, char *, int *));
+        int (*uam_changepw) (void *, char *, struct passwd *, char *,
+                                 int, char *, int *);
     } u;
     struct uam_obj *uam_prev, *uam_next;
 };
@@ -54,17 +54,17 @@ struct uam_obj {
     (a)->uam_next->uam_prev = (a)->uam_prev; \
 } while (0)
 
-extern struct uam_mod *uam_load __P((const char *, const char *));
-extern void uam_unload __P((struct uam_mod *));
+extern struct uam_mod *uam_load (const char *, const char *);
+extern void uam_unload (struct uam_mod *);
 
 /* auth.c */
-int auth_load __P((const char *, const char *));
-int auth_register __P((const int, struct uam_obj *));
+int auth_load (const char *, const char *);
+int auth_register (const int, struct uam_obj *);
 #define auth_unregister(a) uam_detach(a)
-struct uam_obj *auth_uamfind __P((const int, const char *, const int));
-void auth_unload __P((void));
+struct uam_obj *auth_uamfind (const int, const char *, const int);
+void auth_unload (void);
 
 /* uam.c */
-int uam_random_string __P((AFPObj *,char *, int));
+int uam_random_string (AFPObj *,char *, int);
 
 #endif /* uam_auth.h */
index ffe594a01caefea42f9c8869225eec712d17d9a9..48ece6058f38aca072992575cf34d97f13b7a0cd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: unix.c,v 1.53 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: unix.c,v 1.54 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -54,10 +54,7 @@ extern void acltoownermode(char *path, struct stat *st,uid_t uid, struct maccess
 /*
  * Get the free space on a partition.
  */
-int ustatfs_getvolspace( vol, bfree, btotal, bsize )
-const struct vol       *vol;
-VolSpace    *bfree, *btotal;
-u_int32_t   *bsize;
+int ustatfs_getvolspace(const struct vol *vol, VolSpace *bfree, VolSpace *btotal, u_int32_t *bsize)
 {
     VolSpace maxVolSpace = (~(VolSpace)0);
 
@@ -105,8 +102,7 @@ u_int32_t   *bsize;
     return( AFP_OK );
 }
 
-static int utombits( bits )
-mode_t bits;
+static int utombits(mode_t bits)
 {
     int                mbits;
 
@@ -123,9 +119,7 @@ mode_t      bits;
 /* --------------------------------
     cf AFP 3.0 page 63
 */
-void utommode( stat, ma )
-struct stat            *stat;
-struct maccess *ma;
+void utommode(struct stat *stat, struct maccess *ma)
 {
 mode_t mode;
 
@@ -178,11 +172,7 @@ mode_t mode;
  *
  * dir parameter is used by AFS
  */
-void accessmode( path, ma, dir, st )
-char           *path;
-struct maccess *ma;
-struct dir     *dir _U_;
-struct stat     *st;
+void accessmode(char *path, struct maccess *ma, struct dir *dir _U_, struct stat *st)
 
 {
 struct stat     sb;
@@ -200,8 +190,7 @@ struct stat     sb;
 #endif
 }
 
-int gmem( gid )
-const gid_t    gid;
+int gmem(const gid_t gid)
 {
     int                i;
 
@@ -213,8 +202,7 @@ const gid_t gid;
     return( 0 );
 }
 
-static mode_t mtoubits( bits )
-u_char bits;
+static mode_t mtoubits(u_char bits)
 {
     mode_t     mode;
 
@@ -233,8 +221,7 @@ u_char      bits;
    and from AFP 3.0 spec page 63 
    the mac mode should be save somewhere 
 */
-mode_t mtoumode( ma )
-struct maccess *ma;
+mode_t mtoumode(struct maccess *ma)
 {
     mode_t             mode;
 
@@ -252,8 +239,7 @@ struct maccess      *ma;
 
 #define EXEC_MODE (S_IXGRP | S_IXUSR | S_IXOTH)
 
-int setdeskmode( mode )
-const mode_t   mode;
+int setdeskmode(const mode_t mode)
 {
     char               wd[ MAXPATHLEN + 1];
     struct stat         st;
@@ -329,10 +315,7 @@ const mode_t       mode;
 }
 
 /* --------------------- */
-int setfilunixmode (vol, path, mode)
-const struct vol *vol;
-struct path* path;
-mode_t mode;
+int setfilunixmode (const struct vol *vol, struct path* path, mode_t mode)
 {
     if (!path->st_valid) {
         of_stat(path);
@@ -352,10 +335,7 @@ mode_t mode;
 
 
 /* --------------------- */
-int setdirunixmode( vol, name, mode )
-const struct vol *vol;
-const char       *name;
-mode_t           mode;
+int setdirunixmode(const struct vol *vol, const char *name, mode_t mode)
 {
 
     int dropbox = (vol->v_flags & AFPVOL_DROPBOX);
@@ -377,10 +357,7 @@ mode_t           mode;
 }
 
 /* --------------------- */
-int setdirmode( vol, name, mode )
-const struct vol *vol;
-const char       *name;
-mode_t           mode;
+int setdirmode(const struct vol *vol, const char *name, mode_t mode)
 {
     struct stat                st;
     struct dirent      *dirp;
@@ -436,9 +413,7 @@ mode_t           mode;
 }
 
 /* ----------------------------- */
-int setdeskowner( uid, gid )
-const uid_t    uid;
-const gid_t    gid;
+int setdeskowner(const uid_t uid, const gid_t gid)
 {
     char               wd[ MAXPATHLEN + 1];
     char               modbuf[12 + 1], *m;
@@ -500,11 +475,7 @@ const gid_t        gid;
 }
 
 /* ----------------------------- */
-int setfilowner(vol, uid, gid, path)
-const struct vol *vol;
-const uid_t    uid;
-const gid_t    gid;
-struct path* path;
+int setfilowner(const struct vol *vol, const uid_t uid, const gid_t gid, struct path* path)
 {
 
     if (!path->st_valid) {
@@ -535,11 +506,7 @@ struct path* path;
  * that user/group should inherit from other, but that doesn't fit
  * into the unix permission scheme. we can get around this by
  * co-opting some bits. */
-int setdirowner(vol, name, uid, gid )
-const struct vol *vol;
-const char      *name;
-const uid_t    uid;
-const gid_t    gid;
+int setdirowner(const struct vol *vol, const char *name, const uid_t uid, const gid_t gid)
 {
     struct stat                st;
     struct dirent      *dirp;
index c319bcd6e0ac50d4ab6454545b143227664d741c..e6417998a0c347767f5db9ffae5284bcf93ca169 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: unix.h,v 1.21 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: unix.h,v 1.22 2009-10-13 22:55:37 didg Exp $
  */
 
 #ifndef AFPD_UNIX_H
@@ -65,8 +65,8 @@ typedef int   mode_t;
 #if defined(linux) || defined(ultrix) || defined(HAVE_QUOTA_H)
 #ifndef NEED_QUOTACTL_WRAPPER
 /*#include <sys/quota.h>*/
-/*long quotactl __P((int, const char *, unsigned int, caddr_t)); */
-/* extern long quotactl __P((int, const char *, long, caddr_t)); */
+/*long quotactl (int, const char *, unsigned int, caddr_t); */
+/* extern long quotactl (int, const char *, long, caddr_t); */
 
 #else /* ! NEED_QUOTACTL_WRAPPER */
 #include <asm/types.h>
@@ -200,30 +200,30 @@ struct dqblk_v1 {
   time_t dqb_itime;
 };
 
-extern long quotactl __P ((unsigned int, const char *, int, caddr_t));
+extern long quotactl (unsigned int, const char *, int, caddr_t);
 
 
 
 #endif /* linux */
 
-extern int getnfsquota __P((struct vol *, const int, const u_int32_t,
-                                struct dqblk *));
+extern int getnfsquota (struct vol *, const int, const u_int32_t,
+                                struct dqblk *);
 
-extern int uquota_getvolspace __P((struct vol *, VolSpace *, VolSpace *,
-                                       const u_int32_t));
+extern int uquota_getvolspace (struct vol *, VolSpace *, VolSpace *,
+                                       const u_int32_t);
 #endif /* NO_QUOTA_SUPPORT */
 
 extern struct afp_options default_options;
 
-extern int gmem            __P((const gid_t));
-extern int setdeskmode      __P((const mode_t));
-extern int setdirunixmode   __P((const struct vol *, const char *, mode_t));
-extern int setdirmode       __P((const struct vol *, const char *, mode_t));
-extern int setdeskowner     __P((const uid_t, const gid_t));
-extern int setdirowner      __P((const struct vol *, const char *, const uid_t, const gid_t));
-extern int setfilunixmode   __P((const struct vol *, struct path*, const mode_t));
-extern int setfilowner      __P((const struct vol *, const uid_t, const gid_t, struct path*));
-extern void accessmode      __P((char *, struct maccess *, struct dir *, struct stat *));
+extern int gmem            (const gid_t);
+extern int setdeskmode      (const mode_t);
+extern int setdirunixmode   (const struct vol *, const char *, mode_t);
+extern int setdirmode       (const struct vol *, const char *, mode_t);
+extern int setdeskowner     (const uid_t, const gid_t);
+extern int setdirowner      (const struct vol *, const char *, const uid_t, const gid_t);
+extern int setfilunixmode   (const struct vol *, struct path*, const mode_t);
+extern int setfilowner      (const struct vol *, const uid_t, const gid_t, struct path*);
+extern void accessmode      (char *, struct maccess *, struct dir *, struct stat *);
 
 #ifdef AFS     
     #define accessmode afsmode
index a8ffaca9f90031ada7557d46ea246d487bae459b..1a6390c654dfd11fe52689aea9aba8762afe1973 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.91 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: volume.c,v 1.92 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -56,6 +56,8 @@ char *strchr (), *strrchr ();
 #include "unix.h"
 #include "mangle.h"
 #include "fork.h"
+#include "hash.h"
+#include "afp_vfs.h"
 
 extern int afprun(int root, char *cmd, int *outfd);
 
@@ -808,10 +810,7 @@ static int creatvol(AFPObj *obj, struct passwd *pwd,
 }
 
 /* ---------------- */
-static char *myfgets( buf, size, fp )
-char   *buf;
-int            size;
-FILE   *fp;
+static char *myfgets( char *buf, int size, FILE *fp)
 {
     char       *p;
     int                c;
@@ -863,9 +862,7 @@ FILE        *fp;
 
 #endif
 
-static int accessvol(args, name)
-const char *args;
-const char *name;
+static int accessvol(const char *args, const char *name)
 {
     char buf[MAXPATHLEN + 1], *p;
     struct group *gr;
@@ -889,11 +886,7 @@ const char *name;
     return 0;
 }
 
-static int hostaccessvol(type, volname, args, obj)
-int type;
-char *volname;
-const char *args;
-const AFPObj *obj;
+static int hostaccessvol(int type, char *volname, const char *args, const AFPObj *obj)
 {
     char buf[MAXPATHLEN + 1], *p, *b;
     DSI *dsi = obj->handle;
@@ -938,9 +931,7 @@ const AFPObj *obj;
     return 0;
 }
 
-static void setextmap( ext, type, creator, user)
-char           *ext, *type, *creator;
-int                    user;
+static void setextmap(char *ext, char *type, char *creator, int user)
 {
     struct extmap      *em;
     int                 cnt;
@@ -1066,12 +1057,7 @@ static int volfile_changed(struct afp_volume_name *p)
  *                           [codepage:<file>] [casefold:<num>]
  *             <extension> TYPE [CREATOR]
  */
-static int readvolfile(obj, p1, p2, user, pwent)
-AFPObj      *obj;
-struct afp_volume_name         *p1;
-char        *p2;
-int            user;
-struct passwd *pwent;
+static int readvolfile(AFPObj *obj, struct afp_volume_name *p1, char *p2, int user, struct passwd *pwent)
 {
     FILE               *fp;
     char               path[ MAXPATHLEN + 1], tmp[ MAXPATHLEN + 1],
@@ -1316,10 +1302,9 @@ struct vol *vol, *ovol, *nvol;
     }
 }
 
-static int getvolspace( vol, bfree, btotal, xbfree, xbtotal, bsize )
-struct vol     *vol;
-u_int32_t      *bfree, *btotal, *bsize;
-VolSpace    *xbfree, *xbtotal;
+static int getvolspace(struct vol *vol,
+  u_int32_t *bfree, u_int32_t *btotal,
+  VolSpace *xbfree, VolSpace *xbtotal, u_int32_t *bsize)
 {
     int                spaceflag, rc;
     u_int32_t   maxsize;
@@ -1389,12 +1374,7 @@ static void vol_setdate(u_int16_t id, struct adouble *adp, time_t date)
 }
 
 /* ----------------------- */
-static int getvolparams( bitmap, vol, st, buf, buflen )
-u_int16_t      bitmap;
-struct vol     *vol;
-struct stat    *st;
-char   *buf;
-int            *buflen;
+static int getvolparams( u_int16_t bitmap, struct vol *vol, struct stat *st, char *buf, int *buflen)
 {
     struct adouble     ad;
     int                        bit = 0, isad = 1;
@@ -1691,10 +1671,7 @@ void load_volumes(AFPObj *obj)
 }
 
 /* ------------------------------- */
-int afp_getsrvrparms(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf _U_, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_getsrvrparms(AFPObj *obj, char *ibuf _U_, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct timeval     tv;
     struct stat                st;
@@ -1772,10 +1749,7 @@ int      ibuflen _U_, *rbuflen;
 /* ------------------------- 
  * we are the user here
 */
-int afp_openvol(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_openvol(AFPObj *obj, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen)
 {
     struct stat        st;
     char       *volname;
@@ -2088,10 +2062,7 @@ static void deletevol(struct vol *vol)
 }
 
 /* ------------------------- */
-int afp_closevol(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_closevol(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_, int *rbuflen)
 {
     struct vol *vol;
     u_int16_t  vid;
@@ -2165,8 +2136,7 @@ struct extmap *getdefextmap(void)
 /* --------------------------
    poll if a volume is changed by other processes.
 */
-int  pollvoltime(obj)
-AFPObj *obj;
+int  pollvoltime(AFPObj *obj)
 {
     struct vol      *vol;
     struct timeval   tv;
@@ -2192,9 +2162,7 @@ AFPObj *obj;
 }
 
 /* ------------------------- */
-void setvoltime(obj, vol )
-AFPObj *obj;
-struct vol     *vol;
+void setvoltime(AFPObj *obj, struct vol *vol)
 {
     struct timeval     tv;
 
@@ -2225,10 +2193,7 @@ struct vol       *vol;
 }
 
 /* ------------------------- */
-int afp_getvolparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf;
-int    ibuflen _U_, *rbuflen;
+int afp_getvolparams(AFPObj *obj _U_, char *ibuf, int ibuflen _U_,char *rbuf, int *rbuflen)
 {
     struct vol *vol;
     u_int16_t  vid, bitmap;
@@ -2248,10 +2213,7 @@ int      ibuflen _U_, *rbuflen;
 }
 
 /* ------------------------- */
-int afp_setvolparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj  *obj _U_;
-char   *ibuf, *rbuf _U_;
-int    ibuflen _U_, *rbuflen;
+int afp_setvolparams(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf _U_,  int *rbuflen)
 {
     struct adouble ad;
     struct vol *vol;
index cc3dfdc9a8e5a4c0bc260758193df1b3a24ccb53..1cb43993a65c395f35e0571ea03e0868490fd446 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.h,v 1.34 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: volume.h,v 1.35 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 #include "hash.h"
 #endif
 
-extern struct vol      *getvolbyvid __P((const u_int16_t));
-extern int              ustatfs_getvolspace __P((const struct vol *,
+extern struct vol      *getvolbyvid (const u_int16_t);
+extern int              ustatfs_getvolspace (const struct vol *,
             VolSpace *, VolSpace *,
-            u_int32_t *));
-extern void             setvoltime __P((AFPObj *, struct vol *));
-extern int              pollvoltime __P((AFPObj *));
-extern void             load_volumes __P((AFPObj *obj));
+            u_int32_t *);
+extern void             setvoltime (AFPObj *, struct vol *);
+extern int              pollvoltime (AFPObj *);
+extern void             load_volumes (AFPObj *obj);
 
 /* FP functions */
-extern int     afp_openvol      __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_getvolparams __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_setvolparams __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_getsrvrparms __P((AFPObj *, char *, int, char *, int *));
-extern int     afp_closevol     __P((AFPObj *, char *, int, char *, int *));
+extern int     afp_openvol      (AFPObj *, char *, int, char *, int *);
+extern int     afp_getvolparams (AFPObj *, char *, int, char *, int *);
+extern int     afp_setvolparams (AFPObj *, char *, int, char *, int *);
+extern int     afp_getsrvrparms (AFPObj *, char *, int, char *, int *);
+extern int     afp_closevol     (AFPObj *, char *, int, char *, int *);
 
 /* netatalk functions */
-extern void     close_all_vol   __P((void));
+extern void     close_all_vol   (void);
 
 #endif
index bc2cdaaa00e0e9f498c96aa6c242cfcc119875d7..6d3ace97800d475ebf7dad09db89580d37fc4c82 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: aep.c,v 1.8 2002-09-29 23:24:47 sibaz Exp $
+ * $Id: aep.c,v 1.9 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
 
 #include "atserv.h"
 
-int aep_packet( ap, from, data, len )
-    struct atport      *ap;
-    struct sockaddr_at *from;
-    char               *data;
-    int                        len;
+int aep_packet(
+    struct atport      *ap,
+    struct sockaddr_at *from,
+    char               *data,
+    int                        len)
 {
     char               *end;
 
index 8a1368ffe49d3b6ee729c7350bda8aa12266aa3f..9052ab313dec40763352a17d1ea0deb1f9efe5ab 100644 (file)
@@ -1,21 +1,24 @@
 /*
- * $Id: atserv.h,v 1.3 2005-04-28 20:49:46 bfernhomberg Exp $
+ * $Id: atserv.h,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1992 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
-
-struct atserv {
-    char       *as_name;
-    u_char     as_port;                /* Used as a fall back */
-    int                (*as_packet)();
-};
+#ifndef ATALKD_ATSERV_H
+#define ATALKD_ATSERV_H 1
 
 struct atport {
     int                        ap_fd;
     struct atport      *ap_next;
     struct interface   *ap_iface;
     u_char             ap_port;
-    int                        (*ap_packet)();
+    int                        (*ap_packet)(struct atport *ap, struct sockaddr_at *from, char *data, int len);
+};
+
+struct atserv {
+    char       *as_name;
+    u_char     as_port;                /* Used as a fall back */
+    int                (*as_packet)(struct atport *ap, struct sockaddr_at *from, char *data, int len);
 };
 
+#endif
index 700e08f9b50dce99ce5b39fd461ce4928e20d9cd..b456cc4ef1e7c40aa8b255b1ea35ee32486c9898 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: config.c,v 1.16 2008-12-02 18:18:06 morgana Exp $
+ * $Id: config.c,v 1.17 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -67,11 +67,18 @@ char *strchr (), *strrchr ();
 #define IFF_SLAVE 0
 #endif /* IFF_SLAVE */
 
-int    router(), dontroute(), seed(), phase(), net(), addr(), zone(), noallmulti();
+int router(struct interface *iface, char **av);
+int dontroute(struct interface *iface, char **av);
+int seed(struct interface *iface, char **av);
+int phase(struct interface *iface, char **av); 
+int net(struct interface *iface, char **av);
+int addr(struct interface *iface, char **av); 
+int zone(struct interface *iface, char **av);
+int noallmulti(struct interface *iface, char **av);
 
 static const struct param {
     char       *p_name;
-    int                (*p_func)();
+    int                (*p_func)(struct interface *iface, char **av);
 } params[] = {
     { "router", router },
     { "dontroute", dontroute },
@@ -178,8 +185,7 @@ void freeline( char **argv )
     }
 }
 
-int writeconf( cf )
-    char       *cf;
+int writeconf(char *cf)
 {
     struct stat                st;
     char               *path, *p, newpath[ MAXPATHLEN ], line[ MAXLINELEN ];
@@ -321,8 +327,7 @@ int writeconf( cf )
  * zone for an interface is the first zone encountered for that
  * interface.
  */
-int readconf( cf )
-    char               *cf;
+int readconf(char *cf)
 {
     struct ifreq       ifr;
     struct interface   *iface, *niface;
@@ -474,9 +479,7 @@ read_conf_err:
     return -1;
 }
 
-int noallmulti( iface, av )
-    struct interface   *iface;
-    char               **av _U_;
+int noallmulti( struct interface *iface, char **av _U_)
 {
     /* Linux specific, no effect on other platforms */
     iface->i_flags &= !IFACE_ALLMULTI;
@@ -485,9 +488,7 @@ int noallmulti( iface, av )
 }
        
 /*ARGSUSED*/
-int router( iface, av )
-    struct interface   *iface;
-    char               **av _U_;
+int router(struct interface *iface, char **av _U_)
 {
     /* make sure "-router" and "-dontroute" aren't both on the same line. */
     if (iface->i_flags & IFACE_DONTROUTE) {
@@ -509,9 +510,7 @@ int router( iface, av )
 }
 
 /*ARGSUSED*/
-int dontroute( iface, av )
-    struct interface   *iface;
-    char               **av _U_;
+int dontroute(struct interface *iface, char **av _U_)
 {
     /* make sure "-router" and "-dontroute" aren't both on the same line. */
     if (iface->i_flags & IFACE_RSEED) {
@@ -524,9 +523,7 @@ int dontroute( iface, av )
 }
 
 /*ARGSUSED*/
-int seed( iface, av )
-    struct interface   *iface;
-    char               **av _U_;
+int seed( struct interface *iface, char **av _U_)
 {
     /*
      * Check to be sure "-seed" is before "-zone". we keep the old
@@ -542,9 +539,7 @@ int seed( iface, av )
     return( 1 );
 }
 
-int phase( iface, av )
-    struct interface   *iface;
-    char               **av;
+int phase(struct interface *iface, char **av)
 {
     int                        n;
     char               *pnum;
@@ -570,9 +565,7 @@ int phase( iface, av )
     return( 2 );
 }
 
-int net( iface, av )
-    struct interface   *iface;
-    char               **av;
+int net(struct interface *iface, char **av)
 {
     char               *nrange;
     char               *stop;
@@ -640,9 +633,7 @@ int net( iface, av )
     return( 2 );
 }
 
-int addr( iface, av )
-    struct interface   *iface;
-    char               **av;
+int addr(struct interface *iface, char **av)
 {
     if ( av[ 0 ] == NULL ) {
        fprintf( stderr, "No address.\n" );
@@ -676,9 +667,7 @@ int addr( iface, av )
     return( 2 );
 }
 
-int zone( iface, av )
-    struct interface   *iface;
-    char               **av;
+int zone(struct interface *iface, char **av)
 {
     struct ziptab      *zt;
     char               *zname;
@@ -724,7 +713,7 @@ int zone( iface, av )
  * Get the configuration from the kernel. Only called if there's no
  * configuration.
  */
-int getifconf()
+int getifconf(void)
 {
     struct interface   *iface, *niface;
     struct ifreq        ifr;
@@ -804,8 +793,7 @@ int getifconf()
  * the interface structure and have it updated nicely.
  */
 
-struct interface *newiface( name )
-    const char         *name;
+struct interface *newiface( const char *name)
 {
     struct interface   *niface;
 
@@ -829,7 +817,7 @@ struct interface *newiface( name )
 }
 
 #ifdef __svr4__
-int plumb()
+int plumb(void)
 {
     struct interface   *iface;
     char               device[ MAXPATHLEN + 1], *p, *t;
index 4fdd1b5f43483bb4d47ffe31850f22f312cb0146..64888af2fc0ea5823e1e58cbd49fd30284463ac3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: interface.h,v 1.4 2005-04-28 20:49:46 bfernhomberg Exp $
+ * $Id: interface.h,v 1.5 2009-10-13 22:55:37 didg Exp $
  * Copyright (c) 1990,1992 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
@@ -53,6 +53,6 @@ struct interface {
 
 extern struct interface        *interfaces;
 extern struct interface        *ciface;
-struct interface       *newiface __P((const char *));
+struct interface       *newiface (const char *);
 
 #endif /* ATALKD_INTERFACE_H */
index c9ab87f2079ec7d70e6ada4e38c73cec6c969a20..7f437e2964d44b4026d7749bdd71c0a0df661ab8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.c,v 1.19 2009-01-16 18:21:16 morgana Exp $
+ * $Id: main.c,v 1.20 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -55,6 +55,7 @@
 #include <atalk/compat.h>
 #include <atalk/zip.h>
 #include <atalk/rtmp.h>
+#include <atalk/nbp.h>
 #include <atalk/ddp.h>
 #include <atalk/atp.h>
 #include <atalk/paths.h>
@@ -70,6 +71,7 @@
 #include "list.h"
 #include "rtmp.h"
 #include "zip.h"
+#include "nbp.h"
 #include "atserv.h"
 #include "main.h"
 
@@ -97,10 +99,7 @@ int ifconfig(const char *iname, unsigned long cmd, struct sockaddr_at *sa);
 
 #define PKTSZ  1024
 
-extern int     rtmp_packet();
-extern int     nbp_packet();
-extern int     aep_packet();
-extern int     zip_packet();
+extern int aep_packet(struct atport *ap, struct sockaddr_at *from, char *data, int len);
 
 int            rtfd;
 
@@ -713,10 +712,8 @@ consistency()
 }
 #endif /* DEBUG */
 
-#if !defined( ibm032 ) && !defined( _IBMR2 )
-    void
-#endif /* ! ibm032 && ! _IBMR2 */
-as_debug()
+void
+as_debug(int sig _U_)
 {
     struct interface   *iface;
     struct list                *l;
@@ -817,10 +814,8 @@ as_debug()
 /*
  * Called when SIGTERM is recieved.  Remove all routes and then exit.
  */
-#if !defined( ibm032 ) && !defined( _IBMR2 )
-    void
-#endif /* ! ibm032 && ! _IBMR2 */
-as_down()
+void
+as_down(int sig _U_)
 {
     struct interface   *iface;
     struct gate                *gate;
@@ -853,9 +848,7 @@ as_down()
     atalkd_exit( 0 );
 }
 
-int main( ac, av )
-    int                ac;
-    char       **av;
+int main( int ac, char **av)
 {
     extern char         *optarg;
     extern int          optind;
@@ -1233,8 +1226,7 @@ int main( ac, av )
  * and rtmp_packet()) to set the initial "bootstrapping" address
  * on an interface.
  */
-void bootaddr( iface )
-    struct interface   *iface;
+void bootaddr(struct interface *iface)
 {
     if ( iface == 0 ) {
        return;
@@ -1406,9 +1398,7 @@ smaller net range.", iface->i_name, ntohs(first), ntohs(last), strerror(errno));
     nfds++;
 }
 
-int ifsetallmulti ( iname, set )
-const char             *iname;
-int set;
+int ifsetallmulti (const char *iname, int set)
 {
     int sock;
     struct ifreq ifr;
@@ -1443,10 +1433,7 @@ int set;
     return (0);
 }
 
-int ifconfig( iname, cmd, sa )
-    const char         *iname;
-    unsigned long      cmd;
-    struct sockaddr_at *sa;
+int ifconfig( const char *iname, unsigned long cmd, struct sockaddr_at *sa)
 {
     struct ifreq       ifr;
     int                        s;
@@ -1469,8 +1456,7 @@ int ifconfig( iname, cmd, sa )
     return( 0 );
 }
 
-void dumpconfig( iface )
-    struct interface   *iface;
+void dumpconfig( struct interface *iface)
 {
     struct list                *l;
 
@@ -1506,7 +1492,7 @@ void dumpconfig( iface )
 }
 
 #ifdef DEBUG
-void dumproutes()
+void dumproutes(void)
 {
     struct interface   *iface;
     struct rtmptab     *rtmp;
@@ -1554,7 +1540,7 @@ void dumproutes()
     fflush( stdout );
 }
 
-void dumpzones()
+void dumpzones(void)
 {
     struct interface   *iface;
     struct rtmptab     *rtmp;
index 196a6415013807346116925c78eaced756068298..cc028b68e96e6548be90d9584601112bb1615531 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.h,v 1.4 2005-04-28 20:49:46 bfernhomberg Exp $
+ * $Id: main.h,v 1.5 2009-10-13 22:55:37 didg Exp $
  */
 
 #ifndef ATALKD_MAIN_H
@@ -8,14 +8,14 @@
 #include <sys/cdefs.h>
 #include "config.h"
 
-int ifconfig __P(( const char *, unsigned long, struct sockaddr_at * ));
-void setaddr __P(( struct interface *, u_int8_t, u_int16_t,
-        u_int8_t, u_int16_t, u_int16_t ));
-void bootaddr __P(( struct interface * ));
-void dumpconfig __P(( struct interface * ));
+int ifconfig ( const char *, unsigned long, struct sockaddr_at * );
+void setaddr ( struct interface *, u_int8_t, u_int16_t,
+        u_int8_t, u_int16_t, u_int16_t );
+void bootaddr ( struct interface * );
+void dumpconfig ( struct interface * );
 
 #ifdef linux
-int ifsetallmulti __P(( const char *, int));
+int ifsetallmulti ( const char *, int);
 #endif
 
 #endif /* ATALKD_MAIN_H */
index 82769547d981780fb4319bc68c63bf36bdd8bd2c..e95acce106bc8e9dd97659989501299526351d5e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: multicast.c,v 1.11 2003-03-18 23:34:51 srittau Exp $
+ * $Id: multicast.c,v 1.12 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -330,9 +330,7 @@ int addmulti(const char *name, const unsigned char *data)
 }
 
 static u_int16_t
-atalk_cksum( data, len )
-    u_char     *data;
-    int                len;
+atalk_cksum( u_char *data, int len)
 {
     u_char     *end;
     u_int32_t  cksum = 0;
@@ -359,8 +357,7 @@ atalk_cksum( data, len )
  * alike.)
  */
 int
-zone_bcast( zt )
-     struct ziptab     *zt;
+zone_bcast( struct ziptab *zt)
 {
     u_char             uname[ 32 ];
     u_int16_t          cksum;
index 5b8ff51f0ae2a2d35761b33250947788502314ee..d8ef334790e058373c78ca842babce0d9593136d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: multicast.h,v 1.3 2003-03-18 23:34:51 srittau Exp $
+ * $Id: multicast.h,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1997 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -14,7 +14,7 @@
 extern unsigned char   ethermultitab[ 253 ][ 6 ];
 extern unsigned char   ethermulti[ 6 ];
 
-int addmulti __P((const char *, const unsigned char *));
-int zone_bcast __P((struct ziptab *));
+int addmulti (const char *, const unsigned char *);
+int zone_bcast (struct ziptab *);
 
 #endif /* atalkd/multicast.h */
index a01521f73dc07f49f8a4b83bacbe01054208e575..771943817dcc0c4078e754549b435f929efef4df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbp.c,v 1.11 2005-04-28 20:49:46 bfernhomberg Exp $
+ * $Id: nbp.c,v 1.12 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -46,11 +46,7 @@ extern int   transition;
 struct nbptab  *nbptab = NULL;
 
 static 
-void nbp_ack( fd, nh_op, nh_id, to )
-    int                        fd;
-    int                        nh_op;
-    int                        nh_id;
-    struct sockaddr_at *to;
+void nbp_ack( int fd, int nh_op, int nh_id, struct sockaddr_at *to)
 {
     struct nbphdr      nh;
     char               *data, packet[ SZ_NBPHDR + 1 ];
@@ -68,11 +64,7 @@ void nbp_ack( fd, nh_op, nh_id, to )
     }
 }
 
-int nbp_packet( ap, from, data, len )
-    struct atport      *ap;
-    struct sockaddr_at *from;
-    char               *data;
-    int                        len;
+int nbp_packet(struct atport *ap, struct sockaddr_at *from, char *data, int len)
 {
     struct nbphdr      nh;
     struct nbptuple    nt;
index 851146fac139648e37d0d58281c0303630252032..13f511d27d884041c2b4c00717b3239888839ee7 100644 (file)
@@ -1,10 +1,13 @@
 /*
- * $Id: nbp.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ * $Id: nbp.h,v 1.3 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
 
+#ifndef ATALKD_NBP_H
+#define ATALKD_NBP_H 1
+
 struct nbptab {
     struct nbptab      *nt_prev, *nt_next;
     struct nbpnve      nt_nve;
@@ -12,3 +15,7 @@ struct nbptab {
 };
 
 extern struct nbptab   *nbptab;
+
+int nbp_packet(struct atport *ap, struct sockaddr_at *from, char *data, int len);
+
+#endif
index 215be5096c31e41f53f06c020ce13c41e37a38b8..4e7dfac353663dff7605a1a562e9c92807fe0d73 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: route.c,v 1.7 2005-04-28 20:49:46 bfernhomberg Exp $
+ * $Id: route.c,v 1.8 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1996 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
 #include "route.h"
 
 #ifndef BSD4_4
-int route( message, dst, gate, flags )
-    int                        message;
-    struct sockaddr    *dst, *gate;
-    int                        flags;
+int route( int message, struct sockaddr *dst, struct sockaddr *gate, int flags)
 {
 #ifdef TRU64
     struct ortentry    rtent;
@@ -59,10 +56,7 @@ struct rt_msg_at {
     struct sockaddr_m  rtma_mask;
 } rtma;
 
-route( message, dst, gate, flags )
-    int                        message;
-    struct sockaddr_at *dst, *gate;
-    int                        flags;
+route( int message, struct sockaddr_at *dst, struct sockaddr_at *gate, int flags)
 {
     int                        rc;
 
index 15698c48e4041da43beb4492603339b0466c12c5..5f3c0f90bad29ec5acf5f458f243d8ee44053145 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: route.h,v 1.2 2001-06-19 18:04:39 rufustfirefly Exp $
+ * $Id: route.h,v 1.3 2009-10-13 22:55:37 didg Exp $
  */
 
 #ifndef ATALKD_ROUTE_H
@@ -8,9 +8,9 @@
 #include <sys/cdefs.h>
 
 #ifndef BSD4_4
-int route __P(( int, struct sockaddr *, struct sockaddr *, int ));
+int route ( int, struct sockaddr *, struct sockaddr *, int );
 #else /* BSD4_4 */
-int route __P(( int, struct sockaddr_at *, struct sockaddr_at *, int));
+int route ( int, struct sockaddr_at *, struct sockaddr_at *, int);
 #endif /* BSD4_4 */
 
 #endif /* ATALKD_ROUTE_H */
index 5af4d1a88c8628f95d7b79f43530027758c0dea1..dc61575485d7eca1d4990a2c0bc5c95c10fe3f06 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rtmp.c,v 1.14 2008-11-14 10:29:08 didg Exp $
+ * $Id: rtmp.c,v 1.15 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -43,8 +43,7 @@
 #include "route.h"
 #include "main.h"
 
-void rtmp_delzonemap(rtmp)
-    struct rtmptab *rtmp;
+void rtmp_delzonemap(struct rtmptab *rtmp)
 {
     struct list                *lz, *flz, *lr, *flr;
     struct ziptab      *zt;
@@ -97,9 +96,7 @@ void rtmp_delzonemap(rtmp)
 /*
  * Complete configuration for phase 1 interface using RTMP information.
  */
-static int rtmp_config( rh, iface )
-    struct rtmp_head   *rh;
-    struct interface   *iface;
+static int rtmp_config( struct rtmp_head *rh, struct interface *iface)
 {
     extern int         stabletimer;
     int cc;
@@ -162,8 +159,7 @@ static int rtmp_config( rh, iface )
  * Delete rtmp from the per-interface in-use table, remove all
  * zone references, and remove the route from the kernel.
  */
-static void rtmp_delinuse( rtmp )
-    struct rtmptab     *rtmp;
+static void rtmp_delinuse(struct rtmptab *rtmp)
 {
     struct rtmptab     *irt;
 
@@ -197,8 +193,7 @@ static void rtmp_delinuse( rtmp )
 /*
  * Add rtmp to the per-interface in-use table.  No verification is done...
  */
-static void rtmp_addinuse( rtmp )
-    struct rtmptab     *rtmp;
+static void rtmp_addinuse( struct rtmptab *rtmp)
 {
     struct rtmptab     *irt;
 
@@ -225,8 +220,7 @@ static void rtmp_addinuse( rtmp )
  * at this point?  What do we do if we get several copies of a route in
  * an RTMP packet?
  */
-static int rtmp_copyzones( to, from )
-    struct rtmptab     *to, *from;
+static int rtmp_copyzones( struct rtmptab *to,struct rtmptab *from)
 {
     struct list                *lz, *lr;
 
@@ -256,8 +250,7 @@ static int rtmp_copyzones( to, from )
  * Remove rtmp from the in-use table and the per-gate table.
  * Free any associated space.
  */
-void rtmp_free( rtmp )
-    struct rtmptab     *rtmp;
+void rtmp_free( struct rtmptab *rtmp)
 {
     struct gate                *gate;
 
@@ -294,8 +287,7 @@ void rtmp_free( rtmp )
  * Find a replacement for "replace".  If we can't find a replacement,
  * return 1.  If we do find a replacement, return 0. -1 on error.
  */
-int rtmp_replace( replace )
-    struct rtmptab     *replace;
+int rtmp_replace(struct rtmptab *replace)
 {
     struct interface   *iface;
     struct gate                *gate;
@@ -339,8 +331,7 @@ int rtmp_replace( replace )
 }
 
 
-static int rtmp_new( rtmp )
-    struct rtmptab     *rtmp;
+static int rtmp_new(struct rtmptab *rtmp)
 {
     struct interface   *i;
     struct rtmptab     *r;
@@ -403,11 +394,7 @@ static int rtmp_new( rtmp )
 }
 
 
-int rtmp_packet( ap, from, data, len )
-    struct atport      *ap;
-    struct sockaddr_at *from;
-    char               *data;
-    int                        len;
+int rtmp_packet(struct atport *ap, struct sockaddr_at *from, char *data, int len)
 {
     struct rtmp_head   rh;
     struct rtmp_tuple  rt, xrt;
@@ -814,8 +801,7 @@ int rtmp_packet( ap, from, data, len )
     return 0;
 }
 
-int rtmp_request( iface )
-    struct interface   *iface;
+int rtmp_request( struct interface *iface)
 {
     struct sockaddr_at sat;
     struct atport      *ap;
@@ -857,9 +843,7 @@ int rtmp_request( iface )
 }
 
 
-int looproute( iface, cmd )
-    struct interface   *iface;
-    unsigned int       cmd;
+int looproute(struct interface *iface, unsigned int cmd)
 {
     struct sockaddr_at dst, loop;
 
@@ -912,9 +896,7 @@ int looproute( iface, cmd )
     return( 0 );
 }
 
-int gateroute( command, rtmp )
-    unsigned int       command;
-    struct rtmptab     *rtmp;
+int gateroute(unsigned int command, struct rtmptab *rtmp)
 {
     struct sockaddr_at dst, gate;
     unsigned short     net;
index 39093bb26217d5884ce5a2d3f7399c420524a67e..99e15db31bed804558e62d47382772512fba0c40 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rtmp.h,v 1.4 2001-08-03 22:12:54 srittau Exp $
+ * $Id: rtmp.h,v 1.5 2009-10-13 22:55:37 didg Exp $
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  *
@@ -78,13 +78,17 @@ struct rtmp_tuple {
 #define STARTUP_LASTNET                0xfffe
 
 extern int     rtfd;
-struct rtmptab *newrt __P((const struct interface *));
-void rtmp_delzonemap  __P((struct rtmptab *));
+struct rtmptab *newrt (const struct interface *);
+void rtmp_delzonemap  (struct rtmptab *);
 
-int rtmp_request __P(( struct interface * ));
-void rtmp_free __P(( struct rtmptab * ));
-int rtmp_replace __P(( struct rtmptab * ));
-int looproute __P(( struct interface *, unsigned int ));
-int gateroute __P(( unsigned int, struct rtmptab * ));
+int rtmp_request ( struct interface * );
+void rtmp_free ( struct rtmptab * );
+int rtmp_replace ( struct rtmptab * );
+int looproute ( struct interface *, unsigned int );
+int gateroute ( unsigned int, struct rtmptab * );
+
+struct atport;
+
+int rtmp_packet(struct atport *ap, struct sockaddr_at *from, char *data, int len);
 
 #endif /* atalkd/rtmp.h */
index 5efd1c58dd14bc2127b37f4a4297aa511a1d175e..ea73c99e8df23db95b709d95189a745ece7cefce 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: zip.c,v 1.12 2005-04-28 20:49:47 bfernhomberg Exp $
+ * $Id: zip.c,v 1.13 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -48,9 +48,7 @@
 struct ziptab  *ziptab = NULL, *ziplast = NULL;
 
 
-static int zonecheck( rtmp, iface )
-    struct rtmptab     *rtmp;
-    struct interface   *iface;
+static int zonecheck(struct rtmptab *rtmp, struct interface *iface)
 {
     struct list                *l;
     struct ziptab      *czt, *zt;
@@ -88,11 +86,7 @@ static int zonecheck( rtmp, iface )
 }
 
 
-int zip_packet( ap, from, data, len )
-    struct atport      *ap;
-    struct sockaddr_at *from;
-    char               *data;
-    int                        len;
+int zip_packet(struct atport *ap,struct sockaddr_at *from, char *data, int len)
 {
     struct ziphdr      zh;
     struct atphdr      ah;
@@ -898,8 +892,7 @@ int zip_packet( ap, from, data, len )
     return 0;
 }
 
-int zip_getnetinfo( iface )
-    struct interface   *iface;
+int zip_getnetinfo(struct interface *iface)
 {
     struct atport      *ap;
     struct ziphdr      zh;
@@ -955,10 +948,7 @@ int zip_getnetinfo( iface )
     return 0;
 }
 
-    struct ziptab *
-newzt( len, name )
-    const int          len;
-    const char *name;
+struct ziptab *newzt(const int len, const char *name)
 {
     struct ziptab      *zt;
 
@@ -981,9 +971,7 @@ newzt( len, name )
  * Insert at the end.  Return 1 if a mapping already exists, 0 otherwise.
  * -1 on error.
  */
-static int add_list( head, data )
-    struct list        **head;
-    void       *data;
+static int add_list(struct list **head, void *data)
 {
     struct list        *l, *l2;
 
@@ -1012,10 +1000,7 @@ static int add_list( head, data )
     return( 0 );
 }
 
-int addzone( rt, len, zone )
-    struct rtmptab     *rt;
-    int                        len;
-    char               *zone;
+int addzone(struct rtmptab *rt, int len, char *zone)
 {
     struct ziptab      *zt;
     int                        cc, exists = 0;
index dad0a5ccd78a6fe2df9604450d8cc63b4ee31510..e8bf1db39f555b1892717850435b7d6ee503d269 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: zip.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ * $Id: zip.h,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -20,9 +20,10 @@ struct ziptab {
 };
 
 extern struct ziptab   *ziptab, *ziplast;
-struct ziptab  *newzt __P((const int, const char *));
+struct ziptab  *newzt (const int, const char *);
 
-int addzone __P(( struct rtmptab *, int, char * ));
-int zip_getnetinfo __P(( struct interface * ));
+int addzone ( struct rtmptab *, int, char * );
+int zip_getnetinfo ( struct interface * );
+int zip_packet(struct atport *ap,struct sockaddr_at *from, char *data, int len);
 
 #endif /* atalkd/zip.h */
index f4f23fb7039cc8c4dd164fb0e1a2037899f4e2a7..33b0b72f325efc9d77368599b219ea391c1d6322 100644 (file)
@@ -1,5 +1,5 @@
 /* 
-   $Id: cmd_dbd.c,v 1.11 2009-10-12 13:18:11 franklahm Exp $
+   $Id: cmd_dbd.c,v 1.12 2009-10-13 22:55:37 didg Exp $
 
    Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
    
@@ -227,7 +227,7 @@ void free_lock(int lockfd)
     close(lockfd);
 }
 
-static void usage ()
+static void usage (void)
 {
     printf("Usage: dbd [-e|-v|-x] -d [-i] | -s [-n]| -r [-f] | -u <path to netatalk volume>\n"
            "dbd can dump, scan, reindex and rebuild Netatalk dbd CNID databases.\n"
index fec81faa8b436f2ca75c868d9bf5b1ebec43e2ff..ecc5045d75fa7007306fffb959fb12a0be9b0ac0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_metad.c,v 1.14 2009-09-14 00:02:21 didg Exp $
+ * $Id: cnid_metad.c,v 1.15 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -343,8 +343,7 @@ static int set_dbdir(char *dbdir, int len)
 }
 
 /* ------------------ */
-uid_t user_to_uid ( username )
-    char    *username;
+uid_t user_to_uid (char *username)
 {
     struct passwd *this_passwd;
 
@@ -363,8 +362,7 @@ uid_t user_to_uid ( username )
 }
 
 /* ------------------ */
-gid_t group_to_gid ( group )
-    char    *group;
+gid_t group_to_gid ( char *group)
 {
     struct group *this_group;
 
index 853e0e9f47acf3b642736769e177bcd5d5d03529..9b3ffad5cf65073012d7faa867b9442ff1089cb2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: comm.c,v 1.3 2009-04-21 08:55:44 franklahm Exp $
+ * $Id: comm.c,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -141,7 +141,7 @@ static int recv_cred(int fd)
  *  things and clean up fd_table. The same happens for any read/write errors.
  */
 
-static int check_fd()
+static int check_fd(void)
 {
     int fd;
     fd_set readfds;
index beda77053e1a4c4334450f252a30617c7dcfb826..f604e2271fa164f607df461ed9e18b7d7e9b6c91 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: comm.h,v 1.2 2005-04-28 20:49:47 bfernhomberg Exp $
+ * $Id: comm.h,v 1.3 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
 #include <atalk/cnid_dbd_private.h>
 
 
-extern int      comm_init  __P((struct db_param *, int, int));
-extern int      comm_rcv  __P((struct cnid_dbd_rqst *));
-extern int      comm_snd  __P((struct cnid_dbd_rply *));
-extern int      comm_nbe  __P((void));
+extern int      comm_init  (struct db_param *, int, int);
+extern int      comm_rcv  (struct cnid_dbd_rqst *);
+extern int      comm_snd  (struct cnid_dbd_rply *);
+extern int      comm_nbe  (void);
 
 #endif /* CNID_DBD_COMM_H */
 
index 07e79c208134c00831f36788bb1af027cb66fdc7..0d23a32a9e9695cd81f1f55bf8b54893e0cd50d6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: db_param.c,v 1.5 2009-05-06 11:54:24 franklahm Exp $
+ * $Id: db_param.c,v 1.6 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * Copyright (c) Frank Lahm 2009
@@ -39,7 +39,7 @@
 static struct db_param params;
 static int parse_err;
 
-static size_t usock_maxlen()
+static size_t usock_maxlen(void)
 {
     struct sockaddr_un addr;
     return sizeof(addr.sun_path) - 1;
index 18b13b5d3aee1b5b95bc84cc31ad43edbebbbb4f..51d12ee9c03991486ca91be7c7215c818001ee12 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: db_param.h,v 1.4 2009-05-06 11:54:24 franklahm Exp $
+ * $Id: db_param.h,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -28,7 +28,7 @@ struct db_param {
     int max_vols;
 };
 
-extern struct db_param *      db_param_read  __P((char *, enum identity));
+extern struct db_param *      db_param_read  (char *, enum identity);
 
 
 #endif /* CNID_DBD_DB_PARAM_H */
index b4e2b87fe0d9a78581202566fdc4fa9d1d8e9e3e..b1b3599a0abb7542540d78ced4c4187ebb25f5b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dbif.c,v 1.14 2009-09-14 03:12:11 didg Exp $
+ * $Id: dbif.c,v 1.15 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * Copyright (C) Frank Lahm 2009
@@ -32,7 +32,7 @@
 static char *old_dbfiles[] = {"cnid.db", NULL};
 
 /* --------------- */
-static int upgrade_required()
+static int upgrade_required(void)
 {
     int i;
     int found = 0;
index 039a79cded46f080cd42ab8227dc82357ae488b5..1b4a15be588646fff8814ff9f2557abc08d02f7e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pack.c,v 1.5 2009-05-04 09:09:43 franklahm Exp $
+ * $Id: pack.c,v 1.6 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -49,10 +49,7 @@ static void pack_devino(unsigned char *buf, dev_t dev, ino_t ino)
 }
 
 /* --------------- */
-int didname(dbp, pkey, pdata, skey)
-DB *dbp _U_;
-const DBT *pkey _U_, *pdata;
-DBT *skey;
+int didname(DB *dbp _U_, const DBT *pkey _U_, const DBT *pdata, DBT *skey)
 {
 int len;
  
@@ -67,10 +64,7 @@ int len;
 }
  
 /* --------------- */
-int devino(dbp, pkey, pdata, skey)
-DB *dbp _U_;
-const DBT *pkey _U_, *pdata;
-DBT *skey;
+int devino(DB *dbp _U_, const DBT *pkey _U_,  const DBT *pdata, DBT *skey)
 {
     memset(skey, 0, sizeof(DBT));
     skey->data = (char *)pdata->data + CNID_DEVINO_OFS;
index 12de313107a15b55c4310aea2f6d28b77846ede8..dd14aa96d33b144c92eb55b428f0a59dcb185bab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: usockfd.h,v 1.2 2005-04-28 20:49:49 bfernhomberg Exp $
+ * $Id: usockfd.h,v 1.3 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -13,9 +13,9 @@
 #include <atalk/cnid_dbd_private.h>
 
 
-extern int      usockfd_create  __P((char *, mode_t, int));
-extern int      tsockfd_create  __P((char *, u_int16_t, int));
-extern int      usockfd_check   __P((int, unsigned long));
+extern int      usockfd_create  (char *, mode_t, int);
+extern int      tsockfd_create  (char *, u_int16_t, int);
+extern int      usockfd_check   (int, unsigned long);
 
 #ifndef OSSH_ALIGNBYTES
 #define OSSH_ALIGNBYTES (sizeof(int) - 1)
index 560f2b013c59f6821a4c2bce3089e862ba551ef2..a8ba6fd6d69f54e491aa7df514e62ce8b9ba6ac6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: auth.c,v 1.8 2009-02-02 16:04:33 didg Exp $
+ * $Id: auth.c,v 1.9 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -126,7 +126,7 @@ int auth_load(const char *path, const char *list)
 }
 
 /* get rid of all of the uams */
-void auth_unload()
+void auth_unload(void)
 {
   struct uam_mod *mod, *prev, *start = &uam_modules;
 
index ee95058be9a403d568fa39bbf8d97977d709faff..1a2964d6f6a7f86b03336d742d2476d5d30b896e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: comment.c,v 1.9 2008-11-14 10:29:08 didg Exp $
+ * $Id: comment.c,v 1.10 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -31,8 +31,7 @@ void compop( void )
     free( cs );
 }
 
-void compush( comment )
-    struct papd_comment        *comment;
+void compush(struct papd_comment *comment)
 {
     struct comstate    *cs;
 
@@ -48,9 +47,7 @@ void compush( comment )
     comstate = cs;
 }
 
-int comswitch( comments, handler )
-    struct papd_comment        *comments;
-    int                        (*handler)();
+int comswitch(struct papd_comment *comments, int (*handler)())
 {
     struct papd_comment        *c, *comment = NULL;
 
@@ -68,9 +65,7 @@ int comswitch( comments, handler )
     return( 0 );
 }
 
-int comcmp( start, stop, str, how )
-    char       *start, *stop, *str;
-    int                how;
+int comcmp( char *start, char *stop, char *str,int how)
 {
     int                cc, len;
 
@@ -89,9 +84,7 @@ int comcmp( start, stop, str, how )
     return( 1 );
 }
 
-struct papd_comment *commatch( start, stop, comments )
-    char               *start, *stop;
-    struct papd_comment        comments[];
+struct papd_comment *commatch( char *start, char *stop, struct papd_comment comments[])
 {
     struct papd_comment        *comment;
 
@@ -107,8 +100,7 @@ struct papd_comment *commatch( start, stop, comments )
     }
 }
 
-char *comtoken( start, stop, pos, delim )
-    char       *start, *stop, *pos, *delim;
+char *comtoken( char *start, char *stop, char *pos, char *delim)
 {
     if ( pos < start || pos > stop ) {
        abort();
index 9a79349881f723355d40043b94d0f4c63f2ab80b..1cac2d0d051fd1eff10e183b6f0001a42ed90dae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: comment.h,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ * $Id: comment.h,v 1.6 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -54,11 +54,11 @@ extern char                 *comcont;
  */
 #define CM_NOPRINT     (1<<16)                         /* or print */
 
-void compop __P(( void ));
-void compush __P(( struct papd_comment * ));
-int comswitch __P(( struct papd_comment *, int (*)() ));
-int comcmp __P(( char *, char *, char *, int ));
-struct papd_comment *commatch __P(( char *, char *, struct papd_comment * ));
-char *comtoken __P(( char *, char *, char *, char * ));
+void compop ( void );
+void compush ( struct papd_comment * );
+int comswitch ( struct papd_comment *, int (*)() );
+int comcmp ( char *, char *, char *, int );
+struct papd_comment *commatch ( char *, char *, struct papd_comment * );
+char *comtoken ( char *, char *, char *, char * );
 
 #endif /* PAPD_COMMENT_H */
index aa9daea6cb2eca15ccd6ae2138e3f2dcb1d9b72d..27a17c4536303c8ff02a4a8e223ca3b229024a8b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.10 2009-02-02 10:31:32 didg Exp $
+ * $Id: file.c,v 1.11 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 
 /* 
 */
-int markline( pf, start, linelength, crlflength )
-    char               **start;
-    int                        *linelength, *crlflength;
-    struct papfile     *pf;
+int markline( struct papfile *pf, char **start, int *linelength, int *crlflength )
 {
     char               *p;
 
@@ -66,10 +63,7 @@ int markline( pf, start, linelength, crlflength )
     return( 1 );
 }
 
-void morespace( pf, data, len )
-    struct papfile     *pf;
-    const char         *data;
-    int                        len;
+void morespace(struct papfile *pf, const char *data, int len)
 {
     char               *nbuf;
     int                        nsize;
@@ -101,10 +95,7 @@ void morespace( pf, data, len )
 }
 
 
-void append(pf, data, len)
-    struct papfile     *pf;
-    const char         *data;
-    int                        len;
+void append(struct papfile *pf, const char *data, int len)
 {
     if ((pf->pf_data + pf->pf_datalen + len) >
        (pf->pf_buf + pf->pf_bufsize)) {
@@ -116,9 +107,7 @@ void append(pf, data, len)
 }
 
 
-void spoolerror( out, str )
-    struct papfile     *out;
-    char               *str;
+void spoolerror(struct papfile *out, char *str)
 {
     char       *pserr1 = "%%[ Error: ";
     char       *pserr2 = " ]%%\n";
index a1e2c060dc406161c78dbeb06eb539ea64777e42..9f1f52d93ead1126bb1752b0805b49786904a6f5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.h,v 1.7 2005-04-28 20:49:49 bfernhomberg Exp $
+ * $Id: file.h,v 1.8 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -36,9 +36,9 @@ struct papfile {
 
 #define PF_MORESPACE   1024
 
-int markline __P(( struct papfile *, char **, int *, int * ));
-void morespace __P(( struct papfile *, const char *, int ));
-void append __P(( struct papfile *, const char *, int ));
-void spoolerror __P(( struct papfile *, char * ));
+int markline ( struct papfile *, char **, int *, int * );
+void morespace ( struct papfile *, const char *, int );
+void append ( struct papfile *, const char *, int );
+void spoolerror ( struct papfile *, char * );
 
 #endif /* PAPD_FILE_H */
index ef671ad90640e6cd45b920e1b292489a21f64f4d..68e7294cd6b379e8ef9199e4841bb3a7ff0eb4a4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: headers.c,v 1.12 2009-02-02 10:31:32 didg Exp $
+ * $Id: headers.c,v 1.13 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -80,8 +80,7 @@ static char *get_text(char *start, int linelength)
     return ret;
 }
 
-int ch_for( in, out )
-       struct papfile  *in, *out _U_;
+int ch_for( struct papfile *in, struct papfile *out _U_)
 {
     char                *start, *cmt;
     int                 linelength, crlflength;
@@ -112,8 +111,7 @@ int ch_for( in, out )
     return( CH_DONE );
 }
 
-int ch_title( in, out )
-    struct papfile     *in, *out _U_;
+int ch_title( struct papfile *in, struct papfile *out _U_)
 {
     char               *start, *cmt;
     int                        linelength, crlflength;
@@ -159,8 +157,7 @@ static int guess_creator ( char *creator )
 }
 
 
-int ch_creator( in, out )
-    struct papfile     *in, *out _U_;
+int ch_creator( struct papfile *in, struct papfile *out _U_)
 {
     char               *start, *cmt;
     int                        linelength, crlflength;
@@ -192,8 +189,7 @@ int ch_creator( in, out )
     return( CH_DONE );
 }
 
-int ch_endcomm( in, out )
-    struct papfile     *in, *out _U_;
+int ch_endcomm( struct papfile *in, struct papfile *out _U_)
 {
     char                *start;
     int                 linelength, crlflength;
@@ -222,8 +218,7 @@ int ch_endcomm( in, out )
     return ( CH_DONE);
 }
 
-int ch_starttranslate(in,out)
-    struct papfile      *in, *out _U_;
+int ch_starttranslate( struct papfile *in, struct papfile *out _U_)
 {
     char                *start;
     int                 linelength, crlflength;
@@ -250,8 +245,7 @@ int ch_starttranslate(in,out)
     return ( CH_DONE);
 }
 
-int ch_endtranslate(in,out)
-    struct papfile      *in, *out _U_;
+int ch_endtranslate(struct papfile *in, struct papfile *out _U_)
 {
     char                *start;
     int                 linelength, crlflength;
@@ -278,8 +272,7 @@ int ch_endtranslate(in,out)
     return ( CH_DONE);
 }
 
-int ch_translateone(in,out)
-    struct papfile      *in, *out _U_;
+int ch_translateone( struct papfile *in, struct papfile *out _U_)
 {
     char                *start;
     int                 linelength, crlflength;
index 772250b25ae609c462ad2244394de97984355f94..dec0b53d21136307207eff1418e315a1b09a01e0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: lp.c,v 1.27 2009-07-20 09:06:03 franklahm Exp $
+ * $Id: lp.c,v 1.28 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -304,8 +304,7 @@ static char* pipexlate(char *src)
 }
 
 
-void lp_person( person )
-    char       *person;
+void lp_person(char *person)
 {
     if ( lp.lp_person != NULL ) {
        free( lp.lp_person );
@@ -318,7 +317,7 @@ void lp_person( person )
 }
 
 #ifdef ABS_PRINT
-int lp_pagecost()
+int lp_pagecost(void)
 {
     char       cost[ 22 ];
     char       balance[ 22 ];
@@ -335,8 +334,7 @@ int lp_pagecost()
 }
 #endif /* ABS_PRINT */
 
-void lp_host( host )
-    char       *host;
+void lp_host( char *host)
 {
     if ( lp.lp_host != NULL ) {
        free( lp.lp_host );
@@ -354,8 +352,7 @@ void lp_host( host )
  * This should be added.
  */
 
-void lp_job( job )
-    char       *job;
+void lp_job(char *job)
 {
     if ( lp.lp_job != NULL ) {
        free( lp.lp_job );
@@ -368,8 +365,7 @@ void lp_job( job )
     
 }
 
-void lp_for ( lpfor )
-       char    *lpfor;
+void lp_for (char *lpfor)
 {
     if ( lp.lp_created_for != NULL ) {
        free( lp.lp_created_for );
@@ -379,9 +375,7 @@ void lp_for ( lpfor )
 }
 
 
-static int lp_init( out, sat )
-    struct papfile     *out;
-    struct sockaddr_at *sat;
+static int lp_init(struct papfile *out, struct sockaddr_at *sat)
 {
     int                authenticated = 0;
 #ifndef HAVE_CUPS
@@ -544,9 +538,7 @@ static int lp_init( out, sat )
     return( 0 );
 }
 
-int lp_open( out, sat )
-    struct papfile     *out;
-    struct sockaddr_at *sat;
+int lp_open(struct papfile *out, struct sockaddr_at *sat)
 {
     char       name[ MAXPATHLEN ];
     int                fd;
@@ -646,7 +638,7 @@ int lp_open( out, sat )
     return( 0 );
 }
 
-int lp_close()
+int lp_close(void)
 {
     if (( lp.lp_flags & LP_INIT ) == 0 || ( lp.lp_flags & LP_OPEN ) == 0 ) {
        return 0;
@@ -660,10 +652,7 @@ int lp_close()
 
 
 
-int lp_write(in, buf, len )
-    struct papfile *in;
-    char       *buf;
-    size_t     len;
+int lp_write(struct papfile *in, char *buf, size_t len)
 {
 #define BUFSIZE 32768
     static char tempbuf[BUFSIZE];
@@ -746,7 +735,7 @@ int lp_write(in, buf, len )
     return( 0 );
 }
 
-int lp_cancel()
+int lp_cancel(void)
 {
     char       name[ MAXPATHLEN ];
     char       letter;
@@ -775,7 +764,7 @@ int lp_cancel()
  *
  * XXX piped?
  */
-int lp_print()
+int lp_print(void)
 {
 #ifndef HAVE_CUPS
     char               buf[ MAXPATHLEN ];
@@ -899,7 +888,7 @@ int lp_disconn_unix( int fd )
     return( close( fd ));
 }
 
-int lp_conn_unix()
+int lp_conn_unix(void)
 {
     int                        s;
     struct sockaddr_un saun;
@@ -926,7 +915,7 @@ int lp_disconn_inet( int fd )
     return( close( fd ));
 }
 
-int lp_conn_inet()
+int lp_conn_inet(void)
 {
     int                        privfd, port = IPPORT_RESERVED - 1;
     struct sockaddr_in sin;
@@ -970,8 +959,7 @@ int lp_conn_inet()
     return( privfd );
 }
 
-int lp_rmjob( job )
-    int                job;
+int lp_rmjob( int job)
 {
     char       buf[ 1024 ];
     int                n, s;
@@ -1010,8 +998,7 @@ char       *tag_files = "files: ";
 char   *tag_size = "size: ";
 char   *tag_status = "status: ";
 
-int lp_queue( out )
-    struct papfile     *out;
+int lp_queue( struct papfile *out)
 {
     char                       buf[ 1024 ], *start, *stop, *p, *q;
     int                                linelength, crlflength;
index d4ab8423a854c2cd79d81fe186dd79c27aded950..6a3dd68db0b80eff5fcc5dca9d906b5d5128802f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: lp.h,v 1.5 2009-02-01 18:55:37 didg Exp $
+ * $Id: lp.h,v 1.6 2009-10-13 22:55:37 didg Exp $
  */
 
 #ifndef PAPD_LP_H
@@ -9,24 +9,24 @@
 #include <sys/cdefs.h>
 #include "file.h"
 
-void lp_person __P(( char * ));
-int lp_pagecost __P(( void ));
-void lp_host __P(( char * ));
-void lp_job __P(( char * ));
-void lp_for __P(( char * ));
-void lp_origin __P(( int ));
-int lp_rmjob __P(( int ));
-int lp_queue __P(( struct papfile * ));
+void lp_person ( char * );
+int lp_pagecost ( void );
+void lp_host ( char * );
+void lp_job ( char * );
+void lp_for ( char * );
+void lp_origin ( int );
+int lp_rmjob ( int );
+int lp_queue ( struct papfile * );
 
 /* cancel current job */
-int lp_cancel __P(( void ));
+int lp_cancel ( void );
 /* print current job */
-int lp_print __P(( void ));
+int lp_print ( void );
 /* open a file for spooling */
-int lp_open __P(( struct papfile *, struct sockaddr_at * ));
+int lp_open ( struct papfile *, struct sockaddr_at * );
 /* open a buffer to the current open file */
-int lp_write __P(( struct papfile *,char *, size_t ));
+int lp_write ( struct papfile *,char *, size_t );
 /* close current spooling file */
-int lp_close __P(( void ));
+int lp_close ( void );
 
 #endif /* PAPD_LP_H */
index 29a61543d666e2b1a0bb8acdada45c90546aad41..5e128e56099c4d3e8faa26240ae60ab9a587160b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: magics.c,v 1.14 2009-02-02 16:04:33 didg Exp $
+ * $Id: magics.c,v 1.15 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 
 static int state=0;
 
-static void parser_error(outfile)
-    struct papfile     *outfile;
+static void parser_error(struct papfile *outfile)
 {
                 spoolerror( outfile, "Comments error, Ignoring job." );
                outfile->pf_state |= PF_EOF;
                lp_close();
 }
 
-int ps( infile, outfile, sat )
-    struct papfile     *infile, *outfile;
-    struct sockaddr_at *sat;
+int ps( struct papfile *infile, struct papfile *outfile, struct sockaddr_at *sat)
 {
     char                       *start;
     int                                linelength, crlflength;
@@ -103,9 +100,7 @@ int ps( infile, outfile, sat )
     }
 }
 
-int cm_psquery( in, out, sat )
-    struct papfile     *in, *out;
-    struct sockaddr_at *sat _U_;
+int cm_psquery( struct papfile *in, struct papfile *out, struct sockaddr_at *sat _U_)
 {
     struct papd_comment        *comment;
     char               *start;
@@ -139,9 +134,7 @@ int cm_psquery( in, out, sat )
     }
 }
 
-int cm_psadobe( in, out, sat )
-    struct papfile     *in, *out;
-    struct sockaddr_at *sat _U_;
+int cm_psadobe( struct papfile *in, struct papfile *out, struct sockaddr_at *sat _U_)
 {
     char               *start;
     int                        linelength, crlflength;
@@ -183,9 +176,7 @@ int cm_psadobe( in, out, sat )
 
 char   *Query = "Query";
 
-int cm_psswitch( in, out, sat )
-    struct papfile     *in, *out;
-    struct sockaddr_at *sat _U_;
+int cm_psswitch(struct papfile *in, struct papfile *out, struct sockaddr_at *sat _U_)
 {
     char               *start, *stop, *p;
     int                        linelength, crlflength;
index 3ef3910ce0d926f56de9f7de34218996e0c7b91b..6fac410f7c3ab3395eb146b4d7a40503ddab8d2c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.c,v 1.26 2009-02-02 08:50:50 didg Exp $
+ * $Id: main.c,v 1.27 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -104,11 +104,8 @@ static void papd_exit(const int i)
   exit(i);
 }
 
-#if !defined( ibm032 ) && !defined( _IBMR2 )
-    void
-#endif /* ! ibm032 && ! _IBMR2 */
-die( n )
-    int                        n;
+void
+die(int n)
 {
     struct printer     *pr;
     struct at_addr     addr;
@@ -136,10 +133,8 @@ die( n )
     papd_exit( n );
 }
 
-#if !defined( ibm032 ) && !defined( _IBMR2 )
-    void
-#endif /* ! ibm032 && ! _IBMR2 */
-reap()
+void
+reap(int sig _U_)
 {
     int                status;
     int                pid;
@@ -166,9 +161,7 @@ reap()
 
 char           rbuf[ 255 + 1 + 8 ];
 
-int main( ac, av )
-    int                ac;
-    char       **av;
+int main(int ac, char **av)
 {
     extern char         *optarg;
 
@@ -567,9 +560,7 @@ int main( ac, av )
  * We assume buf is big enough for 255 bytes of data and a length byte.
  */
 
-int getstatus( pr, buf )
-    struct printer     *pr;
-    char               *buf;
+int getstatus(struct printer *pr, char *buf)
 {
 
 #ifdef HAVE_CUPS
@@ -612,13 +603,12 @@ int getstatus( pr, buf )
 #endif /* HAVE_CUPS */
 }
 
-char   *pgetstr();
+char   *pgetstr(char *id, char **area);
 char   *getpname(char **area, int bufsize);
 
 #define PF_CONFBUFFER  1024
 
-static void getprinters( cf )
-    char       *cf;
+static void getprinters( char *cf)
 {
     char               buf[ PF_CONFBUFFER ], area[ PF_CONFBUFFER ], *a, *p, *name, *type, *zone;
     struct printer     *pr;
@@ -804,8 +794,7 @@ static void getprinters( cf )
     }
 }
 
-int rprintcap( pr )
-    struct printer     *pr;
+int rprintcap( struct printer *pr)
 {
 
 #ifdef HAVE_CUPS
index e80b4a7734142e18ca06fe0c6e2b907b636531f5..63bf91b98de88dd87a932e1c3316cf41a5e0e018 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ppd.c,v 1.15 2009-02-02 10:24:28 didg Exp $
+ * $Id: ppd.c,v 1.16 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -53,7 +53,7 @@ struct ppdent {
 #ifndef SHOWPPD
 static int ppd_inited;
 
-static void ppd_init()
+static void ppd_init(void)
 {
     if (ppd_inited)
         return;
@@ -68,10 +68,7 @@ static void ppd_init()
 
 /* quick and ugly hack to be able to read
    ppd files with Mac line ending */
-static char* my_fgets(buf, bufsize, stream) 
-    char   *buf;
-    size_t bufsize;
-    FILE   *stream;
+static char* my_fgets(char *buf, size_t bufsize, FILE *stream)
 {
     int p;           /* uninitialized, OK 310105 */
     size_t count = 0;
@@ -94,8 +91,7 @@ static char* my_fgets(buf, bufsize, stream)
     return buf;
 }
 
-static struct ppdent *getppdent( stream )
-    FILE       *stream;
+static struct ppdent *getppdent( FILE *stream)
 {
     static char                        buf[ 1024 ];
     static struct ppdent       ppdent;
@@ -179,9 +175,7 @@ static struct ppdent *getppdent( stream )
     return( NULL );
 }
 
-int read_ppd( file, fcnt )
-    char       *file;
-    int                fcnt;
+int read_ppd(char *file, int fcnt)
 {
     FILE               *ppdfile;
     struct ppdent      *pe;
@@ -255,8 +249,7 @@ int read_ppd( file, fcnt )
     return( 0 );
 }
 
-struct ppd_font *ppd_font( font )
-    char       *font;
+struct ppd_font *ppd_font( char *font)
 {
     struct ppd_font    *pfo;
 
@@ -274,9 +267,7 @@ struct ppd_font *ppd_font( font )
     return( NULL );
 }
 
-struct ppd_feature *ppd_feature( feature, len )
-    const char *feature;
-    int                len;
+struct ppd_feature *ppd_feature( const char *feature, int len)
 {
     struct ppd_feature *pfe;
     char               ppd_feature_main[ 256 ];
index 12822977436b43870fa12cf75d80cf63f20ac973..ad989ddb936c9c8ae24cc91f5acf0bf757e154d0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ppd.h,v 1.5 2009-01-21 04:04:20 didg Exp $
+ * $Id: ppd.h,v 1.6 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -20,8 +20,8 @@ struct ppd_feature {
     char       *pd_value;
 };
 
-struct ppd_feature     *ppd_feature __P((const char *, int));
-struct ppd_font                *ppd_font __P((char *));
-int read_ppd __P((char *, int));
+struct ppd_feature     *ppd_feature (const char *, int);
+struct ppd_font                *ppd_font (char *);
+int read_ppd (char *, int);
 
 #endif /* PAPD_PPD_H */
index 86f56af70038886f64768c1a6dee8e9acc0d6f54..1cad95a72b4facc6db3df40b8f09d170053636c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: print_cups.c,v 1.3 2008-11-14 10:29:08 didg Exp $
+ * $Id: print_cups.c,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright 2004 Bjoern Fernhomberg.
  *
@@ -66,7 +66,7 @@ static int    cups_mangle_printer_name ( struct printer *pr, struct printer *print
 static void     cups_free_printer ( struct printer *pr);
 
 
-char * cups_get_language ()
+char * cups_get_language (void)
 {
         cups_lang_t *language;
 
index 2811a845fc6ee1ff096a1d0565baf9bfdbfaf266..10a9ca707cac1804bece13219143f128fb0dc470 100644 (file)
@@ -10,12 +10,12 @@ struct cups_status {
        char *  status_message;\r
 };\r
 \r
-int            cups_printername_ok __P((char * ));\r
-const char *   cups_get_printer_ppd __P(( char * ));\r
-int            cups_get_printer_status __P((struct printer *pr));\r
-int            cups_print_job __P(( char *, char *, char *, char *, char *));\r
-struct printer * cups_autoadd_printers __P(( struct printer *, struct printer *));\r
-int            cups_check_printer __P(( struct printer *, struct printer *, int));\r
-char           *cups_get_language __P(());\r
+int            cups_printername_ok (char * );\r
+const char *   cups_get_printer_ppd ( char * );\r
+int            cups_get_printer_status (struct printer *pr);\r
+int            cups_print_job ( char *, char *, char *, char *, char *);\r
+struct printer * cups_autoadd_printers ( struct printer *, struct printer *);\r
+int            cups_check_printer ( struct printer *, struct printer *, int);\r
+char           *cups_get_language ( void );\r
 #endif /* HAVE_CUPS */\r
 #endif /* PAPD_CUPS_H */\r
index 19ed788331cc8351de1a76774a9fe532b0930f33..67304d813d3cb2dbea29308ba9ad00eac5c52022 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: printcap.c,v 1.10 2005-04-28 20:49:49 bfernhomberg Exp $
+ * $Id: printcap.c,v 1.11 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -43,6 +43,8 @@
 #include <ctype.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif /* HAVE_UNISTD_H */
 static FILE *pfp = NULL;       /* printcap data base file pointer */
 static char *tbuf;
 static int hopcount;           /* detect infinite loops in termcap, init 0 */
-static char    *tskip();
-char   *tgetstr();
-static char    *tdecode();
-char   *getenv();
 
 /*
  * Similar to tgetent except it returns the next entry instead of
@@ -104,10 +102,7 @@ char       *getenv();
  * Added a "cap" parameter, so we can use these calls for printcap
  * and papd.conf.
  */
-int getprent( cap, bp, bufsize )
-       register char *cap;
-       register char *bp;
-       register int bufsize;
+int getprent( char *cap, char *bp, int bufsize)
 {
        register int c, skip = 0, i;
 
@@ -159,7 +154,7 @@ int getprent( cap, bp, bufsize )
        }
 }
 
-void endprent()
+void endprent(void)
 {
        if (pfp != NULL)
                fclose(pfp);
@@ -173,8 +168,7 @@ void endprent()
  * Added a "cap" parameter, so we can use these calls for printcap
  * and papd.conf.
  */
-int tgetent( cap, bp, name)
-       char *cap, *bp, *name;
+int tgetent(char *cap, char *bp, char *name)
 {
        register char *cp;
        register int c;
@@ -270,8 +264,7 @@ int tgetent( cap, bp, name)
  * Added a "cap" parameter, so we can use these calls for printcap
  * and papd.conf.
  */
-int tnchktc( cap )
-    char *cap;
+int tnchktc( char *cap)
 {
        register char *p, *q;
        char tcname[16];        /* name of similar terminal */
@@ -318,8 +311,7 @@ int tnchktc( cap )
  * against each such name.  The normal : terminator after the last
  * name (before the first field) stops us.
  */
-int tnamatch(np)
-       char *np;
+int tnamatch(char *np)
 {
        register char *Np, *Bp;
 
@@ -344,9 +336,7 @@ int tnamatch(np)
  * knowing about \: escapes or any such.  If necessary, :'s can be put
  * into the termcap file in octal.
  */
-static char *
-tskip(bp)
-       register char *bp;
+static char *tskip(char *bp)
 {
 
        while (*bp && *bp != ':')
@@ -364,8 +354,7 @@ tskip(bp)
  * a # character.  If the option is not found we return -1.
  * Note that we handle octal numbers beginning with 0.
  */
-int tgetnum(id)
-       char *id;
+int tgetnum(char *id)
 {
        register int i, base;
        register char *bp = tbuf;
@@ -397,8 +386,7 @@ int tgetnum(id)
  * of the buffer.  Return 1 if we find the option, or 0 if it is
  * not given.
  */
-int tgetflag(id)
-       char *id;
+int tgetflag(char *id)
 {
        register char *bp = tbuf;
 
@@ -415,43 +403,12 @@ int tgetflag(id)
        }
 }
 
-/*
- * Get a string valued option.
- * These are given as
- *     cl=^Z
- * Much decoding is done on the strings, and the strings are
- * placed in area, which is a ref parameter which is updated.
- * No checking on area overflow.
- */
-char *
-tgetstr(id, area)
-       char *id, **area;
-{
-       register char *bp = tbuf;
-
-       for (;;) {
-               bp = tskip(bp);
-               if (!*bp)
-                       return (0);
-               if (*bp++ != id[0] || *bp == 0 || *bp++ != id[1])
-                       continue;
-               if (*bp == '@')
-                       return(0);
-               if (*bp != '=')
-                       continue;
-               bp++;
-               return (tdecode(bp, area));
-       }
-}
-
 /*
  * Tdecode does the grung work to decode the
  * string capability escapes.
  */
 static char *
-tdecode(str, area)
-       register char *str;
-       char **area;
+tdecode(char *str, char **area)
 {
        register char *cp;
        register int c;
@@ -493,11 +450,36 @@ nextc:
        return (str);
 }
 
+/*
+ * Get a string valued option.
+ * These are given as
+ *     cl=^Z
+ * Much decoding is done on the strings, and the strings are
+ * placed in area, which is a ref parameter which is updated.
+ * No checking on area overflow.
+ */
+char *
+tgetstr(char *id, char **area)
+{
+       register char *bp = tbuf;
+
+       for (;;) {
+               bp = tskip(bp);
+               if (!*bp)
+                       return (0);
+               if (*bp++ != id[0] || *bp == 0 || *bp++ != id[1])
+                       continue;
+               if (*bp == '@')
+                       return(0);
+               if (*bp != '=')
+                       continue;
+               bp++;
+               return (tdecode(bp, area));
+       }
+}
+
 static char *
-decodename(str, area, bufsize)
-       register char *str;
-       char **area;
-       int bufsize;
+decodename(char *str, char **area, int bufsize)
 {
        register char *cp;
        register int c;
@@ -540,9 +522,7 @@ nextc:
 }
 
 char *
-getpname( area, bufsize )
-       char    **area;
-       int     bufsize;
+getpname(char **area, int bufsize)
 {
        return( decodename( tbuf, area, bufsize));
 }
index b56c9c2da28e37db6d863a13197c37f150255dcd..d300d45f87da819b7c3fe261a0dc4636f797a9e6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: printcap.h,v 1.4 2002-08-20 20:25:54 srittau Exp $
+ * $Id: printcap.h,v 1.5 2009-10-13 22:55:37 didg Exp $
  */
 
 #ifndef PAPD_PRINTCAP_H
@@ -7,12 +7,12 @@
 
 #include <sys/cdefs.h>
 
-int getprent __P(( register char *, register char *, register int ));
-int pnchktc __P(( char * ));
-int pgetflag __P(( char * ));
-void endprent __P(( void ));
-int pgetent __P(( char *, char *, char * ));
-int pgetnum __P(( char * ));
-int pnamatch __P(( char * ));
+int getprent ( register char *, register char *, register int );
+int pnchktc ( char * );
+int pgetflag ( char * );
+void endprent ( void );
+int pgetent ( char *, char *, char * );
+int pgetnum ( char * );
+int pnamatch ( char * );
 
 #endif /* PAPD_PRINTCAP_H */
index c698c2b4fcb937f1117708467580b2f4b0bbc5c2..ef1c5a6e8991c0e074408dbac5fd3563397ae101 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: queries.c,v 1.21 2009-02-02 16:04:33 didg Exp $
+ * $Id: queries.c,v 1.22 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -57,8 +57,7 @@ int cq_rbilogin( struct papfile *, struct papfile * );
 
 
 
-int cq_default( in, out )
-    struct papfile     *in, *out;
+int cq_default( struct papfile *in, struct papfile *out)
 {
     char               *start, *stop, *p;
     int                        linelength, crlflength;
@@ -118,8 +117,7 @@ char        *LoginFailed = "LoginFailed\n";
 
 #define h2b(x) (isdigit((x))?(x)-'0':(isupper((x))?(x)-'A':(x)-'a')+10)
 
-int cq_k4login( in, out )
-    struct papfile     *in, *out;
+int cq_k4login( struct papfile *in, struct papfile *out)
 {
     char               *start, *p;
     int                        linelength, crlflength;
@@ -175,8 +173,7 @@ int cq_k4login( in, out )
 
 char   *uameth = "UMICHKerberosIV\n*\n";
 
-int cq_uameth( in, out )
-    struct papfile     *in, *out;
+int cq_uameth( struct papfile *in, struct papfile *out)
 {
     char               *start;
     int                        linelength, crlflength;
@@ -216,8 +213,7 @@ int cq_uameth( in, out )
 }
 #endif /* KRB */
 
-int gq_true( out )
-    struct papfile     *out;
+int gq_true( struct papfile *out)
 {
     if ( printer->p_flags & P_SPOOLED ) {
        append( out, "true\n", 5 );
@@ -227,8 +223,7 @@ int gq_true( out )
     }
 }
 
-int gq_pagecost( out )
-    struct papfile     *out;
+int gq_pagecost( struct papfile *out)
 {
     char               cost[ 60 ];
 
@@ -250,8 +245,7 @@ int gq_pagecost( out )
 }
 
 #ifdef ABS_PRINT
-int gq_balance( out )
-    struct papfile     *out;
+int gq_balance( struct papfile *out)
 {
     char               balance[ 60 ];
 
@@ -271,8 +265,7 @@ int gq_balance( out )
 
 static const char *spoolerid = "(PAPD Spooler) 1.0 (" VERSION ")\n";
 
-int gq_rbispoolerid( out )
-    struct papfile     *out;
+int gq_rbispoolerid( struct papfile *out)
 {
     append( out, spoolerid, strlen( spoolerid ));
     return(0);
@@ -286,8 +279,7 @@ int gq_rbispoolerid( out )
 
 static const char *nouams = "*\n";
 
-int gq_rbiuamlist( out )
-    struct papfile      *out;
+int gq_rbiuamlist( struct papfile *out)
 {
     char uamnames[128] = "\0";
 
@@ -322,8 +314,7 @@ struct genquery {
     { NULL, NULL },
 };
 
-int cq_query( in, out )
-    struct papfile     *in, *out;
+int cq_query( struct papfile *in, struct papfile *out)
 {
     char               *start, *stop, *p, *q;
     int                        linelength, crlflength;
@@ -392,9 +383,7 @@ int cq_query( in, out )
     }
 }
 
-void cq_font_answer( start, stop, out )
-    char               *start, *stop;
-    struct papfile     *out;
+void cq_font_answer( char *start, char *stop, struct papfile *out)
 {
     char               *p, *q, buf[ 256 ];
     struct ppd_font    *pfo;
@@ -431,8 +420,7 @@ void cq_font_answer( start, stop, out )
     return;
 }
 
-int cq_font( in, out )
-    struct papfile     *in, *out;
+int cq_font(struct papfile *in, struct papfile *out)
 {
     char               *start, *stop, *p;
     int                        linelength, crlflength;
@@ -493,8 +481,7 @@ int cq_font( in, out )
     }
 }
 
-int cq_feature( in, out )
-    struct papfile     *in, *out;
+int cq_feature( struct papfile *in, struct papfile *out)
 {
     char               *start, *stop, *p;
     int                        linelength, crlflength;
@@ -555,8 +542,7 @@ int cq_feature( in, out )
 static const char      *psver = "*PSVersion\n";
 static const char      *prod = "*Product\n";
 
-int cq_printer( in, out )
-    struct papfile     *in, *out;
+int cq_printer(struct papfile *in, struct papfile *out)
 {
     char               *start, *p;
     int                        linelength, crlflength;
@@ -636,8 +622,7 @@ int cq_printer( in, out )
 static const char      *rmjobfailed = "Failed\n";
 static const char      *rmjobok = "Ok\n";
 
-int cq_rmjob( in, out )
-    struct papfile     *in, *out;
+int cq_rmjob( struct papfile *in, struct papfile *out)
 {
     char               *start, *stop, *p;
     int                        linelength, crlflength;
@@ -680,8 +665,7 @@ int cq_rmjob( in, out )
     return( CH_DONE );
 }
 
-int cq_listq( in, out )
-    struct papfile     *in, *out;
+int cq_listq( struct papfile *in, struct papfile *out)
 {
     char               *start;
     int                        linelength, crlflength;
@@ -720,8 +704,7 @@ SecurityViolation: Unknown user, incorrect password or log on is \
 disabled ]%%\r%%[Flushing: rest of job (to end-of-file) will be \
 ignored ]%%\r";
 
-int cq_rbilogin( in, out )
-    struct papfile      *in, *out;
+int cq_rbilogin( struct papfile *in, struct papfile *out)
 {
     char               *start, *stop, *p, *begin;
     int                        linelength, crlflength;
index 9b6b914a3de72a3e6eb3065ccbf1889a34a23370..3dcb3a4c31e381c8f85099499e98e29dc6d1ff91 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: session.c,v 1.16 2008-11-14 10:29:08 didg Exp $
+ * $Id: session.c,v 1.17 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -62,9 +62,7 @@ struct iovec  iov[ PAP_MAXQUANTUM ] = {
  * Read lines of a file, until the client sends eof, after
  * which we'll send eof also.
  */
-int session( atp, sat )
-    ATP                        atp;
-    struct sockaddr_at *sat;
+int session(ATP atp, struct sockaddr_at *sat)
 {
     struct timeval     tv;
     struct atp_block   atpb;
index 3485df7be0676d650292581f62dcb841c75b1bfb..d023204827ff27b97cf610f16beaa9244bd485ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: showppd.c,v 1.6 2005-04-28 20:49:49 bfernhomberg Exp $
+ * $Id: showppd.c,v 1.7 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -26,9 +26,7 @@ extern struct ppd_font                *ppd_fonts;
 extern struct ppd_feature      ppd_features[];
 
 
-int main( ac, av )
-    int                ac;
-    char       **av;
+int main(int ac, char **av)
 {
     struct ppd_feature *pfe;
     struct ppd_font    *pfo;
index 0ae2ddc94988cd035787533b7537e5b289088833..0cc9156a2b78e5356dbf899de246c2f7ddc2d213 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uam_auth.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ * $Id: uam_auth.h,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
@@ -29,15 +29,15 @@ struct uam_obj {
   int uam_count;
   union {
     struct {
-      int (*login) __P((void *, struct passwd **, 
-                       char *, int, char *, int *));
-      int (*logincont) __P((void *, struct passwd **, char *,
-                           int, char *, int *));
-      void (*logout) __P((void));
+      int (*login) (void *, struct passwd **, 
+                       char *, int, char *, int *);
+      int (*logincont) (void *, struct passwd **, char *,
+                           int, char *, int *);
+      void (*logout) (void);
     } uam_login;
-    int (*uam_changepw) __P((void *, char *, struct passwd *, char *,
-                            int, char *, int *));
-    int (*uam_printer) __P((char *, char *, char *, struct papfile *));
+    int (*uam_changepw) (void *, char *, struct passwd *, char *,
+                            int, char *, int *);
+    int (*uam_printer) (char *, char *, char *, struct papfile *);
   } u;
   struct uam_obj *uam_prev, *uam_next;
 };
@@ -59,15 +59,15 @@ struct uam_obj {
                 (((type) == UAM_SERVER_PRINTAUTH) ? &uam_printer : NULL)))
 
 
-extern struct uam_mod *uam_load __P((const char *, const char *));
-extern void uam_unload __P((struct uam_mod *));
+extern struct uam_mod *uam_load (const char *, const char *);
+extern void uam_unload (struct uam_mod *);
 
 /* auth.c */
-int auth_load __P((const char *, const char *));
-int auth_register __P((const int, struct uam_obj *));
+int auth_load (const char *, const char *);
+int auth_register (const int, struct uam_obj *);
 #define auth_unregister(a) uam_detach(a)
-struct uam_obj *auth_uamfind __P((const int, const char *, const int));
-void auth_unload __P((void));
-int getuamnames __P((const int, char *));
+struct uam_obj *auth_uamfind (const int, const char *, const int);
+void auth_unload (void);
+int getuamnames (const int, char *);
 
 #endif /* uam_auth.h */
index 82bc4f211a5d4d013919d9127cf1949a44b6eef8..2606a7c51060d5be82169b1ca30520951dd165db 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: psa.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ * $Id: psa.c,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -28,9 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-int main( ac, av )
-    int                ac;
-    char       **av;
+int main( int ac, char **av)
 {
     FILE       *af;
     char       *acc, *user, *host;
index c4db9b9988d1e4be0dfc554deeca9eb483061c40..94d95d82242361487c4b180b1c1fe8ddc6c8be2f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: psf.c,v 1.9 2005-04-28 20:49:49 bfernhomberg Exp $
+ * $Id: psf.c,v 1.10 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -91,9 +91,7 @@ struct papersize {
     { 80, 70, 8.27, 11.69 },                   /* A4 */
 };
 
-int main( ac, av ) 
-    int                ac;
-    char       **av;
+int main( int ac, char **av)
 {
     int                        c, rc, children = 0;
 #ifdef FUCKED
@@ -368,7 +366,7 @@ restart:
     exit( rc );
 }
 
-int copyio()
+int copyio(void)
 {
     /* implement the FSM needed to do the suspend. Note that
      * the last characters will be \031\001 so don't worry
@@ -482,7 +480,7 @@ char                pspro[] = "\
 /EP { SV restore showpage } bind def\n\
 %%EndProlog\n";
 
-int textps()
+int textps(void)
 {
     struct papersize   papersize;
     int                        state = 0, line = 0, col = 0, npages = 0, rc;
@@ -691,8 +689,7 @@ out:
  * Manipulates file descriptors 0, 1, and 2, such that the new child
  * is reading from the parent's output.
  */
-int pexecv( path, argv )
-    char       *path, *argv[];
+int pexecv( char *path, char *argv[])
 {
     int                fd[ 2 ], c;
 
index 57cc523b4108091a529c5e9da0822b5b30ee6322..94c3377dc4d4526ac6d55ead3617e3f32e21a316 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_dhx2_pam.c,v 1.6 2009-01-15 04:16:32 didg Exp $
+ * $Id: uams_dhx2_pam.c,v 1.7 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
@@ -720,7 +720,7 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
 
 
 /* logout */
-static void pam_logout() {
+static void pam_logout(void) {
     pam_close_session(pamh, 0);
     pam_end(pamh, 0);
     pamh = NULL;
index 37e4066580505c8d71dcaf96f71bf52b48f7fe12..d50950cd2fbb6c1623e3f1fac20384bc752b93bf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_dhx_pam.c,v 1.29 2008-12-03 19:31:50 didg Exp $
+ * $Id: uams_dhx_pam.c,v 1.30 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -554,7 +554,7 @@ logincont_err:
 }
 
 /* logout */
-static void pam_logout() {
+static void pam_logout(void) {
     pam_close_session(pamh, 0);
     pam_end(pamh, 0);
     pamh = NULL;
index 0b7f000bdca079b79d4e1530ac9f5002d6574d2c..97c934b0b7c1b62eafed0da7124cbf6dffa66ff0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_guest.c,v 1.14 2009-09-14 00:02:21 didg Exp $
+ * $Id: uams_guest.c,v 1.15 2009-10-13 22:55:37 didg Exp $
  *
  * (c) 2001 (see COPYING)
  */
@@ -38,7 +38,9 @@ char *strchr (), *strrchr ();
 #define MIN(a,b) ((a) < (b) ? (a) : (b))
 #endif /* MIN */
 
-extern void append(void *, const char *, int);
+/*XXX in etc/papd/file.h */
+struct papfile;
+extern void append(struct papfile *, const char *, int);
 
 /* login and login_ext are almost the same */
 static int noauth_login(void *obj, struct passwd **uam_pwd,
@@ -86,9 +88,7 @@ static int noauth_login_ext(void *obj, char *uname _U_, struct passwd **uam_pwd,
 
 
 /* Printer NoAuthUAM Login */
-int noauth_printer(start, stop, username, out)
-       char    *start, *stop, *username;
-       struct papfile  *out;
+int noauth_printer(char *start, char *stop, char *username, struct papfile *out)
 {
     char       *data, *p, *q;
     static const char *loginok = "0\r";
@@ -149,7 +149,7 @@ static int uam_setup(const char *path)
   return 0;
 }
 
-static void uam_cleanup()
+static void uam_cleanup(void)
 {
   uam_unregister(UAM_SERVER_LOGIN, "No User Authent");
   uam_unregister(UAM_SERVER_PRINTAUTH, "NoAuthUAM");
index 2600e7989331be8d9d31ebca54a40945691cb66b..afa62cd93578688f0882155b3837d0843e7462fe 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_pam.c,v 1.18 2009-09-14 00:02:21 didg Exp $
+ * $Id: uams_pam.c,v 1.19 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -59,7 +59,9 @@ static char *hostname;
 static char *PAM_username;
 static char *PAM_password;
 
-extern void append(void *, const char *, int);
+/*XXX in etc/papd/file.h */
+struct papfile;
+extern void append(struct papfile *, const char *, int);
 
 /* PAM conversation function
  * Here we assume (for now, at least) that echo on means login name, and
@@ -274,7 +276,7 @@ static int pam_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
 }
 
 /* logout */
-static void pam_logout() {
+static void pam_logout(void) {
     pam_close_session(pamh, 0);
     pam_end(pamh, 0);
     pamh = NULL;
@@ -341,9 +343,7 @@ static int pam_changepw(void *obj _U_, char *username,
 
 
 /* Printer ClearTxtUAM login */
-int pam_printer(start, stop, username, out)
-        char    *start, *stop, *username;
-       struct papfile  *out;
+int pam_printer(char *start, char *stop, char *username, struct papfile *out)
 {
     int PAM_error;
     char       *data, *p, *q;
index 5fcdce5661eaf95fa04160b75d6816bf90c50008..799cdc28360e26d003e03e908783c15749694de3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_passwd.c,v 1.25 2009-09-14 00:02:21 didg Exp $
+ * $Id: uams_passwd.c,v 1.26 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -71,7 +71,9 @@ char *strchr (), *strrchr ();
 static char *clientname;
 #endif /* TRU64 */
 
-extern void append(void *, const char *, int);
+/*XXX in etc/papd/file.h */
+struct papfile;
+extern void append(struct papfile *, const char *, int);
 
 static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pwd,
                         char *ibuf, int ibuflen,
@@ -271,9 +273,7 @@ static int passwd_changepw(void *obj, char *username,
 
 
 /* Printer ClearTxtUAM login */
-static int passwd_printer(start, stop, username, out)
-char   *start, *stop, *username;
-struct papfile *out;
+static int passwd_printer(char *start, char *stop, char *username, struct papfile *out)
 {
     struct passwd *pwd;
 #ifdef SHADOWPW
index 580bff6afd70e8413c6984eb626b48c2b7f0576b..a9cd08bd69b4b399d36a51709dd9ad16787abf3b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: adouble.h,v 1.43 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: adouble.h,v 1.44 2009-10-13 22:55:37 didg Exp $
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
  *
@@ -432,42 +432,42 @@ struct adouble_fops {
 #define ad_get_MD_flags(ad) ((ad)->ad_md->adf_flags)
 
 /* ad_flush.c */
-extern int ad_rebuild_adouble_header __P((struct adouble *));
-extern int ad_rebuild_sfm_header __P((struct adouble *));
-extern int ad_copy_header __P((struct adouble *, struct adouble *));
-extern int ad_flush __P((struct adouble *));
-extern int ad_close __P((struct adouble *, int));
+extern int ad_rebuild_adouble_header (struct adouble *);
+extern int ad_rebuild_sfm_header (struct adouble *);
+extern int ad_copy_header (struct adouble *, struct adouble *);
+extern int ad_flush (struct adouble *);
+extern int ad_close (struct adouble *, int);
 
 /* ad_lock.c */
-extern int ad_fcntl_lock    __P((struct adouble *, const u_int32_t /*eid*/,
+extern int ad_fcntl_lock    (struct adouble *, const u_int32_t /*eid*/,
                                  const int /*type*/, const off_t /*offset*/,
-                                 const off_t /*len*/, const int /*user*/));
-extern void ad_fcntl_unlock __P((struct adouble *, const int /*user*/));
-extern int ad_fcntl_tmplock __P((struct adouble *, const u_int32_t /*eid*/,
+                                 const off_t /*len*/, const int /*user*/);
+extern void ad_fcntl_unlock (struct adouble *, const int /*user*/);
+extern int ad_fcntl_tmplock (struct adouble *, const u_int32_t /*eid*/,
                                  const int /*type*/, const off_t /*offset*/,
-                                 const off_t /*len*/, const int /*user*/));
-extern int ad_testlock      __P((struct adouble * /*adp*/, int /*eid*/, off_t /*off*/));
-extern int ad_excl_lock     __P((struct adouble * /*adp*/, const u_int32_t /*eid*/));
+                                 const off_t /*len*/, const int /*user*/);
+extern int ad_testlock      (struct adouble * /*adp*/, int /*eid*/, off_t /*off*/);
+extern int ad_excl_lock     (struct adouble * /*adp*/, const u_int32_t /*eid*/);
 
 #define ad_lock ad_fcntl_lock
 #define ad_tmplock ad_fcntl_tmplock
 #define ad_unlock ad_fcntl_unlock
 
 /* ad_open.c */
-extern int ad_setfuid     __P((const uid_t ));
-extern uid_t ad_getfuid   __P((void ));
-extern char *ad_dir       __P((const char *));
-extern char *ad_path      __P((const char *, int));
-extern char *ad_path_osx  __P((const char *, int));
-extern char *ad_path_ads  __P((const char *, int));
-extern char *ad_path_sfm  __P((const char *, int));
-extern int ad_mode        __P((const char *, int));
-extern int ad_mkdir       __P((const char *, int));
-extern void ad_init       __P((struct adouble *, int, int ));
-extern int ad_open        __P((const char *, int, int, int, struct adouble *));
-extern int ad_refresh     __P((struct adouble *));
-extern int ad_stat        __P((const char *, struct stat *));
-extern int ad_metadata    __P((const char *, int, struct adouble *));
+extern int ad_setfuid     (const uid_t );
+extern uid_t ad_getfuid   (void );
+extern char *ad_dir       (const char *);
+extern char *ad_path      (const char *, int);
+extern char *ad_path_osx  (const char *, int);
+extern char *ad_path_ads  (const char *, int);
+extern char *ad_path_sfm  (const char *, int);
+extern int ad_mode        (const char *, int);
+extern int ad_mkdir       (const char *, int);
+extern void ad_init       (struct adouble *, int, int );
+extern int ad_open        (const char *, int, int, int, struct adouble *);
+extern int ad_refresh     (struct adouble *);
+extern int ad_stat        (const char *, struct stat *);
+extern int ad_metadata    (const char *, int, struct adouble *);
 
 #define ad_open_metadata(name, flags, mode, adp)\
    ad_open(name, ADFLAGS_MD|(flags), O_RDWR |(mode), 0666, (adp))
@@ -500,54 +500,54 @@ static inline mode_t ad_hf_mode (mode_t mode)
 }
 
 /* ad_read.c/ad_write.c */
-extern ssize_t ad_read __P((struct adouble *, const u_int32_t,
-                            const off_t, char *, const size_t));
-extern ssize_t ad_pread __P((struct ad_fd *, void *, size_t, off_t));
-extern ssize_t ad_write __P((struct adouble *, const u_int32_t, off_t,
-                             const int, const char *, const size_t));
-extern ssize_t adf_pread  __P((struct ad_fd *, void *, size_t, off_t));
-extern ssize_t adf_pwrite __P((struct ad_fd *, const void *, size_t, off_t));
-extern int     ad_dtruncate __P((struct adouble *, const off_t));
-extern int     ad_rtruncate __P((struct adouble *, const off_t));
+extern ssize_t ad_read (struct adouble *, const u_int32_t,
+                            const off_t, char *, const size_t);
+extern ssize_t ad_pread (struct ad_fd *, void *, size_t, off_t);
+extern ssize_t ad_write (struct adouble *, const u_int32_t, off_t,
+                             const int, const char *, const size_t);
+extern ssize_t adf_pread  (struct ad_fd *, void *, size_t, off_t);
+extern ssize_t adf_pwrite (struct ad_fd *, const void *, size_t, off_t);
+extern int     ad_dtruncate (struct adouble *, const off_t);
+extern int     ad_rtruncate (struct adouble *, const off_t);
 
 /* ad_size.c */
-extern off_t ad_size __P((const struct adouble *, const u_int32_t ));
+extern off_t ad_size (const struct adouble *, const u_int32_t );
 
 /* ad_mmap.c */
-extern void *ad_mmapread __P((struct adouble *, const u_int32_t,
-                              const off_t, const size_t));
-extern void *ad_mmapwrite __P((struct adouble *, const u_int32_t,
-                               const off_t, const int, const size_t));
+extern void *ad_mmapread (struct adouble *, const u_int32_t,
+                              const off_t, const size_t);
+extern void *ad_mmapwrite (struct adouble *, const u_int32_t,
+                               const off_t, const int, const size_t);
 #define ad_munmap(buf, len)  (munmap((buf), (len)))
 
 /* ad_date.c */
-extern int ad_setdate __P((const struct adouble *, unsigned int, u_int32_t));
-extern int ad_getdate __P((const struct adouble *, unsigned int, u_int32_t *));
+extern int ad_setdate (const struct adouble *, unsigned int, u_int32_t);
+extern int ad_getdate (const struct adouble *, unsigned int, u_int32_t *);
 
 /* ad_attr.c */
-extern int       ad_setattr __P((const struct adouble *, const u_int16_t));
-extern int       ad_getattr __P((const struct adouble *, u_int16_t *));
+extern int       ad_setattr (const struct adouble *, const u_int16_t);
+extern int       ad_getattr (const struct adouble *, u_int16_t *);
 
 /* Note: starting with Netatalk 2.1 we do NOT alway set the name */
-extern int       ad_setname __P((struct adouble *, const char *));
+extern int       ad_setname (struct adouble *, const char *);
 
 #if AD_VERSION == AD_VERSION2
-extern int       ad_setid __P((struct adouble *, const dev_t dev,const ino_t ino, const u_int32_t, const u_int32_t, const void *));
-extern u_int32_t ad_getid __P((struct adouble *, const dev_t, const ino_t, const cnid_t, const void *));
-extern u_int32_t ad_forcegetid __P((struct adouble *adp));
+extern int       ad_setid (struct adouble *, const dev_t dev,const ino_t ino, const u_int32_t, const u_int32_t, const void *);
+extern u_int32_t ad_getid (struct adouble *, const dev_t, const ino_t, const cnid_t, const void *);
+extern u_int32_t ad_forcegetid (struct adouble *adp);
 #else
 #define ad_setid(a, b, c)
 #endif
 
 #ifdef WITH_SENDFILE
-extern ssize_t ad_readfile __P((const struct adouble *, const int,
-                                const int, off_t, const size_t));
+extern ssize_t ad_readfile (const struct adouble *, const int,
+                                const int, off_t, const size_t);
 #endif
 
 #if 0
 #ifdef HAVE_SENDFILE_WRITE
-extern ssize_t ad_writefile __P((struct adouble *, const int,
-                                 const int, off_t, const int, const size_t));
+extern ssize_t ad_writefile (struct adouble *, const int,
+                                 const int, off_t, const int, const size_t);
 #endif /* HAVE_SENDFILE_WRITE */
 #endif /* 0 */
 
index 4db53a40a9f60dac7111b8ebf5161c635e264e49..7c555e481ad9ecec304e50eeaf988b57c4e51499 100644 (file)
@@ -87,18 +87,18 @@ typedef struct ASP {
 #define ASPERR_TOOMANY 0xfbce
 #define ASPERR_NOACK   0xfbcd
 
-extern ASP asp_init         __P((ATP));
-extern void asp_setstatus   __P((ASP, char *, const int));
-extern ASP asp_getsession   __P((ASP, server_child *, const int));
-extern int asp_close        __P((ASP));
-extern int asp_shutdown     __P((ASP));
-extern int asp_attention    __P((ASP, AFPUserBytes));
-extern int asp_getrequest   __P((ASP));
-extern int asp_cmdreply     __P((ASP, int));
-extern int asp_wrtcont      __P((ASP, char *, int *));
+extern ASP asp_init         (ATP);
+extern void asp_setstatus   (ASP, char *, const int);
+extern ASP asp_getsession   (ASP, server_child *, const int);
+extern int asp_close        (ASP);
+extern int asp_shutdown     (ASP);
+extern int asp_attention    (ASP, AFPUserBytes);
+extern int asp_getrequest   (ASP);
+extern int asp_cmdreply     (ASP, int);
+extern int asp_wrtcont      (ASP, char *, int *);
 #define asp_wrtreply(a,b)   asp_cmdreply((a), (b))
-extern void asp_kill        __P((int));
-extern int asp_tickle      __P((ASP, const u_int8_t, struct sockaddr_at *));
-extern void asp_stop_tickle __P((void));
+extern void asp_kill        (int);
+extern int asp_tickle      (ASP, const u_int8_t, struct sockaddr_at *);
+extern void asp_stop_tickle (void);
 
 #endif
index e859312830d4f932b9d447d116e6e5c8838b9d3a..48e5dfdd0edccb2b3b2e31317a8479d324763547 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atp.h,v 1.4 2002-02-07 23:35:49 srittau Exp $
+ * $Id: atp.h,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -180,14 +180,14 @@ struct atp_block {
 #define ATP_TRESP      (2<<6)          /* Trans. RESPonse */
 #define ATP_TREL       (3<<6)          /* Trans. RELease */
 
-extern ATP             atp_open  __P((u_int8_t, 
-                                      const struct at_addr *));
-extern int             atp_close __P((ATP));
-extern int             atp_sreq  __P((ATP, struct atp_block *, int, 
-                                      u_int8_t));
-extern int             atp_rresp __P((ATP, struct atp_block *));
-extern int             atp_rsel  __P((ATP, struct sockaddr_at *, int));
-extern int             atp_rreq  __P((ATP, struct atp_block *));
-extern int             atp_sresp __P((ATP, struct atp_block *));
+extern ATP             atp_open  (u_int8_t, 
+                                      const struct at_addr *);
+extern int             atp_close (ATP);
+extern int             atp_sreq  (ATP, struct atp_block *, int, 
+                                      u_int8_t);
+extern int             atp_rresp (ATP, struct atp_block *);
+extern int             atp_rsel  (ATP, struct sockaddr_at *, int);
+extern int             atp_rreq  (ATP, struct atp_block *);
+extern int             atp_sresp (ATP, struct atp_block *);
 
 #endif
index 7bd9983d62fb85380bb07e1ca075223a93a83f0a..6820f7ba5f110d4b61b22326db81820c59ecb63c 100644 (file)
@@ -21,8 +21,8 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-extern int flock __P((int, int));
-extern int inet_aton __P((const char *, struct in_addr *));
+extern int flock (int, int);
+extern int inet_aton (const char *, struct in_addr *);
 #else /* __svr4__ */
 
 #ifdef sun
@@ -66,8 +66,8 @@ extern int inet_aton __P((const char *, struct in_addr *));
 #define SA_RESTART     0
 #endif
 
-extern char *strdup __P((const char *));
-extern int inet_aton __P((const char *, struct in_addr *));
+extern char *strdup (const char *);
+extern int inet_aton (const char *, struct in_addr *);
 #endif /* ultrix */
 
 #ifdef BSD4_4
@@ -77,7 +77,7 @@ extern int inet_aton __P((const char *, struct in_addr *));
 #endif /* BSD4_4 */
 
 #if defined(ultrix) || defined(_IBMR2) || defined(NEED_GETUSERSHELL)
-extern char *getusershell __P((void));
+extern char *getusershell (void);
 #endif
 
 #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
index 13609048191226e6e972d15409b7bf163899d23d..91cee9ba1ef2b1b520a0ac14bad739fc2da11bc0 100644 (file)
@@ -138,47 +138,47 @@ typedef struct DSI {
 #define DSI_AFPOVERTCP_PORT 548
 
 /* basic initialization: dsi_init.c */
-extern DSI *dsi_init __P((const dsi_proto /*protocol*/,
+extern DSI *dsi_init (const dsi_proto /*protocol*/,
                          const char * /*program*/, 
                          const char * /*host*/, const char * /*address*/,
                          const int /*port*/, const int /*proxy*/,
-                         const u_int32_t /* server quantum */));
-extern void dsi_setstatus __P((DSI *, char *, const size_t));
+                         const u_int32_t /* server quantum */);
+extern void dsi_setstatus (DSI *, char *, const size_t);
 
 /* in dsi_getsess.c */
-extern DSI *dsi_getsession __P((DSI *, server_child *, const int));
-extern void dsi_kill __P((int));
+extern DSI *dsi_getsession (DSI *, server_child *, const int);
+extern void dsi_kill (int);
 
 
 /* DSI Commands: individual files */
-extern void dsi_opensession __P((DSI *));
-extern int  dsi_attention __P((DSI *, AFPUserBytes));
-extern int  dsi_cmdreply __P((DSI *, const int));
-extern int dsi_tickle __P((DSI *));
-extern void dsi_getstatus __P((DSI *));
-extern void dsi_close __P((DSI *));
-extern void dsi_sleep __P((DSI *, const int ));
+extern void dsi_opensession (DSI *);
+extern int  dsi_attention (DSI *, AFPUserBytes);
+extern int  dsi_cmdreply (DSI *, const int);
+extern int dsi_tickle (DSI *);
+extern void dsi_getstatus (DSI *);
+extern void dsi_close (DSI *);
+extern void dsi_sleep (DSI *, const int );
 
 /* set, unset socket blocking mode */
-extern int dsi_block __P((DSI *, const int));
+extern int dsi_block (DSI *, const int);
 
 /* low-level stream commands -- in dsi_stream.c */
-extern size_t dsi_stream_write __P((DSI *, void *, const size_t, const int mode));
-extern size_t dsi_stream_read __P((DSI *, void *, const size_t));
-extern int dsi_stream_send __P((DSI *, void *, size_t));
-extern int dsi_stream_receive __P((DSI *, void *, const size_t, size_t *));
+extern size_t dsi_stream_write (DSI *, void *, const size_t, const int mode);
+extern size_t dsi_stream_read (DSI *, void *, const size_t);
+extern int dsi_stream_send (DSI *, void *, size_t);
+extern int dsi_stream_receive (DSI *, void *, const size_t, size_t *);
 
 /* client writes -- dsi_write.c */
-extern size_t dsi_writeinit __P((DSI *, void *, const size_t));
-extern size_t dsi_write __P((DSI *, void *, const size_t));
-extern void   dsi_writeflush __P((DSI *));
+extern size_t dsi_writeinit (DSI *, void *, const size_t);
+extern size_t dsi_write (DSI *, void *, const size_t);
+extern void   dsi_writeflush (DSI *);
 #define dsi_wrtreply(a,b)  dsi_cmdreply(a,b)
 
 /* client reads -- dsi_read.c */
-extern ssize_t dsi_readinit __P((DSI *, void *, const size_t, const size_t,
-                                const int));
-extern ssize_t dsi_read __P((DSI *, void *, const size_t));
-extern void dsi_readdone __P((DSI *));
+extern ssize_t dsi_readinit (DSI *, void *, const size_t, const size_t,
+                                const int);
+extern ssize_t dsi_read (DSI *, void *, const size_t);
+extern void dsi_readdone (DSI *);
 
 /* some useful macros */
 #define dsi_serverID(x)   ((x)->serverID++)
index e917adfa34bdf29830ca6e9a407883a7e62304a2..aa4190446a355b3938caa6eeb120e8e5743b3b99 100644 (file)
@@ -84,13 +84,13 @@ struct nbpnve {
 #define NBPMATCH_NOGLOB        (1<<1)
 #define NBPMATCH_NOZONE        (1<<2)
 
-extern int nbp_name __P((const char *, char **, char **, char **));
-extern int nbp_lookup __P((const char *, const char *, const char *,
+extern int nbp_name (const char *, char **, char **, char **);
+extern int nbp_lookup (const char *, const char *, const char *,
                           struct nbpnve *, const int, 
-                          const struct at_addr *));
-extern int nbp_rgstr __P((struct sockaddr_at *, 
-                         const char *, const char *, const char *));
-extern int nbp_unrgstr __P((const char *, const char *, const char *,
-                           const struct at_addr *));
+                          const struct at_addr *);
+extern int nbp_rgstr (struct sockaddr_at *, 
+                         const char *, const char *, const char *);
+extern int nbp_unrgstr (const char *, const char *, const char *,
+                           const struct at_addr *);
 
 #endif
index 4fa5a582d8f75dee873b35dd3cc38655a0ae26fc..bf1c9bd3a8007407c8a3739597ab3f9835432830 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: netddp.h,v 1.3 2002-02-07 23:35:49 srittau Exp $
+ * $Id: netddp.h,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
 #include <sys/socket.h>
 #include <netatalk/at.h>
 
-extern int netddp_open   __P((struct sockaddr_at *, struct sockaddr_at *));
+extern int netddp_open   (struct sockaddr_at *, struct sockaddr_at *);
 
 #if !defined(NO_DDP) && defined(MACOSX_SERVER)
-extern int netddp_sendto __P((int, void *, size_t, unsigned int, 
-                          const struct sockaddr *, unsigned int));
-extern int netddp_recvfrom __P((int, void *, int, unsigned int, 
-                            struct sockaddr *, unsigned int *));
+extern int netddp_sendto (int, void *, size_t, unsigned int, 
+                          const struct sockaddr *, unsigned int);
+extern int netddp_recvfrom (int, void *, int, unsigned int, 
+                            struct sockaddr *, unsigned int *);
 #define netddp_close(a)  ddp_close(a)
 #else
 #include <unistd.h>
index aeee9439bc33469ad77f140f759b5910e8dc38b3..8479367bb4f42b2c8786d0ce4a48145aef07b659 100644 (file)
@@ -24,18 +24,18 @@ typedef struct server_child {
 } server_child;
 
 /* server_child.c */
-extern server_child *server_child_alloc __P((const int, const int));
-extern int server_child_add __P((server_child *, const int, const pid_t));
-extern int server_child_remove __P((server_child *, const int, const pid_t));
-extern void server_child_free __P((server_child *));
-
-extern void server_child_kill __P((server_child *, const int, const int));
-extern void server_child_kill_one __P((server_child *children, const int forkid, const pid_t, const uid_t));
-extern void server_child_kill_one_by_id __P((server_child *children, const int forkid, const pid_t pid, const uid_t,
-                                               const u_int32_t len, char *id, u_int32_t boottime));
-
-extern void server_child_setup __P((server_child *, const int, void (*)()));
-extern void server_child_handler __P((server_child *));
-extern void server_reset_signal __P((void));
+extern server_child *server_child_alloc (const int, const int);
+extern int server_child_add (server_child *, const int, const pid_t);
+extern int server_child_remove (server_child *, const int, const pid_t);
+extern void server_child_free (server_child *);
+
+extern void server_child_kill (server_child *, const int, const int);
+extern void server_child_kill_one (server_child *children, const int forkid, const pid_t, const uid_t);
+extern void server_child_kill_one_by_id (server_child *children, const int forkid, const pid_t pid, const uid_t,
+                                               const u_int32_t len, char *id, u_int32_t boottime);
+
+extern void server_child_setup (server_child *, const int, void (*)(const pid_t));
+extern void server_child_handler (server_child *);
+extern void server_reset_signal (void);
 
 #endif
index e161b6859c1771c89288382b623b956808c09799..ffab8f01e375705173efdec62ac5369e9ecef984 100644 (file)
@@ -78,29 +78,29 @@ struct session_info {
 };
 
 /* register and unregister uams with these functions */
-extern int uam_register __P((const int, const char *, const char *, ...));
-extern void uam_unregister __P((const int, const char *));
+extern int uam_register (const int, const char *, const char *, ...);
+extern void uam_unregister (const int, const char *);
 
 /* helper functions */
-extern struct passwd *uam_getname __P((void*, char *, const int));
-extern int uam_checkuser __P((const struct passwd *));
+extern struct passwd *uam_getname (void*, char *, const int);
+extern int uam_checkuser (const struct passwd *);
 
 /* afp helper functions */
-extern int uam_afp_read __P((void *, char *, int *,
-                            int (*)(void *, void *, const int)));
-extern int uam_afpserver_option __P((void *, const int, void *, int *));
+extern int uam_afp_read (void *, char *, int *,
+                            int (*)(void *, void *, const int));
+extern int uam_afpserver_option (void *, const int, void *, int *);
 #ifdef TRU64
-extern void uam_afp_getcmdline __P((int *, char ***));
-extern int uam_sia_validate_user __P((sia_collect_func_t *, int, char **,
+extern void uam_afp_getcmdline (int *, char ***);
+extern int uam_sia_validate_user (sia_collect_func_t *, int, char **,
                                      char *, char *, char *, int, char *,
-                                     char *));
+                                     char *);
 #endif /* TRU64 */
 
 /* switch.c */
 #define UAM_AFPSERVER_PREAUTH  (0)
 #define UAM_AFPSERVER_POSTAUTH (1 << 0)
 
-extern int uam_afpserver_action __P((const int /*id*/, const int /*switch*/, 
-                                    int (*)(), int (**)()));
+extern int uam_afpserver_action (const int /*id*/, const int /*switch*/, 
+                                    int (*)(), int (**)());
 
 #endif
index e927b5eec24b2f55ef1373d8a6bfa164f9d58a7d..b24ee4a57c31721263bf41bd1ab754aec507e86a 100644 (file)
@@ -84,62 +84,62 @@ struct charset_functions {
 };
 
 /* from iconv.c */
-extern atalk_iconv_t   atalk_iconv_open __P((const char *, const char *));
-extern size_t          atalk_iconv __P((atalk_iconv_t, const char **, size_t *, char **, size_t *));
-extern int             atalk_iconv_close __P((atalk_iconv_t));
-extern struct charset_functions *find_charset_functions __P((const char *));
-extern int             atalk_register_charset __P((struct charset_functions *));
+extern atalk_iconv_t   atalk_iconv_open (const char *, const char *);
+extern size_t          atalk_iconv (atalk_iconv_t, const char **, size_t *, char **, size_t *);
+extern int             atalk_iconv_close (atalk_iconv_t);
+extern struct charset_functions *find_charset_functions (const char *);
+extern int             atalk_register_charset (struct charset_functions *);
 
 /* from util_unistr.c */
-extern ucs2_t  toupper_w  __P((ucs2_t));
-extern ucs2_t  tolower_w  __P((ucs2_t));
-extern int     strupper_w __P((ucs2_t *));
-extern int     strlower_w __P((ucs2_t *));
-extern int     islower_w  __P((ucs2_t));
-extern int     islower_w  __P((ucs2_t));
-extern size_t  strlen_w   __P((const ucs2_t *));
-extern size_t  strnlen_w  __P((const ucs2_t *, size_t));
-extern ucs2_t*         strchr_w   __P((const ucs2_t *, ucs2_t));
-extern int     strcmp_w   __P((const ucs2_t *, const ucs2_t *));
-extern int     strncmp_w  __P((const ucs2_t *, const ucs2_t *, size_t));
-extern int      strcasecmp_w  __P((const ucs2_t *, const ucs2_t *));
-extern int     strncasecmp_w __P((const ucs2_t *, const ucs2_t *, size_t));
-extern ucs2_t   *strcasestr_w __P((const ucs2_t *, const ucs2_t *));
-extern ucs2_t  *strndup_w __P((const ucs2_t *, size_t));
-extern ucs2_t          *strdup_w  __P((const ucs2_t *));
-extern ucs2_t  *strncpy_w __P((ucs2_t *, const ucs2_t *, const size_t));
-extern ucs2_t  *strncat_w __P((ucs2_t *, const ucs2_t *, const size_t));
-extern ucs2_t  *strcat_w  __P((ucs2_t *, const ucs2_t *));
-extern size_t  precompose_w __P((ucs2_t *, size_t, ucs2_t *,size_t *));
-extern size_t  decompose_w  __P((ucs2_t *, size_t, ucs2_t *,size_t *));
-extern size_t  utf8_charlen __P(( char* ));
-extern size_t  utf8_strlen_validate __P(( char *));
+extern ucs2_t  toupper_w  (ucs2_t);
+extern ucs2_t  tolower_w  (ucs2_t);
+extern int     strupper_w (ucs2_t *);
+extern int     strlower_w (ucs2_t *);
+extern int     islower_w  (ucs2_t);
+extern int     islower_w  (ucs2_t);
+extern size_t  strlen_w   (const ucs2_t *);
+extern size_t  strnlen_w  (const ucs2_t *, size_t);
+extern ucs2_t*         strchr_w   (const ucs2_t *, ucs2_t);
+extern int     strcmp_w   (const ucs2_t *, const ucs2_t *);
+extern int     strncmp_w  (const ucs2_t *, const ucs2_t *, size_t);
+extern int      strcasecmp_w  (const ucs2_t *, const ucs2_t *);
+extern int     strncasecmp_w (const ucs2_t *, const ucs2_t *, size_t);
+extern ucs2_t   *strcasestr_w (const ucs2_t *, const ucs2_t *);
+extern ucs2_t  *strndup_w (const ucs2_t *, size_t);
+extern ucs2_t          *strdup_w  (const ucs2_t *);
+extern ucs2_t  *strncpy_w (ucs2_t *, const ucs2_t *, const size_t);
+extern ucs2_t  *strncat_w (ucs2_t *, const ucs2_t *, const size_t);
+extern ucs2_t  *strcat_w  (ucs2_t *, const ucs2_t *);
+extern size_t  precompose_w (ucs2_t *, size_t, ucs2_t *,size_t *);
+extern size_t  decompose_w  (ucs2_t *, size_t, ucs2_t *,size_t *);
+extern size_t  utf8_charlen ( char* );
+extern size_t  utf8_strlen_validate ( char *);
 
 /* from charcnv.c */
-extern void    init_iconv __P((void));
-extern size_t  convert_string __P((charset_t, charset_t, void const *, size_t, void *, size_t));
-extern size_t  convert_string_allocate __P((charset_t, charset_t, void const *, size_t, char **));
-extern size_t  utf8_strupper __P((const char *, size_t, char *, size_t));
-extern size_t  utf8_strlower __P((const char *, size_t, char *, size_t));
-extern size_t  unix_strupper __P((const char *, size_t, char *, size_t));
-extern size_t  unix_strlower __P((const char *, size_t, char *, size_t));
-extern size_t  charset_strupper __P((charset_t, const char *, size_t, char *, size_t));
-extern size_t  charset_strlower __P((charset_t, const char *, size_t, char *, size_t));
-
-extern size_t  charset_to_ucs2_allocate __P((charset_t, ucs2_t **dest, const char *src));
-extern size_t  charset_to_utf8_allocate __P((charset_t, char **dest, const char *src));
-extern size_t  ucs2_to_charset_allocate __P((charset_t, char **dest, const ucs2_t *src));
-extern size_t  utf8_to_charset_allocate __P((charset_t, char **dest, const char *src));
-extern size_t  ucs2_to_charset __P((charset_t, const ucs2_t *src, char *dest, size_t));
-
-extern size_t  convert_charset __P((charset_t, charset_t, charset_t, char *, size_t, char *, size_t, u_int16_t *));
-
-extern size_t  charset_precompose __P(( charset_t, char *, size_t, char *, size_t));
-extern size_t  charset_decompose  __P(( charset_t, char *, size_t, char *, size_t));
-extern size_t  utf8_precompose __P(( char *, size_t, char *, size_t));
-extern size_t  utf8_decompose  __P(( char *, size_t, char *, size_t));
-
-extern charset_t add_charset __P((char* name));
+extern void    init_iconv (void);
+extern size_t  convert_string (charset_t, charset_t, void const *, size_t, void *, size_t);
+extern size_t  convert_string_allocate (charset_t, charset_t, void const *, size_t, char **);
+extern size_t  utf8_strupper (const char *, size_t, char *, size_t);
+extern size_t  utf8_strlower (const char *, size_t, char *, size_t);
+extern size_t  unix_strupper (const char *, size_t, char *, size_t);
+extern size_t  unix_strlower (const char *, size_t, char *, size_t);
+extern size_t  charset_strupper (charset_t, const char *, size_t, char *, size_t);
+extern size_t  charset_strlower (charset_t, const char *, size_t, char *, size_t);
+
+extern size_t  charset_to_ucs2_allocate (charset_t, ucs2_t **dest, const char *src);
+extern size_t  charset_to_utf8_allocate (charset_t, char **dest, const char *src);
+extern size_t  ucs2_to_charset_allocate (charset_t, char **dest, const ucs2_t *src);
+extern size_t  utf8_to_charset_allocate (charset_t, char **dest, const char *src);
+extern size_t  ucs2_to_charset (charset_t, const ucs2_t *src, char *dest, size_t);
+
+extern size_t  convert_charset (charset_t, charset_t, charset_t, char *, size_t, char *, size_t, u_int16_t *);
+
+extern size_t  charset_precompose ( charset_t, char *, size_t, char *, size_t);
+extern size_t  charset_decompose  ( charset_t, char *, size_t, char *, size_t);
+extern size_t  utf8_precompose ( char *, size_t, char *, size_t);
+extern size_t  utf8_decompose  ( char *, size_t, char *, size_t);
+
+extern charset_t add_charset (char* name);
 
 
 
index 4811b47d009e887284d54edfde0750e7c24f0052..736fab22cd5fb1823e6e8b903001eca9c687ed3c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: util.h,v 1.10 2009-10-02 09:32:40 franklahm Exp $
+ * $Id: util.h,v 1.11 2009-10-13 22:55:37 didg Exp $
  */
 
 #ifndef _ATALK_UTIL_H
 #define EXITERR_SYS  3  /* local system error */
 
 
-extern int     sys_ftruncate __P((int fd, off_t length));
+extern int     sys_ftruncate (int fd, off_t length);
 
 #ifdef WITH_SENDFILE
-extern ssize_t sys_sendfile __P((int __out_fd, int __in_fd, off_t *__offset,size_t __count));
+extern ssize_t sys_sendfile (int __out_fd, int __in_fd, off_t *__offset,size_t __count);
 #endif
 
 extern const int _diacasemap[], _dialowermap[];
@@ -32,27 +32,27 @@ extern void freeifacelist(char **);
 
 #define diatolower(x)     _dialowermap[(unsigned char) (x)]
 #define diatoupper(x)     _diacasemap[(unsigned char) (x)]
-extern int atalk_aton     __P((char *, struct at_addr *));
-extern void bprint        __P((char *, int));
-extern int strdiacasecmp  __P((const char *, const char *));
-extern int strndiacasecmp __P((const char *, const char *, size_t));
-extern pid_t server_lock  __P((char * /*program*/, char * /*file*/, 
-                              int /*debug*/));
-extern void fault_setup          __P((void (*fn)(void *)));
+extern int atalk_aton     (char *, struct at_addr *);
+extern void bprint        (char *, int);
+extern int strdiacasecmp  (const char *, const char *);
+extern int strndiacasecmp (const char *, const char *, size_t);
+extern pid_t server_lock  (char * /*program*/, char * /*file*/, 
+                              int /*debug*/);
+extern void fault_setup          (void (*fn)(void *));
 #define server_unlock(x)  (unlink(x))
 
 #ifndef HAVE_STRLCPY
-size_t strlcpy __P((char *, const char *, size_t));
+size_t strlcpy (char *, const char *, size_t);
 #endif
  
 #ifndef HAVE_STRLCAT
-size_t strlcat __P((char *, const char *, size_t));
+size_t strlcat (char *, const char *, size_t);
 #endif
 
 #ifndef HAVE_DLFCN_H
-extern void *mod_open    __P((const char *));
-extern void *mod_symbol  __P((void *, const char *));
-extern void mod_close    __P((void *));
+extern void *mod_open    (const char *);
+extern void *mod_symbol  (void *, const char *);
+extern void mod_close    (void *);
 #define mod_error()      ""
 #else /* ! HAVE_DLFCN_H */
 #include <dlfcn.h>
@@ -75,7 +75,7 @@ extern void mod_close    __P((void *));
 #ifndef DLSYM_PREPEND_UNDERSCORE
 #define mod_symbol(a, b) dlsym(a, b)
 #else /* ! DLSYM_PREPEND_UNDERSCORE */
-extern void *mod_symbol  __P((void *, const char *));
+extern void *mod_symbol  (void *, const char *);
 #endif /* ! DLSYM_PREPEND_UNDERSCORE */
 #define mod_error()      dlerror()
 #define mod_close(a)     dlclose(a)
@@ -102,8 +102,8 @@ struct volinfo {
     int                 v_dbd_port;
 };
 
-extern int loadvolinfo __P((char *path, struct volinfo *vol));
-extern int vol_load_charsets __P(( struct volinfo *vol));
+extern int loadvolinfo (char *path, struct volinfo *vol);
+extern int vol_load_charsets ( struct volinfo *vol);
 #endif /* 0 */
 
 /*
index c35001196e742bfacdc5e03da9e173251daf9acb..a938331521874ea4bb48969ad5aa5a61d7261ea7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_flush.c,v 1.11 2009-09-14 10:04:16 franklahm Exp $
+ * $Id: ad_flush.c,v 1.12 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -168,8 +168,7 @@ int  ad_rebuild_sfm_header(struct adouble *ad)
 }
 
 
-int ad_flush( ad )
-    struct adouble  *ad;
+int ad_flush( struct adouble *ad)
 {
     int len;
 
@@ -195,9 +194,7 @@ int ad_flush( ad )
 }
 
 /* use refcounts so that we don't have to re-establish fcntl locks. */
-int ad_close( ad, adflags )
-    struct adouble  *ad;
-    int         adflags;
+int ad_close( struct adouble *ad, int adflags)
 {
     int         err = 0;
 
index 6d9bf8f63d8b8e9948b6363df0a54bea40b8d9b1..0b2516645edb701fd3d983e7699cd8e399a6a448 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_open.c,v 1.48 2009-10-02 09:32:41 franklahm Exp $
+ * $Id: ad_open.c,v 1.49 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -760,9 +760,7 @@ static int ad_header_sfm_read(struct adouble *ad, struct stat *hst)
  * FIXME: should do something for pathname > MAXPATHLEN
  */
 char *
-ad_path( path, adflags )
-    const char  *path;
-    int     adflags;
+ad_path( const char *path, int adflags)
 {
     static char pathbuf[ MAXPATHLEN + 1];
     char    c, *slash, buf[MAXPATHLEN + 1];
@@ -857,9 +855,7 @@ static int ad_mkrf_osx(char *path _U_)
  *
  */
 char *
-ad_path_sfm( path, adflags )
-    const char  *path;
-    int     adflags;
+ad_path_sfm( const char *path, int adflags)
 {
     static char pathbuf[ MAXPATHLEN + 1];
     char    c, *slash, buf[MAXPATHLEN + 1];
@@ -938,8 +934,7 @@ static int ad_mkrf_sfm(char *path)
 #define DEFMASK 07700   /* be conservative */
 
 char
-*ad_dir(path)
-    const char      *path;
+*ad_dir(const char *path)
 {
     static char     modebuf[ MAXPATHLEN + 1];
     char        *slash;
@@ -1051,9 +1046,7 @@ static int ad_mode_st(const char *path, int *mode, struct stat *stbuf)
    return access right of path parent directory
 */
 int
-ad_mode( path, mode )
-    const char      *path;
-    int         mode;
+ad_mode( const char *path, int mode)
 {
     struct stat     stbuf;
     ad_mode_st(path, &mode, &stbuf);
@@ -1064,9 +1057,7 @@ ad_mode( path, mode )
  * Use mkdir() with mode bits taken from ad_mode().
  */
 int
-ad_mkdir( path, mode )
-    const char      *path;
-    int         mode;
+ad_mkdir( const char *path, int mode)
 {
     int ret;
     int st_invalid;
@@ -1194,10 +1185,7 @@ void ad_init(struct adouble *ad, int flags, int options)
  * It's not possible to open the header file O_RDONLY -- the read
  * will fail and return an error. this refcounts things now.
  */
-int ad_open( path, adflags, oflags, mode, ad )
-    const char      *path;
-    int         adflags, oflags, mode;
-    struct adouble  *ad;
+int ad_open( const char *path, int adflags, int oflags, int mode, struct adouble  *ad)
 {
     struct stat         st_dir;
     struct stat         st_meta;
index 9991e3f0aa86c5ad366bceacf4be862b0f17557d..19d6218f3e6ff28c0ef95c4423ce39b99e35491d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_read.c,v 1.8 2009-09-11 13:26:05 franklahm Exp $
+ * $Id: ad_read.c,v 1.9 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -59,12 +59,7 @@ ssize_t adf_pread(struct ad_fd *ad_fd, void *buf, size_t count, off_t offset)
 /* XXX: locks have to be checked before each stream of consecutive
  *      ad_reads to prevent a denial in the middle from causing
  *      problems. */
-ssize_t ad_read( ad, eid, off, buf, buflen)
-    struct adouble  *ad;
-    const u_int32_t     eid;
-    off_t               off;
-    char        *buf;
-    const size_t    buflen;
+ssize_t ad_read( struct adouble *ad, const u_int32_t eid, off_t off, char *buf, const size_t buflen)
 {
     ssize_t     cc;
 
index 1331ae047d7e33c19a485b28fd347cc5735037f3..db542cb126f8bba07904c415e1f99478c5877ca9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_write.c,v 1.9 2006-09-29 09:39:16 didg Exp $
+ * $Id: ad_write.c,v 1.10 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -47,13 +47,7 @@ ssize_t adf_pwrite(struct ad_fd *ad_fd, const void *buf, size_t count, off_t off
 }
 
 /* end is always 0 */
-ssize_t ad_write( ad, eid, off, end, buf, buflen )
-    struct adouble     *ad;
-    const u_int32_t    eid;
-    off_t               off;
-    const int          end;
-    const char         *buf;
-    const size_t       buflen;
+ssize_t ad_write(struct adouble *ad, const u_int32_t eid, off_t off, const int end, const char *buf, const size_t buflen)
 {
     struct stat                st;
     ssize_t            cc;
@@ -151,9 +145,7 @@ char            c = 0;
 }
 
 /* ------------------------ */
-int ad_rtruncate( ad, size )
-    struct adouble     *ad;
-    const off_t        size;
+int ad_rtruncate( struct adouble *ad, const off_t size)
 {
     if ( sys_ftruncate( ad_reso_fileno(ad),
            size + ad->ad_eid[ ADEID_RFORK ].ade_off ) < 0 ) {
@@ -164,9 +156,7 @@ int ad_rtruncate( ad, size )
     return 0;
 }
 
-int ad_dtruncate(ad, size)
-    struct adouble     *ad;
-    const off_t        size;
+int ad_dtruncate(struct adouble *ad, const off_t size)
 {
     if (sys_ftruncate(ad_data_fileno(ad), size) < 0) {
       return -1;
index e3674167c4eebe312ebabd0bcbe2ce52b355724b..618782596679b50828ddd75ca0bca2dbbb52c406 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asp_close.c,v 1.4 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: asp_close.c,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -38,8 +38,7 @@
 #include <atalk/atp.h>
 #include <atalk/asp.h>
 
-int asp_close( asp )
-    ASP                asp;
+int asp_close(ASP asp)
 {
     struct atp_block   atpb;
     struct iovec       iov[ 1 ];
index e2c8cf9a1af195acc7769a3f9c8b0af83c15fbcc..f3a3fd1c5026644ba1fc360276332e810f90db98 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asp_cmdreply.c,v 1.4 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: asp_cmdreply.c,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -39,9 +39,7 @@
 #define memmove(a, b, n)   bcopy((b), (a), (n))
 #endif /* BSD || BSD4_3 */
 
-int asp_cmdreply( asp, result)
-    ASP                asp;
-    int                result;
+int asp_cmdreply(ASP asp, int result)
 {
     struct iovec       iov[ ASP_MAXPACKETS ];
     struct atp_block   atpb;
index 3d04c5fdff0e66111478ee052358c20b52687df8..51d87846820c0f34c92b36af9b5556faace25b98 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asp_getsess.c,v 1.8 2005-04-28 20:49:55 bfernhomberg Exp $
+ * $Id: asp_getsess.c,v 1.9 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1996 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -60,7 +60,7 @@ static struct asp_child    **asp_ac = NULL;
  * + space: if actual connections < potential
  * - space: actual connections ~ potential
  */
-static void tickle_handler()
+static void tickle_handler(int sig _U_)
 {
   int sid;
   
index ef8eaa7093a8f68cb71202c831970850cda9c0a2..06e77f041deced4ba4ec99cf707aae30d8297c4a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asp_init.c,v 1.3 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: asp_init.c,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -38,8 +38,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-ASP asp_init( atp )
-    ATP                atp;
+ASP asp_init(ATP atp)
 {
     ASP                asp;
 
@@ -66,10 +65,7 @@ ASP asp_init( atp )
     return( asp );
 }
 
-void asp_setstatus( asp, status, slen )
-    ASP                asp;
-    char       *status;
-    const int  slen;
+void asp_setstatus(ASP asp, char *status, const int slen)
 {
     asp->asp_status = status;
     asp->asp_slen = slen;
index 22cb214e7befd896383ae51a20f2702fb431ef42..1f77e1f266024bcefbe4703a40d0a4f54a8daa16 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asp_shutdown.c,v 1.3 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: asp_shutdown.c,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1996 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -18,8 +18,7 @@
 #include <atalk/atp.h>
 #include <atalk/asp.h>
 
-int asp_shutdown( asp )
-    ASP                        asp;
+int asp_shutdown(ASP asp)
 {
     struct atp_block   atpb;
     struct iovec       iov;
index 128736fbc68124b713c39aad7df848713378cf4f..9c899e23cbc3d20ef454e8e4e0e044e118e83fc3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atp_bufs.c,v 1.4 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: atp_bufs.c,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -80,9 +80,7 @@ static int more_bufs(void)
 
 
 #ifdef EBUG
-void atp_print_bufuse( ah, s )
-    ATP                ah;
-    char       *s;
+void atp_print_bufuse(ATP ah, char *s)
 {
     struct atpbuf      *bp;
     int                        i, sentcount, incount, respcount;
@@ -134,8 +132,7 @@ struct atpbuf *atp_alloc_buf(void)
 }
 
 
-int atp_free_buf( bp )
-    struct atpbuf      *bp;
+int atp_free_buf(struct atpbuf *bp)
 {
     if ( bp == NULL ) {
        return -1;
index df03b02edd387eee0db12c57963e50c25f6fa886..4d31b5f765e5b47d6af0a755116375f006ce4587 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atp_close.c,v 1.4 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: atp_close.c,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1997 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -22,8 +22,7 @@
 #include <stdio.h>
 #endif /* EBUG */
 
-int atp_close( ah )
-    ATP                ah;
+int atp_close(ATP ah)
 {
     struct atpbuf      *cq;
     int                        i;
index 12160167a0aa46e69c331b6419b0bb65527eff54..51d3b8b158d0dbeabad6e62330ff3966dc136c1e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atp_internals.h,v 1.3 2001-08-15 02:17:57 srittau Exp $
+ * $Id: atp_internals.h,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
 #define ATP_TIDANY     0xffff
 
 /* in atp_bufs.c */
-extern struct atpbuf *atp_alloc_buf __P((void));
-extern void atp_print_bufuse        __P((ATP, char *));
-extern int atp_free_buf             __P((struct atpbuf *));
+extern struct atpbuf *atp_alloc_buf (void);
+extern void atp_print_bufuse        (ATP, char *);
+extern int atp_free_buf             (struct atpbuf *);
 
 /* in atp_packet.c */
-extern int at_addr_eq               __P((struct sockaddr_at *, 
-                                        struct sockaddr_at *));
-extern void atp_build_req_packet    __P((struct atpbuf *, u_int16_t, 
-                                        u_int8_t, struct atp_block *));
-extern void atp_build_resp_packet   __P((struct atpbuf *, u_int16_t,
+extern int at_addr_eq               (struct sockaddr_at *, 
+                                        struct sockaddr_at *);
+extern void atp_build_req_packet    (struct atpbuf *, u_int16_t, 
+                                        u_int8_t, struct atp_block *);
+extern void atp_build_resp_packet   (struct atpbuf *, u_int16_t,
                                         u_int8_t, struct atp_block *,
-                                        u_int8_t));
-extern int atp_recv_atp             __P((ATP, struct sockaddr_at *, 
+                                        u_int8_t);
+extern int atp_recv_atp             (ATP, struct sockaddr_at *, 
                                         u_int8_t *, u_int16_t, char *,
-                                        int));
+                                        int);
 #ifdef EBUG
-extern void atp_print_addr          __P((char *, struct sockaddr_at *));
+extern void atp_print_addr          (char *, struct sockaddr_at *);
 #endif /* EBUG */
 
 #endif /* ATP_INTERNALS_H */
index 9659e008f1c2f5ec5bb908d30190c41c7c83142b..a7fae01b565ab59f6960386a7e62285b3c786621 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atp_packet.c,v 1.5 2002-01-17 06:08:55 srittau Exp $
+ * $Id: atp_packet.c,v 1.6 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -52,8 +52,7 @@
 #ifdef EBUG
 #include <stdio.h>
 
-static void print_func( ctrlinfo )
-    u_int8_t   ctrlinfo;
+static void print_func(u_int8_t ctrlinfo)
 {
     switch ( ctrlinfo & ATP_FUNCMASK ) {
     case ATP_TREQ:
@@ -73,9 +72,7 @@ static void print_func( ctrlinfo )
     }
 }
 
-static void dump_packet( buf, len )
-    char       *buf;
-    int                len;
+static void dump_packet(char *buf, int len)
 {
     int                i;
 
@@ -85,9 +82,7 @@ static void dump_packet( buf, len )
     putchar( '\n' );
 }
 
-void atp_print_addr( s, saddr )
-    char               *s;
-    struct sockaddr_at *saddr;
+void atp_print_addr(char *s, struct sockaddr_at *saddr)
 {
     printf( "%s ", s );
     saddr->sat_family == AF_APPLETALK ? printf( "at." ) :
@@ -315,9 +310,9 @@ atp_recv_atp( ATP ah,
 }
 
 
-int at_addr_eq( paddr, saddr )
-    struct sockaddr_at *paddr;         /* primary address */
-    struct sockaddr_at *saddr;         /* secondary address */
+int at_addr_eq( 
+    struct sockaddr_at *paddr,         /* primary address */
+    struct sockaddr_at *saddr)         /* secondary address */
 {
 /* compare two atalk addresses -- only check the non-zero fields
     of paddr against saddr.
index 9e46efcf1036493913ee987fd18f07fb36a64454..6736dbd290a1cccec811625eee6145a89e67c665 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atp_rreq.c,v 1.3 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: atp_rreq.c,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -43,9 +43,9 @@
 
 /* wait for a tranasaction service request
 */
-int atp_rreq( ah, atpb )
-    ATP                        ah;             /* open atp handle */
-    struct atp_block   *atpb;          /* parameter block */
+int atp_rreq(
+    ATP                        ah,             /* open atp handle */
+    struct atp_block   *atpb)          /* parameter block */
 {
     struct atpbuf      *req_buf;       /* for receiving request packet */
     struct atphdr      req_hdr;        /* request header overlay */
index 4ba76d10478e846a33a7dd6a50156a02525f0464..ac0a146cb628665f49ea872a04e2453e567a5895 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atp_rresp.c,v 1.5 2002-01-17 06:08:55 srittau Exp $
+ * $Id: atp_rresp.c,v 1.6 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -46,9 +46,9 @@
 #include "atp_internals.h"
 
 int
-atp_rresp( ah, atpb )
-    ATP                        ah;             /* open atp handle */
-    struct atp_block   *atpb;          /* parameter block */
+atp_rresp(
+    ATP                        ah,             /* open atp handle */
+    struct atp_block   *atpb)          /* parameter block */
 {
     int                i, rc;
     size_t     len;
index a48d038c152783ce5e1bc099a95c46c1ea412cd1..92f978681338c5964afb5ef6c91106dc355791d2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atp_rsel.c,v 1.4 2002-01-17 06:08:55 srittau Exp $
+ * $Id: atp_rsel.c,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1997 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -32,8 +32,7 @@ static int    release_count = 0;
 
 
 int
-resend_request( ah )
-    ATP                ah;
+resend_request(ATP ah)
 {
     /*
      * update bitmap and send request packet
@@ -72,10 +71,10 @@ resend_request( ah )
 }
 
 int
-atp_rsel( ah, faddr, func )
-    ATP                        ah;             /* open atp handle */
-    struct sockaddr_at *faddr;         /* address to receive from */
-    int                        func;           /* which function(s) to wait for;
+atp_rsel( 
+    ATP                        ah,             /* open atp handle */
+    struct sockaddr_at *faddr,         /* address to receive from */
+    int                        func)           /* which function(s) to wait for;
                                           0 means request or response */
 {
     struct atpbuf      *abuf, *pb, *cb;
index 7b13bf4e485378d030e63e0a6a07ade153439420..781760bb8731a6fd02052e774c0d860c4e43f321 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atp_sresp.c,v 1.5 2005-04-28 20:49:56 bfernhomberg Exp $
+ * $Id: atp_sresp.c,v 1.6 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -46,9 +46,9 @@
 
 /* send a transaction response
 */
-int atp_sresp( ah, atpb )
-    ATP                        ah;             /* open atp handle */
-    struct atp_block   *atpb;          /* parameter block */
+int atp_sresp(
+    ATP                        ah,             /* open atp handle */
+    struct atp_block   *atpb)          /* parameter block */
 {
     int                        i;
     u_int8_t           ctrlinfo;
index e1fc8a5894d02fea6653e8cdb34f9b028baa65f8..311fba0d15e89f183f8d9e295494d9e4996a3600 100644 (file)
 
 /* cnid_open.c */
 extern struct _cnid_module cnid_cdb_module;
-extern struct _cnid_db *cnid_cdb_open __P((const char *, mode_t));
+extern struct _cnid_db *cnid_cdb_open (const char *, mode_t);
 
 /* cnid_close.c */
-extern void cnid_cdb_close __P((struct _cnid_db *));
+extern void cnid_cdb_close (struct _cnid_db *);
 
 /* cnid_add.c */
-extern cnid_t cnid_cdb_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                           char *, const size_t, cnid_t));
-extern int cnid_cdb_getstamp __P((struct _cnid_db *, void *, const size_t ));
+extern cnid_t cnid_cdb_add (struct _cnid_db *, const struct stat *, const cnid_t,
+                           char *, const size_t, cnid_t);
+extern int cnid_cdb_getstamp (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 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 size_t));
+extern cnid_t cnid_cdb_get (struct _cnid_db *, const cnid_t, char *, const size_t); 
+extern char *cnid_cdb_resolve (struct _cnid_db *, cnid_t *, void *, size_t ); 
+extern cnid_t cnid_cdb_lookup (struct _cnid_db *, const struct stat *, const cnid_t,
+                              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 *, size_t));
+extern int cnid_cdb_update (struct _cnid_db *, const cnid_t, const struct stat *,
+                           const cnid_t, char *, size_t);
 
 /* cnid_delete.c */
-extern int cnid_cdb_delete __P((struct _cnid_db *, const cnid_t));
+extern int cnid_cdb_delete (struct _cnid_db *, const cnid_t);
 
 /* cnid_nextid.c */
-extern cnid_t cnid_cdb_nextid __P((struct _cnid_db *));
+extern cnid_t cnid_cdb_nextid (struct _cnid_db *);
 
-extern int cnid_cdb_lock   __P((void *));
-extern int cnid_cdb_unlock __P((void *));
+extern int cnid_cdb_lock   (void *);
+extern int cnid_cdb_unlock (void *);
 
-extern cnid_t cnid_cdb_rebuild_add __P((struct _cnid_db *, const struct stat *,
-                const cnid_t, char *, const size_t, cnid_t));
+extern cnid_t cnid_cdb_rebuild_add (struct _cnid_db *, const struct stat *,
+                const cnid_t, char *, const size_t, cnid_t);
 
 
 #endif /* include/atalk/cnid_cdb.h */
index f645574d16d3f5f352a27f320622fac1881c9e0d..0a00ec5997334fd6991879dc60333b3199018379 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cnid_cdb_open.c,v 1.2 2005-04-28 20:49:59 bfernhomberg Exp $
+ * $Id: cnid_cdb_open.c,v 1.3 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -85,10 +85,7 @@ static int my_yield(void)
 }
 
 /* --------------- */
-static int didname(dbp, pkey, pdata, skey)
-DB *dbp _U_;
-const DBT *pkey _U_, *pdata;
-DBT *skey;
+static int didname(DB *dbp _U_, const DBT *pkey _U_, const DBT *pdata, DBT *skey)
 {
 int len;
  
@@ -100,10 +97,7 @@ int len;
 }
  
 /* --------------- */
-static int devino(dbp, pkey, pdata, skey)
-DB *dbp _U_;
-const DBT *pkey _U_, *pdata;
-DBT *skey;
+static int devino(DB *dbp _U_, const DBT *pkey _U_, const DBT *pdata, DBT *skey)
 {
     memset(skey, 0, sizeof(DBT));
     skey->data = (char *)pdata->data + CNID_DEVINO_OFS;
index 35dc39e2fc523cf8db0fe44a760d19f3733fd32a..4a655580c43cf0e81a623d714b48db38db6c3ee0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_cdb_private.h,v 1.4 2008-12-03 18:35:44 didg Exp $
+ * $Id: cnid_cdb_private.h,v 1.5 2009-10-13 22:55:37 didg Exp $
  */
 
 #ifndef LIBATALK_CDB_PRIVATE_H
@@ -169,7 +169,7 @@ typedef struct CNID_private {
  */
 
 /* construct db_cnid data. NOTE: this is not re-entrant.  */
-extern unsigned char *make_cnid_data __P((const struct stat *,const cnid_t ,
-                                       const char *, const size_t ));
+extern unsigned char *make_cnid_data (const struct stat *,const cnid_t ,
+                                       const char *, const size_t );
 
 #endif /* atalk/cnid/cnid_private.h */
index b1bfc597bd8ab2c3e212aa46f802ddfe682d501c..7cc108d3bcf5013dc6724ff96316034b36aad4c8 100644 (file)
@@ -1,6 +1,6 @@
 
 /* 
- * $Id: cnid_init.c,v 1.2 2005-04-28 20:49:58 bfernhomberg Exp $
+ * $Id: cnid_init.c,v 1.3 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 2003 the Netatalk Team
  * Copyright (c) 2003 Rafal Lewczuk <rlewczuk@pronet.pl>
@@ -57,7 +57,7 @@ extern struct _cnid_module cnid_dbd_module;
 extern struct _cnid_module cnid_tdb_module;
 #endif
 
-void cnid_init()
+void cnid_init(void)
 {
 #ifdef CNID_BACKEND_DB3
     cnid_register(&cnid_db3_module);
index 1b01ebe090e77c5bfa3c4f0b50ba9ca7b922a4ec..2b0a0516d9e6ffb6b1ba904e87bc3a613975fbb2 100644 (file)
@@ -53,33 +53,33 @@ static int db3_txn_commit(DB_TXN *db_txn, u_int32_t flags)
    cnid_open.c 
 */
 extern struct _cnid_module cnid_db3_module;
-extern struct _cnid_db *cnid_db3_open __P((const char *, mode_t));
+extern struct _cnid_db *cnid_db3_open (const char *, mode_t);
 
 /* cnid_close.c */
-extern void cnid_db3_close __P((struct _cnid_db *));
+extern void cnid_db3_close (struct _cnid_db *);
 
 /* cnid_add.c */
-extern cnid_t cnid_db3_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                           char *, const size_t, cnid_t));
+extern cnid_t cnid_db3_add (struct _cnid_db *, const struct stat *, const 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 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 size_t));
+extern cnid_t cnid_db3_get (struct _cnid_db *, const cnid_t, char *, const size_t); 
+extern char *cnid_db3_resolve (struct _cnid_db *, cnid_t *, void *, size_t ); 
+extern cnid_t cnid_db3_lookup (struct _cnid_db *, const struct stat *, const cnid_t,
+                              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 *, size_t));
+extern int cnid_db3_update (struct _cnid_db *, const cnid_t, const struct stat *,
+                           const cnid_t, char *, size_t);
 
 /* cnid_delete.c */
-extern int cnid_db3_delete __P((struct _cnid_db *, const cnid_t));
+extern int cnid_db3_delete (struct _cnid_db *, const cnid_t);
 
 /* cnid_nextid.c */
-extern cnid_t cnid_db3_nextid __P((struct _cnid_db *));
+extern cnid_t cnid_db3_nextid (struct _cnid_db *);
 
-extern int cnid_db3_lock   __P((void *));
-extern int cnid_db3_unlock __P((void *));
+extern int cnid_db3_lock   (void *);
+extern int cnid_db3_unlock (void *);
 
 #endif /* include/atalk/cnid_db3.h */
 
index e32f1edd8a18a51ed25db9e43a71bfe9e97f98a2..fed486ebfec9b08f0a01526222277ed87b1795b3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_dbd.h,v 1.3 2005-05-03 14:55:14 didg Exp $
+ * $Id: cnid_dbd.h,v 1.4 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
 #include <atalk/cnid.h>
 
 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 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 size_t));
-extern int cnid_dbd_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
-                           const cnid_t, char *, size_t));
-extern int cnid_dbd_delete __P((struct _cnid_db *, const cnid_t));
-extern cnid_t cnid_dbd_rebuild_add __P((struct _cnid_db *, const struct stat *,
-                const cnid_t, char *, const size_t, cnid_t));
+extern struct _cnid_db *cnid_dbd_open (const char *, mode_t);
+extern void cnid_dbd_close (struct _cnid_db *);
+extern cnid_t cnid_dbd_add (struct _cnid_db *, const struct stat *, const cnid_t,
+                           char *, const size_t, cnid_t);
+extern cnid_t cnid_dbd_get (struct _cnid_db *, const cnid_t, char *, const size_t); 
+extern char *cnid_dbd_resolve (struct _cnid_db *, cnid_t *, void *, size_t ); 
+extern int cnid_dbd_getstamp (struct _cnid_db *, void *, const size_t ); 
+extern cnid_t cnid_dbd_lookup (struct _cnid_db *, const struct stat *, const cnid_t,
+                              char *, const size_t);
+extern int cnid_dbd_update (struct _cnid_db *, const cnid_t, const struct stat *,
+                           const cnid_t, char *, size_t);
+extern int cnid_dbd_delete (struct _cnid_db *, const cnid_t);
+extern cnid_t cnid_dbd_rebuild_add (struct _cnid_db *, const struct stat *,
+                const cnid_t, char *, const size_t, cnid_t);
 
 /* FIXME: These functions could be static in cnid_dbd.c */
 
index f27ef1c2f5a25b7553c2c9f5b8354a178d6152cd..a3f8e4b87c04fbfe6b0afffe9222f765f974b352 100644 (file)
@@ -40,28 +40,28 @@ struct _cnid_hash_private {
 
 /* cnid_open.c */
 extern struct _cnid_module cnid_hash_module;
-extern struct _cnid_db *cnid_hash_open __P((const char *, mode_t));
+extern struct _cnid_db *cnid_hash_open (const char *, mode_t);
 
 /* cnid_close.c */
-extern void cnid_hash_close __P((struct _cnid_db *));
+extern void cnid_hash_close (struct _cnid_db *);
 
 /* cnid_add.c */
-extern cnid_t cnid_hash_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                                 char *, const int, cnid_t));
+extern cnid_t cnid_hash_add (struct _cnid_db *, const struct stat *, const cnid_t,
+                                 char *, const int, cnid_t);
 
 /* cnid_get.c */
-extern cnid_t cnid_hash_get __P((struct _cnid_db *, const cnid_t, char *, const int));
-extern char *cnid_hash_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t));
-extern cnid_t cnid_hash_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const int));
+extern cnid_t cnid_hash_get (struct _cnid_db *, const cnid_t, char *, const int);
+extern char *cnid_hash_resolve (struct _cnid_db *, cnid_t *, void *, u_int32_t);
+extern cnid_t cnid_hash_lookup (struct _cnid_db *, const struct stat *, const cnid_t, char *, const int);
 
 /* cnid_update.c */
-extern int cnid_hash_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
-                                 const cnid_t, char *, int));
+extern int cnid_hash_update (struct _cnid_db *, const cnid_t, const struct stat *,
+                                 const cnid_t, char *, int);
 
 /* cnid_delete.c */
-extern int cnid_hash_delete __P((struct _cnid_db *, const cnid_t));
+extern int cnid_hash_delete (struct _cnid_db *, const cnid_t);
 
 /* cnid_nextid.c */
-extern cnid_t cnid_hash_nextid __P((struct _cnid_db *));
+extern cnid_t cnid_hash_nextid (struct _cnid_db *);
 
 #endif /* include/atalk/cnid_hash.h */
index 33f561e10c8191c512f0e0c021a688140ab46dc2..45f6d3b5f97cb1eac3890b3184473193e6fe7611 100644 (file)
@@ -20,15 +20,15 @@ struct _cnid_last_private {
 };
 
 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 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 *, size_t));
-extern int cnid_last_delete __P((struct _cnid_db *, const cnid_t));
+extern struct _cnid_db *cnid_last_open (const char *, mode_t);
+extern void cnid_last_close (struct _cnid_db *);
+extern cnid_t cnid_last_add (struct _cnid_db *, const struct stat *, const cnid_t,
+                                 char *, const size_t, cnid_t);
+extern cnid_t cnid_last_get (struct _cnid_db *, const cnid_t, char *, const size_t);
+extern char *cnid_last_resolve (struct _cnid_db *, cnid_t *, void *, size_t);
+extern cnid_t cnid_last_lookup (struct _cnid_db *, const struct stat *, const cnid_t, char *, const size_t);
+extern int cnid_last_update (struct _cnid_db *, const cnid_t, const struct stat *,
+                                 const cnid_t, char *, size_t);
+extern int cnid_last_delete (struct _cnid_db *, const cnid_t);
 
 #endif /* include/atalk/cnid_last.h */
index 27d2a7b3fb99acb82f1a60a2cc4006079d89c3ea..28fe05cf6c7f57a1da755a9bb5524d3512e966c9 100644 (file)
 
 extern struct _cnid_module cnid_mtab_module;
 
-extern struct _cnid_db *cnid_mtab_open __P((const char *, mode_t));
-extern void cnid_mtab_close __P((struct _cnid_db *));
-extern cnid_t cnid_mtab_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                                 char *, const int, cnid_t));
-extern cnid_t cnid_mtab_get __P((struct _cnid_db *, const cnid_t, char *, const int));
-extern char *cnid_mtab_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t));
-extern cnid_t cnid_mtab_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const int));
-extern int cnid_mtab_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
-                                 const cnid_t, char *, int));
-extern int cnid_mtab_delete __P((struct _cnid_db *, const cnid_t));
+extern struct _cnid_db *cnid_mtab_open (const char *, mode_t);
+extern void cnid_mtab_close (struct _cnid_db *);
+extern cnid_t cnid_mtab_add (struct _cnid_db *, const struct stat *, const cnid_t,
+                                 char *, const int, cnid_t);
+extern cnid_t cnid_mtab_get (struct _cnid_db *, const cnid_t, char *, const int);
+extern char *cnid_mtab_resolve (struct _cnid_db *, cnid_t *, void *, u_int32_t);
+extern cnid_t cnid_mtab_lookup (struct _cnid_db *, const struct stat *, const cnid_t, char *, const int);
+extern int cnid_mtab_update (struct _cnid_db *, const cnid_t, const struct stat *,
+                                 const cnid_t, char *, int);
+extern int cnid_mtab_delete (struct _cnid_db *, const cnid_t);
 
 #endif /* include/atalk/cnid_mtab.h */
index f361f5e2c988c4252d2a686c371a75c49329cd0a..a9fa76280f61044856ff235117442a95e9d0f218 100644 (file)
@@ -63,29 +63,29 @@ struct _cnid_tdb_private {
 
 /* cnid_open.c */
 extern struct _cnid_module cnid_tdb_module;
-extern struct _cnid_db *cnid_tdb_open __P((const char *, mode_t));
+extern struct _cnid_db *cnid_tdb_open (const char *, mode_t);
 
 /* cnid_close.c */
-extern void cnid_tdb_close __P((struct _cnid_db *));
+extern void cnid_tdb_close (struct _cnid_db *);
 
 /* cnid_add.c */
-extern cnid_t cnid_tdb_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
-                                 char *, const size_t, cnid_t));
+extern cnid_t cnid_tdb_add (struct _cnid_db *, const struct stat *, const 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 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));
+extern cnid_t cnid_tdb_get (struct _cnid_db *, const cnid_t, char *, const size_t);
+extern char *cnid_tdb_resolve (struct _cnid_db *, cnid_t *, void *, size_t);
+extern cnid_t cnid_tdb_lookup (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 *, size_t));
+extern int cnid_tdb_update (struct _cnid_db *, const cnid_t, const struct stat *,
+                                 const cnid_t, char *, size_t);
 
 /* cnid_delete.c */
-extern int cnid_tdb_delete __P((struct _cnid_db *, const cnid_t));
+extern int cnid_tdb_delete (struct _cnid_db *, const cnid_t);
 
 /* cnid_nextid.c */
-extern cnid_t cnid_tdb_nextid __P((struct _cnid_db *));
+extern cnid_t cnid_tdb_nextid (struct _cnid_db *);
 
 /* construct db_cnid data. NOTE: this is not re-entrant.  */
 static inline char *make_tdb_data(const struct stat *st,
index a0a589e0659971f27db06646b5893a95ff42a95c..ac16cb682035d5a13390e9443e63467eb151c21c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dsi_private.h,v 1.2 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: dsi_private.h,v 1.3 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
@@ -17,9 +17,9 @@
 #include <sys/types.h>
 #include <netatalk/endian.h>
 
-extern int dsi_tcp_init __P((DSI *, const char * /*host*/, 
+extern int dsi_tcp_init (DSI *, const char * /*host*/, 
                             const char * /*address*/,
                             const u_int16_t /*port*/,
-                            const int /*proxy*/));
+                            const int /*proxy*/);
 
 #endif /* _DSI_PRIVATE_H */
index 7653c6f938e0a8f1acf24566c8bc19e751260a2e..5f6b6eb49dbd5a09ce3ab7fb7ef23be832259f95 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dsi_tcp.c,v 1.14 2009-09-14 00:02:21 didg Exp $
+ * $Id: dsi_tcp.c,v 1.15 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1997, 1998 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
@@ -87,7 +87,7 @@ static void dsi_tcp_close(DSI *dsi)
 }
 
 /* alarm handler for tcp_open */
-static void timeout_handler()
+static void timeout_handler(int sig _U_)
 {
   LOG(log_error, logtype_default, "dsi_tcp_open: connection timed out");
   exit(EXITERR_CLNT);
index c7bd4035cee1ecfcbec1b710abdfa0235ae01bc5..66029a65469b81648574714c9eba9e34eb1665da 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbp_conf.h,v 1.2 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: nbp_conf.h,v 1.3 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -35,7 +35,7 @@ extern u_char         nbp_port;
 extern unsigned char    nbp_id;
 
 
-int nbp_parse __P((char *, struct nbpnve *, int));
-int nbp_match __P((struct nbpnve *, struct nbpnve *, int));
+int nbp_parse (char *, struct nbpnve *, int);
+int nbp_match (struct nbpnve *, struct nbpnve *, int);
 
 #endif /* NBP_CONF_H */
index d3920ff35fc6ae34acd448add7a847ef88d82d8f..6a991267f9b03aeb0e83f76fbb77150a713525e9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbp_lkup.c,v 1.4 2002-01-17 06:12:02 srittau Exp $
+ * $Id: nbp_lkup.c,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1997 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
 #define SOCKLEN_T unsigned int
 #endif /* ! SOCKLEN_T */
 
-int nbp_lookup( obj, type, zone, nn, nncnt, ataddr )
-    const char         *obj, *type, *zone;
-    struct nbpnve      *nn;
-    int                        nncnt;
-    const struct at_addr *ataddr;
+int nbp_lookup( const char *obj, const char *type, const char *zone, struct nbpnve *nn,
+    int                        nncnt,
+    const struct at_addr *ataddr)
 {
     struct sockaddr_at addr, from;
     struct timeval     tv, tv_begin, tv_end;
index b9bc091d8741e9aefa31f8561c51ed7231b12628..cf5ee99927c673f93b2523cc429d750b44332565 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbp_rgstr.c,v 1.4 2002-01-17 06:12:02 srittau Exp $
+ * $Id: nbp_rgstr.c,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -34,9 +34,7 @@
 #define SOCKLEN_T unsigned int
 #endif /* ! SOCKLEN_T */
 
-int nbp_rgstr( sat, obj, type, zone )
-    struct sockaddr_at *sat;
-    const char         *obj, *type, *zone;
+int nbp_rgstr( struct sockaddr_at *sat, const char *obj, const char *type, const char *zone)
 {
     struct sockaddr_at to;
     struct nbpnve      nn;
index 5aa4a4b76cf6ef759cfe5a734710fe32bcbd5ef6..9a2169b2041653c6920557338e699abd602452f0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbp_unrgstr.c,v 1.4 2002-01-17 06:12:02 srittau Exp $
+ * $Id: nbp_unrgstr.c,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1997 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -34,9 +34,7 @@
 #define SOCKLEN_T unsigned int
 #endif /* ! SOCKLEN_T */
 
-int nbp_unrgstr( obj, type, zone, addr )
-    const char         *obj, *type, *zone;
-    const struct at_addr *addr;
+int nbp_unrgstr(const char *obj,const char *type,const char  *zone, const struct at_addr *addr)
 {
     struct sockaddr_at to;
     struct nbphdr      nh;
index ba201b1d4a5d4d2f2a829518c68cf9905c56d712..4cbea4b9b0efa96273f854b37a305f9901acb23f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbp_util.c,v 1.4 2002-01-17 06:12:02 srittau Exp $
+ * $Id: nbp_util.c,v 1.5 2009-10-13 22:55:37 didg Exp $
  *
  * Copyright (c) 1990,1997 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -35,10 +35,7 @@ char         nbp_recv[ 1024 ];
 u_char         nbp_port = 0;
 unsigned char   nbp_id = 0;
 
-int nbp_parse( data, nn, len )
-    char               *data;
-    struct nbpnve      *nn;
-    int                        len;
+int nbp_parse(char *data, struct nbpnve *nn, int len)
 {
     struct nbptuple    nt;
 
@@ -96,9 +93,7 @@ int nbp_parse( data, nn, len )
 #define NBPM_TYPE      (1<<2)
 #define NBPM_ZONE      (1<<3)
 
-int nbp_match( n1, n2, flags )
-    struct nbpnve      *n1, *n2;
-    int                        flags;
+int nbp_match(struct nbpnve *n1, struct nbpnve *n2, int flags)
 {
     int                        match = 0;
 
@@ -137,9 +132,7 @@ int nbp_match( n1, n2, flags )
     return( 1 );
 }
 
-int nbp_name( name, objp, typep, zonep )
-    const char  *name;
-    char       **objp, **typep, **zonep;
+int nbp_name(const char  *name, char **objp,char **typep,char **zonep)
 {
     static char        buf[ 32 + 1 + 32 + 1 + 32 + 1 ];
     char       *p;
index 1f9e2086db2c6f53fdf11369a94b388578bfe119..8c6cbaaf20a212e10ecaa9afdb8152982ba1e728 100644 (file)
@@ -29,14 +29,14 @@ typedef struct {
   const u_int16_t (*summary)[2];
 } cjk_index_t;
 
-extern size_t cjk_generic_push __P((size_t (*)(u_int8_t*, const ucs2_t*, size_t*),
-                                  void*, char**, size_t*, char**, size_t*));
-extern size_t cjk_generic_pull __P((size_t (*)(ucs2_t*, const u_int8_t*, size_t*),
-                                  void*, char**, size_t*, char**, size_t*));
+extern size_t cjk_generic_push (size_t (*)(u_int8_t*, const ucs2_t*, size_t*),
+                                  void*, char**, size_t*, char**, size_t*);
+extern size_t cjk_generic_pull (size_t (*)(ucs2_t*, const u_int8_t*, size_t*),
+                                  void*, char**, size_t*, char**, size_t*);
 
-extern size_t cjk_char_push __P((u_int16_t, u_int8_t*));
-extern size_t cjk_char_pull __P((ucs2_t, ucs2_t*, const u_int32_t*));
+extern size_t cjk_char_push (u_int16_t, u_int8_t*);
+extern size_t cjk_char_pull (ucs2_t, ucs2_t*, const u_int32_t*);
 
-extern u_int16_t cjk_lookup __P((u_int16_t, const cjk_index_t*, const u_int16_t*));
-extern ucs2_t cjk_compose __P((ucs2_t, ucs2_t, const u_int32_t*, size_t));
-extern ucs2_t cjk_compose_seq __P((const ucs2_t*, size_t*, const u_int32_t*, size_t));
+extern u_int16_t cjk_lookup (u_int16_t, const cjk_index_t*, const u_int16_t*);
+extern ucs2_t cjk_compose (ucs2_t, ucs2_t, const u_int32_t*, size_t);
+extern ucs2_t cjk_compose_seq (const ucs2_t*, size_t*, const u_int32_t*, size_t);
index 769d4e68fe0159f8e3db6f86bc39d55fcf5f5053..751c68e007b5c9f6ffc66671f5ea99e0949e0490 100644 (file)
@@ -26,9 +26,7 @@
  * 0's. This means that we can't support octal addressing.
  */
 
-int atalk_aton( cp, addr )
-    char               *cp;
-    struct at_addr     *addr;
+int atalk_aton(char *cp, struct at_addr *addr)
 {
     u_int32_t val, base, n;
     char c;
index 33947de7d8c9ced86d9e0762efedb02a8939e67d..05af80b1d0b35cea7432f9ce38a5c69ec6c2237b 100644 (file)
@@ -117,7 +117,7 @@ static int getifaces(const int sockfd, char ***list)
  * Get interfaces from the kernel. we keep an extra null entry to signify
  * the end of the interface list. 
  */
-char **getifacelist()
+char **getifacelist(void)
 {
   char **list = NULL; /* FIXME */
   int  i, fd;
index 30cc4739cb5359dc3d4b3cb21e286fba5ec318b8..7aef01a663901573b91a8e72d8c3a5714ea4931a 100644 (file)
@@ -346,7 +346,7 @@ void syslog_setup(int loglevel, enum logtypes logtype _U_,
         arr_loglevel_strings[loglevel]);
 }
 
-void log_close()
+void log_close(void)
 {
 }