--- bin/nbp/nbprgstr.c.orig Thu Sep 19 05:07:25 1996 +++ bin/nbp/nbprgstr.c Wed Nov 10 14:08:18 1999 @@ -8,15 +8,20 @@ #include #include #include +#include #include +#include #include +#include +#include +void Usage( av0 ) char *av0; { char *p; - if (( p = rindex( av0, '/' )) == 0 ) { + if (( p = strrchr( av0, '/' )) == 0 ) { p = av0; } else { p++; @@ -26,15 +31,15 @@ exit( 1 ); } +int main( ac, av ) int ac; char **av; { struct sockaddr_at addr; char *Obj = 0, *Type = 0, *Zone = 0; - int s, namelen, c, port = 0; - extern char *optarg; - extern int optind, opterr; + int s, c, port = 0; + unsigned int namelen; while (( c = getopt( ac, av, "p:" )) != EOF ) { switch ( c ) { @@ -63,7 +68,7 @@ return( -1 ); } - bzero( &addr, sizeof( struct sockaddr_at )); + memset( &addr, 0, sizeof( struct sockaddr_at )); #ifdef BSD4_4 addr.sat_len = sizeof( struct sockaddr_at ); #endif BSD4_4 @@ -90,4 +95,5 @@ Zone ? Zone : "*" ); exit( 1 ); } + return(0); }