]> diplodocus.org Git - nmh/blobdiff - sbr/cpydgst.c
crawl_folders.h: Base header on implementation.
[nmh] / sbr / cpydgst.c
index 12829f1312b83f405b87adfceaca6ce792bff8b7..4878e8feaaa530b82d17186c1474fef649c16543 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * cpydgst.c -- copy from one fd to another in encapsulating mode
+/* cpydgst.c -- copy from one fd to another in encapsulating mode
  *           -- (do dashstuffing of input data).
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  *           -- (do dashstuffing of input data).
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
@@ -8,7 +6,9 @@
  * complete copyright information.
  */
 
  * complete copyright information.
  */
 
-#include <h/mh.h>
+#include "h/mh.h"
+#include "cpydgst.h"
+#include "error.h"
 
 /*
  * We want to perform the substitution
 
 /*
  * We want to perform the substitution
@@ -35,9 +35,9 @@
 void
 cpydgst (int in, int out, char *ifile, char *ofile)
 {
 void
 cpydgst (int in, int out, char *ifile, char *ofile)
 {
-    register int i, j, state;
-    register char *cp, *ep;
-    register char *bp, *dp;
+    int i, j, state;
+    char *cp, *ep;
+    char *bp, *dp;
     char buffer[BUFSIZ], outbuf[BUFSIZ];
 
     dp = (bp = outbuf) + sizeof outbuf;
     char buffer[BUFSIZ], outbuf[BUFSIZ];
 
     dp = (bp = outbuf) + sizeof outbuf;
@@ -51,8 +51,8 @@ cpydgst (int in, int out, char *ifile, char *ofile)
                        output ('-');
                        output (' ');
                    }
                        output ('-');
                        output (' ');
                    }
-                   state = S2; /* fall */
-
+                   state = S2;
+                   /* FALLTHRU */
                case S2: 
                    output (*cp);
                    if (*cp == '\n')
                case S2: 
                    output (*cp);
                    if (*cp == '\n')