]> arthur.barton.de Git - netatalk.git/blobdiff - bin/afile/afile.c
Enhanced machine type
[netatalk.git] / bin / afile / afile.c
index ee1487ade6339622a75a2922fde93cee40db158c..e70c850090675c6013b37ef0c3c8245490ffff35 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afile.c,v 1.4 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: afile.c,v 1.7 2009-10-14 01:38:28 didg Exp $
  *
     afile - determine the MacOS creator/type of files
 
@@ -52,9 +52,6 @@
 
 #include "common.h"
 
-/* Please change this whenever you change this file. */
-#define AFILE_VERSION "1.0.0"
-
 /* Possible return types. These are taken from the original afile for
  * compatibility.
  */
 
 
 /* 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,
@@ -95,9 +92,9 @@ void help(char *prog)
 }
 
 /* Print the version. */
-void version()
+static void version(void)
 {
-  fprintf(stderr, "afile " AFILE_VERSION " (netatalk " VERSION ")\n");
+  fprintf(stderr, "afile (netatalk " VERSION ")\n");
 }
 
 /* Argument Handling
@@ -105,7 +102,7 @@ void version()
  * 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;
 
@@ -152,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;
@@ -182,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;
@@ -221,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;