summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/common.h6
-rw-r--r--include/config.h6
-rw-r--r--mbbsd/xyz.c115
3 files changed, 11 insertions, 116 deletions
diff --git a/include/common.h b/include/common.h
index 309f49c5..18d377c2 100644
--- a/include/common.h
+++ b/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) ((a<b)?a:b)
+#define MIN(a,b) (((a)<(b))?(a):(b))
#endif
#ifndef MAX
-#define MAX(a,b) ((a>b)?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/include/config.h b/include/config.h
index 23bca878..d7dd1606 100644
--- a/include/config.h
+++ b/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/mbbsd/xyz.c b/mbbsd/xyz.c
index 9f9aa4d0..aead7e5d 100644
--- a/mbbsd/xyz.c
+++ b/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��, �Ϊ����� <ENTER> �����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 */