From 62440ae3be847691d6944e64e81035de7c56b0df Mon Sep 17 00:00:00 2001 From: kcwu Date: Sat, 6 Sep 2003 15:02:29 +0000 Subject: clean up git-svn-id: http://opensvn.csie.org/pttbbs/trunk@1163 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/include/common.h | 6 +-- pttbbs/include/config.h | 6 +-- pttbbs/mbbsd/xyz.c | 115 +++--------------------------------------------- 3 files changed, 11 insertions(+), 116 deletions(-) diff --git a/pttbbs/include/common.h b/pttbbs/include/common.h index 309f49c5..18d377c2 100644 --- a/pttbbs/include/common.h +++ b/pttbbs/include/common.h @@ -1,4 +1,4 @@ -/* $Id: common.h,v 1.6 2003/05/26 05:30:22 in2 Exp $ */ +/* $Id$ */ #ifndef INCLUDE_COMMON_H #define INCLUDE_COMMON_H @@ -175,10 +175,10 @@ #define MAX_MODES 127 #ifndef MIN -#define MIN(a,b) ((ab)?a:b) +#define MAX(a,b) (((a)>(b))?(a):(b)) #endif #define char_lower(c) ((c >= 'A' && c <= 'Z') ? c|32 : c) diff --git a/pttbbs/include/config.h b/pttbbs/include/config.h index 23bca878..d7dd1606 100644 --- a/pttbbs/include/config.h +++ b/pttbbs/include/config.h @@ -1,4 +1,4 @@ -/* $Id: config.h,v 1.10 2003/05/10 16:52:01 bbs Exp $ */ +/* $Id$ */ #ifndef INCLUDE_CONFIG_H #define INCLUDE_CONFIG_H @@ -134,12 +134,8 @@ #undef HAVE_REPORT /* ¨t²Î°lÂܳø§i */ #undef HAVE_INFO /* Åã¥Üµ{¦¡ªO¥»»¡©ú */ #undef HAVE_LICENSE /* Åã¥Ü GNU ªOÅvµe­± */ -#undef HAVE_TIN /* ´£¨Ñ news reader */ -#undef HAVE_GOPHER /* ´£¨Ñ gopher */ -#undef HAVE_WWW /* ´£¨Ñ www browser */ #define FAST_LOGIN /* Login ¤£Àˬd»·ºÝ¨Ï¥ÎªÌ */ #define HAVE_CAL /* ´£¥\­pºâ¾÷ */ -#undef HAVE_ARCHIE /* have arche */ #undef POSTBUG /* board/mail post ¨S¦³ bug ¤F */ #undef HAVE_REPORT /* ¨t²Î°lÂܳø§i */ #undef EMAIL_JUSTIFY /* µo¥X InterNet Email ¨­¥÷»{ÃÒ«H¨ç */ diff --git a/pttbbs/mbbsd/xyz.c b/pttbbs/mbbsd/xyz.c index 9f9aa4d0..aead7e5d 100644 --- a/pttbbs/mbbsd/xyz.c +++ b/pttbbs/mbbsd/xyz.c @@ -1,4 +1,4 @@ -/* $Id: xyz.c,v 1.19 2003/03/31 08:27:50 in2 Exp $ */ +/* $Id$ */ #include "bbs.h" #if 0 @@ -244,13 +244,13 @@ note() collect = 1; while (total) { - snprintf(buf, sizeof(buf), "\033[1;31m¢~¢t\033[32m %s \033[37m(%s)", + snprintf(buf, sizeof(buf), "\033[1;31mùú¢t\033[32m %s \033[37m(%s)", myitem.userid, myitem.username); len = strlen(buf); for (i = len; i < 71; i++) strcat(buf, " "); - snprintf(buf2, sizeof(buf2), " \033[1;36m%.16s\033[31m ¢u¢¡\033[m\n", + snprintf(buf2, sizeof(buf2), " \033[1;36m%.16s\033[31m ¢uùû\033[m\n", Cdate(&(myitem.date))); strcat(buf, buf2); fputs(buf, fp); @@ -263,12 +263,12 @@ note() fprintf(foo, "\033[1;31m¢x\033[m%-74.74s\033[1;31m¢x\033[m\n", myitem.buf[i]); } - fputs("\033[1;31m¢¢¢s¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w" - "¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢s¢£\033[m\n", fp); + fputs("\033[1;31mùü¢s¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w" + "¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢sùý\033[m\n", fp); if (collect) { - fputs("\033[1;31m¢¢¢s¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w" - "¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢s¢£\033[m\n", foo); + fputs("\033[1;31mùü¢s¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w" + "¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢sùý\033[m\n", foo); fclose(foo); collect = 0; } @@ -392,104 +392,3 @@ Goodbye() u_exit("EXIT "); return QUIT; } - -/* ¤ä´©¥~±¾µ{¦¡ : tin¡Bgopher¡Bwww¡Bbbsnet¡Bgame¡Bcsh */ -#define LOOKFIRST (0) -#define LOOKLAST (1) -#define QUOTEMODE (2) -#define MAXCOMSZ (1024) -#define MAXARGS (40) -#define MAXENVS (20) -#define BINDIR BBSHOME"/bin/" - -#ifdef HAVE_TIN -static int -x_tin() -{ - clear(); - return exec_cmd(NEWS, YEA, "bin/tin.sh", "TIN"); -} -#endif - -#ifdef HAVE_GOPHER -static int -x_gopher() -{ - clear(); - return exec_cmd(GOPHER, YEA, "bin/gopher.sh", "GOPHER"); -} -#endif - -#ifdef HAVE_WWW -static int -x_www() -{ - return exec_cmd(WWW, NA, "bin/www.sh", "WWW"); -} -#endif - -#ifdef HAVE_IRC -static int -x_irc() -{ - return exec_cmd(XMODE, NA, "bin/irc.sh", "IRC"); -} -#endif - -#ifdef HAVE_ARCHIE -static int -x_archie() -{ - char buf[STRLEN], ans[4]; - char genbuf1[100], genbuf2[200]; - char *s; - - setutmpmode(ARCHIE); - clear(); - outs("\nÅwªï¥úÁ{¡i\033[1;33;44m" BBSNAME "\033[m¡j¨Ï¥Î " - "\033[32mARCHIE\033[m ¥\\¯à\n"); - outs("\n¥»¥\\¯à±N¬°±z¦C¥X¦b­þ­Ó FTP ¯¸¦s¦³±z±ý´M§äªºÀÉ®×.\n"); - outs("\n½Ð¿é¤J±ý·j´Mªº¦r¦ê, ©Îª½±µ«ö ¨ú®ø¡C\n"); - outs("\n coder by Harimau\n"); - outs(" modified by Leeym\n"); - getdata(13, 0, "·j´M¦r¦ê¡G", buf, 20, DOECHO, 0); - if (buf[0] == '\0') { - prints("\n¨ú®ø·j´M.....\n"); - pressanykey(); - return; - } - for (s = buf; *s != '\0'; s++) { - if (isspace(*s)) { - prints("\n¤@¦¸¥u¯à·j´M¤@­Ó¦r¦ê°Õ, ¤£¯à¤Ó³g¤ß³á!!"); - pressanykey(); - return; - } - } - bbssetenv("ARCHIESTRING", buf); - exec_cmd(ARCHIE, YEA, "bin/archie.sh", ARCHIE); - log_usies("ARCHIE", ""); - strcpy(genbuf1, buf); - snprintf(buf, sizeof(buf), BBSHOME "/tmp/archie.%s", cuser.userid); - if (dashf(buf)) { - getdata(0, 0, "­n±Nµ²ªG±H¦^«H½c¶Ü(Y/N)¡H[N]", - ans, sizeof(ans), DOECHO, 0); - if (*ans == 'y') { - fileheader_t mhdr; - char title[128], buf1[80]; - - sethomepath(buf1, cuser.userid); - stampfile(buf1, &mhdr); - strcpy(mhdr.owner, cuser.userid); - sprintf(genbuf2, sizeof(genbuf2), - "Archie ·j´MÀÉ®×: %s µ²ªG", genbuf1); - strcpy(mhdr.title, genbuf2); - mhdr.filemode = 0; - sethomedir(title, cuser.userid); - append_record(title, &mhdr, sizeof(mhdr)); - Link(buf, buf1); - } - more(buf, YEA); - unlink(buf); - } -} -#endif /* HAVE_ARCHIE */ -- cgit v1.2.3