]> arthur.barton.de Git - netatalk.git/commitdiff
CVS id tags, define fixes, code beautification
authorrufustfirefly <rufustfirefly>
Mon, 25 Jun 2001 20:13:45 +0000 (20:13 +0000)
committerrufustfirefly <rufustfirefly>
Mon, 25 Jun 2001 20:13:45 +0000 (20:13 +0000)
50 files changed:
ChangeLog
etc/atalkd/aep.c
etc/atalkd/atserv.h
etc/atalkd/config.c
etc/atalkd/gate.h
etc/atalkd/interface.h
etc/atalkd/list.h
etc/atalkd/main.c
etc/atalkd/main.h
etc/atalkd/multicast.c
etc/atalkd/multicast.h
etc/atalkd/nbp.c
etc/atalkd/nbp.h
etc/atalkd/route.c
etc/atalkd/rtmp.c
etc/atalkd/rtmp.h
etc/atalkd/zip.c
etc/atalkd/zip.h
etc/papd/auth.c
etc/papd/comment.c
etc/papd/comment.h
etc/papd/file.c
etc/papd/file.h
etc/papd/lp.c
etc/papd/lp.h
etc/papd/main.c
etc/papd/ppd.c
etc/papd/ppd.h
etc/papd/printcap.c
etc/papd/printcap.h
etc/papd/printer.h
etc/papd/queries.c
etc/papd/session.c
etc/papd/session.h
etc/papd/showppd.c
etc/papd/uam.c
etc/papd/uam_auth.h
etc/psf/psa.c
etc/psf/psf.c
etc/uams/uams_dhx_pam.c
etc/uams/uams_dhx_passwd.c
etc/uams/uams_guest.c
etc/uams/uams_krb4/kuam.c
etc/uams/uams_krb4/lifetime.c
etc/uams/uams_krb4/send_to_kdc.c
etc/uams/uams_krb4/uams_krb4.c
etc/uams/uams_pam.c
etc/uams/uams_passwd.c
etc/uams/uams_pgp.c
etc/uams/uams_randnum.c

index 866d15501f98b30221c25ae38fe490e8ff38cc31..c7da171ae6a78d926bfb9ffdb736aef730a71cc0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-($Id: ChangeLog,v 1.53 2001-06-25 18:17:49 rufustfirefly Exp $)
+($Id: ChangeLog,v 1.54 2001-06-25 20:13:45 rufustfirefly Exp $)
 
 2001-06-25  jeff b  <jeff@univrel.pr.uconn.edu>
        * etc/afpd/auth.c, etc/afpd/main.c, etc/afpd/uam.c,
@@ -10,6 +10,9 @@
        * etc/afpd/uam.c, etc/papd/uam.c: fixed DISABLE_SHELLCHECK
        support in both afpd and papd (Jason Keltz <jas@cs.yorku.ca>)
 
+       * etc/*/*.{c,h}: corrected malformed defines, nicer comments,
+       CVS Id tags
+
 2001-06-20  jeff b  <jeff@univrel.pr.uconn.edu>
        * configure.in: check for linux/quota.h before enabling
        QUOTACTL_WRAPPER (Joe Clarke) 
index f378b063fff57418bf10b64ad5ebe68ced50b047..d3fff8f5d1f89eaf06713fa42a4254f20bbac7fa 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: aep.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 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 <sys/types.h>
index 64474206b9c3c9aeb740659842f7d674ac410a3d..e66ccadd96e7eb3843974ec9832656497c34e358 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: atserv.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1992 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
index 42a64856a6144c6d9e7d330213eea27f05719631..488ba8c423773e67c707f89ce9ab192c475959b3 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: config.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 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/types.h>
 #include <sys/stat.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
+#endif /* HAVE_FCNTL_H */
 #include <errno.h>
 
 #ifdef __svr4__
 #include <sys/sockio.h>
 #include <sys/stropts.h>
-#endif __svr4__
+#endif /* __svr4__ */
 
 #include "interface.h"
 #include "multicast.h"
@@ -38,7 +42,7 @@
 
 #ifndef IFF_SLAVE /* a little backward compatibility */
 #define IFF_SLAVE 0
-#endif
+#endif /* IFF_SLAVE */
 
 int    router(), dontroute(), seed(), phase(), net(), addr(), zone();
 
@@ -253,7 +257,7 @@ int readconf( cf )
        fclose(conf);
        return -1;
     }
-#endif __svr4__
+#endif /* __svr4__ */
 
     while ( fgets( line, sizeof( line ), conf ) != NULL ) {
        if (( argv = parseline( line )) == NULL ) {
@@ -287,7 +291,7 @@ int readconf( cf )
        if ((ifr.ifr_flags & IFF_MULTICAST) == 0)
            fprintf(stderr, "%s: multicast may not work properly.\n",
                    ifr.ifr_name);
-#endif
+#endif /* IFF_MULTICAST */
 
        /* configure hw multicast for this interface. */
        if (addmulti(ifr.ifr_name, NULL) < 0) {
@@ -295,7 +299,7 @@ int readconf( cf )
          fprintf(stderr, "Can't configure multicast.\n");
          goto read_conf_err;
        }
-#endif __svr4__
+#endif /* __svr4__ */
 
        if (( niface = newiface( argv[ 0 ] )) == NULL ) {
            perror( "newiface" );
@@ -347,7 +351,7 @@ int readconf( cf )
 
 #ifndef __svr4__
     close( s );
-#endif
+#endif /* __svr4__ */
 
     fclose( conf );
 
@@ -366,7 +370,7 @@ int readconf( cf )
 read_conf_err:
 #ifndef __svr4__
     close(s);
-#endif
+#endif /* __svr4__ */
     fclose(conf);
     return -1;
 }
@@ -647,7 +651,7 @@ int getifconf()
        if ((ifr.ifr_flags & IFF_MULTICAST) == 0)
          fprintf(stderr, "%s: multicast may not work correctly.\n",
                  ifr.ifr_name);
-#endif
+#endif /* IFF_MULTICAST */
 
        if (addmulti(ifr.ifr_name, NULL) < 0) {
          fprintf(stderr, "%s: disabled.\n", ifr.ifr_name);
@@ -695,11 +699,11 @@ struct interface *newiface( name )
     strncpy( niface->i_name, name, sizeof(niface->i_name));
 #ifdef BSD4_4
     niface->i_addr.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
     niface->i_addr.sat_family = AF_APPLETALK;
 #ifdef BSD4_4
     niface->i_caddr.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
     niface->i_caddr.sat_family = AF_APPLETALK;
     return( niface );
 }
@@ -753,4 +757,4 @@ int plumb()
 
     return( 0 );
 }
-#endif __svr4__
+#endif /* __svr4__ */
index ca09fb7b19ed3b88881774b8a4ef4b66b7d02117..9d2869f0ce6e0356a1e071c8f84e7d515262a4cb 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: gate.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
index 3c682088c89c78e879c687a5fb2a90fe94df2c67..735b1f7ecc5c46180d5221b1f09e6b86cf0a53ff 100644 (file)
@@ -1,4 +1,5 @@
 /*
+ * $Id: interface.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
  * Copyright (c) 1990,1992 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
@@ -52,4 +53,4 @@ extern struct interface       *interfaces;
 extern struct interface        *ciface;
 struct interface       *newiface __P((const char *));
 
-#endif
+#endif /* ATALKD_INTERFACE_H */
index 8d05b345b5d0906bf5d250f790f5b88285b8af31..17b7cce31e22dc5e1f00376ca49e57d5e5abffd9 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: list.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1992 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
index cf3784b0de86b863a2f10b2c6b3fdcc5e3ef3a3c..e4acd9e767182a55abd50adb84eb3d2e34003c24 100644 (file)
@@ -1,20 +1,22 @@
 /*
+ * $Id: main.c,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 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/types.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #if defined( sun ) && defined( __svr4__ )
 #include </usr/ucbinclude/sys/file.h>
-#else sun __svr4__
+#else /* sun __svr4__ */
 #include <sys/file.h>
-#endif sun __svr4__
+#endif /* sun __svr4__ */
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <sys/ioctl.h>
@@ -45,7 +47,7 @@
 #ifdef __svr4__
 #include <sys/sockio.h>
 #include <termios.h>
-#endif __svr4__
+#endif /* __svr4__ */
 
 #include "interface.h"
 #include "gate.h"
@@ -61,11 +63,11 @@ int ifconfig(const char *iname, unsigned long cmd, struct sockaddr_at *sa);
 /* FIXME/SOCKLEN_T: socklen_t is a unix98 feature */
 #ifndef SOCKLEN_T
 #define SOCKLEN_T unsigned int
-#endif
+#endif /* SOCKLEN_T */
 
 #ifndef WEXITSTATUS
 #define WEXITSTATUS(x) ((x).w_retcode)
-#endif WEXITSTATUS
+#endif /* WEXITSTATUS */
 
 /* linux has a special ioctl for appletalk device destruction.  as of
  * 2.1.57, SIOCDIFADDR works w/ linux. okay, we need to deal with the
@@ -128,14 +130,14 @@ static void atalkd_exit(const int i)
 #if (SIOCDIFADDR != SIOCATALKDIFADDR)
       if (!ifconfig(iface->i_name, SIOCATALKDIFADDR, &iface->i_addr)) 
        continue;
-#endif
-#endif
+#endif /* SIOCDIFADDR != SIOCATALKDIFADDR */
+#endif /* SIOCATALKIFADDR */
       syslog( LOG_ERR, "difaddr(%u.%u): %m", 
              ntohs(iface->i_addr.sat_addr.s_net), 
              iface->i_addr.sat_addr.s_node);
     }
   }
-#endif 
+#endif /* SOPCDOFADDR */
 
   server_unlock(pidfile);
   exit(i);
@@ -144,7 +146,7 @@ static void atalkd_exit(const int i)
 
 #if !defined( ibm032 ) && !defined( _IBMR2 )
     void
-#endif ibm032 _IBMR2
+#endif /* ibm032 _IBMR2 */
 as_timer()
 {
     struct sockaddr_at sat;
@@ -501,7 +503,7 @@ as_timer()
        if ((iface->i_flags & IFACE_ISROUTER)) {
 #ifdef BSD4_4
            sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
            sat.sat_family = AF_APPLETALK;
            sat.sat_addr.s_net = ATADDR_ANYNET;
            sat.sat_addr.s_node = ATADDR_BCAST;
@@ -649,7 +651,7 @@ as_timer()
 
 #ifdef DEBUG
     consistency();
-#endif DEBUG
+#endif /* DEBUG */
 }
 
 #ifdef DEBUG
@@ -686,11 +688,11 @@ consistency()
        }
     }
 }
-#endif DEBUG
+#endif /* DEBUG */
 
 #if !defined( ibm032 ) && !defined( _IBMR2 )
     void
-#endif ibm032 _IBMR2
+#endif /* ! ibm032 && ! _IBMR2 */
 as_debug()
 {
     struct interface   *iface;
@@ -794,7 +796,7 @@ as_debug()
  */
 #if !defined( ibm032 ) && !defined( _IBMR2 )
     void
-#endif ibm032 _IBMR2
+#endif /* ! ibm032 && ! _IBMR2 */
 as_down()
 {
     struct interface   *iface;
@@ -999,7 +1001,7 @@ int main( ac, av )
        fprintf(stderr, "can't establish STREAMS plumbing, exiting.\n" );
        atalkd_exit( 1 );
     }
-#endif __svr4__
+#endif /* __svr4__ */
 
     /* delete pre-existing interface addresses. */
 #ifdef SIOCDIFADDR
@@ -1008,11 +1010,11 @@ int main( ac, av )
 #ifdef SIOCATALKDIFADDR
 #if (SIOCDIFADDR != SIOCATALKDIFADDR)
        ifconfig(iface->i_name, SIOCATALKDIFADDR, &iface->i_addr);
-#endif
-#endif
+#endif /* SIOCDIFADDR != SIOCATALKDIFADDR */
+#endif /* SIOCATALKDIFADDR */
       }
     }
-#endif
+#endif /* SIOCDIFADDR */
 
     /*
      * Disassociate. The child will send itself a signal when it is
@@ -1052,9 +1054,9 @@ int main( ac, av )
 
 #ifdef ultrix
     openlog( prog, LOG_PID );
-#else ultrix
+#else /* ultrix */
     openlog( prog, LOG_PID, LOG_DAEMON );
-#endif ultrix
+#endif /* ultrix */
 
     syslog( LOG_INFO, "restart (%s)", version );
 
@@ -1071,12 +1073,12 @@ int main( ac, av )
        syslog( LOG_ERR, "route shutdown: %m" );
        atalkd_exit( 1 );
     }
-#else BSD4_4
+#else /* BSD4_4 */
     if (( rtfd = socket( AF_APPLETALK, SOCK_DGRAM, 0 )) < 0 ) {
        syslog( LOG_ERR, "route socket: %m" );
        atalkd_exit( 1 );
     }
-#endif BSD4_4
+#endif /* BSD4_4 */
 
     memset(&sv, 0, sizeof(sv));
     sv.sa_handler = as_down;
@@ -1153,16 +1155,16 @@ int main( ac, av )
                                    iface->i_flags, ap->ap_port, ap->ap_fd );
                            bprint( Packet, c );
                        }
-#endif DEBUG
+#endif /* DEBUG */
 #ifdef __svr4__
                        if ( sighold( SIGALRM ) || sighold( SIGUSR1 )) {
                            syslog( LOG_ERR, "sighold: %m" );
                            atalkd_exit( 1 );
                        }
-#else __svr4__
+#else /* __svr4__ */
                        mask = sigsetmask( sigmask( SIGALRM ) |
                                sigmask( SIGUSR1 ));
-#endif __svr4__
+#endif /* __svr4__ */
                        if (( *ap->ap_packet )( ap, &sat, Packet, c ) < 0) {
                          syslog(LOG_ERR, "ap->ap_packet: %m");
                          atalkd_exit(1);
@@ -1170,15 +1172,15 @@ int main( ac, av )
 
 #ifdef DEBUG
                        consistency();
-#endif DEBUG
+#endif /* DEBUG */
 #ifdef __svr4__
                        if ( sigrelse( SIGUSR1 ) || sigrelse( SIGALRM )) {
                            syslog( LOG_ERR, "sigrelse: %m" );
                            atalkd_exit( 1 );
                        }
-#else __svr4__
+#else /* __svr4__ */
                        sigsetmask( mask );
-#endif __svr4__
+#endif /* __svr4__ */
                    }
                }
            }
@@ -1289,7 +1291,7 @@ void setaddr( iface, phase, net, node, first, last )
 
 #ifdef BSD4_4
     iface->i_addr.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
     iface->i_addr.sat_family = AF_APPLETALK;
     iface->i_addr.sat_addr.s_net = net;
     iface->i_addr.sat_addr.s_node = node;
@@ -1311,22 +1313,22 @@ smaller net range.", iface->i_name, ntohs(first), ntohs(last));
 
     /* open ports */
     i = 1; /* enable broadcasts */
-#if defined(__svr4__) 
+#ifdef __svr4__ 
     syslog(LOG_INFO, "setsockopt incompatible w/ Solaris STREAMS module.");
-#endif
+#endif /* __svr4__ */
     for ( ap = iface->i_ports; ap; ap = ap->ap_next ) {
        if (( ap->ap_fd = socket( AF_APPLETALK, SOCK_DGRAM, 0 )) < 0 ) {
            syslog( LOG_ERR, "socket: %m" );
            atalkd_exit( 1 );
        }
-#if !defined(__svr4__)
+#ifndef __svr4__
        setsockopt(ap->ap_fd, SOL_SOCKET, SO_BROADCAST, &i, sizeof(i));
-#endif
+#endif /* ! __svr4 */
 
        memset( &sat, 0, sizeof( struct sockaddr_at ));
 #ifdef BSD4_4
        sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
        sat.sat_family = AF_APPLETALK;
        sat.sat_addr.s_net = iface->i_addr.sat_addr.s_net;
        sat.sat_addr.s_node = iface->i_addr.sat_addr.s_node;
@@ -1344,11 +1346,11 @@ smaller net range.", iface->i_name, ntohs(first), ntohs(last));
 #ifdef SIOCATALKDIFADDR
 #if (SIOCDIFADDR != SIOCATALKDIFADDR)
                ifconfig( iface->i_name, SIOCATALKDIFADDR, &iface->i_addr );
-#endif         
-#endif
+#endif /* SIOCDIFADDR != SIOCATALKDIFADDR */
+#endif /* SIOCATALKDIFADDR */
              }
            }
-#endif 
+#endif /* SIOCDIFADDR */
            atalkd_exit( 1 );
        }
     }
@@ -1504,4 +1506,4 @@ void dumpzones()
     printf( "\n" );
     fflush( stdout );
 }
-#endif DEBUG
+#endif /* DEBUG */
index 54081a40234c023417f4975923e0659a0053ca4e..21852eb7ee0e720adeab67f81bf2ba4b0cd3f4cf 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * $Id: main.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ */
+
 #ifndef ATALKD_MAIN_H
 #define ATALKD_MAIN_H
 
index f9f53fa6d0e2f0cc49e64679dbbd757773125d2e..72dba048c1c998a821a70d13f833213afcfc7af4 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: multicast.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <stdlib.h>
 #include <string.h>
 #if __FreeBSD_version >= 300000
 #include <net/if_dl.h>
 #define NO_DATA_LINK_PASSTHROUGH
-#endif
-#endif
+#endif /* __FreeBSD_version >= 300000 */
+#endif /* __FreeBSD__ */
 
 #ifdef __svr4__
 #include <sys/sockio.h>
-#endif __svr4__
+#endif /* __svr4__ */
 
 #include <atalk/util.h>
 #include <netatalk/endian.h>
@@ -329,9 +331,9 @@ int addmulti(const char *name, const unsigned char *data)
 {
 #ifdef NO_DATA_LINK_PASSTHROUGH
     struct sockaddr_dl sa;
-#else
+#else /* NO_DATA_LINK_PASSTHROUGH */
     struct sockaddr sa;
-#endif
+#endif /* NO_DATA_LINK_PASSTHROUGH */
 
     memset(&sa, 0, sizeof(sa));
 #ifdef NO_DATA_LINK_PASSTHROUGH
@@ -339,9 +341,9 @@ int addmulti(const char *name, const unsigned char *data)
     memcpy(LLADDR(&sa), data ? data : ethermulti, sizeof(ethermulti));
     sa.sdl_alen = sizeof(ethermulti);
     sa.sdl_len = sizeof(sa);
-#else
+#else /* NO_DATA_LINK_PASSTHROUGH */
     memcpy(sa.sa_data, data ? data : ethermulti, sizeof(ethermulti));
-#endif
+#endif /* NO_DATA_LINK_PASSTHROUGH */
     if (ifconfig(name, SIOCADDMULTI, (struct sockaddr_at *)&sa))
       return -1;
 
index a3ff56d06dc51c3c89b2ddffe2e209417decda8b..fbb7bc8f2abb1d9e2ab9fb77725e95a4c18e7f3f 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: multicast.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1997 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
index 5e92f280749d96b5f9888ce25f64b9a74545cee2..cdd4cec4e8f68d724faba7ea88c021d4e82e366c 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: nbp.c,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <stdlib.h>
 #include <string.h>
@@ -23,7 +25,7 @@
 
 #ifdef __svr4__
 #include <sys/sockio.h>
-#endif __svr4__
+#endif /* __svr4__ */
 
 #include "atserv.h"
 #include "interface.h"
@@ -108,7 +110,7 @@ int nbp_packet( ap, from, data, len )
     memset( &nn.nn_sat, 0, sizeof( struct sockaddr_at ));
 #ifdef BSD4_4
     nn.nn_sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
     nn.nn_sat.sat_family = AF_APPLETALK;
     nn.nn_sat.sat_addr.s_net = nt.nt_net;
     nn.nn_sat.sat_addr.s_node = nt.nt_node;
@@ -368,7 +370,7 @@ int nbp_packet( ap, from, data, len )
        if ( zt == 0 ) {
 #ifdef BSD4_4
            sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
            sat.sat_family = AF_APPLETALK;
            sat.sat_port = ap->ap_port;
 
@@ -403,7 +405,7 @@ int nbp_packet( ap, from, data, len )
        } else {
 #ifdef BSD4_4
            sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
            sat.sat_family = AF_APPLETALK;
            sat.sat_port = ap->ap_port;
            for ( l = zt->zt_rt; l; l = l->l_next ) {
index 42961f023df452b2c3b8940821c1ec2502dad135..851146fac139648e37d0d58281c0303630252032 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: nbp.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
index 0a7a512285c0e69a46abf154c2913aef30db5fa5..83c4d250fc1ee0f226de1750e4ba4721516d082e 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: route.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1996 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <string.h>
 #include <sys/param.h>
@@ -27,9 +29,9 @@ int route( message, dst, gate, flags )
 {
 #ifdef TRU64
     struct ortentry    rtent;
-#else
+#else /* TRU64 */
     struct rtentry     rtent;
-#endif
+#endif /* TRU64 */
 
     memset( &rtent, 0, sizeof( struct rtentry ));
     rtent.rt_dst = *dst;
@@ -38,7 +40,7 @@ int route( message, dst, gate, flags )
     return( ioctl( rtfd, message, &rtent ));
 }
 
-#else BSD4_4
+#else /* BSD4_4 */
 
 struct sockaddr_m {
     u_char     sam_len;
@@ -85,4 +87,4 @@ route( message, dst, gate, flags )
     }
     return( 0 );
 }
-#endif BSD4_4
+#endif /* BSD4_4 */
index 3819f5691f84c253b529bb7b5a32de0823ff8117..a996523966d9be6078b9413c2f97c7c62b032f52 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rtmp.c,v 1.5 2001-06-19 18:04:39 rufustfirefly Exp $
+ * $Id: rtmp.c,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -888,7 +888,7 @@ int looproute( iface, cmd )
                RTF_UP | RTF_HOST ) ) {
        return( 1 );
     }
-#else /* BSD4_4 */
+#else /* BSD4_4 */
     if ( route( cmd,
                (struct sockaddr_at *) &dst,
                (struct sockaddr_at *) &loop,
@@ -955,7 +955,7 @@ int gateroute( command, rtmp )
                    ntohs( gate.sat_addr.s_net ), gate.sat_addr.s_node );
            continue;
        }
-#else /* BSD4_4 */
+#else /* BSD4_4 */
        if ( route( command,
                    (struct sockaddr_at *) &dst,
                    (struct sockaddr_at *) &gate,
@@ -964,7 +964,7 @@ int gateroute( command, rtmp )
                    ntohs( gate.sat_addr.s_net ), gate.sat_addr.s_node );
            continue;
        }
-#endif /* BSD4_4 */
+#endif /* BSD4_4 */
     } while ( net++ < ntohs( rtmp->rt_lastnet ));
 
     if ( command == RTMP_ADD ) {
index bf2be9a58b6e2e1fe83f3fd08bdba04ad4c10608..96b7938a81a0f57425119a500d6f2fd6ee4608fd 100644 (file)
@@ -1,9 +1,8 @@
 /*
+ * $Id: rtmp.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
- */
-
-/*
+ *
  * We have an rtmptab circular linked list for each gateway.  Entries
  * are inserted in the order we get them.  The expectation is that
  * we will get a complexity of N for the stable case.  If we have N
@@ -70,10 +69,10 @@ struct rtmp_tuple {
 #ifndef BSD4_4
 #define RTMP_ADD       SIOCADDRT
 #define RTMP_DEL       SIOCDELRT
-#else BSD4_4
+#else /* BSD4_4 */
 #define RTMP_ADD       RTM_ADD
 #define RTMP_DEL       RTM_DELETE
-#endif BSD4_4
+#endif /* BSD4_4 */
 
 #define STARTUP_FIRSTNET       0xff00
 #define STARTUP_LASTNET                0xfffe
index 1092f51edfa4649f69328c76de1e73b9d6a998ec..52f79bd67e5f74201a575dabf0e15ff490a80b44 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: zip.c,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <stdlib.h>
 #include <string.h>
@@ -22,7 +24,7 @@
 
 #ifdef __svr4__
 #include <sys/sockio.h>
-#endif __svr4__
+#endif /* __svr4__ */
 
 #include <atalk/ddp.h>
 #include <atalk/zip.h>
@@ -736,7 +738,7 @@ int zip_packet( ap, from, data, len )
 #ifdef DEBUG
            printf( "zip notify from %u.%u\n", ntohs( from->sat_addr.s_net ),
                    from->sat_addr.s_node );
-#endif DEBUG
+#endif /* DEBUG */
            break;
 
        default :
@@ -927,7 +929,7 @@ int zip_getnetinfo( iface )
 
 #ifdef BSD4_4
     sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
     sat.sat_family = AF_APPLETALK;
     sat.sat_addr.s_net = 0;
     sat.sat_addr.s_node = ATADDR_BCAST;
index 386317dca68eac303cc94b2e0484f3a3982cbe1d..dad0a5ccd78a6fe2df9604450d8cc63b4ee31510 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: zip.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
  */
index a30a48b5212d92ca62edb1d93dbf0367f603cef8..e85db9a2d3a7467b300185c0abd0264e4ac4afe8 100644 (file)
@@ -1,15 +1,19 @@
 /*
+ * $Id: auth.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/stat.h>
index d4122107c081bed4ed5671b2e09a9ca9493bcdda..042ec0ef4d111ea621f26b6a0c0413d8b25d63bd 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: comment.c,v 1.5 2001-06-25 20:13:45 rufustfirefly 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 <sys/param.h>
index bf537a507c18035387f51c5b8a5912b0887eaca1..9a79349881f723355d40043b94d0f4c63f2ab80b 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: comment.h,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
index 4449e09d9faebcd1650995ee5a746ddce91e11a9..0339158cd2ae37e1854aa7000719f1d617f05cb1 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: file.c,v 1.6 2001-06-25 20:13:45 rufustfirefly 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 <sys/param.h>
index d913546c412da364c93fad7ccd2adc1d23681980..c5fb435c3e43c337b2be80ce10c8c6a4e137e5d2 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: file.h,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
index 5a08554113719cc3eb572c3d51175be6637a0c78..37c194041ff1005fbf851701e3dd68c1cb578871 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: lp.c,v 1.9 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  *
@@ -41,7 +43,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <sys/param.h>
 #include <sys/syslog.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <ctype.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 
 #if defined( sun ) && defined( __svr4__ )
 #include </usr/ucbinclude/sys/file.h>
-#else sun __svr4__
+#else /* sun && __svr4__ */
 #include <sys/file.h>
-#endif sun __svr4__
+#endif /* sun && __svr4__ */
 #include <sys/un.h>
 #include <netinet/in.h>
 #undef s_net
 
 #ifdef ABS_PRINT
 #include <math.h>
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <netdb.h>
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
+#endif /* HAVE_FCNTL_H */
 #include <pwd.h>
 
 #include "printer.h"
@@ -132,7 +138,7 @@ int lp_pagecost()
     printer->p_balance = atof( balance ) + atof( cost );
     return( err < 0 ? -1 : 0 );
 }
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
 
 void lp_host( host )
     char       *host;
@@ -180,7 +186,7 @@ int lp_init( out, sat )
 #ifdef ABS_PRINT
     char       cost[ 22 ];
     char       balance[ 22 ];
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
 
     if ( printer->p_flags & P_AUTH ) {
        authenticated = 0;
@@ -239,7 +245,7 @@ int lp_init( out, sat )
            spoolerror( out, "No ABS funds available." );
            return( -1 );
        }
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
     }
 
     if ( gethostname( hostname, sizeof( hostname )) < 0 ) {
index 7e990ee1cc0ee497cfb491561a051b2be7cab76f..4d74f2a0aff84db1bebc8c2fd5120dcf83fc2e37 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * $Id: lp.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ */
+
 #ifndef PAPD_LP_H
 #define PAPD_LP_H 1
 
index 9e84eb9dcab619daa6aacf003ac90adf42d2ae37..be4d84f674472b014a801f4501f46c8cb2544ea1 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: main.c,v 1.7 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1995 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/param.h>
 #include <sys/types.h>
@@ -13,9 +15,9 @@
 #include <sys/uio.h>
 #if defined( sun ) && defined( __svr4__ )
 #include </usr/ucbinclude/sys/file.h>
-#else sun __svr4__
+#else /* sun && __svr4__ */
 #include <sys/file.h>
-#endif sun __svr4__
+#endif /* sun && __svr4__ */
 #include <sys/socket.h>
 #include <sys/syslog.h>
 #include <sys/wait.h>
@@ -27,7 +29,9 @@
 #include <stdlib.h>
 #include <netdb.h>
 #include <fcntl.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 
 #include <netatalk/endian.h>
 #include <netatalk/at.h>
@@ -78,7 +82,7 @@ static void papd_exit(const int i)
 
 #if !defined( ibm032 ) && !defined( _IBMR2 )
     void
-#endif ibm032 _IBMR2
+#endif /* ! ibm032 && ! _IBMR2 */
 die( n )
     int                        n;
 {
@@ -103,7 +107,7 @@ die( n )
 
 #if !defined( ibm032 ) && !defined( _IBMR2 )
     void
-#endif ibm032 _IBMR2
+#endif /* ! ibm032 && ! _IBMR2 */
 reap()
 {
     int                status;
@@ -169,16 +173,16 @@ int main( ac, av )
 #ifdef __svr4__
     defprinter.p_flags = P_PIPED;
     defprinter.p_printer = "/usr/bin/lp -T PS";
-#else
+#else /* __svr4__ */
     defprinter.p_flags = P_SPOOLED;
     defprinter.p_printer = "lp";
-#endif
+#endif /* __svr4__ */
     defprinter.p_operator = "operator";
     defprinter.p_spool = _PATH_PAPDSPOOLDIR;
 #ifdef ABS_PRINT
     defprinter.p_role = NULL;
     defprinter.p_srvid = 0;
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
     defprinter.p_pagecost = 200;               /* default cost */
     defprinter.p_pagecost_msg = NULL;
     defprinter.p_lock = "lock";
@@ -237,9 +241,9 @@ int main( ac, av )
     }
 #ifdef ultrix
     openlog( p, LOG_PID );
-#else ultrix
+#else /* ultrix */
     openlog( p, LOG_NDELAY|LOG_PID, LOG_LPR );
-#endif ultrix
+#endif /* ultrix */
 
     syslog( LOG_INFO, "restart (%s)", version );
 
@@ -313,7 +317,7 @@ int main( ac, av )
                bzero( &sat, sizeof( struct sockaddr_at ));
 #ifdef BSD4_4
                sat.sat_len = sizeof( struct sockaddr_at );
-#endif BSD4_4
+#endif /* BSD4_4 */
                sat.sat_family = AF_APPLETALK;
                sat.sat_addr.s_net = ATADDR_ANYNET;
                sat.sat_addr.s_node = ATADDR_ANYNODE;
@@ -462,7 +466,7 @@ int main( ac, av )
                if ( atp_sresp( pr->p_atp, &atpb ) < 0 ) {
                    syslog( LOG_ERR, "atp_sresp: %m" );
                }
-#endif notdef
+#endif /* notdef */
            }
        }
     }
@@ -722,7 +726,7 @@ int rprintcap( pr )
            } else {
                pr->p_srvid = c;
            }
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
        }
 
 
@@ -777,7 +781,7 @@ int rprintcap( pr )
        } else {
            pr->p_flags &= ~P_KRB;
        }
-#endif
+#endif /* KRB */
 
        endprent();
     }
index 9848211c7591d1daad733f5befb1b6ac076d6ca0..c0a4e59bc63cd9620595b31279304ab9cead52bb 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: ppd.c,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -55,7 +57,7 @@ int ppd_init()
 
     return read_ppd( printer->p_ppdfile, 0 );
 }
-#endif SHOWPPD
+#endif /* SHOWPPD */
 
 struct ppdent *getppdent( stream )
     FILE       *stream;
@@ -227,7 +229,7 @@ struct ppd_font *ppd_font( font )
     if ( ! ppd_inited ) {
        ppd_init();
     }
-#endif SHOWPPD
+#endif /* SHOWPPD */
 
     for ( pfo = ppd_fonts; pfo; pfo = pfo->pd_next ) {
        if ( strcmp( pfo->pd_font, font ) == 0 ) {
@@ -250,7 +252,7 @@ struct ppd_feature *ppd_feature( feature, len )
     if ( ! ppd_inited ) {
        ppd_init();
     }
-#endif SHOWPPD
+#endif /* SHOWPPD */
 
     for ( end = feature + len, p = feature, q = ppd_feature_main;
            (p <= end) && (*p != '\n') && (*p != '\r'); p++, q++ ) {
index d7c982d95915688ebd137d6ba7c7a6e480ab8dac..bdfea746b32742ef8eaa06f54df6992f79a8744d 100644 (file)
@@ -1,7 +1,10 @@
 /*
+ * $Id: ppd.h,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
+
 #ifndef PAPD_PPD_H
 #define PAPD_PPD_H 1
 
index e542cd120e4369ff50356761e33eb66684ea7b90..203269f252c9888c68ac1b0b5647615da37d3f77 100644 (file)
@@ -1,9 +1,9 @@
 /*
+ * $Id: printcap.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
- */
-
-/*
+ *
  * Copyright (c) 1983 Regents of the University of California.
  * All rights reserved.
  *
@@ -38,7 +38,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #ifndef lint
 static char sccsid[] = "@(#)printcap.c 5.7 (Berkeley) 3/4/91";
@@ -47,17 +47,21 @@ static char sccsid[] = "@(#)printcap.c      5.7 (Berkeley) 3/4/91";
 #include <ctype.h>
 #include <stdio.h>
 #include <string.h>
+#ifndef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #include <sys/types.h>
 #include <sys/stat.h>
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
+#endif /* HAVE_FCNTL_H */
 #include <atalk/paths.h>
 
 #include "printcap.h"
 
 #ifndef BUFSIZ
 #define        BUFSIZ  1024
-#endif
+#endif /* ! BUFSIZ */
 #define MAXHOP 32      /* max number of tc= indirections */
 
 /*
@@ -87,7 +91,7 @@ static char sccsid[] = "@(#)printcap.c        5.7 (Berkeley) 3/4/91";
 #define tnchktc        pnchktc
 #define        tnamatch pnamatch
 #define V6
-#endif
+#endif /* PRINTCAP */
 
 static FILE *pfp = NULL;       /* printcap data base file pointer */
 static char *tbuf;
index a76bb034adfc0c339230c5f2245a5cd6d6215a38..745d3315ce0e25dfb0fd45ec006995cab01cbf45 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * $Id: printcap.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ */
+
 #ifndef PAPD_PRINTCAP_H
 #define PAPD_PRINTCAP_H 1
 
index 369d31e179aa011b662d642da057c589f257c45b..49ed104b9c245887f6693e665b65e47f99fd1a5f 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: printer.h,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
@@ -10,7 +12,7 @@ struct printer {
 #ifdef notdef
     char               *p_fonts;
     char               *p_psetdir;
-#endif notdef
+#endif /* notdef */
     char               *p_ppdfile;
     char               *p_authprintdir;
     int                        p_flags;
@@ -24,7 +26,7 @@ struct printer {
            char                *pr_role;
            double              pr_balance;
            int                 pr_srvid;
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
            int                 pr_pagecost;
            char                *pr_pagecost_msg;
            char                *pr_lock;
@@ -42,7 +44,7 @@ struct printer {
 #define p_role         p_un.pu_pr.pr_role
 #define p_balance      p_un.pu_pr.pr_balance
 #define p_srvid                p_un.pu_pr.pr_srvid
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
 #define p_pagecost     p_un.pu_pr.pr_pagecost
 #define p_pagecost_msg p_un.pu_pr.pr_pagecost_msg
 #define p_lock         p_un.pu_pr.pr_lock
index 74a4fc97c0c07a46819620d4b85bef1b2932ef6e..01a7d3ba75eca85dc1cfd6761036dbe5c67bbecf 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: queries.c,v 1.7 2001-06-25 20:13:45 rufustfirefly 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 <string.h>
 #include <stdio.h>
 #ifdef KRB
 #ifdef SOLARIS
 #include <kerberos/krb.h>
-#else
+#else /* SOLARIS */
 #include <krb.h>
-#endif
-#endif KRB
+#endif /* SOLARIS */
+#endif /* KRB */
 
 #include "file.h"
 #include "comment.h"
@@ -198,7 +200,7 @@ int cq_uameth( in, out )
        CONSUME( in, linelength + crlflength );
     }
 }
-#endif KRB
+#endif /* KRB */
 
 int gq_true( out )
     struct papfile     *out;
@@ -223,7 +225,7 @@ int gq_pagecost( out )
     } else if ( printer->p_flags & P_ACCOUNT ) {
 #ifdef ABS_PRINT
        lp_pagecost();
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
        sprintf( cost, "%d", printer->p_pagecost );
        append( out, cost, strlen( cost ));
     } else {
@@ -246,7 +248,7 @@ int gq_balance( out )
     append( out, balance, strlen( balance ));
     return( 0 );
 }
-#endif ABS_PRINT
+#endif /* ABS_PRINT */
 
 
 /*
@@ -297,7 +299,7 @@ struct genquery {
     { "UMICHCostPerPage", gq_pagecost },
 #ifdef notdef
     { "UMICHUserBalance", gq_balance },
-#endif 
+#endif /* notdef */
     { "RBISpoolerID",  gq_rbispoolerid },
     { "RBIUAMListQuery", gq_rbiuamlist },
     { "UMICHListQueue", gq_true },
index 8065633688cfb2ad5bb73b29234b5f30dc914b41..928ffca2efa7829b40ea5f97cb1edbc471e73b0a 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: session.c,v 1.7 2001-06-25 20:13:45 rufustfirefly 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 <stdlib.h>
 #include <string.h>
index 714a5c325a4b3ba12b00eadbe47f00441f4552cf..86e830f7cef35a7db7dab7b1c83f697c07f751c9 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * $Id: session.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ */
+
 #ifndef PAPD_SESSION_H
 #define PAPD_SESSION_H 1
 
index 80e4d0d7a5efd7d10496d532c925cd78c323d0fb..428a6e6db4e4d7d41b647ff9cf9bc48d1bb98627 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: showppd.c,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
index f99a847d518e1e4a2b4384aa37230ef4b991a18a..d164e0efc4b83f8a95046d83508257de86487231 100644 (file)
@@ -1,15 +1,20 @@
-/* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
+/*
+ * $Id: uam.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
+ * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #include <fcntl.h>
 #include <ctype.h>
 #include <syslog.h>
@@ -197,7 +202,7 @@ struct passwd *uam_getname(char *name, const int len)
     }
   }
   endpwent();
-#endif
+#endif /* NO_REAL_USER_NAME */
 
   /* os x server doesn't keep anything useful if we do getpwent */
   return pwent ? getpwnam(name) : NULL;
index 9e9b7692f637abb47cc861baacc7ffad68002a4b..0ae2ddc94988cd035787533b7537e5b289088833 100644 (file)
@@ -1,4 +1,7 @@
-/* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
+/*
+ * $Id: uam_auth.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
+ * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
  *
  * interface between uam.c and auth.c
index d73c81db64273d28b34a4cf1aa4e6ee1a848be88..82bc4f211a5d4d013919d9127cf1949a44b6eef8 100644 (file)
@@ -1,9 +1,9 @@
 /*
+ * $Id: psa.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
- */
-
-/*
+ *
  * PostScript Accounting, psa.
  *
  * psa is invoked by psf, as output for a communication program.  The
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index c0ce07bf764f24ad8bf2e5bfa031981315ef8909..53d3a543124beec8b82ed60700def2faeafa3904 100644 (file)
@@ -1,9 +1,9 @@
 /*
+ * $Id: psf.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
- */
-
-/*
+ *
  * PostScript Filter, psf.
  *
  * Handles both PostScript files and text files.  Files with the
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #define FUCKED
 
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -84,7 +86,7 @@ int main( ac, av )
     int                        c, rc, children = 0;
 #ifdef FUCKED
     int                        psafileno, multiconn = 0, waitidle = 0, waitidle2 = 0;
-#endif FUCKED
+#endif /* FUCKED */
     int                        status;
     extern char                *optarg;
     extern int         optind, opterr;
@@ -97,9 +99,9 @@ int main( ac, av )
     }
 #ifdef ultrix
     openlog( prog, LOG_PID );
-#else ultrix
+#else /* ultrix */
     openlog( prog, LOG_PID, LOG_LPR );
-#endif ultrix
+#endif /* ultrix */
 
     while (( c = getopt( ac, av, "P:C:D:F:L:J:x:y:n:h:w:l:i:c" )) != EOF ) {
        switch ( c ) {
@@ -120,7 +122,7 @@ int main( ac, av )
            if ( width == 0 ) {
                width = 80;
            }
-#endif ZEROWIDTH
+#endif /* ZEROWIDTH */
            break;
 
        case 'l' :
@@ -147,7 +149,7 @@ int main( ac, av )
        default :
            syslog( LOG_ERR, "bad option: %c", c );
            exit( 2 );
-#endif notdef
+#endif /* notdef */
        }
     }
     if ( ac - optind > 1 ) {
@@ -164,7 +166,7 @@ int main( ac, av )
     if ( index( prog, 'm' )) {
        multiconn++;
     }
-#endif FUCKED
+#endif /* FUCKED */
 
     syslog( LOG_INFO, "starting for %s", name ? name : "?" );
 
@@ -237,7 +239,7 @@ restart:
                papargv[ 5 ] = _PATH_PAGECOUNT;
                papargv[ 6 ] = 0;
            }
-#endif FUCKED
+#endif /* FUCKED */
        } else {
            papargv[ 2 ] = "-c";
            papargv[ 3 ] = "-E";
@@ -316,7 +318,7 @@ restart:
        children++;
        syslog( LOG_INFO, "pagecount with pap[%d]", c );
     }
-#endif FUCKED
+#endif /* FUCKED */
 
     if ( children ) {
        close( 1 );
@@ -329,7 +331,7 @@ restart:
        if ( WIFEXITED( status )) {
 #ifndef WEXITSTATUS
 #define WEXITSTATUS(x) ((x).w_status)
-#endif WEXITSTATUS
+#endif /* WEXITSTATUS */
            if ( WEXITSTATUS( status ) != 0 ) {
                syslog( LOG_ERR, "%d died with %d", c, WEXITSTATUS( status ));
                exit( WEXITSTATUS( status ));
index 084f4e271ce219af204a5ab05c619b0a3a5d55f6..6420bd52ff5604a96a56c13b8b53e5d0f06b6b09 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_dhx_pam.c,v 1.14 2001-04-16 17:49:49 rufustfirefly Exp $
+ * $Id: uams_dhx_pam.c,v 1.15 2001-06-25 20:13:45 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -8,7 +8,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #if defined(USE_PAM) && defined(UAM_DHX)
 #include <stdio.h>
 #include <openssl/bn.h>
 #include <openssl/dh.h>
 #include <openssl/cast.h>
-#else
+#else /* OPENSSL_DHX */
 #include <bn.h>
 #include <dh.h>
 #include <cast.h>
-#endif
+#endif /* OPENSSL_DHX */
 
 #include <atalk/afp.h>
 #include <atalk/uam.h>
@@ -264,9 +264,9 @@ static int dhx_setup(void *obj, char *ibuf, int ibuflen,
       goto pam_fail;
     }
     memcpy(rbuf + KEYSIZE, buf, KEYSIZE); 
-#else
+#else /* 0 */
     memset(rbuf + KEYSIZE, 0, KEYSIZE); 
-#endif
+#endif /* 0 */
 
     /* encrypt using cast */
     CAST_cbc_encrypt(rbuf, rbuf, CRYPTBUFLEN, &castkey, msg2_iv, 
index 6e6c1a4bff0edff3ec1a74f20d1d9a942cae9632..16395eeb5df6c0b91b4a21f24f7c81d9f05bd5e8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_dhx_passwd.c,v 1.9 2001-06-25 15:18:01 rufustfirefly Exp $
+ * $Id: uams_dhx_passwd.c,v 1.10 2001-06-25 20:13:45 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -8,22 +8,25 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #ifdef UAM_DHX
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #ifndef NO_CRYPT_H
 #include <crypt.h>
-#endif
+#endif /* ! NO_CRYPT_H */
 #include <pwd.h>
 #include <syslog.h>
 
 #ifdef SOLARIS
 #define SHADOWPW
-#endif SOLARIS
+#endif /* SOLARIS */
 
 #ifdef SHADOWPW
 #include <shadow.h>
@@ -33,7 +36,7 @@
 #include <openssl/bn.h>
 #include <openssl/dh.h>
 #include <openssl/cast.h>
-#else
+#else /* OPENSSL_DHX */
 #include <bn.h>
 #include <dh.h>
 #include <cast.h>
@@ -74,7 +77,7 @@ static int passwd_login(void *obj, struct passwd **uam_pwd,
     u_int8_t g = 0x07;
 #ifdef SHADOWPW
     struct spwd *sp;
-#endif
+#endif /* SHADOWPW */
     BIGNUM *bn, *gbn, *pbn;
     u_int16_t sessid;
     int len, i;
@@ -122,7 +125,7 @@ static int passwd_login(void *obj, struct passwd **uam_pwd,
        return AFPERR_NOTAUTH;
     }
     dhxpwd->pw_passwd = sp->sp_pwdp;
-#endif SHADOWPW
+#endif /* SHADOWPW */
 
     if (!dhxpwd->pw_passwd)
       return AFPERR_NOTAUTH;
@@ -193,9 +196,9 @@ static int passwd_login(void *obj, struct passwd **uam_pwd,
       goto passwd_fail;
     }
     memcpy(rbuf + KEYSIZE, name, KEYSIZE); 
-#else
+#else /* 0 */
     memset(rbuf + KEYSIZE, 0, KEYSIZE);
-#endif
+#endif /* 0 */
 
     /* encrypt using cast */
     CAST_cbc_encrypt(rbuf, rbuf, CRYPTBUFLEN, &castkey, iv, CAST_ENCRYPT);
@@ -316,4 +319,5 @@ UAM_MODULE_EXPORT struct uam_export uams_dhx = {
   UAM_MODULE_VERSION,
   uam_setup, uam_cleanup
 };
-#endif
+
+#endif /* UAM_DHX */
index e580f858338b2faf55f4e8a6cdedc9a79e23f59f..146e7091392d85db215372c8d99bf9ed7bae3373 100644 (file)
@@ -1,12 +1,12 @@
 /*
- * $Id: uams_guest.c,v 1.4 2001-02-27 17:07:43 rufustfirefly Exp $
+ * $Id: uams_guest.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
  *
  * (c) 2001 (see COPYING)
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H &/
 
 #include <stdio.h>
 #include <stdlib.h>
index ae1d7d6f6d45b4b034685c4fdce9be53a06f3478..3c79064f05a9645bd0f820f206068407a7208dcb 100644 (file)
@@ -1,13 +1,13 @@
 /*
- * $Id: kuam.c,v 1.3 2001-03-28 22:42:15 samnoble Exp $
+ * $Id: kuam.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
 
-#if defined( HAVE_CONFIG_H )
+#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #ifdef UAM_AFSKRB
 
index c5a7f91315f2541ceb162b326d041d9c32cd152c..428eac9014fe9b99a7de67e6f5165b80dd5ce810 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: lifetime.c,v 1.2 2001-02-27 21:07:20 rufustfirefly Exp $
+ * $Id: lifetime.c,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
  *
  * Ticket lifetime.  This defines the table used to lookup lifetime
  * for the fixed part of rande of the one byte lifetime field.  Values
  * upperbounds on ticket lifetimes.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+
 #include <sys/types.h>
 #include <netatalk/endian.h>
 
@@ -23,7 +27,7 @@
 #define MAXTKTLIFETIME (30*24*3600)    /* 30 days */
 #ifndef NEVERDATE
 #define NEVERDATE ((u_int32_t)-1L)
-#endif
+#endif /* NEVERDATE */
 
 static int tkt_lifetimes[TKTLIFENUMFIXED] = {
     38400,                             /* 10.67 hours, 0.44 days */ 
index 751f73be624f518be7f9ba2ef01566354db331b0..d20856ff9aa6630aec24706bb62ca7785239b03d 100644 (file)
@@ -1,13 +1,11 @@
 /*
- * $Id: send_to_kdc.c,v 1.3 2001-03-28 22:42:46 samnoble Exp $
+ * $Id: send_to_kdc.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ * $Author: rufustfirefly $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
- */
-
-/*
+ *
  * $Source: /home/ralph/netatalk/rsync/netatalk/etc/uams/uams_krb4/send_to_kdc.c,v $
- * $Author: samnoble $
  *
  * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
  *
 
 #ifndef lint
 static char rcsid_send_to_kdc_c[] =
-"$Id: send_to_kdc.c,v 1.3 2001-03-28 22:42:46 samnoble Exp $";
+"$Id: send_to_kdc.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $";
 #endif /* lint */
 
-#if defined( HAVE_CONFIG_H )
+#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #ifdef UAM_AFSKRB
 
index d377b466007d8506104132e089abb4f3e53a90dc..e1e8184160331abe700eded467d4aeee746133b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_krb4.c,v 1.3 2001-03-28 22:49:25 samnoble Exp $
+ * $Id: uams_krb4.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 #endif
 
 #if defined( KRB ) || defined( UAM_AFSKRB )
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
+#endif /* HAVE_FCNTL_H */
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/stat.h>
@@ -26,7 +30,7 @@
 #include <krb.h>
 #if 0
 #include <prot.h>
-#endif
+#endif /* 0 */
 
 #include <netatalk/endian.h>
 #include <atalk/afp.h>
@@ -44,7 +48,7 @@ static int            validseskey = 0;
 static int             logged = 0;
 static char            *tktfile;
 static char            instance[ INST_SZ ], name[ ANAME_SZ ];
-#endif /*UAM_AFSKRB*/
+#endif /* UAM_AFSKRB */
 
 #ifdef AFS
 #include <afs/stds.h>
@@ -62,7 +66,7 @@ struct ClearToken {
     int32_t BeginTimestamp;
     int32_t EndTimestamp;
 };
-#endif /*AFS*/
+#endif /* AFS */
 
 
 #ifdef KRB
@@ -167,7 +171,7 @@ static int krb4_login(void *obj, struct passwd **uam_pwd,
 
            p = rbuf;
 
-#if !defined( AFS )
+#ifdef AFS
            *p = KRB4RPL_DONE;  /* XXX */
            *rbuflen = 1;
 
@@ -211,7 +215,7 @@ static int krb4_login(void *obj, struct passwd **uam_pwd,
            return( AFPERR_NOTAUTH );
     }
 
-#if defined( AFS )
+#ifdef AFS
     if ( setpag() < 0 ) {
        *rbuflen = 0;
        syslog( LOG_ERR, "krb_login: setpag: %m" );
@@ -246,7 +250,7 @@ static int krb4_logincont(void *obj, struct passwd **uam_pwd,
 #ifdef AFS
     struct ViceIoctl   vi;
     struct ClearToken  ct;
-#endif /*AFS*/
+#endif /* AFS */
     char               buf[ 1024 ];
     int                        aint, ulen, snlen;
 
@@ -259,7 +263,7 @@ static int krb4_logincont(void *obj, struct passwd **uam_pwd,
     ibuf++;
     switch ( rc = *ibuf++ ) {
        case KRB4CMD_TOKEN :
-#if defined (AFS)
+#ifdef AFS
            p = buf;
            memcpy( &len, ibuf, sizeof( u_int16_t ) );
            ibuf += sizeof( len );
@@ -372,7 +376,7 @@ static int krb4_logincont(void *obj, struct passwd **uam_pwd,
                    }
                    *uam_pwd = pwd;
                    return AFP_OK;
-#else AFS
+#else /* ! AFS */
                    /* get principals */
                    *p++ = KRB4RPL_PRINC;
                    len = strlen( realm );
@@ -453,7 +457,7 @@ static int krb4_logincont(void *obj, struct passwd **uam_pwd,
     }
 }
 
-#endif /*KRB*/
+#endif /* KRB */
 
 
 #ifdef AFS
@@ -544,7 +548,7 @@ static void authenticate(cells,name,passwd)
                    passwd,/*setpag*/0,&errorstring);
        }
 }
-#endif /*AFS*/
+#endif /* AFS */
 
 #if defined( UAM_AFSKRB ) && defined( AFS )
 static int afskrb_login(void *obj, struct passwd *uam_pwd,
@@ -748,12 +752,12 @@ static int uam_setup(const char *path)
    uam_register(UAM_SERVER_LOGIN, path, "Kerberos IV", krb4_login, 
                krb4_logincont, NULL);
    /* uam_afpserver_action(); */
-#endif
+#endif /* KRB */
 #ifdef UAM_AFSKRB
    uam_register(UAM_SERVER_LOGIN, path, "AFS Kerberos", afskrb_login, 
                afskrb_logincont, NULL);
    /* uam_afpserver_action(); */
-#endif
+#endif /* UAM_AFSKRB */
    return 0;
 }
 
index bb65bec1c293374039393d17fd6fe9d7c72d849e..88545e532f6b56ce9028f233d479a1db6d8200ce 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_pam.c,v 1.6 2001-02-27 17:07:43 rufustfirefly Exp $
+ * $Id: uams_pam.c,v 1.7 2001-06-25 20:13:45 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -8,12 +8,15 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #ifdef USE_PAM
+
 #include <stdio.h>
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #include <string.h>
 #include <syslog.h>
 
@@ -70,7 +73,7 @@ static int PAM_conv (int num_msg,
     case PAM_TEXT_INFO:
 #ifdef PAM_BINARY_PROMPT
     case PAM_BINARY_PROMPT:
-#endif
+#endif /* PAM_BINARY_PROMPT */
       /* ignore it... */
       break;
     case PAM_ERROR_MSG:
@@ -171,13 +174,13 @@ static int pam_login(void *obj, struct passwd **uam_pwd,
 #ifdef PAM_AUTHTOKEN_REQD
       else if (PAM_error == PAM_AUTHTOKEN_REQD) 
        err = AFPERR_PWDCHNG;
-#endif
+#endif /* PAM_AUTHTOKEN_REQD */
       goto login_err;
     }
 
 #ifndef PAM_CRED_ESTABLISH
 #define PAM_CRED_ESTABLISH PAM_ESTABLISH_CRED
-#endif
+#endif /* PAM_CRED_ESTABLISH */
     PAM_error = pam_setcred(pamh, PAM_CRED_ESTABLISH);
     if (PAM_error != PAM_SUCCESS)
       goto login_err;
index 2896b46f505181b543a2f1c85a6face0d0a28fa4..3925b8b63c23fc0420d76ea168012791c7836ec1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_passwd.c,v 1.11 2001-06-25 15:18:01 rufustfirefly Exp $
+ * $Id: uams_passwd.c,v 1.12 2001-06-25 20:13:45 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -8,25 +8,27 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #ifndef NO_CRYPT_H
 #include <crypt.h>
-#endif
+#endif /* ! NO_CRYPT_H */
 #include <pwd.h>
 #include <syslog.h>
 
 #ifdef SOLARIS
 #define SHADOWPW
-#endif SOLARIS
+#endif /* SOLARIS */
 
 #ifdef SHADOWPW
 #include <shadow.h>
-#endif SHADOWPW
+#endif /* SHADOWPW */
 
 #include <atalk/afp.h>
 #include <atalk/uam.h>
@@ -90,7 +92,7 @@ static int passwd_login(void *obj, struct passwd **uam_pwd,
        return AFPERR_NOTAUTH;
     }
     pwd->pw_passwd = sp->sp_pwdp;
-#endif SHADOWPW
+#endif /* SHADOWPW */
 
     if (!pwd->pw_passwd)
       return AFPERR_NOTAUTH;
@@ -130,7 +132,7 @@ static int passwd_changepw(void *obj, char *username,
 {
 #ifdef SHADOWPW
     struct spwd *sp;
-#endif
+#endif /* SHADOWPW */
     char pw[PASSWDLEN + 1], *p;
     uid_t uid = geteuid();
 
@@ -148,7 +150,7 @@ static int passwd_changepw(void *obj, char *username,
        return AFPERR_PARAM;
     }
     pwd->pw_passwd = sp->sp_pwdp;
-#endif SHADOWPW
+#endif /* SHADOWPW */
 
     p = crypt(pw, pwd->pw_passwd );
     if (strcmp( p, pwd->pw_passwd )) {
@@ -161,11 +163,11 @@ static int passwd_changepw(void *obj, char *username,
     ibuf[PASSWDLEN] = '\0';
     
 #ifdef SHADOWPW
-#else
-#endif
+#else /* SHADOWPW */
+#endif /* SHADOWPW */
     return AFP_OK;
-}
-#endif
+} 
+#endif /* 0 */
 
 
 /* Printer ClearTxtUAM login */
@@ -176,7 +178,7 @@ static int passwd_printer(start, stop, username, out)
     struct passwd *pwd;
 #ifdef SHADOWPW
     struct spwd *sp;
-#endif
+#endif /* SHADOWPW */
     char *data, *p, *q;
     char       password[PASSWDLEN + 1] = "\0";
     static const char *loginok = "0\r";
@@ -237,7 +239,7 @@ static int passwd_printer(start, stop, username, out)
        return(-1);
     }
     pwd->pw_passwd = sp->sp_pwdp;
-#endif SHADOWPW
+#endif /* SHADOWPW */
 
     if (!pwd->pw_passwd) {
        syslog(LOG_INFO, "Bad Login ClearTxtUAM: no password for %s",
@@ -248,7 +250,7 @@ static int passwd_printer(start, stop, username, out)
 #ifdef AFS
     if ( kcheckuser( pwd, password) == 0) 
       return(0);
-#endif AFS
+#endif /* AFS */
 
     p = crypt(password, pwd->pw_passwd);
     if (strcmp(p, pwd->pw_passwd) != 0) {
index 6be6f308b0e9bd88ae980630947cd7e0313dfcea..ced79fe54d4871875217ecf156cf93ea98d95fe5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_pgp.c,v 1.4 2001-02-27 17:07:43 rufustfirefly Exp $
+ * $Id: uams_pgp.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -8,13 +8,16 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #ifdef UAM_PGP
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #include <pwd.h>
 #include <syslog.h>
 
@@ -22,7 +25,7 @@
 #include <openssl/bn.h>
 #include <openssl/dh.h>
 #include <openssl/cast.h>
-#else
+#else /* OPENSSL_DHX */
 #include <bn.h>
 #include <dh.h>
 #include <cast.h>
@@ -153,7 +156,7 @@ static int pgp_logincont(void *obj, struct passwd **uam_pwd,
       *uam_pwd = pgppwd;
       return AFP_OK;
     }
-#endif AFS
+#endif /* AFS */
 
     rbuf[PASSWDLEN] = '\0';
     p = crypt( rbuf, pgppwd->pw_passwd );
@@ -187,4 +190,4 @@ UAM_MODULE_EXPORT struct uam_export uams_pgp = {
   uam_setup, uam_cleanup
 };
 
-#endif
+#endif /* UAM_PGP */
index 30ddc7cf847871b64d58f09092281864a493c19b..0e94b15373b7849937ef3e7f7d9a379a20e830f5 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: uams_randnum.c,v 1.4 2001-02-27 17:07:43 rufustfirefly Exp $
+ * $Id: uams_randnum.c,v 1.5 2001-06-25 20:13:45 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -8,12 +8,14 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #include <fcntl.h>
 #include <ctype.h>
 #include <pwd.h>
 
 #ifdef USE_CRACKLIB
 #include <crack.h>
-#endif
+#endif /* USE_CRACKLIB */
 
 #ifndef __inline__
 #define __inline__
-#endif
+#endif /* __inline__ */
 
 #define PASSWDLEN 8
 
@@ -471,7 +473,7 @@ static int randnum_changepw(void *obj, const char *username,
 #ifdef USE_CRACKLIB
     else if (FascistCheck(ibuf + PASSWDLEN, _PATH_CRACKLIB))
         err = AFPERR_PWDPOLCY;
-#endif
+#endif /* USE_CRACKLIB */
 
     if (!err) 
       err = randpass(pwd, passwdfile, ibuf + PASSWDLEN, sizeof(seskey), 1);