summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-27 23:50:20 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-27 23:50:20 +0800
commit1cfd2ba12337bbad41d8e1c1bb5b828d7ef9bc95 (patch)
tree95c9fbe94ccd9f50a0f09732b577ff455149dd66
parentf793f25ce60f90f2413546a170203bcc5403e77e (diff)
downloadpttbbs-1cfd2ba12337bbad41d8e1c1bb5b828d7ef9bc95.tar
pttbbs-1cfd2ba12337bbad41d8e1c1bb5b828d7ef9bc95.tar.gz
pttbbs-1cfd2ba12337bbad41d8e1c1bb5b828d7ef9bc95.tar.bz2
pttbbs-1cfd2ba12337bbad41d8e1c1bb5b828d7ef9bc95.tar.lz
pttbbs-1cfd2ba12337bbad41d8e1c1bb5b828d7ef9bc95.tar.xz
pttbbs-1cfd2ba12337bbad41d8e1c1bb5b828d7ef9bc95.tar.zst
pttbbs-1cfd2ba12337bbad41d8e1c1bb5b828d7ef9bc95.zip
for mbbsd.icc
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@128 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd.icc/.cvsignore2
-rw-r--r--mbbsd.icc/Makefile51
-rw-r--r--mbbsd/dark.c40
-rw-r--r--mbbsd/descrypt.c6
-rw-r--r--mbbsd/edit.c4
-rw-r--r--mbbsd/mbbsd.c6
-rw-r--r--mbbsd/more.c18
-rw-r--r--mbbsd/page.c34
-rw-r--r--mbbsd/screen.c10
-rw-r--r--mbbsd/talk.c12
-rw-r--r--mbbsd/user.c6
11 files changed, 121 insertions, 68 deletions
diff --git a/mbbsd.icc/.cvsignore b/mbbsd.icc/.cvsignore
new file mode 100644
index 00000000..0ffc7757
--- /dev/null
+++ b/mbbsd.icc/.cvsignore
@@ -0,0 +1,2 @@
+*.o
+mbbsd.icc
diff --git a/mbbsd.icc/Makefile b/mbbsd.icc/Makefile
new file mode 100644
index 00000000..a87135cc
--- /dev/null
+++ b/mbbsd.icc/Makefile
@@ -0,0 +1,51 @@
+.PATH: ../mbbsd
+
+BBSHOME=/home/bbs
+PROG= mbbsd.icc
+OBJS= admin.o announce.o args.o bbcall.o bbs.o board.o cache.o cal.o card.o\
+ chat.o chc_draw.o chc_net.o chc_play.o chc_rule.o chicken.o dark.o\
+ dice.o edit.o friend.o gamble.o gomo.o gomo1.o guess.o indict.o io.o\
+ kaede.o lovepaper.o mail.o mbbsd.o menu.o more.o name.o osdep.o\
+ othello.o page.o read.o record.o register.o screen.o stuff.o\
+ talk.o term.o topsong.o user.o vice.o vote.o xyz.o\
+ voteboard.o syspost.o var.o descrypt.o toolkit.o passwd.o\
+ calendar.o
+
+CFLAGS= -O -DHAVE_SETPROCTITLE -DBBSHOME='"$(BBSHOME)"' -DFreeBSD -I../include -D__FreeBSD__
+LDFLAGS=-O -lutil -lkvm
+GCCUSE=gcc -pipe -Wall -O -DHAVE_SETPROCTITLE -DBBSHOME='"/home/bbs"' -DFreeBSD -I../include -c
+
+.SUFFIXES: .c .o
+.c.o:
+ iccbin $(CFLAGS) -c ../mbbsd/$*.c
+
+all: $(PROG)
+
+$(PROG): $(OBJS)
+ cc $(LDFLAGS) -o $(PROG) $(OBJS)
+
+install: $(PROG)
+ install -d $(BBSHOME)/bin/
+ install -c -m 755 $(PROG) $(BBSHOME)/bin/
+ rm -f $(BBSHOME)/bin/mbbsd
+ ln -sv $(BBSHOME)/bin/$(PROG) $(BBSHOME)/bin/mbbsd
+cache.o: cache.c
+ $(GCCUSE) ../mbbsd/$*.c
+
+mail.o: mail.c
+ $(GCCUSE) ../mbbsd/$*.c
+
+menu.o: menu.c
+ $(GCCUSE) ../mbbsd/$*.c
+
+record.o: record.c
+ $(GCCUSE) ../mbbsd/$*.c
+
+topsong.o: topsong.c
+ $(GCCUSE) ../mbbsd/$*.c
+
+xyz.o: xyz.c
+ $(GCCUSE) ../mbbsd/$*.c
+
+clean:
+ rm -f $(OBJS) $(PROG)
diff --git a/mbbsd/dark.c b/mbbsd/dark.c
index 52741617..1b084407 100644
--- a/mbbsd/dark.c
+++ b/mbbsd/dark.c
@@ -1,4 +1,4 @@
-/* $Id: dark.c,v 1.1 2002/03/07 15:13:48 in2 Exp $ */
+/* $Id: dark.c,v 1.2 2002/04/27 15:50:17 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -113,17 +113,17 @@ static void brd_rand() {
static void brd_prints() {
clear();
move(1,0);
- outs("
- ¢~¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢¡
- ¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x
- ¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t
- ¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x
- ¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t
- ¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x
- ¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t
- ¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x
- ¢¢¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢£
- ");
+ outs("\n"
+" ¢~¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢¡\n"
+" ¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x\n"
+" ¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t\n"
+" ¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x\n"
+" ¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t\n"
+" ¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x\n"
+" ¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t\n"
+" ¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x\n"
+" ¢¢¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢£\n"
+" ");
}
static void draw_line(sint y, sint f) {
@@ -325,14 +325,14 @@ int main_dark(int fd,userinfo_t *uin) {
}
move(12,3);
prints("%s[0³Ó0±Ñ]¢þ¢û.%s[0³Ó0±Ñ]",currutmp->userid,currutmp->mateid);
- outs("
- ¢®¢¬¥\\¯àªí¢­¢®¢­¢¬¢®¢­
- ¢¬ ¡ô¡ö¡õ¡÷: ²¾°Ê
- ¢® ¢û:  ¿ï¤l,½¤l
- ¢¬ enter:  ¦Y´Ñ,©ñ´Ñ
-¡@¤w¸g¸Ñ¨Mªº:¡@¡@ ¢® ¢ø:  ¦X´Ñ
- ¡@¡@ ¢¬ ¢ù:  »{¿é
- ¢® ¢ë:  ´«Ãä");
+ outs("\n"
+" ¢®¢¬¥\\¯àªí¢­¢®¢­¢¬¢®¢­\n"
+" ¢¬ ¡ô¡ö¡õ¡÷: ²¾°Ê\n"
+" ¢® ¢û:  ¿ï¤l,½¤l\n"
+" ¢¬ enter:  ¦Y´Ñ,©ñ´Ñ\n"
+"¡@¤w¸g¸Ñ¨Mªº:¡@¡@ ¢® ¢ø:  ¦X´Ñ\n"
+" ¡@¡@ ¢¬ ¢ù:  »{¿é\n"
+" ¢® ¢ë:  ´«Ãä");
if(currutmp->turn) move(cury[0],curx[0]);
diff --git a/mbbsd/descrypt.c b/mbbsd/descrypt.c
index 3bb0a5e5..1d246670 100644
--- a/mbbsd/descrypt.c
+++ b/mbbsd/descrypt.c
@@ -1,4 +1,4 @@
-/* $Id: descrypt.c,v 1.1 2002/03/07 15:13:48 in2 Exp $ */
+/* $Id: descrypt.c,v 1.2 2002/04/27 15:50:17 in2 Exp $ */
/*
* FreeSec: libcrypt for NetBSD
@@ -560,7 +560,7 @@ char *crypt(char *key, char *setting) {
if((*q++ = *key << 1))
key++;
}
- if(des_setkey((unsigned char *)keybuf))
+ if(des_setkey((char *)keybuf))
return NULL;
/*
@@ -611,6 +611,6 @@ char *crypt(char *key, char *setting) {
*p++ = ascii64[l & 0x3f];
*p = 0;
- return output;
+ return (char *)output;
}
#endif
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 8072de6d..0b372209 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1,4 +1,4 @@
-/* $Id: edit.c,v 1.3 2002/04/16 15:27:40 in2 Exp $ */
+/* $Id: edit.c,v 1.4 2002/04/27 15:50:17 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -860,7 +860,7 @@ void addsignature(FILE *fp, int ifuseanony) {
fprintf(fp, "\n--\n¡° µo«H¯¸: " BBSNAME "(" MYHOSTNAME
") \n¡» From: %s\n", "¼Ê¦W¤Ñ¨Ïªº®a");
else {
- char temp[32];
+ char temp[33];
strncpy(temp, fromhost, 31);
temp[32] = '\0';
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 3f2b68e7..49915683 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1,4 +1,4 @@
-/* $Id: mbbsd.c,v 1.21 2002/04/15 20:00:22 in2 Exp $ */
+/* $Id: mbbsd.c,v 1.22 2002/04/27 15:50:17 in2 Exp $ */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -288,7 +288,7 @@ dosearchuser (char *userid)
}
static void
-talk_request ()
+talk_request(int sig)
{
bell ();
bell ();
@@ -1351,7 +1351,7 @@ daemon_login (int argc, char *argv[], char *envp[])
/* main loop */
for(;;) {
len_of_sock_addr = sizeof(xsin);
- csock = accept(msock, (struct sockaddr *)&xsin, &len_of_sock_addr);
+ csock = accept(msock, (struct sockaddr *)&xsin, (socklen_t *)&len_of_sock_addr);
if(csock < 0) {
if(errno!=EINTR) sleep(1);
diff --git a/mbbsd/more.c b/mbbsd/more.c
index e072dac4..7440ecc4 100644
--- a/mbbsd/more.c
+++ b/mbbsd/more.c
@@ -1,4 +1,4 @@
-/* $Id: more.c,v 1.10 2002/04/24 11:16:30 in2 Exp $ */
+/* $Id: more.c,v 1.11 2002/04/27 15:50:17 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -119,9 +119,9 @@ more_readln (int fd, unsigned char *buf)
}
else if (ch == '\033')
{
- if (atoi (data + 1) > 47)
+ if (atoi ((char *)(data + 1)) > 47)
{
- if ((cc = strchr (data + 1, 'm')) != NULL)
+ if ((cc = (unsigned char *)strchr ((char *)(data + 1), 'm')) != NULL)
{
ch = cc - data + 1;
@@ -251,7 +251,7 @@ int more(char *fpath, int promptend) {
more_base = more_head = more_size = 0;
- while((numbytes = more_readln(fd, buf)) || (line == t_lines)) {
+ while((numbytes = more_readln(fd, (unsigned char *)buf)) || (line == t_lines)) {
if(scrollup) {
rscroll();
move(0, 0);
@@ -280,7 +280,7 @@ int more(char *fpath, int promptend) {
"\033[m\n", head[pos], word);
viewed += numbytes;
- numbytes = more_readln(fd, buf);
+ numbytes = more_readln(fd, (unsigned char *)buf);
/* ²Ä¤@¦æ¤Óªø¤F */
if(!pos && viewed > 79) {
@@ -288,7 +288,7 @@ int more(char *fpath, int promptend) {
if(memcmp( buf, head[1], 2)) {
/* Ū¤U¤@¦æ¶i¨Ó³B²z */
viewed += numbytes;
- numbytes = more_readln(fd, buf);
+ numbytes = more_readln(fd, (unsigned char *)buf);
}
}
pos++;
@@ -390,7 +390,7 @@ int more(char *fpath, int promptend) {
move(line = b_lines, 0);
clrtoeol();
for(pos = 1; pos < b_lines; pos++)
- viewed += more_readln(fd, buf);
+ viewed += more_readln(fd, (unsigned char *)buf);
} else if(pos == b_lines) /* ±²°Ê¿Ã¹õ */
scroll();
else
@@ -693,13 +693,13 @@ int more(char *fpath, int promptend) {
scrollup = lino - 1;
more_goto(fd, viewed = pagebreak[pageno - 1]);
while(line--)
- viewed += more_readln(fd, buf);
+ viewed += more_readln(fd, (unsigned char *)buf);
} else if(pageno > 1) {
scrollup = b_lines - 1;
line = (b_lines - 2) - local;
more_goto(fd, viewed = pagebreak[--pageno - 1]);
while(line--)
- viewed += more_readln(fd, buf);
+ viewed += more_readln(fd, (unsigned char *)buf);
}
line = pos = 0;
} else {
diff --git a/mbbsd/page.c b/mbbsd/page.c
index c77ef421..33201bfc 100644
--- a/mbbsd/page.c
+++ b/mbbsd/page.c
@@ -1,4 +1,4 @@
-/* $Id: page.c,v 1.1 2002/03/07 15:13:48 in2 Exp $ */
+/* $Id: page.c,v 1.2 2002/04/27 15:50:17 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -59,22 +59,22 @@ int main_railway() {
move(0,25);
prints("\033[1;37;45m ¤õ¨®¬d¸ß¨t²Î \033[1;44;33m§@ªÌ:Heat\033[m");
move(1,0);
- outs("\033[1;33m
- 1.°ò¶© 16.¤¤Ãc 31.Às´ä 46.»ÉÆr 61.¥Ð¤¤ 76.ªL»ñÀç 91.°ª¶¯
- 2.¤K°ô 17.®H¤ß 32.¥Õ¨F¤Ù 47.¤T¸q 62.¤G¤ô 77.¶©¥Ð 92.»ñ¤s
- 3.¤C°ô 18.·¨±ö 33.·s®H 48.³Ó¿³ 63.ªL¤º 78.©ÞªL 93.¤E¦±°ó
- 4.¤­°ô 19.´ò¤f 34.³q¾] 49.®õ¦w 64.¥Ûºh 79.µ½¤Æ 94.«ÌªF
- 5.¦Á¤î 20.·sÂ× 35.­b¸Ì 50.¦Z¨½ 65.¤æ¤» 80.·s¥«
- 6.«n´ä 21.¦Ë¥_ 36.¤é«n 51.Â×­ì 66.¤æ«n 81.¥Ã±d
- 7.ªQ¤s 22.·s¦Ë 37.¤j¥Ò 52.¼æ¤l 67.¥ÛÀt 82.¥x«n
- 8.¥x¥_ 23.­»¤s 38.»O¤¤´ä 53.¥x¤¤ 68.¤jªL 83.«O¦w
- 9.¸UµØ 24.±T³» 39.²M¤ô 54.¯Q¤é 69.¥Á¶¯ 84.¤¤¬w
-10.ªO¾ô 25.¦Ë«n 40.¨F³À 55.¦¨¥\\ 70.¹Å¸q 85.¤j´ò
-11.¾ðªL 26.³y¾ô 41.Às¤« 56.¹ü¤Æ 71.¤ô¤W 86.¸ô¦Ë
-12.¤s¨Î 27.Â×´I 42.¤j¨{ 57.ªá¾Â 72.«n¹t 87.©£¤s
-13.Åaºq 28.½Í¤å 43.°l¤À 58.­ûªL 73.«á¾À 88.¾ôÀY
-14.®ç¶é 29.¤j¤s 44.­]®ß 59.¥Ã¹t 74.·sÀç 89.·£±ê
-15.¤ºÃc 30.«áÀs 45.«n¶Õ 60.ªÀÀY 75.¬hÀç 90.¥ªÀç\033[m");
+ outs("\033[1;33m\n"
+" 1.°ò¶© 16.¤¤Ãc 31.Às´ä 46.»ÉÆr 61.¥Ð¤¤ 76.ªL»ñÀç 91.°ª¶¯\n"
+" 2.¤K°ô 17.®H¤ß 32.¥Õ¨F¤Ù 47.¤T¸q 62.¤G¤ô 77.¶©¥Ð 92.»ñ¤s\n"
+" 3.¤C°ô 18.·¨±ö 33.·s®H 48.³Ó¿³ 63.ªL¤º 78.©ÞªL 93.¤E¦±°ó\n"
+" 4.¤­°ô 19.´ò¤f 34.³q¾] 49.®õ¦w 64.¥Ûºh 79.µ½¤Æ 94.«ÌªF\n"
+" 5.¦Á¤î 20.·sÂ× 35.­b¸Ì 50.¦Z¨½ 65.¤æ¤» 80.·s¥«\n"
+" 6.«n´ä 21.¦Ë¥_ 36.¤é«n 51.Â×­ì 66.¤æ«n 81.¥Ã±d\n"
+" 7.ªQ¤s 22.·s¦Ë 37.¤j¥Ò 52.¼æ¤l 67.¥ÛÀt 82.¥x«n\n"
+" 8.¥x¥_ 23.­»¤s 38.»O¤¤´ä 53.¥x¤¤ 68.¤jªL 83.«O¦w\n"
+" 9.¸UµØ 24.±T³» 39.²M¤ô 54.¯Q¤é 69.¥Á¶¯ 84.¤¤¬w\n"
+"10.ªO¾ô 25.¦Ë«n 40.¨F³À 55.¦¨¥\\ 70.¹Å¸q 85.¤j´ò\n"
+"11.¾ðªL 26.³y¾ô 41.Às¤« 56.¹ü¤Æ 71.¤ô¤W 86.¸ô¦Ë\n"
+"12.¤s¨Î 27.Â×´I 42.¤j¨{ 57.ªá¾Â 72.«n¹t 87.©£¤s\n"
+"13.Åaºq 28.½Í¤å 43.°l¤À 58.­ûªL 73.«á¾À 88.¾ôÀY\n"
+"14.®ç¶é 29.¤j¤s 44.­]®ß 59.¥Ã¹t 74.·sÀç 89.·£±ê\n"
+"15.¤ºÃc 30.«áÀs 45.«n¶Õ 60.ªÀÀY 75.¬hÀç 90.¥ªÀç\033[m");
getdata(17, 0, "\033[1;35m§A½T©w­n·j´M¶Ü?[y/n]:\033[m", buf, 2, LCECHO);
if(buf[0] != 'y' && buf[0] != 'Y')
diff --git a/mbbsd/screen.c b/mbbsd/screen.c
index 46ad5b38..2c70917f 100644
--- a/mbbsd/screen.c
+++ b/mbbsd/screen.c
@@ -1,4 +1,4 @@
-/* $Id: screen.c,v 1.1 2002/03/07 15:13:48 in2 Exp $ */
+/* $Id: screen.c,v 1.2 2002/04/27 15:50:17 in2 Exp $ */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -131,9 +131,9 @@ void redoscr() {
if((len = bp->len)) {
rel_move(tc_col, tc_line, 0, i);
if(bp->mode & STANDOUT)
- standoutput(bp->data, 0, len, bp->sso, bp->eso);
+ standoutput((char *)bp->data, 0, len, bp->sso, bp->eso);
else
- output(bp->data, len);
+ output((char *)bp->data, len);
tc_col += len;
if(tc_col >= t_columns) {
if (automargins)
@@ -195,10 +195,10 @@ void refresh() {
rel_move(tc_col, tc_line, bp->smod, i);
if(bp->mode & STANDOUT)
- standoutput(bp->data, bp->smod, bp->emod + 1,
+ standoutput((char *)bp->data, bp->smod, bp->emod + 1,
bp->sso, bp->eso);
else
- output(&bp->data[bp->smod], bp->emod - bp->smod + 1);
+ output((char *)&bp->data[bp->smod], bp->emod - bp->smod + 1);
tc_col = bp->emod + 1;
if(tc_col >= t_columns) {
if(automargins) {
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index facab4b4..73fdbc43 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1,4 +1,4 @@
-/* $Id: talk.c,v 1.21 2002/04/10 10:49:42 in2 Exp $ */
+/* $Id: talk.c,v 1.22 2002/04/27 15:50:17 in2 Exp $ */
#include <stdio.h>
#include <string.h>
#include <errno.h>
@@ -954,13 +954,13 @@ static void do_talk_char(talkwin_t * twin, int ch)
case Ctrl('M'):
case Ctrl('J'):
line = big_picture + twin->curln;
- strncpy(buf, line->data, line->len);
+ strncpy(buf, (char *)line->data, line->len);
buf[line->len] = 0;
do_talk_nextline(twin);
break;
case Ctrl('P'):
line = big_picture + twin->curln;
- strncpy(buf, line->data, line->len);
+ strncpy(buf, (char *)line->data, line->len);
buf[line->len] = 0;
if (twin->curln > twin->sline){
--(twin->curln);
@@ -969,7 +969,7 @@ static void do_talk_char(talkwin_t * twin, int ch)
break;
case Ctrl('N'):
line = big_picture + twin->curln;
- strncpy(buf, line->data, line->len);
+ strncpy(buf, (char *)line->data, line->len);
buf[line->len] = 0;
if (twin->curln < twin->eline){
++(twin->curln);
@@ -1230,7 +1230,7 @@ static void my_talk(userinfo_t * uin, int fri_stat) {
return;
}
length = sizeof(server);
- if (getsockname(sock, (struct sockaddr *) &server, &length) < 0){
+ if (getsockname(sock, (struct sockaddr *) &server, (socklen_t*)&length) < 0){
close(sock);
perror("sock name err");
unlockutmpmode();
@@ -1305,7 +1305,7 @@ static void my_talk(userinfo_t * uin, int fri_stat) {
}
}
- msgsock = accept(sock, (struct sockaddr *) 0, (int *) 0);
+ msgsock = accept(sock, (struct sockaddr *) 0, (socklen_t *) 0);
if (msgsock == -1){
perror("accept");
unlockutmpmode();
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 2e2e3401..55719a4a 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -1,4 +1,4 @@
-/* $Id: user.c,v 1.13 2002/04/05 18:49:47 in2 Exp $ */
+/* $Id: user.c,v 1.14 2002/04/27 15:50:17 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -319,7 +319,7 @@ void uinfo_query(userec_t *u, int real, int unum) {
if(HAS_PERM(PERM_BBSADM)) {
sprintf(genbuf, "%d", x.money);
if(getdata_str(i++, 0,"»È¦æ±b¤á¡G", buf, 10, DOECHO,genbuf))
- if((l = atol(buf)) >= 0) {
+ if((l = atol(buf)) != 0) {
if(l != x.money) {
money_change = 1;
money = x.money;
@@ -329,7 +329,7 @@ void uinfo_query(userec_t *u, int real, int unum) {
}
sprintf(genbuf, "%d", x.exmailbox);
if(getdata_str(i++, 0,"ÁʶR«H½c¼Æ¡G", buf, 4, DOECHO,genbuf))
- if((l = atol(buf)) >= 0)
+ if((l = atol(buf)) != 0)
x.exmailbox = (int)l;
getdata_buf(i++, 0, "»{ÃÒ¸ê®Æ¡G", x.justify, 44, DOECHO);