]> arthur.barton.de Git - netatalk.git/blobdiff - etc/papd/headers.c
Update NEWS
[netatalk.git] / etc / papd / headers.c
index 266036270f21926c0b85c017faffc9d2ccf12e76..dd315396c16cf226077ccaadb42de66b54f0b90d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: headers.c,v 1.11 2008-08-14 19:57:52 didg Exp $
+ * $Id: headers.c,v 1.14 2009-10-29 13:38:15 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;
@@ -92,6 +91,9 @@ int ch_for( in, out )
 
     case -1 :
         return( CH_MORE );
+
+    case -2 :
+        return( CH_ERROR );
     }
 
     cmt = get_text(start, linelength);
@@ -109,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;
@@ -121,10 +122,13 @@ int ch_title( in, out )
 
     case -1 :
        return( CH_MORE );
+
+    case -2 :
+        return( CH_ERROR );
     }
 
 #ifdef DEBUG
-    LOG(log_debug, logtype_papd, "Parsing %%Title");
+    LOG(log_debug9, logtype_papd, "Parsing %%Title");
 #endif
 
     cmt = get_text(start, linelength);
@@ -153,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;
@@ -165,6 +168,9 @@ int ch_creator( in, out )
 
     case -1 :
        return( CH_MORE );
+
+    case -2 :
+        return( CH_ERROR );
     }
 
     cmt = get_text(start, linelength);
@@ -183,14 +189,13 @@ 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;
 
 #ifdef DEBUG
-    LOG(log_debug, logtype_papd, "End Comment");
+    LOG(log_debug9, logtype_papd, "End Comment");
 #endif
     in->pf_state |= PF_STW;
 
@@ -200,6 +205,9 @@ int ch_endcomm( in, out )
 
     case -1 :
        return( CH_MORE );
+
+    case -2 :
+        return( CH_ERROR );
     }
 
     in->pf_state |= PF_TRANSLATE;
@@ -210,14 +218,13 @@ 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;
 
 #ifdef DEBUG
-    LOG(log_debug, logtype_papd, "Start translate");
+    LOG(log_debug9, logtype_papd, "Start translate");
 #endif
 
     switch ( markline( in, &start, &linelength, &crlflength )) {
@@ -226,6 +233,9 @@ int ch_starttranslate(in,out)
 
     case -1 :
         return( CH_MORE );
+
+    case -2 :
+        return( CH_ERROR );
     }
 
     in->pf_state |= PF_TRANSLATE;
@@ -235,14 +245,13 @@ 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;
 
 #ifdef DEBUG
-    LOG(log_debug, logtype_papd, "EndTranslate");
+    LOG(log_debug9, logtype_papd, "EndTranslate");
 #endif
 
     switch ( markline( in, &start, &linelength, &crlflength )) {
@@ -251,6 +260,9 @@ int ch_endtranslate(in,out)
 
     case -1 :
         return( CH_MORE );
+
+    case -2 :
+        return( CH_ERROR );
     }
 
     lp_write( in, start, linelength + crlflength );
@@ -260,14 +272,13 @@ 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;
 
 #ifdef DEBUG
-    LOG(log_debug, logtype_papd, "TranslateOne");
+    LOG(log_debug9, logtype_papd, "TranslateOne");
 #endif
 
     switch ( markline( in, &start, &linelength, &crlflength )) {
@@ -276,6 +287,9 @@ int ch_translateone(in,out)
 
     case -1 :
         return( CH_MORE );
+
+    case -2 :
+        return( CH_ERROR );
     }
 
     in->pf_state |= PF_TRANSLATE;