]> arthur.barton.de Git - netatalk.git/commitdiff
remove most sparse warning 'symbol 'xxx' was not declared. Should it be static?'
authordidg <didg>
Wed, 14 Oct 2009 01:38:28 +0000 (01:38 +0000)
committerdidg <didg>
Wed, 14 Oct 2009 01:38:28 +0000 (01:38 +0000)
58 files changed:
bin/adv1tov2/adv1tov2.c
bin/aecho/aecho.c
bin/afile/achfile.c
bin/afile/afile.c
bin/cnid/ad_ls.c
bin/getzones/getzones.c
bin/megatron/asingle.c
bin/megatron/hqx.c
bin/megatron/macbin.c
bin/megatron/megatron.c
bin/megatron/megatron.h
bin/megatron/nad.c
bin/nbp/nbplkup.c
bin/nbp/nbprgstr.c
bin/nbp/nbpunrgstr.c
bin/pap/pap.c
bin/pap/papstatus.c
bin/psorder/psorder.c
etc/afpd/afp_asp.c
etc/afpd/afp_dsi.c
etc/afpd/afp_options.c
etc/afpd/afp_util.c
etc/afpd/catsearch.c
etc/afpd/desktop.c
etc/afpd/file.h
etc/afpd/fork.c
etc/afpd/fork.h
etc/atalkd/config.c
etc/atalkd/main.c
etc/atalkd/main.h
etc/atalkd/multicast.c
etc/atalkd/multicast.h
etc/cnid_dbd/cmd_dbd.c
etc/cnid_dbd/cmd_dbd_lookup.c
etc/cnid_dbd/cmd_dbd_scanvol.c
etc/cnid_dbd/cnid_metad.c
etc/cnid_dbd/dbd.h
etc/cnid_dbd/dbif.c
etc/cnid_dbd/main.c
etc/papd/lp.c
etc/papd/main.c
etc/papd/session.c
etc/psf/psf.c
etc/uams/uams_guest.c
etc/uams/uams_pam.c
include/atalk/adouble.h
include/atalk/unicode.h
libatalk/atp/atp_rsel.c
libatalk/cnid/cdb/cnid_cdb_add.c
libatalk/dsi/dsi_stream.c
libatalk/tdb/tdb.c
libatalk/unicode/charcnv.c
libatalk/unicode/iconv.c
libatalk/unicode/util_unistr.c
libatalk/util/locking.c
libatalk/util/logger.c
libatalk/util/server_ipc.c
libatalk/vfs/vfs.c

index 987599b9cb9557ca189274fcd8efa0359bcc88a6..d4a66fba98b9e14fdeb2b408f1793b50bea34711 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: adv1tov2.c,v 1.4 2005-04-28 20:49:18 bfernhomberg Exp $
+ * $Id: adv1tov2.c,v 1.5 2009-10-14 01:38:28 didg Exp $
  * v1tov2: given a root directory, run down and convert all the
  * files/directories into appledouble v2.
  */
@@ -76,7 +76,7 @@ char *fullpathname(const char *name)
 #define MAXDESCEND 0xFFFF
 /* recursively descend subdirectories. 
  * oh the stack space we use up! */
-void descend(DIR *dp)
+static void descend(DIR *dp)
 {
   DIR *dpnew;
   struct dirent *de;
index e1210e660cb36f9cb7e37dafea393e6836f35a03..274421b53b614e9aba9bad99825cd2a9c9706799 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: aecho.c,v 1.8 2009-10-13 22:55:36 didg Exp $
+ * $Id: aecho.c,v 1.9 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
 #define SOCKLEN_T unsigned int
 #endif /* ! SOCKLEN_T */
 
-struct sockaddr_at     target;
-int                    sock;
-unsigned int           nsent = 0, nrecv = 0;
-time_t                 totalms = 0, minms = -1, maxms = -1;
-unsigned int           pings = 0;
+static struct sockaddr_at      target;
+static int                     sock;
+static unsigned int            nsent = 0, nrecv = 0;
+static time_t                  totalms = 0, minms = -1, maxms = -1;
+static unsigned int            pings = 0;
 
-void usage(char *);
+static void usage(char *);
 
-void done(int sig _U_)
+static void done(int sig _U_)
 {
     if ( nsent) {
        printf( "\n----%d.%d AEP Statistics----\n",
@@ -82,7 +82,7 @@ void done(int sig _U_)
     exit( 0 );
 }
   
-void aep_send(int sig _U_)
+static void aep_send(int sig _U_)
 {
     struct timeval     tv;
     char               *p, buf[ 1024 ];
@@ -257,7 +257,7 @@ int main(int ac, char **av)
     }
 }
 
-void usage( char * av0 )
+static void usage( char * av0 )
 {
     fprintf( stderr, "usage:\t%s [-A source address ] [-c count] ( addr | nbpname )\n", av0 );
     exit( 1 );
index db8bfad3b99ce4cab51f091c5d7dd1ff8b4a7515..99133cc95d13b01037dbc97727b33323b4bc93e0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: achfile.c,v 1.6 2009-10-13 22:55:36 didg Exp $
+ * $Id: achfile.c,v 1.7 2009-10-14 01:38:28 didg Exp $
  *
     afile - determine the MacOS creator/type of files
 
 #include "common.h"
 
 /* Global Variables */
-const char *type    = NULL;
-const char *creator = NULL;
+static const char *type    = NULL;
+static const char *creator = NULL;
 
 
 /* Print usage information. */
-void usage(char *prog)
+static void usage(char *prog)
 {
   fprintf(stderr, "Usage: %s [-t TYPE] [-c CREATOR] FILE ...\n", prog);
 }
 
 /* Print extensive help. */
-void help(char *prog)
+static void help(char *prog)
 {
   usage(prog);
   fprintf(stderr,
@@ -81,7 +81,7 @@ void help(char *prog)
 }
 
 /* Print the version. */
-void version(void)
+static void version(void)
 {
   fprintf(stderr, "achfile (netatalk " VERSION ")\n");
 }
@@ -91,7 +91,7 @@ void version(void)
  * known long options: --help, --version
  */
 #define OPTSTRING "t:c:hv-:"
-const char *get_long_arg(int argc, char *argv[], const char *arg, const char *oa) {
+static const char *get_long_arg(int argc, char *argv[], const char *arg, const char *oa) {
   switch (*oa) {
   case '=':
     return &oa[1];
@@ -108,7 +108,7 @@ const char *get_long_arg(int argc, char *argv[], const char *arg, const char *oa
   }
 }
 
-int parse_args(int argc, char *argv[])
+static int parse_args(int argc, char *argv[])
 {
   int c;
   const char *longarg;
@@ -178,7 +178,7 @@ int parse_args(int argc, char *argv[])
 
 
 /* Change the owner/creator of each file specified on the command line. */
-int handle_file(const char *filename)
+static int handle_file(const char *filename)
 {
   int fd;
   struct stat statbuf;
index 4cf8a353515b257da01e288748f374b23286bc5f..e70c850090675c6013b37ef0c3c8245490ffff35 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afile.c,v 1.6 2009-10-13 22:55:36 didg Exp $
+ * $Id: afile.c,v 1.7 2009-10-14 01:38:28 didg Exp $
  *
     afile - determine the MacOS creator/type of files
 
 
 
 /* Global Variables */
-int showall = 0;
+static int showall = 0;
 
 
 /* Print usage information. */
-void usage(char *prog)
+static void usage(char *prog)
 {
   fprintf(stderr, "Usage: %s [-a] FILE ...\n", prog);
 }
 
 /* Print extensive help. */
-void help(char *prog)
+static void help(char *prog)
 {
   usage(prog);
   fprintf(stderr,
@@ -92,7 +92,7 @@ void help(char *prog)
 }
 
 /* Print the version. */
-void version(void)
+static void version(void)
 {
   fprintf(stderr, "afile (netatalk " VERSION ")\n");
 }
@@ -102,7 +102,7 @@ void version(void)
  * known long options: --show-all, --help, --version
  */
 #define OPTSTRING "ahv-:"
-int parse_args(int argc, char *argv[])
+static int parse_args(int argc, char *argv[])
 {
   int c;
 
@@ -149,13 +149,13 @@ int parse_args(int argc, char *argv[])
 /* Print the creator/type as taken from the supplied character stream, which
  * must be a AppleDouble file header.
  */
-void print_type(const char *filename, const char *creator, const char *type)
+static void print_type(const char *filename, const char *creator, const char *type)
 {
   printf("%4.4s %4.4s %s\n", creator, type, filename);
 }
 
 
-int handle_ad(struct AFile *rfile)
+static int handle_ad(struct AFile *rfile)
 {
   int fd;
   char *dataname;
@@ -179,7 +179,7 @@ int handle_ad(struct AFile *rfile)
 }
 
 
-int handle_datafile(struct AFile *datafile)
+static int handle_datafile(struct AFile *datafile)
 {
   int ret;
   char *adname;
@@ -218,7 +218,7 @@ int handle_datafile(struct AFile *datafile)
 
 
 /* Parse a file and its resource fork. Output the file's creator/type. */
-int parse_file(char *filename)
+static int parse_file(char *filename)
 {
   int ret;
   struct AFile *afile;
index 4b6092953330b7baa0ba2d5f10251ca5c14a6680..0708c77add57b0800b980844324c6416b46c87db 100644 (file)
@@ -1,5 +1,5 @@
 /* 
-   $Id: ad_ls.c,v 1.3 2009-10-13 22:55:36 didg Exp $
+   $Id: ad_ls.c,v 1.4 2009-10-14 01:38:28 didg Exp $
 
    Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
    
@@ -407,7 +407,7 @@ static void print_mode(const struct stat *st)
 #undef TYPE
 #undef MODE
 
-int ad_print(char *path, const struct stat *st, afpvol_t *vol)
+static int ad_print(char *path, const struct stat *st, afpvol_t *vol)
 {
     if ( ! ls_l) {
         printf("%s  ", path);
@@ -432,7 +432,7 @@ int ad_print(char *path, const struct stat *st, afpvol_t *vol)
     return 0;
 }
 
-int ad_ls_r(char *path, afpvol_t *vol)
+static int ad_ls_r(char *path, afpvol_t *vol)
 {
     int ret = 0, cwd, dirprinted = 0, dirempty;
     const char *name;
index 6d8a5eefd62fa721843addab9a77e98388b3871a..b1757109c7ecc3fd9c7c981f198b7c27b27b5bfd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: getzones.c,v 1.8 2009-10-13 22:55:36 didg Exp $
+ * $Id: getzones.c,v 1.9 2009-10-14 01:38:28 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -27,9 +27,9 @@
 #include <atalk/unicode.h>
 #include <atalk/zip.h>
 
-void print_zones(short n, char *buf);
+static void print_zones(short n, char *buf);
 
-void usage( char *s)
+static void usage( char *s)
 {
     fprintf( stderr, "usage:\t%s [-m | -l] [address]\n", s );
     exit( 1 );
@@ -147,7 +147,7 @@ int main( int argc, char *argv[])
  * n:   number of zones in this packet
  * buf: zone length/name pairs
  */
-void print_zones( short n, char *buf )
+static void print_zones( short n, char *buf )
 {
     size_t zone_len;
     char *zone;
index b9756e82e91dc43f6d2168a5b570f2b81bd3548e..4fb9a3ea4f11c012c0571da8ca5ec14decedead9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asingle.c,v 1.12 2009-10-13 22:55:36 didg Exp $
+ * $Id: asingle.c,v 1.13 2009-10-14 01:38:28 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
        following globals; therefore this module can only be used
        for one of the two functions at a time.
  */
-struct single_file_data {
+static struct single_file_data {
     int                        filed;
     char               path[ MAXPATHLEN + 1];
     struct ad_entry    entry[ ADEID_MAX ];
 }              single;
 
 extern char    *forkname[];
-u_char         header_buf[ AD_HEADER_LEN ];
+static u_char  header_buf[ AD_HEADER_LEN ];
 
 /* 
  * single_open must be called first.  pass it a filename that is supposed
@@ -333,7 +333,7 @@ int single_header_read( struct FHeader *fh, int version)
  * "Macintosh       " (that is seven blanks of padding).
  */
 #define MACINTOSH      "Macintosh       "
-u_char         sixteennulls[] = { 0, 0, 0, 0, 0, 0, 0, 0,
+static u_char          sixteennulls[] = { 0, 0, 0, 0, 0, 0, 0, 0,
                                    0, 0, 0, 0, 0, 0, 0, 0 };
 
 int single_header_test(void)
index 9656141362e482186dc062ba25e04db68e6f3b1f..8f303b0c5e7c7c2b2cfce150268eb044c54e2614 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: hqx.c,v 1.15 2009-10-13 22:55:36 didg Exp $
+ * $Id: hqx.c,v 1.16 2009-10-14 01:38:28 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -79,7 +79,7 @@ int hqx7_fill(u_char *hqx7_ptr);
 FILE           *rawhex, *expandhex;
 #endif /* HEXOUTPUT */
 
-struct hqx_file_data {
+static struct hqx_file_data {
     u_int32_t          forklen[ NUMFORKS ];
     u_short            forkcrc[ NUMFORKS ];
     char               path[ MAXPATHLEN + 1];
@@ -88,10 +88,10 @@ struct hqx_file_data {
 }              hqx;
 
 extern char    *forkname[];
-u_char         hqx7_buf[8192];
-u_char         *hqx7_first;
-u_char         *hqx7_last;
-int            first_flag;
+static u_char  hqx7_buf[8192];
+static u_char  *hqx7_first;
+static u_char  *hqx7_last;
+static int     first_flag;
 
 /* 
 hqx_open must be called first.  pass it a filename that is supposed
@@ -422,7 +422,7 @@ character that should be skipped, namely '\n', '\r'.  0xFD signals ':'.
 0xFC signals a whitespace character.
 */
 
-u_char hqxlookup[] = {
+static const u_char hqxlookup[] = {
     0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
     0xFF, 0xFC, 0xFE, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF,
     0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
index d43bb37d41142a570b92f9cc1c67bc12fbab3fb3..1b2dd197a665efeba762772576fe600a0c35ca0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: macbin.c,v 1.13 2009-10-13 22:55:36 didg Exp $
+ * $Id: macbin.c,v 1.14 2009-10-14 01:38:28 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -53,7 +53,7 @@
        following globals; therefore this module can only be used
        for one of the two functions at a time.
  */
-struct bin_file_data {
+static struct bin_file_data {
     u_int32_t          forklen[ NUMFORKS ];
     char               path[ MAXPATHLEN + 1];
     int                        filed;
@@ -62,7 +62,7 @@ struct bin_file_data {
 }              bin;
 
 extern char    *forkname[];
-u_char         head_buf[HEADBUFSIZ];
+static u_char  head_buf[HEADBUFSIZ];
 
 /* 
  * bin_open must be called first.  pass it a filename that is supposed
index 48810abdaab7f72acf9f374576137e76adc0955e..6bf52dd43f635ccdfed82e454387f89e40a19589 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: megatron.c,v 1.11 2009-10-13 22:55:36 didg Exp $
+ * $Id: megatron.c,v 1.12 2009-10-14 01:38:28 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -24,9 +24,9 @@
 #include "macbin.h"
 #include "nad.h"
 
-char           forkbuf[8192];
 char           *forkname[] = { "data", "resource" };
-char           *name[] = { "unhex",
+static char    forkbuf[8192];
+static char    *name[] = { "unhex",
                            "unbin",
                            "unsingle",
                            "macbinary",
@@ -36,7 +36,7 @@ char          *name[] = { "unhex",
                            "binheader",
                            "megatron" };
 
-int from_open(int un, char *file, struct FHeader *fh, int flags)
+static int from_open(int un, char *file, struct FHeader *fh, int flags)
 {
     switch ( un ) {
        case MEGATRON :
@@ -61,7 +61,7 @@ int from_open(int un, char *file, struct FHeader *fh, int flags)
     }
 }
 
-int from_read(int un, int fork, char *buf, int len)
+static int from_read(int un, int fork, char *buf, int len)
 {
     switch ( un ) {
        case MEGATRON :
@@ -84,7 +84,7 @@ int from_read(int un, int fork, char *buf, int len)
     }
 }
 
-int from_close(int un)
+static int from_close(int un)
 {
     switch ( un ) {
        case MEGATRON :
@@ -107,7 +107,7 @@ int from_close(int un)
     }
 }
 
-int to_open(int to, char *file, struct FHeader *fh, int flags)
+static int to_open(int to, char *file, struct FHeader *fh, int flags)
 {
     switch ( to ) {
        case MEGATRON :
@@ -127,7 +127,7 @@ int to_open(int to, char *file, struct FHeader *fh, int flags)
     }
 }
 
-int to_write(int to, int fork, int bufc)
+static int to_write(int to, int fork, int bufc)
 {
     switch ( to ) {
        case MEGATRON :
@@ -147,7 +147,7 @@ int to_write(int to, int fork, int bufc)
     }
 }
 
-int to_close(int to, int keepflag)
+static int to_close(int to, int keepflag)
 {
     switch ( to ) {
        case MEGATRON :
@@ -167,7 +167,7 @@ int to_close(int to, int keepflag)
     }
 }
 
-int megatron( char *path, int module, char *newname, int flags)
+static int megatron( char *path, int module, char *newname, int flags)
 {
     struct stat                st;
     struct FHeader     fh;
index 259c26425628729517dd146d3c0f64964206758e..c9aa8cee547ba75916a9b611e3fdb2c8aaa840d3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: megatron.h,v 1.4 2009-10-13 22:55:36 didg Exp $
+ * $Id: megatron.h,v 1.5 2009-10-14 01:38:28 didg Exp $
  */
 
 #ifndef _MEGATRON_H
@@ -92,6 +92,7 @@ struct FHeader {
 #      define S_ISDIR(s)       (( s & S_IFMT ) == S_IFDIR )
 #endif /* ! S_ISDIR */
 
+extern char    *forkname[];
 extern char     *(*_mtoupath) ( char *);
 extern char     *(*_utompath) ( char *);
 #define mtoupath(s) (*_mtoupath)(s)
index 2e105675de2d9473de2248045bb1292409cfee26..250f51ac196a501be670979e2b5f63d4c06c0886 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nad.c,v 1.16 2009-10-13 22:55:36 didg Exp $
+ * $Id: nad.c,v 1.17 2009-10-14 01:38:28 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -27,7 +27,7 @@
 #include "megatron.h"
 #include "nad.h"
 
-struct volinfo vol;
+static struct volinfo  vol;
 static char            hexdig[] = "0123456789abcdef";
 
 static char mtou_buf[MAXPATHLEN + 1], utom_buf[MAXPATHLEN + 1];
@@ -344,7 +344,7 @@ utompath_error:
     return(utompathcap( upath ));
 }
 
-char *mtoupathiconv(char *mpath)
+static char *mtoupathiconv(char *mpath)
 {
     char        *m, *u;
     size_t       inplen;
@@ -409,7 +409,7 @@ void select_charset( int options)
     int                        hexfork[ NUMFORKS ];
 #endif /* HEXOUTPUT */
 
-struct nad_file_data {
+static struct nad_file_data {
     char               macname[ MAXPATHLEN + 1 ];
     char               adpath[ 2 ][ MAXPATHLEN + 1];
     int                        offset[ NUMFORKS ];
@@ -689,7 +689,7 @@ int nad_header_write(struct FHeader *fh)
     return( 0 );
 }
 
-int                    forkeid[] = { ADEID_DFORK, ADEID_RFORK };
+static int             forkeid[] = { ADEID_DFORK, ADEID_RFORK };
 
 int nad_read(int fork, char *forkbuf, int bufc)
 {
index 821f0e0870acfdaddb855641956b209f3df3fa92..2e3850f29f82068e9397b2fd6870d1d77ab61051 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbplkup.c,v 1.6 2009-10-13 22:55:36 didg Exp $
+ * $Id: nbplkup.c,v 1.7 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
 
 #include <atalk/unicode.h>
 
-char *Obj = "=";
-char *Type = "=";
-char *Zone = "*";
+static char *Obj = "=";
+static char *Type = "=";
+static char *Zone = "*";
 
-void Usage(char *av0)
+static void Usage(char *av0)
 {
     char       *p;
 
index 7b9bd4b06bbf95df1916b4a62f3372662e0b09e2..ab041ba8458ec2d5c47093594bd932c752479359 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbprgstr.c,v 1.6 2009-10-13 22:55:36 didg Exp $
+ * $Id: nbprgstr.c,v 1.7 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -22,7 +22,7 @@
 #include <atalk/util.h>
 #include <atalk/unicode.h>
 
-void Usage(char *av0)
+static void Usage(char *av0)
 {
     char       *p;
 
index b9cd23478144ceda9513c920afebd2ce4ef9061a..d24251a0a78fe01aadf1be79d015be9ccebc575c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbpunrgstr.c,v 1.7 2009-10-13 22:55:36 didg Exp $
+ * $Id: nbpunrgstr.c,v 1.8 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -41,7 +41,7 @@
 
 #include <atalk/unicode.h>
 
-void Usage(char *av0)
+static void Usage(char *av0)
 {
     char       *p;
 
index 3649547fbb381ae78774e8b2f0c6f1a80a1246a1..de707217a2f8ac78eeb2fe85fd46f64be3d9a250 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pap.c,v 1.11 2009-10-13 22:55:36 didg Exp $
+ * $Id: pap.c,v 1.12 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 #define FUCKED
 
 #define _PATH_PAPRC    ".paprc"
-char   *nbpfailure = "AppleTalk printer offline";
+static char    *nbpfailure = "AppleTalk printer offline";
 
 /* Forward Declarations */
-void updatestatus(char *s, int len);
-int send_file(int fd, ATP atp, int lastfile);
+static void updatestatus(char *s, int len);
+static int send_file(int fd, ATP atp, int lastfile);
 
-void usage(char *path)
+static void usage(char *path)
 {
     char       *p;
 
@@ -62,7 +62,7 @@ void usage(char *path)
     exit( 2 );
 }
 
-char *
+static char *
 paprc(void)
 {
     static char        s[ 32 + 1 + 32 + 1 + 32 ];
@@ -89,20 +89,20 @@ paprc(void)
     return( name );
 }
 
-char                   *printer = NULL;
-char                   *status = NULL;
-int                    noeof = 0;
-int                    waitforprinter = 0;
+static char                    *printer = NULL;
+static char                    *status = NULL;
+static int                     noeof = 0;
+static int                     waitforprinter = 0;
 
-unsigned char          connid, quantum, oquantum = PAP_MAXQUANTUM;
-struct sockaddr_at     sat;
+static unsigned char           connid, quantum, oquantum = PAP_MAXQUANTUM;
+static struct sockaddr_at      sat;
 
-char                   cbuf[ 8 ];
-struct nbpnve          nn;
-ATP                    satp;
+static char                    cbuf[ 8 ];
+static struct nbpnve           nn;
+static ATP                     satp;
 
-char           fbuf[ PAP_MAXQUANTUM ][ 4 + PAP_MAXDATA ];
-struct iovec   rfiov[ PAP_MAXQUANTUM ] = {
+static char            fbuf[ PAP_MAXQUANTUM ][ 4 + PAP_MAXDATA ];
+static struct iovec    rfiov[ PAP_MAXQUANTUM ] = {
     { fbuf[ 0 ] + 4,   0 },
     { fbuf[ 1 ] + 4,   0 },
     { fbuf[ 2 ] + 4,   0 },
@@ -112,7 +112,8 @@ struct iovec        rfiov[ PAP_MAXQUANTUM ] = {
     { fbuf[ 6 ] + 4,   0 },
     { fbuf[ 7 ] + 4,   0 },
 };
-struct iovec   sniov[ PAP_MAXQUANTUM ] = {
+
+static struct iovec    sniov[ PAP_MAXQUANTUM ] = {
     { fbuf[ 0 ],       0 },
     { fbuf[ 1 ],       0 },
     { fbuf[ 2 ],       0 },
@@ -123,8 +124,8 @@ struct iovec        sniov[ PAP_MAXQUANTUM ] = {
     { fbuf[ 7 ],       0 },
 };
 
-char           nbuf[ PAP_MAXQUANTUM ][ 4 + PAP_MAXDATA ];
-struct iovec   rniov[ PAP_MAXQUANTUM ] = {
+static char            nbuf[ PAP_MAXQUANTUM ][ 4 + PAP_MAXDATA ];
+static struct iovec    rniov[ PAP_MAXQUANTUM ] = {
     { nbuf[ 0 ],       0 },
     { nbuf[ 1 ],       0 },
     { nbuf[ 2 ],       0 },
@@ -134,7 +135,8 @@ struct iovec        rniov[ PAP_MAXQUANTUM ] = {
     { nbuf[ 6 ],       0 },
     { nbuf[ 7 ],       0 },
 };
-struct iovec   sfiov[ PAP_MAXQUANTUM ] = {
+
+static struct iovec    sfiov[ PAP_MAXQUANTUM ] = {
     { nbuf[ 0 ] + 4,   0 },
     { nbuf[ 1 ] + 4,   0 },
     { nbuf[ 2 ] + 4,   0 },
@@ -145,7 +147,7 @@ struct iovec        sfiov[ PAP_MAXQUANTUM ] = {
     { nbuf[ 7 ] + 4,   0 },
 };
 
-int debug;
+static int debug;
 
 int main( int ac, char **av)
 {
@@ -461,11 +463,11 @@ int main( int ac, char    **av)
     exit( 0 );
 }
 
-int            data = 0;
-unsigned char  port;
-u_int16_t       seq = 0, rseq = 1;
+static int             data = 0;
+static unsigned char   port;
+static u_int16_t       seq = 0, rseq = 1;
 
-int send_file( int fd, ATP atp, int lastfile)
+static int send_file( int fd, ATP atp, int lastfile)
 {
     struct timeval     stv, tv;
     struct sockaddr_at ssat;
@@ -839,7 +841,7 @@ int send_file( int fd, ATP atp, int lastfile)
     }
 }
 
-void updatestatus(char *s, int len)
+static void updatestatus(char *s, int len)
 {
     int                        fd = -1;
     struct iovec       iov[ 3 ];
index ed51580a952e7eaea5592a984cefc3a9dfcb2e62..0ada9c0abd67bb8566e9e825d9fffb16320b6412 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: papstatus.c,v 1.6 2009-10-13 22:55:36 didg Exp $
+ * $Id: papstatus.c,v 1.7 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -45,9 +45,9 @@
 #define _PATH_PAPRC    ".paprc"
 
 /* Forward Declaration */
-void getstatus(ATP atp, struct sockaddr_at *sat);
+static void getstatus(ATP atp, struct sockaddr_at *sat);
 
-void usage(char *path)
+static void usage(char *path)
 {
     char       *p;
 
@@ -61,7 +61,7 @@ void usage(char *path)
     exit( 1 );
 }
 
-char *
+static char *
 paprc(void)
 {
     static char        s[ 32 + 1 + 32 + 1 + 32 ];
@@ -83,10 +83,10 @@ paprc(void)
     return( name );
 }
 
-char                   *printer = NULL;
+static char                    *printer = NULL;
 
-char                   cbuf[ 8 ];
-struct nbpnve          nn;
+static char                    cbuf[ 8 ];
+static struct nbpnve           nn;
 
 int main( int ac, char **av)
 {
@@ -164,7 +164,7 @@ int main( int ac, char **av)
     return 0;
 }
 
-void getstatus(ATP atp, struct sockaddr_at *sat)
+static void getstatus(ATP atp, struct sockaddr_at *sat)
 {
     struct iovec       iov;
     struct atp_block   atpb;
index 37c5fc4a9a509d091f39584b48e01b18ad4f4a1d..d2de6c87627fe3687ee604b1565b3d0c5aabb7c4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: psorder.c,v 1.7 2009-10-13 22:55:36 didg Exp $
+ * $Id: psorder.c,v 1.8 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
  *                     Global Variables
  */
 
-u_char                 psbuf[ 8192 ];
-struct psinfo_st       psinfo;
-int                    orderflag, forceflag;
+static u_char                  psbuf[ 8192 ];
+static struct psinfo_st                psinfo;
+static int                     orderflag, forceflag;
 
-void
+static void
 filecleanup( int errorcode, int tfd, char *tfile)
 {
 
@@ -79,7 +79,7 @@ filecleanup( int errorcode, int tfd, char *tfile)
     exit( errorcode );
 }
 
-void
+static void
 filesetup( char *inputfile, int *infd, char *tfile, int *tfd)
 {
     struct stat                st;
@@ -133,7 +133,7 @@ filesetup( char *inputfile, int *infd, char *tfile, int *tfd)
     return;
 }
 
-struct pspage_st
+static struct pspage_st
 *getpspage(off_t off)
 {
     struct pspage_st   *newpspage;
@@ -148,7 +148,7 @@ struct pspage_st
     return( newpspage );
 }
 
-int
+static int
 handletok(off_t count, char *token)
 {
     int                        incdoc = 0;
@@ -236,7 +236,7 @@ handletok(off_t count, char *token)
     return( 0 );
 }
 
-void
+static void
 readps(int inputfd, int tempfd, char *tempfile)
 {
     off_t              ccread = 0;
@@ -336,7 +336,7 @@ readps(int inputfd, int tempfd, char *tempfile)
     return;
 }
 
-void
+static void
 temp2out(int tempfd, char *tempfile, off_t length)
 {
     int                        ccread;
@@ -367,7 +367,7 @@ temp2out(int tempfd, char *tempfile, off_t length)
     }
 }
 
-void
+static void
 writelable(int tempfd, char *tempfile, char *lable)
 {
     char               line[256];
@@ -394,7 +394,7 @@ writelable(int tempfd, char *tempfile, char *lable)
     }
 }
 
-void
+static void
 writeps(int tempfd, char *tempfile)
 {
     struct stat                st;
@@ -489,7 +489,7 @@ writeps(int tempfd, char *tempfile)
     return;
 }
 
-int
+static int
 psorder(char *path)
 {
     int                        tempfd;
index 5a5a0b3f1bcfcb393f1ef28959c9a0eb71dbd055..94a0cd2d942e2640cba7edb22925a923c36dd2d9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_asp.c,v 1.24 2009-10-13 22:55:36 didg Exp $
+ * $Id: afp_asp.c,v 1.25 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -43,8 +43,6 @@
 #include "uid.h"
 #endif /* FORCE_UIDGID */
 
-extern struct oforks   *writtenfork;
-
 static AFPObj *child;
 
 static void afp_authprint_remove(AFPObj *);
index 789d81a8e6b1bcbdead8e2770496e30808bd885b..2803236379b1c4113d28ab878860b455df0ec7f5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_dsi.c,v 1.38 2009-10-13 22:55:36 didg Exp $
+ * $Id: afp_dsi.c,v 1.39 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -43,8 +43,6 @@
 #include "uid.h"
 #endif /* FORCE_UIDGID */
 
-extern struct oforks   *writtenfork;
-
 #define CHILD_DIE         (1 << 0)
 #define CHILD_RUNNING     (1 << 1)
 #define CHILD_SLEEPING    (1 << 2)
index d1e85bc51722a4b926da27946b938d0c5c33b671..ff48c01af720acea2cf1670baaa709ef6b8c8c01 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_options.c,v 1.46 2009-10-13 22:55:36 didg Exp $
+ * $Id: afp_options.c,v 1.47 2009-10-14 01:38:28 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 )
+static void show_version( void )
 {
        printf( "afpd %s - Apple Filing Protocol (AFP) daemon of Netatalk\n\n", VERSION );
 
@@ -506,7 +506,7 @@ void show_version( void )
  * Show extended version information about afpd and Netatalk.
  * Used by "afp -V".
  */
-void show_version_extended(void )
+static void show_version_extended(void )
 {
        show_version( );
 
@@ -570,7 +570,7 @@ void show_version_extended(void )
 /*
  * Display compiled-in default paths
  */
-void show_paths( void )
+static void show_paths( void )
 {
        printf( "             afpd.conf:\t%s\n", _PATH_AFPDCONF );
        printf( "   AppleVolumes.system:\t%s\n", _PATH_AFPDSYSVOL );
@@ -581,7 +581,7 @@ void show_paths( void )
 /*
  * Display usage information about adpd.
  */
-void show_usage( char *name )
+static void show_usage( char *name )
 {
        fprintf( stderr, "Usage:\t%s [-dDIptTu] [-c maxconnections] [-f defaultvolumes] [-F config]\n", name );
        fprintf( stderr, "\t     [-g guest] [-L message] [-m umask][-n nbpname] [-P pidfile]\n" );
index 6189201bf65032e6b76bd2c251a769dd4f1761e4..f32ed77265b8f36fbeb617ec53c9b8b853ce9cb1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_util.c,v 1.6 2009-09-28 11:59:44 franklahm Exp $
+ * $Id: afp_util.c,v 1.7 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -15,6 +15,7 @@
 #endif /* HAVE_CONFIG_H */
 
 #include <atalk/afp.h>
+#include "globals.h"
 
 const char *AfpNum2name(int num)
 {
index 73a8a94fc9c0e881178fee334dc722dbefaa43f1..a06ecabc0effeeb65882242dde143cf929ffc631 100644 (file)
@@ -662,7 +662,7 @@ catsearch_end: /* Exiting catsearch: error condition */
 } /* catsearch() */
 
 /* -------------------------- */
-int catsearch_afp(AFPObj *obj _U_, char *ibuf, int ibuflen,
+static int catsearch_afp(AFPObj *obj _U_, char *ibuf, int ibuflen,
                   char *rbuf, int *rbuflen, int ext)
 {
     struct vol *vol;
index c594480a9819768ee712a900c0bd1f6877c4279d..0711b56819af5a2301f283d157cd240f99d40b86 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: desktop.c,v 1.38 2009-10-13 22:55:36 didg Exp $
+ * $Id: desktop.c,v 1.39 2009-10-14 01:38:28 didg Exp $
  *
  * See COPYRIGHT.
  *
@@ -64,7 +64,7 @@ int afp_closedt(AFPObj *obj _U_, char *ibuf _U_, int ibuflen _U_, char *rbuf _U_
     return( AFP_OK );
 }
 
-struct savedt  si = { { 0, 0, 0, 0 }, -1, 0, 0 };
+static struct savedt   si = { { 0, 0, 0, 0 }, -1, 0, 0 };
 
 static char *icon_dtfile(struct vol *vol, u_char creator[ 4 ])
 {
index 37c65d0333d41e445b61c90ee4745ec9d34a23c7..62acd0b005355a4236a384683343eb3446bde618 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.h,v 1.22 2009-10-13 22:55:37 didg Exp $
+ * $Id: file.h,v 1.23 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -119,6 +119,9 @@ extern int renamefile   (const struct vol *, char *, char *, char *, struct adou
 extern int copyfile     (const struct vol *, const struct vol *, char *, char *, char *, struct adouble *);
 extern int deletefile   (const struct vol *, char *, int);
 
+extern int getmetadata  (struct vol *vol, u_int16_t bitmap, struct path *path, 
+                         struct dir *dir, char *buf, int *buflen, struct adouble *adp);
+
 extern void *get_finderinfo (const struct vol *, const char *, struct adouble *, void *);
 
 extern size_t mtoUTF8   (const struct vol *, const char *, size_t , char *, size_t );
index 5e58b326cce993ec1251757d0760591bf74ba5fd..e1ade8d1a7b97a9fdb56b1b70e3171b0e65eb513 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: fork.c,v 1.63 2009-10-13 22:55:37 didg Exp $
+ * $Id: fork.c,v 1.64 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 #define Debug(a) (0)
 #endif
 
-struct ofork           *writtenfork;
-extern int getmetadata(struct vol *vol,
-                 u_int16_t bitmap,
-                 struct path *path, struct dir *dir, char *buf, 
-                 int *buflen, struct adouble *adp);
+#ifdef AFS
+struct ofork *writtenfork;
+#endif
 
 static int getforkparams(struct ofork *ofork, u_int16_t bitmap, char *buf, int *buflen)
 {
index 267c184dff72f638d7155d35e6a26f0a25fc6dc2..7d69337678304b57ee1c08ee3077d3a55585237c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: fork.h,v 1.14 2009-10-13 22:55:37 didg Exp $
+ * $Id: fork.h,v 1.15 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -51,6 +51,10 @@ struct ofork {
 #define AFPFORK_ACCWR   (1<<5)
 #define AFPFORK_ACCMASK (AFPFORK_ACCRD | AFPFORK_ACCWR)
 
+#ifdef AFS
+extern struct ofork *writtenfork;
+#endif
+
 #define of_name(a) (a)->of_ad->ad_m_name
 /* in ofork.c */
 extern struct ofork *of_alloc    (struct vol *, struct dir *,
index b456cc4ef1e7c40aa8b255b1ea35ee32486c9898..fb19303d684db79f4918c63d77f5890449bc487c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: config.c,v 1.17 2009-10-13 22:55:37 didg Exp $
+ * $Id: config.c,v 1.18 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -92,7 +92,7 @@ static const struct param {
 
 #define ARGV_CHUNK_SIZE 128
 #define MAXLINELEN 2048
-char **parseline(const char *line)
+static char **parseline(const char *line)
 {
     const char  *p;
     int                  argc = 0;
@@ -172,7 +172,7 @@ char **parseline(const char *line)
     return argv;
 }
 
-void freeline( char **argv )
+static void freeline( char **argv )
 {
     char **tmp = argv;
 
index 7f437e2964d44b4026d7749bdd71c0a0df661ab8..01eb92a02a0c6e4b96f4d1f016c9abda0d617e70 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.c,v 1.20 2009-10-13 22:55:37 didg Exp $
+ * $Id: main.c,v 1.21 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -102,6 +102,8 @@ int ifconfig(const char *iname, unsigned long cmd, struct sockaddr_at *sa);
 extern int aep_packet(struct atport *ap, struct sockaddr_at *from, char *data, int len);
 
 int            rtfd;
+int            transition = 0;
+int            stabletimer, newrtmpdata = 0;
 
 static struct atserv   atserv[] = {
     { "rtmp",          1,      rtmp_packet },          /* 0 */
@@ -113,17 +115,17 @@ static int                atservNATSERV = elements( atserv );
 
 struct interface       *interfaces = NULL, *ciface = NULL;
 
-int            debug = 0, quiet = 0, chatty = 0;
-char           *configfile = NULL;
-int            ziptimeout = 0, transition = 0;
-int            stabletimer, stable = 0, newrtmpdata = 0, noparent = 0;
-static int     ninterfaces;
-int            defphase = IFACE_PHASE2;
-int            nfds = 0;
-fd_set         fds;
-char           Packet[ PKTSZ ];
-char           *version = VERSION;
-static char     *pidfile = _PATH_ATALKDLOCK;
+static int             debug = 0, quiet = 0, chatty = 0;
+static char            *configfile = NULL;
+static int             ziptimeout = 0;
+static int             stable = 0, noparent = 0;
+static int             ninterfaces;
+static int             defphase = IFACE_PHASE2;
+static int             nfds = 0;
+static fd_set          fds;
+static char            Packet[ PKTSZ ];
+static char            *version = VERSION;
+static char            *pidfile = _PATH_ATALKDLOCK;
 
 
 /* from config.c */
@@ -712,7 +714,7 @@ consistency()
 }
 #endif /* DEBUG */
 
-void
+static void
 as_debug(int sig _U_)
 {
     struct interface   *iface;
@@ -814,7 +816,7 @@ as_debug(int sig _U_)
 /*
  * Called when SIGTERM is recieved.  Remove all routes and then exit.
  */
-void
+static void
 as_down(int sig _U_)
 {
     struct interface   *iface;
index cc028b68e96e6548be90d9584601112bb1615531..39e6b520be8be88e16b241ecaa1271b443a1ea79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.h,v 1.5 2009-10-13 22:55:37 didg Exp $
+ * $Id: main.h,v 1.6 2009-10-14 01:38:28 didg Exp $
  */
 
 #ifndef ATALKD_MAIN_H
@@ -8,6 +8,9 @@
 #include <sys/cdefs.h>
 #include "config.h"
 
+extern int transition;
+extern int stabletimer, newrtmpdata;
+
 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 );
index e95acce106bc8e9dd97659989501299526351d5e..3b7785ce1c866d5cb9f30b9be99bf1dd3e6da25e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: multicast.c,v 1.12 2009-10-13 22:55:37 didg Exp $
+ * $Id: multicast.c,v 1.13 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -41,6 +41,7 @@
 #include "rtmp.h"
 #include "zip.h"
 #include "main.h"
+#include "multicast.h"
 
 
 static const unsigned char     ethermulti[ 6 ] = {
index d8ef334790e058373c78ca842babce0d9593136d..988b189ff27033db0c4510695bc8454d7117e776 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: multicast.h,v 1.4 2009-10-13 22:55:37 didg Exp $
+ * $Id: multicast.h,v 1.5 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1997 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -11,9 +11,6 @@
 #include <sys/cdefs.h>
 #include "zip.h"
 
-extern unsigned char   ethermultitab[ 253 ][ 6 ];
-extern unsigned char   ethermulti[ 6 ];
-
 int addmulti (const char *, const unsigned char *);
 int zone_bcast (struct ziptab *);
 
index 33b0b72f325efc9d77368599b219ea391c1d6322..62df7c019389dc094aa112c5c4a4595c740d7ee8 100644 (file)
@@ -1,5 +1,5 @@
 /* 
-   $Id: cmd_dbd.c,v 1.12 2009-10-13 22:55:37 didg Exp $
+   $Id: cmd_dbd.c,v 1.13 2009-10-14 01:38:28 didg Exp $
 
    Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
    
@@ -131,7 +131,7 @@ static void sig_handler(int signo)
     return;
 }
 
-void set_signal(void)
+static void set_signal(void)
 {
     struct sigaction sv;
 
@@ -165,7 +165,7 @@ void set_signal(void)
     }        
 }
 
-int get_lock(const char *dbpath)
+static int get_lock(const char *dbpath)
 {
     int lockfd;
     char lockpath[PATH_MAX];
@@ -215,7 +215,7 @@ int get_lock(const char *dbpath)
     return lockfd;
 }
 
-void free_lock(int lockfd)
+static void free_lock(int lockfd)
 {
     struct flock lock;
 
index 1a12c6de659e38a73ec18508548f6333d0d9695b..93866e2c40230aded2532d526883f239ef5bb072 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cmd_dbd_lookup.c,v 1.2 2009-07-12 09:21:34 franklahm Exp $
+ * $Id: cmd_dbd_lookup.c,v 1.3 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (C) Frank Lahm 2009
  * All Rights Reserved.  See COPYING.
  */
 
 
-/* Pull these in from dbd_add.c */
-extern int add_cnid(DBD *dbd, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply);
-extern int get_cnid(DBD *dbd, struct cnid_dbd_rply *rply);
-
 /*
  *  This returns the CNID corresponding to a particular file and logs any inconsitencies.
  *  If roflags == 1 we only scan, if roflag == 0, we modify i.e. call dbd_update
index f1d54ceb929f3abee58bceacf0c390c5a2ae46e9..1d6d6a920287f112e51a84e72a147d3464392776 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  $Id: cmd_dbd_scanvol.c,v 1.9 2009-10-12 11:30:52 franklahm Exp $
+  $Id: cmd_dbd_scanvol.c,v 1.10 2009-10-14 01:38:28 didg Exp $
 
   Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
 
@@ -680,7 +680,7 @@ static int scanvol(struct volinfo *vi, dbd_flags_t flags)
 /* 
    Remove all CNIDs from dbd that are not in dbd_rebuild
 */
-void delete_orphaned_cnids(DBD *dbd, DBD *dbd_rebuild, dbd_flags_t flags)
+static void delete_orphaned_cnids(DBD *dbd, DBD *dbd_rebuild, dbd_flags_t flags)
 {
     int ret, deleted = 0;
     cnid_t dbd_cnid = 0, rebuild_cnid = 0;
index ecc5045d75fa7007306fffb959fb12a0be9b0ac0..709e694facecf3a55f9ab02d426671d8c75e2eaa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_metad.c,v 1.15 2009-10-13 22:55:37 didg Exp $
+ * $Id: cnid_metad.c,v 1.16 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
 
 static int srvfd;
 static int rqstfd;
-volatile sig_atomic_t alarmed = 0;
+static volatile sig_atomic_t alarmed = 0;
 
 #define MAXSPAWN   3                   /* Max times respawned in.. */
 #define TESTTIME   42                  /* this much seconds apfd client tries to  *
@@ -343,7 +343,7 @@ static int set_dbdir(char *dbdir, int len)
 }
 
 /* ------------------ */
-uid_t user_to_uid (char *username)
+static uid_t user_to_uid (char *username)
 {
     struct passwd *this_passwd;
 
@@ -362,7 +362,7 @@ uid_t user_to_uid (char *username)
 }
 
 /* ------------------ */
-gid_t group_to_gid ( char *group)
+static gid_t group_to_gid ( char *group)
 {
     struct group *this_group;
 
@@ -381,7 +381,7 @@ gid_t group_to_gid ( char *group)
 }
 
 /* ------------------ */
-void catch_alarm(int sig _U_) {
+static void catch_alarm(int sig _U_) {
     alarmed = 1;
 }
 
index 6dd547015f64861cf6ddd0dd9125caa810c5163a..cca91c6ef271594e1e21a3632176860f50e37f36 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dbd.h,v 1.5 2009-07-12 09:21:34 franklahm Exp $
+ * $Id: dbd.h,v 1.6 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * Copyright (C) Frank Lahm 2009
@@ -11,6 +11,9 @@
 
 #include <atalk/cnid_dbd_private.h>
 
+extern int add_cnid(DBD *dbd, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply);
+extern int get_cnid(DBD *dbd, struct cnid_dbd_rply *rply);
+
 extern int dbd_stamp(DBD *dbd);
 extern int dbd_add(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
 extern int dbd_get(DBD *dbd, struct cnid_dbd_rqst *, struct cnid_dbd_rply *);
index b1b3599a0abb7542540d78ced4c4187ebb25f5b7..cb155c03a3b8c190307274d964d4780eabf700f6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dbif.c,v 1.15 2009-10-13 22:55:37 didg Exp $
+ * $Id: dbif.c,v 1.16 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * Copyright (C) Frank Lahm 2009
@@ -399,7 +399,7 @@ int dbif_open(DBD *dbd, struct db_param *dbp _U_, int reindex)
 }
 
 /* ------------------------ */
-int dbif_closedb(DBD *dbd)
+static int dbif_closedb(DBD *dbd)
 {
     int i;
     int ret;
index fc3af8204bd7d592527d8b85b8d05aec88e7f504..95a0946d340d4f225ffc1741bdab9816e573f865 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.c,v 1.10 2009-09-03 08:35:15 franklahm Exp $
+ * $Id: main.c,v 1.11 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * Copyright (c) Frank Lahm 2009
@@ -238,7 +238,7 @@ static void switch_to_user(char *dir)
 }
 
 /* ------------------------ */
-int get_lock(void)
+static int get_lock(void)
 {
     int lockfd;
     struct flock lock;
@@ -266,7 +266,7 @@ int get_lock(void)
 }
 
 /* ----------------------- */
-void set_signal(void)
+static void set_signal(void)
 {
     struct sigaction sv;
 
@@ -288,7 +288,7 @@ void set_signal(void)
 }
 
 /* ----------------------- */
-void free_lock(int lockfd)
+static void free_lock(int lockfd)
 {
     struct flock lock;
 
index dec0b53d21136307207eff1418e315a1b09a01e0..017cee89f6de460e90d9dd1b097611f04bc0de9f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: lp.c,v 1.28 2009-10-13 22:55:37 didg Exp $
+ * $Id: lp.c,v 1.29 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -92,11 +92,11 @@ int lp_disconn_inet( int );
 int lp_conn_unix();
 int lp_disconn_unix( int );
 
-char   hostname[ MAXHOSTNAMELEN ];
+static char hostname[ MAXHOSTNAMELEN ];
 
 extern struct sockaddr_at *sat;
 
-struct lp {
+static struct lp {
     int                        lp_flags;
     FILE               *lp_stream;
     int                        lp_seq;
index 6fac410f7c3ab3395eb146b4d7a40503ddab8d2c..668594837aa58cc19ec8a1721ef39b84f925da85 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.c,v 1.27 2009-10-13 22:55:37 didg Exp $
+ * $Id: main.c,v 1.28 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -104,7 +104,7 @@ static void papd_exit(const int i)
   exit(i);
 }
 
-void
+static void
 die(int n)
 {
     struct printer     *pr;
@@ -133,7 +133,7 @@ die(int n)
     papd_exit( n );
 }
 
-void
+static void
 reap(int sig _U_)
 {
     int                status;
@@ -159,7 +159,7 @@ reap(int sig _U_)
     return;
 }
 
-char           rbuf[ 255 + 1 + 8 ];
+static char rbuf[ 255 + 1 + 8 ];
 
 int main(int ac, char **av)
 {
index 3dcb3a4c31e381c8f85099499e98e29dc6d1ff91..4da0b27eda5aa9cfa29f3b2d79ed1c07813d6233 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: session.c,v 1.17 2009-10-13 22:55:37 didg Exp $
+ * $Id: session.c,v 1.18 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -35,8 +35,8 @@ int ps(struct papfile *infile, struct papfile *outfile, struct sockaddr_at *sat)
 
 extern unsigned char   connid, quantum, oquantum;
 
-char           buf[ PAP_MAXQUANTUM ][ 4 + PAP_MAXDATA ];
-struct iovec   niov[ PAP_MAXQUANTUM ] = {
+static char            buf[ PAP_MAXQUANTUM ][ 4 + PAP_MAXDATA ];
+static struct iovec    niov[ PAP_MAXQUANTUM ] = {
     { buf[ 0 ],        0 },
     { buf[ 1 ],        0 },
     { buf[ 2 ],        0 },
@@ -46,7 +46,7 @@ struct iovec  niov[ PAP_MAXQUANTUM ] = {
     { buf[ 6 ],        0 },
     { buf[ 7 ],        0 },
 };
-struct iovec   iov[ PAP_MAXQUANTUM ] = {
+static struct iovec    iov[ PAP_MAXQUANTUM ] = {
     { buf[ 0 ] + 4,    0 },
     { buf[ 1 ] + 4,    0 },
     { buf[ 2 ] + 4,    0 },
index 94d95d82242361487c4b180b1c1fe8ddc6c8be2f..7498b93de74bdd1104f5c7ea999142191b2f9974 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: psf.c,v 1.10 2009-10-13 22:55:37 didg Exp $
+ * $Id: psf.c,v 1.11 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -55,8 +55,8 @@ int pexecv(char *path, char *argv[]);
 int copyio();
 int textps();
 
-char           psapath[] = _PATH_PSA;
-char           *psaargv[] = { "psa", 0, 0, 0, 0 };
+static char            psapath[] = _PATH_PSA;
+static char            *psaargv[] = { "psa", 0, 0, 0, 0 };
 
 /*
  * If we're not doing accounting, we just call pap as below.
@@ -65,23 +65,23 @@ char                *psaargv[] = { "psa", 0, 0, 0, 0 };
  * arg 4.  The second time, we call it with "-c" in arg 2, pagecount.ps
  * in arg 3, and 0 in arg 4.
  */
-char           pappath[] = _PATH_PAP;
-char           *papargv[] = { "pap", "-sstatus", 0, 0, 0, 0, 0, 0 };
+static char            pappath[] = _PATH_PAP;
+static char            *papargv[] = { "pap", "-sstatus", 0, 0, 0, 0, 0, 0 };
 
-char           revpath[] = _PATH_PSORDER;
-char           *revargv[] = { "psorder", "-d", 0 };
+static char            revpath[] = _PATH_PSORDER;
+static char            *revargv[] = { "psorder", "-d", 0 };
 
-char           *filtargv[] = { 0, 0, 0 };
+static char            *filtargv[] = { 0, 0, 0 };
 
-char           inbuf[ 1024 * 8 ];
-int            inlen;
+static char            inbuf[ 1024 * 8 ];
+static int             inlen;
 
-FILE           *acctfile = NULL;
-int            literal;
-int            width = 80, length = 66, indent = 0;
-char           *prog, *name, *host;
+static FILE            *acctfile = NULL;
+static int             literal;
+static int             width = 80, length = 66, indent = 0;
+static char            *prog, *name, *host;
 
-struct papersize {
+static struct papersize {
     int                width;
     int                length;
    float       win;
@@ -458,10 +458,10 @@ notdone:
     return( 0 );
 }
 
-char           *font = "Courier";
-int            point = 11;
+static char            *font = "Courier";
+static int             point = 11;
 
-char           pspro[] = "\
+static char            pspro[] = "\
 /GSV save def                                          % global VM\n\
 /SP {\n\
        /SV save def                                    % save vmstate\n\
index 97c934b0b7c1b62eafed0da7124cbf6dffa66ff0..963c34ee9d1979776e26024d8971289212d140af 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_guest.c,v 1.15 2009-10-13 22:55:37 didg Exp $
+ * $Id: uams_guest.c,v 1.16 2009-10-14 01:38:28 didg Exp $
  *
  * (c) 2001 (see COPYING)
  */
@@ -88,7 +88,7 @@ static int noauth_login_ext(void *obj, char *uname _U_, struct passwd **uam_pwd,
 
 
 /* Printer NoAuthUAM Login */
-int noauth_printer(char *start, char *stop, char *username, struct papfile *out)
+static int noauth_printer(char *start, char *stop, char *username, struct papfile *out)
 {
     char       *data, *p, *q;
     static const char *loginok = "0\r";
index afa62cd93578688f0882155b3837d0843e7462fe..ebf483b5535fc33a6b6627e6454a7b6ad92b882a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_pam.c,v 1.19 2009-10-13 22:55:37 didg Exp $
+ * $Id: uams_pam.c,v 1.20 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -343,7 +343,7 @@ static int pam_changepw(void *obj _U_, char *username,
 
 
 /* Printer ClearTxtUAM login */
-int pam_printer(char *start, char *stop, char *username, struct papfile *out)
+static int pam_printer(char *start, char *stop, char *username, struct papfile *out)
 {
     int PAM_error;
     char       *data, *p, *q;
index a9cd08bd69b4b399d36a51709dd9ad16787abf3b..bc6bb196215e54b4eae45ac0e70a8f4bd6805a71 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: adouble.h,v 1.44 2009-10-13 22:55:37 didg Exp $
+ * $Id: adouble.h,v 1.45 2009-10-14 01:38:28 didg Exp $
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
  *
@@ -500,6 +500,7 @@ static inline mode_t ad_hf_mode (mode_t mode)
 }
 
 /* ad_read.c/ad_write.c */
+extern int     sys_ftruncate(int fd, off_t length);
 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);
index b24ee4a57c31721263bf41bd1ab754aec507e86a..bd2b897cb23d87c1d09de01fa92517c0ae955972 100644 (file)
@@ -96,14 +96,16 @@ 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 int     isupper_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 ucs2_t   *strcasechr_w (const ucs2_t *s, ucs2_t c);
 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   *strstr_w (const ucs2_t *s, const ucs2_t *ins);
 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 *);
index 92f978681338c5964afb5ef6c91106dc355791d2..bc6ec56cb88411a831ff8696cd6e4c19c8fb02a9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atp_rsel.c,v 1.5 2009-10-13 22:55:37 didg Exp $
+ * $Id: atp_rsel.c,v 1.6 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1997 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -31,7 +31,7 @@ static int    release_count = 0;
 #endif /* DROP_ATPTREL */
 
 
-int
+static int
 resend_request(ATP ah)
 {
     /*
index e48ed5b48fc5583ba07392d255f2d0de33069f02..ca3447f7ebc40621f703b2776cf77675ea81d74f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_cdb_add.c,v 1.4 2008-12-03 18:35:44 didg Exp $
+ * $Id: cnid_cdb_add.c,v 1.5 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -72,7 +72,7 @@ unsigned char *make_cnid_data(const struct stat *st,const cnid_t did,
 }    
 
 /* --------------- */
-int db_stamp(void *buffer, size_t size)
+static int db_stamp(void *buffer, size_t size)
 {
 time_t t;
     memset(buffer, 0, size);
index fbbfbcc974b3d5b60cfd723331342c6a2b471b20..6c8ffcd90ae66c64f01ea3f5eebf3bde84775956 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dsi_stream.c,v 1.12 2005-04-28 20:50:02 bfernhomberg Exp $
+ * $Id: dsi_stream.c,v 1.13 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1998 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
@@ -51,7 +51,7 @@
 /* ------------------------- 
  * we don't use a circular buffer.
 */
-void dsi_buffer(DSI *dsi)
+static void dsi_buffer(DSI *dsi)
 {
     fd_set readfds, writefds;
     int    len;
index 369bf04bbce0fc6a3f1a878d0c757f9c8aa0648f..70255d454c0a2e84a995ebd132a259f9a8cf2004 100644 (file)
@@ -1975,12 +1975,12 @@ int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key)
        return tdb_unlock(tdb, BUCKET(tdb_hash(&key)), F_WRLCK);
 }
 
-int tdb_chainlock_read(TDB_CONTEXT *tdb, TDB_DATA key)
+static int tdb_chainlock_read(TDB_CONTEXT *tdb, TDB_DATA key)
 {
        return tdb_lock(tdb, BUCKET(tdb_hash(&key)), F_RDLCK);
 }
 
-int tdb_chainunlock_read(TDB_CONTEXT *tdb, TDB_DATA key)
+static int tdb_chainunlock_read(TDB_CONTEXT *tdb, TDB_DATA key)
 {
        return tdb_unlock(tdb, BUCKET(tdb_hash(&key)), F_RDLCK);
 }
index f560ad08cc2385a905ffc7ba1d6de24d0375c135..9429bb61d14bbf6add711b9c792dbf88c476a02a 100644 (file)
@@ -170,7 +170,7 @@ if (ch == CH_UNIX) ret = NULL;
        return ret;
 }
 
-struct charset_functions* get_charset_functions (charset_t ch)
+static struct charset_functions* get_charset_functions (charset_t ch)
 {
        if (charsets[ch] != NULL)
                return charsets[ch];
@@ -181,7 +181,7 @@ struct charset_functions* get_charset_functions (charset_t ch)
 }
        
 
-void lazy_initialize_conv(void)
+static void lazy_initialize_conv(void)
 {
        static int initialized = 0;
 
index 4df0e93d5fb365dbce5d66fa7f9a27cb6ecf7e32..17125004d7fde59c4e3d39ff8af39bdd75d8a6e9 100644 (file)
@@ -157,7 +157,7 @@ int atalk_register_charset(struct charset_functions *funcs)
        return 0;
 }
 
-void lazy_initialize_iconv(void)
+static void lazy_initialize_iconv(void)
 {
        static int initialized = 0;
        int i;
index ab169464b96514e246ea983101b08378fcb2203e..45ffcd93f19db8a9ccb0e6ee9ec942c83eac16c8 100644 (file)
@@ -334,7 +334,7 @@ ucs2_t *strcat_w(ucs2_t *dest, const ucs2_t *src)
 
 
 /* ------------------------ */
-ucs2_t do_precomposition(unsigned int base, unsigned int comb) 
+static ucs2_t do_precomposition(unsigned int base, unsigned int comb) 
 {
        int min = 0;
        int max = sizeof(precompositions) / sizeof(precompositions[0]) - 1;
@@ -358,7 +358,7 @@ ucs2_t do_precomposition(unsigned int base, unsigned int comb)
 }
 
 /* -------------------------- */
-u_int32_t do_decomposition(ucs2_t base) 
+static u_int32_t do_decomposition(ucs2_t base) 
 {
        int min = 0;
        int max = sizeof(decompositions) / sizeof(decompositions[0]) - 1;
index f42edac8fc4d126c101866bf3b4b6e0d1384459b..7fdb5d8106b124e3907f1887acc86ac595c265e1 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   $Id: locking.c,v 1.1 2009-10-02 09:32:41 franklahm Exp $
+   $Id: locking.c,v 1.2 2009-10-14 01:38:29 didg Exp $
    Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
 
    This program is free software; you can redistribute it and/or modify
@@ -15,6 +15,7 @@
 
 #include <unistd.h>
 #include <fcntl.h>
+#include <atalk/util.h>
 
 /*
  * Function: lock_reg
index 7aef01a663901573b91a8e72d8c3a5714ea4931a..132662b5b0eda56fa25ca675e6d6857193565398 100644 (file)
@@ -208,7 +208,7 @@ static void generate_message_details(char *message_details_buffer,
     strncat(ptr, "): ", len);
 }
 
-int get_syslog_equivalent(enum loglevels loglevel)
+static int get_syslog_equivalent(enum loglevels loglevel)
 {
     switch (loglevel)
     {
index dadeda6ae4c7b803f7559a31da26eea32a97aa19..031954163e73675a6d037098a80f25a813ae657c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: server_ipc.c,v 1.2 2005-04-28 20:50:05 bfernhomberg Exp $
+ * $Id: server_ipc.c,v 1.3 2009-10-14 01:38:29 didg Exp $
  *
  * All rights reserved. See COPYRIGHT.
  *
@@ -56,7 +56,7 @@ int server_ipc_parent(void *obj _U_)
 }
 
 /* ----------------- */
-int ipc_kill_token (struct ipc_header *ipc, server_child *children)
+static int ipc_kill_token (struct ipc_header *ipc, server_child *children)
 {
     pid_t pid;
 
@@ -72,7 +72,7 @@ int ipc_kill_token (struct ipc_header *ipc, server_child *children)
 }
 
 /* ----------------- */
-int ipc_get_session (struct ipc_header *ipc, server_child *children)
+static int ipc_get_session (struct ipc_header *ipc, server_child *children)
 {
     u_int32_t boottime;
     u_int32_t idlen;
index d8e01804180056f50bd4ae48f384df233335b325..0dc4df4e1ed9cdeff46123669313740ac1a52377 100644 (file)
@@ -113,7 +113,7 @@ static int RF_chown_adouble(const struct vol *vol, const char *path, uid_t uid,
 }
 
 /* ----------------- */
-int RF_renamedir_adouble(const struct vol *vol _U_, const char *oldpath _U_, const char *newpath _U_)
+static int RF_renamedir_adouble(const struct vol *vol _U_, const char *oldpath _U_, const char *newpath _U_)
 {
     return 0;
 }
@@ -273,7 +273,7 @@ static int RF_deletefile_adouble(const struct vol *vol, const char *file )
 }
 
 /* ----------------- */
-int RF_renamefile_adouble(const struct vol *vol, const char *src, const char *dst)
+static int RF_renamefile_adouble(const struct vol *vol, const char *src, const char *dst)
 {
     char  adsrc[ MAXPATHLEN + 1];
     int   err = 0;
@@ -658,7 +658,7 @@ static int RF_deletefile_ads(const struct vol *vol, const char *file )
 }
 
 /* --------------------------- */
-int RF_renamefile_ads(const struct vol *vol, const char *src, const char *dst)
+static int RF_renamefile_ads(const struct vol *vol, const char *src, const char *dst)
 {
     char  adsrc[ MAXPATHLEN + 1];
     int   err = 0;
@@ -714,7 +714,7 @@ static int validupath_osx(const struct vol *vol, const char *name)
 }             
 
 /* ---------------- */
-int RF_renamedir_osx(const struct vol *vol, const char *oldpath, const char *newpath)
+static int RF_renamedir_osx(const struct vol *vol, const char *oldpath, const char *newpath)
 {
     /* We simply move the corresponding ad file as well */
     char   tempbuf[258]="._";
@@ -722,7 +722,7 @@ int RF_renamedir_osx(const struct vol *vol, const char *oldpath, const char *new
 }
 
 /* ---------------- */
-int RF_deletecurdir_osx(const struct vol *vol)
+static int RF_deletecurdir_osx(const struct vol *vol)
 {
     return netatalk_unlink( vol->vfs->ad_path(".",0) );
 }
@@ -748,7 +748,7 @@ RF_setdirowner_osx(const struct vol *vol _U_, const char *path _U_, uid_t uid _U
 }
 
 /* ---------------- */
-int RF_renamefile_osx(const struct vol *vol, const char *src, const char *dst)
+static int RF_renamefile_osx(const struct vol *vol, const char *src, const char *dst)
 {
     char  adsrc[ MAXPATHLEN + 1];
     int   err = 0;
@@ -767,7 +767,7 @@ int RF_renamefile_osx(const struct vol *vol, const char *src, const char *dst)
     return 0;
 }
 
-struct vfs_ops netatalk_adouble = {
+static struct vfs_ops netatalk_adouble = {
     /* ad_path:           */ ad_path,
     /* validupath:        */ validupath_adouble,
     /* rf_chown:          */ RF_chown_adouble,
@@ -785,7 +785,7 @@ struct vfs_ops netatalk_adouble = {
 #endif
 };
 
-struct vfs_ops netatalk_adouble_osx = {
+static struct vfs_ops netatalk_adouble_osx = {
     /* ad_path:          */ ad_path_osx,
     /* validupath:       */ validupath_osx,
     /* rf_chown:         */ RF_chown_adouble,
@@ -800,7 +800,7 @@ struct vfs_ops netatalk_adouble_osx = {
 };
 
 /* samba sfm format. ad_path shouldn't be set her */
-struct vfs_ops netatalk_adouble_sfm = {
+static struct vfs_ops netatalk_adouble_sfm = {
     /* ad_path:          */ ad_path_sfm,
     /* validupath:       */ validupath_adouble,
     /* rf_chown:         */ RF_chown_ads,