diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-08 15:54:00 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-08 15:54:00 +0800 |
commit | 271bcfc4e7d98aafb59b6e67399244f635ee74e8 (patch) | |
tree | 6c8c84e636581109db1de66d4036441c36b607c8 /innbbsd/pmain.c | |
parent | 9b4d34a17c6061171456ae8e4b63dcd270f53091 (diff) | |
download | pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.gz pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.bz2 pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.lz pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.xz pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.zst pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.zip |
indent -i4
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1473 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'innbbsd/pmain.c')
-rw-r--r-- | innbbsd/pmain.c | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/innbbsd/pmain.c b/innbbsd/pmain.c index 39ddba22..d86dc88e 100644 --- a/innbbsd/pmain.c +++ b/innbbsd/pmain.c @@ -1,62 +1,61 @@ #include "innbbsconf.h" #include "daemon.h" -/*char *AccessFile=ACCESSFILE;*/ +/* char *AccessFile=ACCESSFILE; */ #define INNBBSDPORT1 "1904" #define INNBBSDPORT2 "1234" #define INNBBSDPATH1 ".innbbsd1" #define INNBBSDPATH2 ".innbbsd2" pmain(port) -char *port; + char *port; { if (port == NULL) { - int rel; -/* installbbstalkd(); */ - fprintf(stderr,"Trying to listen in port %s\n",INNBBSDPORT1); - rel = open_listen(INNBBSDPORT1,"tcp",NULL); + int rel; + /* installbbstalkd(); */ + fprintf(stderr, "Trying to listen in port %s\n", INNBBSDPORT1); + rel = open_listen(INNBBSDPORT1, "tcp", NULL); #ifdef DEBUG - printf("port fd %d allocated\n",rel); + printf("port fd %d allocated\n", rel); #endif - if (rel<0) { - fprintf(stderr,"Trying to listen in port %s\n",INNBBSDPORT2); - return open_listen(INNBBSDPORT2,"tcp",NULL); + if (rel < 0) { + fprintf(stderr, "Trying to listen in port %s\n", INNBBSDPORT2); + return open_listen(INNBBSDPORT2, "tcp", NULL); } return rel; } else { #ifdef DEBUG printf("start to allocate port\n"); #endif - return open_listen(port,"tcp",NULL); - } + return open_listen(port, "tcp", NULL); + } } p_unix_main(path) -char *path; + char *path; { if (path == NULL) { - int rel; -/* installbbstalkd(); */ - fprintf(stderr,"Trying to listen in port %s\n",INNBBSDPATH1); - rel = open_unix_listen(INNBBSDPATH1,"tcp",NULL); + int rel; + /* installbbstalkd(); */ + fprintf(stderr, "Trying to listen in port %s\n", INNBBSDPATH1); + rel = open_unix_listen(INNBBSDPATH1, "tcp", NULL); #ifdef DEBUG - printf("port fd %d allocated\n",rel); + printf("port fd %d allocated\n", rel); #endif - if (rel<0) { - fprintf(stderr,"Trying to listen in port %s\n",INNBBSDPATH2); - return open_listen(INNBBSDPATH2,"tcp",NULL); + if (rel < 0) { + fprintf(stderr, "Trying to listen in port %s\n", INNBBSDPATH2); + return open_listen(INNBBSDPATH2, "tcp", NULL); } return rel; } else { #ifdef DEBUG printf("start to allocate path %s\n", path); #endif - int fd = unixclient(path,"tcp"); - if (fd < 0) - unlink(path); - else - close(fd); - return open_unix_listen(path,"tcp",NULL); - } + int fd = unixclient(path, "tcp"); + if (fd < 0) + unlink(path); + else + close(fd); + return open_unix_listen(path, "tcp", NULL); + } } - |