]> code.delx.au - gnu-emacs/blobdiff - lib-src/hexl.c
*** empty log message ***
[gnu-emacs] / lib-src / hexl.c
index 053efbe0ccda0d0bdf3597e3fc65cc323258c034..98561cf604de789dba4a9e0006dd1d4609f6176b 100644 (file)
@@ -1,3 +1,24 @@
+/* Convert files for Emacs Hexl mode.
+   Copyright (C) 1989, 2001, 2002, 2003, 2004, 2005,
+                 2006, 2007  Free Software Foundation, Inc.
+
+This file is not considered part of GNU Emacs.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -54,7 +75,7 @@ main (argc, argv)
    ** <filename>       dump filename
    ** -                (as filename == stdin)
    */
-    
+
   while (*argv && *argv[0] == '-' && (*argv)[1])
     {
       /* A switch! */
@@ -154,7 +175,7 @@ main (argc, argv)
 #endif
          for (;;)
            {
-             register int i, c, d;
+             register int i, c = 0, d;
 
 #define hexchar(x) (isdigit (x) ? x - '0' : x - 'a' + 10)
 
@@ -206,7 +227,7 @@ main (argc, argv)
          string[17] = '\0';
          for (;;)
            {
-             register int i, c;
+             register int i, c = 0;
 
              for (i=0; i < 16; ++i)
                {
@@ -251,12 +272,17 @@ main (argc, argv)
        fclose (fp);
 
     } while (*argv != NULL);
-  return 0;
+  return EXIT_SUCCESS;
 }
 
 void
 usage ()
 {
   fprintf (stderr, "usage: %s [-de] [-iso]\n", progname);
-  exit (1);
+  exit (EXIT_FAILURE);
 }
+
+/* arch-tag: 20e04fb7-926e-4e48-be86-64fe869ecdaa
+   (do not change this comment) */
+
+/* hexl.c ends here */