]> arthur.barton.de Git - netatalk.git/blobdiff - etc/papd/comment.c
sys/syslog.h -> syslog.h
[netatalk.git] / etc / papd / comment.c
index 426627182c0f776b2cc4b3d78ff067f9bf503a31..98c7e88c3c9f6896b0b924641925101cfd7ec03d 100644 (file)
@@ -1,13 +1,15 @@
 /*
+ * $Id: comment.c,v 1.5.2.1 2002-03-12 15:44:38 srittau Exp $
+ *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
-#include <sys/syslog.h>
+#include <syslog.h>
 #include <sys/param.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -19,7 +21,7 @@ struct comstate       *comstate;
 
 char   *comcont = "%%+";
 
-compop()
+void compop( void )
 {
     struct comstate    *cs;
 
@@ -28,8 +30,8 @@ compop()
     free( cs );
 }
 
-compush( comment )
-    struct comment     *comment;
+void compush( comment )
+    struct papd_comment        *comment;
 {
     struct comstate    *cs;
 
@@ -45,11 +47,11 @@ compush( comment )
     comstate = cs;
 }
 
-comswitch( comments, handler )
-    struct comment     *comments;
+int comswitch( comments, handler )
+    struct papd_comment        *comments;
     int                        (*handler)();
 {
-    struct comment     *c, *comment = NULL;
+    struct papd_comment        *c, *comment = NULL;
 
     for ( c = comments; c->c_begin; c++ ) {
        if ( c->c_handler == handler ) {
@@ -65,7 +67,7 @@ comswitch( comments, handler )
     return( 0 );
 }
 
-comcmp( start, stop, str, how )
+int comcmp( start, stop, str, how )
     char       *start, *stop, *str;
     int                how;
 {
@@ -74,11 +76,11 @@ comcmp( start, stop, str, how )
     len = stop - start;
     cc = strlen( str );
     if ( how & C_FULL ) {
-       if ( cc == len & strncmp( str, start, cc ) == 0 ) {
+       if ( (cc == len) && (strncmp( str, start, cc ) == 0) ) {
            return( 0 );
        }
     } else {
-       if ( cc <= len && strncmp( str, start, cc ) == 0 ) {
+       if ( (cc <= len) && (strncmp( str, start, cc ) == 0) ) {
            return( 0 );
        }
     }
@@ -86,12 +88,11 @@ comcmp( start, stop, str, how )
     return( 1 );
 }
 
-    struct comment *
-commatch( start, stop, comments )
+struct papd_comment *commatch( start, stop, comments )
     char               *start, *stop;
-    struct comment     comments[];
+    struct papd_comment        comments[];
 {
-    struct comment     *comment;
+    struct papd_comment        *comment;
 
     for ( comment = comments; comment->c_begin; comment++ ) {
        if ( comcmp( start, stop, comment->c_begin, comment->c_flags ) == 0 ) {
@@ -105,8 +106,7 @@ commatch( start, stop, comments )
     }
 }
 
-    char *
-comtoken( start, stop, pos, delim )
+char *comtoken( start, stop, pos, delim )
     char       *start, *stop, *pos, *delim;
 {
     if ( pos < start || pos > stop ) {