diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/dark.c | 40 | ||||
-rw-r--r-- | mbbsd/descrypt.c | 6 | ||||
-rw-r--r-- | mbbsd/edit.c | 4 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 6 | ||||
-rw-r--r-- | mbbsd/more.c | 18 | ||||
-rw-r--r-- | mbbsd/page.c | 34 | ||||
-rw-r--r-- | mbbsd/screen.c | 10 | ||||
-rw-r--r-- | mbbsd/talk.c | 12 | ||||
-rw-r--r-- | mbbsd/user.c | 6 |
9 files changed, 68 insertions, 68 deletions
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(" - [43;30m¢~¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢¡[m - [43;30m¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x[m - [43;30m¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t[m - [43;30m¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x[m - [43;30m¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t[m - [43;30m¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x[m - [43;30m¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t[m - [43;30m¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x[m - [43;30m¢¢¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢£[m - "); + outs("\n" +" [43;30m¢~¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢s¢w¢¡[m\n" +" [43;30m¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x[m\n" +" [43;30m¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t[m\n" +" [43;30m¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x[m\n" +" [43;30m¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t[m\n" +" [43;30m¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x[m\n" +" [43;30m¢u¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢q¢w¢t[m\n" +" [43;30m¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x¡´¢x[m\n" +" [43;30m¢¢¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢r¢w¢£[m\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±Ñ][5;31m¢þ¢û[1;37m.[m%s[0³Ó0±Ñ]",currutmp->userid,currutmp->mateid); - outs(" - [1;36m¢®¢¬[1;31m¥\\¯àªí[1;36m¢¢®¢¢¬¢®¢[m - [1;36m¢¬[1;33m ¡ô¡ö¡õ¡÷[1;37m: [1;35m²¾°Ê[m - [1;36m¢®[1;33m ¢û[1;37m: [1;35m ¿ï¤l,½¤l[m - [1;36m¢¬[1;33m enter[1;37m: [1;35m ¦Y´Ñ,©ñ´Ñ[m -¡@[1;33m¤w¸g¸Ñ¨Mªº[1;37m:[1;36m¡@¡@ ¢®[1;33m ¢ø[1;37m: [1;35m ¦X´Ñ[m - ¡@¡@ [1;36m¢¬[1;33m ¢ù[1;37m: [1;35m »{¿é[m - [1;36m¢®[1;33m ¢ë[1;37m: [1;35m ´«Ãä[m"); + outs("\n" +" [1;36m¢®¢¬[1;31m¥\\¯àªí[1;36m¢¢®¢¢¬¢®¢[m\n" +" [1;36m¢¬[1;33m ¡ô¡ö¡õ¡÷[1;37m: [1;35m²¾°Ê[m\n" +" [1;36m¢®[1;33m ¢û[1;37m: [1;35m ¿ï¤l,½¤l[m\n" +" [1;36m¢¬[1;33m enter[1;37m: [1;35m ¦Y´Ñ,©ñ´Ñ[m\n" +"¡@[1;33m¤w¸g¸Ñ¨Mªº[1;37m:[1;36m¡@¡@ ¢®[1;33m ¢ø[1;37m: [1;35m ¦X´Ñ[m\n" +" ¡@¡@ [1;36m¢¬[1;33m ¢ù[1;37m: [1;35m »{¿é[m\n" +" [1;36m¢®[1;33m ¢ë[1;37m: [1;35m ´«Ãä[m"); 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©wn·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); |