diff --git a/include/attr.h b/include/attr.h index 22fd4d779..290668a94 100644 --- a/include/attr.h +++ b/include/attr.h @@ -1,29 +1,29 @@ -/*-------------------------------------------------------*/ -/* attr.h ( NTHU CS MapleBBS Ver 3.10 ) */ -/*-------------------------------------------------------*/ -/* target : dynamic attribute database */ -/* create : 99/03/11 */ -/* update : / / */ -/*-------------------------------------------------------*/ - -#ifndef _ATTR_H_ -#define _ATTR_H_ - +/*-------------------------------------------------------*/ +/* attr.h ( NTHU CS MapleBBS Ver 3.10 ) */ +/*-------------------------------------------------------*/ +/* target : dynamic attribute database */ +/* create : 99/03/11 */ +/* update : / / */ +/*-------------------------------------------------------*/ + +#ifndef _ATTR_H_ +#define _ATTR_H_ + #if 0 - int key; - key < 0 is reserved. - key & 0xff == 0 is reserved. - sizeof(attr): key & 0xff - - file: $userhome/.ATTR + int key; + key < 0 is reserved. + key & 0xff == 0 is reserved. + sizeof(attr): key & 0xff + + file: $userhome/.ATTR #endif -#define ATTR_OTHELLO_TOTAL 0x00001004 -#define ATTR_FIVE_TOTAL 0x00001104 -#define ATTR_BLOCK_TOTAL 0x00001204 -#define ATTR_OTHELLO_WIN 0x00001404 -#define ATTR_FIVE_WIN 0x00001504 -#define ATTR_BLOCK_WIN 0x00001604 +#define ATTR_OTHELLO_TOTAL 0x00001004 +#define ATTR_FIVE_TOTAL 0x00001104 +#define ATTR_BLOCK_TOTAL 0x00001204 +#define ATTR_OTHELLO_WIN 0x00001404 +#define ATTR_FIVE_WIN 0x00001504 +#define ATTR_BLOCK_WIN 0x00001604 /*-------------------------------------------------------*/ /* USER for WindTop */ @@ -36,7 +36,7 @@ #define REG_REQUEST 0x00000001 #define REG_OPEN 0x00000002 #define REG_FAULT 0x00000004 -#define REG_SENT 0x00000008 +#define REG_SENT 0x00000008 #define REG_OK 0x00000010 #endif diff --git a/include/battr.h b/include/battr.h index 229c88bc8..8949ae924 100644 --- a/include/battr.h +++ b/include/battr.h @@ -52,7 +52,7 @@ #define NUMATTRS 30 -char *battrs[NUMATTRS] = +char *battrs[NUMATTRS] = { "¤£¥i Zap", "¤£Âà«H", @@ -99,12 +99,12 @@ char *battrs[NUMATTRS] = "¤£¥i¦PID³s±À", "¤£¥i§Ö³t³s±À", "¥i¥H±À¼N¤å", - "¥i¥H¦Û­q±À¤å°Êµü", + "¥i¥H¦Û­q±À¤å°Êµü", #else "¤£¥i¦PID³s±À(¨t²Î¥\\¯à¥¼¶}±Ò)", "¤£¥i§Ö³t³s±À(¨t²Î¥\\¯à¥¼¶}±Ò)", "¥i¥H±À¼N¤å(¨t²Î¥\\¯à¥¼¶}±Ò)", - "¥i¥H¦Û­q±À¤å°Êµü(¨t²Î¥\\¯à¥¼¶}±Ò)", + "¥i¥H¦Û­q±À¤å°Êµü(¨t²Î¥\\¯à¥¼¶}±Ò)", #endif #ifdef HAVE_COUNT_BOARD "¤£¬ö¿ý¬ÝªO¸ê°T²Î­p", @@ -119,11 +119,11 @@ char *battrs[NUMATTRS] = #endif "Àu¨}ÂI¼Æ¬ÝªO", "¥¼¨Ï¥Î", -#ifdef ANTI_PHONETIC +#ifdef ANTI_PHONETIC "¸T¤îª`­µ¤å", #else "¸T¤îª`­µ¤å(¨t²Î¥\\¯à¥¼¶}±Ò)", -#endif +#endif "µo¤å­­¨î¬ÝªO", "ªO¥D¥i¦Û­qµo¤åÃþ§O", "RSS¬ÝªO" diff --git a/include/bbs.h b/include/bbs.h index ce84629aa..b360e836e 100644 --- a/include/bbs.h +++ b/include/bbs.h @@ -34,11 +34,11 @@ #include "proto.h" /* prototype of functions */ #include "skin.h" /* skin definition */ #include "attr.h" /* Thor.990311: dynamic attribute database */ -#include "popup.h" /* popup menu define */ +#include "popup.h" /* popup menu define */ #include "battr.h" /* board attribution */ #include "theme.h" /* custom theme */ -#ifdef __linux__ +#ifdef __linux__ #include #else #include diff --git a/include/config.h b/include/config.h index 146dc229e..7d4fea019 100644 --- a/include/config.h +++ b/include/config.h @@ -82,7 +82,7 @@ #undef AUTO_FIX_INFO /* ¶}±Ò¨Ï¥ÎªÌ¦Cªí¦P®ÉÀˬd¤W¯¸/ªO¤Í¸ê°T (°£«D¦³°ÝÃD§_«h½Ð¤Å¶}±Ò) */ -#define loginAD /* ¶i¯¸Æ[¬Ý¼s§i */ +#define loginAD /* ¶i¯¸Æ[¬Ý¼s§i */ #define NOIDENT /* ¶i¯¸¤£¤Ï¬d,¥[§Ö³s½u³t«× */ #define ANTI_PHONETIC /* ¶}±ÒÀˬdª`­µ¤å¥\¯à */ @@ -102,7 +102,7 @@ #ifndef MAXACTIVE #define MAXACTIVE (4096) /* ³Ì¦h¦P®É¤W¯¸¤H¼Æ (ex.1400)*/ /* ­Y­n¶W¹L 1024 ½Ð­×§ï kernel */ - /* options SHMMAXPGS=? */ + /* options SHMMAXPGS=? */ #endif #define MAXFIREWALL (300) /* ¥þ°ì¾×«H¦Cªí¤W­­ */ @@ -193,7 +193,7 @@ #define HAVE_DETECT_VIOLATELAW /* ¹Hªk¬ö¿ý */ -#define HAVE_RESIST_WATER /* ¨¾Äé¤ô¥\¯à */ +#define HAVE_RESIST_WATER /* ¨¾Äé¤ô¥\¯à */ #define HAVE_CLASSTABLE /* ­Ó¤H¥\½Òªí */ @@ -205,7 +205,7 @@ #define HAVE_SEM /* ¨Ï¥Î Semaphores */ -#define HAVE_DOWNLOAD /* ¥´¥]¦^®a */ +#define HAVE_DOWNLOAD /* ¥´¥]¦^®a */ #define HAVE_MULTI_CROSSPOST /* ¸s²ÕÂà¶K */ @@ -249,7 +249,7 @@ #ifdef HAVE_WATER_LIST #define HAVE_SYSOP_WATERLIST /* SYSOP ¤ô±í¦W³æ */ #endif -#endif +#endif #undef HAVE_GAME_QKMJ /* ´£¨Ñ QKMJ ¹CÀ¸ */ @@ -455,7 +455,7 @@ #ifdef HAVE_RESIST_WATER #define CHECK_QUOT (3) /* ¤å³¹Äé¤ô³Ì¤p¦æ¼Æ */ -#define CHECK_QUOT_MAX (3) /* ¤å³¹Äé¤ô³sÄò½g¼Æ */ +#define CHECK_QUOT_MAX (3) /* ¤å³¹Äé¤ô³sÄò½g¼Æ */ #endif #define BANMAIL_EXPIRE (30) /* ¾×«H¦Cªí§ó·s (¤Ñ) */ @@ -512,34 +512,34 @@ /* ----------------------------------------------------- */ #ifndef BRDSHM_KEY -#define BRDSHM_KEY (2997) +#define BRDSHM_KEY (2997) #endif #ifndef UTMPSHM_KEY -#define UTMPSHM_KEY (1998) +#define UTMPSHM_KEY (1998) #endif #ifndef FILMSHM_KEY -#define FILMSHM_KEY (2999) +#define FILMSHM_KEY (2999) #endif #ifndef FWSHM_KEY -#define FWSHM_KEY (3999) +#define FWSHM_KEY (3999) #endif #ifndef FWOSHM_KEY -#define FWOSHM_KEY (5000) +#define FWOSHM_KEY (5000) #endif #ifndef COUNT_KEY -#define COUNT_KEY (4000) +#define COUNT_KEY (4000) #endif #ifdef HAVE_OBSERVE_LIST /* ¨t²ÎÆ[¹î¦W³æ */ #ifndef OBSERVE_KEY -#define OBSERVE_KEY (6000) +#define OBSERVE_KEY (6000) #endif #endif diff --git a/include/global.h b/include/global.h index 23349e9a8..65a8363cf 100644 --- a/include/global.h +++ b/include/global.h @@ -164,7 +164,7 @@ #define FN_MAIL_LOG "run/mail.log" /* ©Ò¦³ [«H¥ó] °O¿ý */ #define FN_BBSMAILPOST_LOG "run/bbsmailpost.log" /* bbsmail mailpost ¬ö¿ý */ -#define FN_MAILSERVICE_LOG "run/mailservice.log" +#define FN_MAILSERVICE_LOG "run/mailservice.log" #ifdef HAVE_RECOMMEND #define FN_RECOMMEND_LOG "run/recommend.log" /* ±ÀÂˤ峹 */ @@ -192,7 +192,7 @@ #define FN_SPAMPATH_LOG "run/spampath.log" /* junk ªO spam ¤ÀªR path */ #define FN_CLASSTABLE_DB "run/class_alert.db" /* ½Òªí®É¨è³qª¾ */ #define FN_SAMEEMAIL_LOG "tmp/sameemail.log" -#define FN_EMAILADDR_LOG "run/emailaddr.log" /* ¶W¹L»{ÃÒ«H½c¤W­­ */ +#define FN_EMAILADDR_LOG "run/emailaddr.log" /* ¶W¹L»{ÃÒ«H½c¤W­­ */ /* µù¥U«H½c¨Ï¥Î¦¸¼Æ²Î­p */ #ifdef LOG_TALK @@ -209,7 +209,7 @@ #define FN_SECURITY "run/secure.log" /* lkchu.981201: ¨t²Î¦w¥þ°O¿ý */ #endif #define FN_VERIFY_LOG "run/verify.log" /* »{ÃÒ°O¿ý */ -#define FN_CRIMINAL_LOG "run/criminal.log" /* °±Åv¦W³æ */ +#define FN_CRIMINAL_LOG "run/criminal.log" /* °±Åv¦W³æ */ #define FN_UEEQUERY_LOG "run/ueequery.log" /* Áp¦Ò¬dº]¬ö¿ý */ #define FN_RFORM_R "run/rform_r.db" /* µù¥U³æ¥Ó½Ð¸ê®Æ®w */ @@ -220,7 +220,7 @@ /* ----------------------------------------------------- */ /* ¨ä¥LªºÀɦW³]©w */ -/* ----------------------------------------------------- */ +/* ----------------------------------------------------- */ #define FN_ERROR_CAMERA "gem/@/@error-camera" /* ¿ù»~ªº°ÊºA¬Ýª© */ #define FN_HOTBOARD "gem/@/@HotBoard" /* ¼öªù¬ÝªO */ @@ -296,7 +296,7 @@ /* ----------------------------------------------------- */ /* °Ñ¼Æ³]©w */ /* ----------------------------------------------------- */ - + #define GRAYOUT_DARK 0 #define GRAYOUT_BOLD 1 #define GRAYOUT_NORMAL 2 diff --git a/include/perm.h b/include/perm.h index a1044b007..e4e2db3cb 100644 --- a/include/perm.h +++ b/include/perm.h @@ -62,7 +62,7 @@ /* This is the default permission granted to all new accounts. */ -#define PERM_DEFAULT (PERM_BASIC) +#define PERM_DEFAULT (PERM_BASIC) #define PERM_ADMIN (PERM_BOARD | PERM_ACCOUNTS | PERM_SYSOP | PERM_CHATROOM | PERM_KTV) #define PERM_ALLBOARD (PERM_SYSOP | PERM_BOARD) diff --git a/include/pip.h b/include/pip.h index f08fb02c0..83a7acaf2 100644 --- a/include/pip.h +++ b/include/pip.h @@ -49,21 +49,21 @@ struct chicken { int level; /*µ¥ ¯Å*/ int exp; /*¸g Åç ­È*/ int dataE; - + /*---¨­Å骺°Ñ¼Æ---*/ //12 int hp; /*Åé ¤O*/ int maxhp; /*³Ì¤jÅé¤O*/ int weight; /*Åé ­«*/ int tired; /*¯h ³Ò «×*/ int sick; /*¯f ®ð*/ - int shit; /*²M ¼ä «×*/ + int shit; /*²M ¼ä «×*/ int wrist; /*µÃ ¤O*/ int bodyA; int bodyB; int bodyC; int bodyD; int bodyE; - + /*---µû»ùªº°Ñ¼Æ---*/ //9 int social; /*ªÀ¥æµû»ù*/ int family; /*®a¨Æµû»ù*/ @@ -74,7 +74,7 @@ struct chicken { int tmpC; int tmpD; int tmpE; - + /*---¾Ô°«¥Î°Ñ¼Æ---*/ //13 int mp; /*ªk ¤O*/ int maxmp; /*³Ì¤jªk¤O*/ @@ -89,24 +89,24 @@ struct chicken { int fightC; int fightD; int fightE; - + /*---ªZ¾¹ªº°Ñ¼Æ---*/ //10 int weaponhead; /*ÀY³¡ªZ¾¹*/ int weaponrhand; /*¥k¤âªZ¾¹*/ int weaponlhand; /*¥ª¤âªZ¾¹*/ int weaponbody; /*¨­ÅéªZ¾¹*/ - int weaponfoot; /*¸}ªºªZ¾¹*/ + int weaponfoot; /*¸}ªºªZ¾¹*/ int weaponA; int weaponB; int weaponC; int weaponD; int weaponE; - + /*---¦U¯à¤O°Ñ¼Æ---*/ //17 - int toman; /*«Ý¤H±µª«*/ - int character; /*®ð ½è «×*/ - int love; /*·R ¤ß*/ + int toman; /*«Ý¤H±µª«*/ + int character; /*®ð ½è «×*/ + int love; /*·R ¤ß*/ int wisdom; /*´¼ ¼z*/ int art; /*ÃÀ³N¯à¤O*/ int ethics; /*¹D ¼w*/ @@ -121,8 +121,8 @@ struct chicken { int learnC; int learnD; int learnE; - - + + /*---¦Uª¬ºA¼Æ­È---*/ //11 int happy; /*§Ö ¼Ö «×*/ int satisfy; /*º¡ ·N «×*/ @@ -135,7 +135,7 @@ struct chicken { int stateC; int stateD; int stateE; - + /*---¦YªºªF¦è°Õ---*/ //9 int food; /*­¹ ª«*/ int medicine; /*ÆF ªÛ*/ @@ -146,27 +146,27 @@ struct chicken { int eatC; int eatD; int eatE; - + /*---¾Ö¦³ªºªF¦è---*/ //8 int book; /*®Ñ ¥»*/ int playtool; /*ª± ¨ã*/ int money; /*ª÷ ¿ú*/ - int thingA; - int thingB; + int thingA; + int thingB; int thingC; int thingD; - int thingE; - + int thingE; + /*---²q®±ªº°Ñ¼Æ---*/ //2 - int winn; + int winn; int losee; - + /*---°Ñ¨£¤ý¦Ú--*/ //16 int royalA; /*from¦u½Ã*/ int royalB; /*fromªñ½Ã*/ int royalC; /*from±N­x*/ int royalD; /*from¤j¦Ú*/ - int royalE; /*from²½¥q*/ + int royalE; /*from²½¥q*/ int royalF; /*fromÃd¦m*/ int royalG; /*from¤ý¦m*/ int royalH; /*from°ê¤ý*/ @@ -183,8 +183,8 @@ struct chicken { int wantend; /*20·³µ²§½*/ /*1:¤£­n¥B¥¼±B 2:¤£­n¥B¤w±B 3:¤£­n¥B·í²Ä¤TªÌ 4:­n¥B¥¼±B 5:­n¥B¤w±B 6:­n¥B·í²Ä¤TªÌ*/ int lover; /*·R¤H*/ - /*0:¨S¦³ 1:Å]¤ý 2:Às±Ú 3:A 4:B 5:C 6:D 7:E */ - + /*0:¨S¦³ 1:Å]¤ý 2:Às±Ú 3:A 4:B 5:C 6:D 7:E */ + /*-------¤u§@¦¸¼Æ--------*/ int workA; /*®a¨Æ*/ int workB; /*«O©i*/ @@ -212,7 +212,7 @@ struct chicken { int workX; int workY; int workZ; - + /*-------¤W½Ò¦¸¼Æ--------*/ int classA; int classB; @@ -221,7 +221,7 @@ struct chicken { int classE; int classF; int classG; - int classH; + int classH; int classI; int classJ; int classK; @@ -229,7 +229,7 @@ struct chicken { int classM; int classN; int classO; - + /*---¤pÂûªº®É¶¡---*/ //1 time_t bbtime; }; @@ -251,7 +251,7 @@ typedef struct pipcommands pipcommands; /*--------------------------------------------------------------------------*/ struct playrule { - char name[20]; /*¦W¦r*/ + char name[20]; /*¦W¦r*/ int hp; /*Åé¤O*/ int maxhp; /*MAXHP*/ int mp; /*ªk¤O*/ @@ -273,16 +273,16 @@ typedef struct playrule playrule; /* ¥H¤UÃþ±À */ /* ¹p¨t ¦B¨t ¤õ¨t ¤g¨t ­·¨t */ /*struct playrule goodmanlist[] = { -}*/ +}*/ -#define PIP_BADMAN (3) /* ©Çª«¾ãÅé­Ó¼Æ */ +#define PIP_BADMAN (3) /* ©Çª«¾ãÅé­Ó¼Æ */ /*--------------------------------------------------------------------------*/ /* Å]ªk°Ñ¼Æ³]©w */ /*--------------------------------------------------------------------------*/ struct magicset { - char *name; /*Å]ªkªº¦W¦r*/ + char *name; /*Å]ªkªº¦W¦r*/ int needmp; /*»Ý­nªºªk¤O*/ int hpmode; /*0:´î¤Ö 1:¼W¥[ 2:³Ì¤j­È*/ int hp; /*±þ¶Ë¥Í©R¤O*/ @@ -299,7 +299,7 @@ typedef struct magicset magicset; struct royalset { char *num; /*¥N½X*/ - char *name; /*¤ý¦Úªº¦W¦r*/ + char *name; /*¤ý¦Úªº¦W¦r*/ int needmode; /*»Ý­nªºmode*/ /*0:¤£»Ý­n 1:§»ö 2:½Í¦R*/ int needvalue; /*»Ý­nªºvalue*/ int addtoman; /*³Ì¤jªº¼W¥[¶q*/ @@ -325,7 +325,7 @@ struct goodsofpip }; typedef struct goodsofpip goodsofpip; -struct goodsofpip pipfoodlist[] = +struct goodsofpip pipfoodlist[] = { {0,"ª««~¦W", "»¡©úbuy", "»¡©úfeed", 0, 0, 0,0}, {1,"¦n¦Yªº­¹ª«", "Åé¤O«ì´_50", "¨C¦Y¤@¦¸­¹ª«·|«ì´_Åé¤O50³á!", 50, 50, 1,1}, @@ -333,7 +333,7 @@ struct goodsofpip pipfoodlist[] = {0,NULL,NULL,NULL,0,0,0,0} }; -struct goodsofpip pipmedicinelist[] = +struct goodsofpip pipmedicinelist[] = { {0,"ª««~¦W", "»¡©úbuy", "»¡©úfeed", 0, 0, 0,0}, {1,"¦n¥Î¤j¸É¤Y", "Åé¤O«ì´_600", "«ì´_¤j¶q¬y¥¢Åé¤Oªº¨}¤è", 500, 600, 4,4}, @@ -355,7 +355,7 @@ struct goodsofpip pipotherlist[] = { /*--------------------------------------------------------------------------*/ struct weapon { - char *name; /*¦W¦r*/ + char *name; /*¦W¦r*/ int needmaxhp; /*»Ý­nhp*/ int needmaxmp; /*»Ý­nmp*/ int needspeed; /*»Ý­nªºspeed*/ @@ -371,27 +371,27 @@ struct weapon typedef struct weapon weapon; /*¦W¦r,»Ýhp,»Ýmp,»Ýspeed,§ðÀ»,¨¾Å@,³t«×,¶R»ù,½æ»ù,¯S§O,¹ÏÀÉ*/ -struct weapon headlist[] = +struct weapon headlist[] = { {"¤£¶R¸Ë³Æ", 0, 0, 0, 0, 0, 0, 0, 0,0,0}, - {"¶ì½¦´U¤l", 0, 0, 0, 0, 5, 0, 500, 300,0,0}, + {"¶ì½¦´U¤l", 0, 0, 0, 0, 5, 0, 500, 300,0,0}, {"¤û¥Ö¤p´U", 0, 0, 0, 0, 10, 0, 3500, 1000,0,0}, {"¡À¦w¥þ´U", 60, 0, 0, 0, 20, 0, 5000, 3500,0,0}, {"¿ûÅKÀY²¯",150, 50, 0, 0, 30, 0, 10000, 6000,0,0}, - {"Å]ªk¾vãT",100,150, 0, 0, 25, 0, 50000, 10000,0,0}, + {"Å]ªk¾vãT",100,150, 0, 0, 25, 0, 50000, 10000,0,0}, {"¶Àª÷¸t²¯",300,300,300, 0,100, 0,300000,100000,0,0}, {NULL, 0, 0, 0, 0, 0, 0, 0, 0,0,0} }; /*¦W¦r,»Ýhp,»Ýmp,»Ýspeed,§ðÀ»,¨¾Å@,³t«×,¶R»ù,½æ»ù,¯S§O,¹ÏÀÉ*/ -struct weapon rhandlist[] = +struct weapon rhandlist[] = { {"¤£¶R¸Ë³Æ", 0, 0, 0, 0, 0, 0, 0, 0,0,0}, - {"¤j¤ì´Î", 0, 0, 0, 5, 0, 0, 1000, 700,0,0}, + {"¤j¤ì´Î", 0, 0, 0, 5, 0, 0, 1000, 700,0,0}, {"ª÷Äݧæ¤â", 0, 0, 0, 10, 0, 0, 2500, 1000,0,0}, {"«C»É¼C", 50, 0, 0, 20, 0, 0, 6000, 4000,0,0}, {"´¸¹p¼C", 80, 0, 0, 30, 0, 0, 10000, 8000,0,0}, - {"ÂÍÁl¤M", 100, 20, 0, 40, 0, 0, 15000, 10000,0,0}, + {"ÂÍÁl¤M", 100, 20, 0, 40, 0, 0, 15000, 10000,0,0}, {"§Ñ±¡¼C", 100, 40, 0, 35, 20, 0, 15000, 10000,0,0}, {"·àÀYÄ_¤M",150, 0, 0, 60, 0, 0, 35000, 20000,0,0}, {"±OÀs¤M", 200, 0, 0,100, 0, 0, 50000, 25000,0,0}, @@ -400,10 +400,10 @@ struct weapon rhandlist[] = }; /*¦W¦r,»Ýhp,»Ýmp,»Ýspeed,§ðÀ»,¨¾Å@,³t«×,¶R»ù,½æ»ù,¯S§O,¹ÏÀÉ*/ -struct weapon lhandlist[] = +struct weapon lhandlist[] = { {"¤£¶R¸Ë³Æ", 0, 0, 0, 0, 0, 0, 0, 0,0,0}, - {"¤j¤ì´Î", 0, 0, 0, 5, 0, 0, 1000, 700,0,0}, + {"¤j¤ì´Î", 0, 0, 0, 5, 0, 0, 1000, 700,0,0}, {"ª÷Äݧæ¤â", 0, 0, 0, 10, 0, 0, 1500, 1000,0,0}, {"¤ì¬Þ", 0, 0, 0, 0, 10, 0, 2000, 1500,0,0}, {"¤£Äÿû¬Þ", 60, 0, 0, 0, 25, 0, 5000, 3000,0,0}, @@ -414,24 +414,24 @@ struct weapon lhandlist[] = }; /*¦W¦r,»Ýhp,»Ýmp,»Ýspeed,§ðÀ»,¨¾Å@,³t«×,¶R»ù,½æ»ù,¯S§O,¹ÏÀÉ*/ -struct weapon bodylist[] = +struct weapon bodylist[] = { {"¤£¶R¸Ë³Æ", 0, 0, 0, 0, 0, 0, 0, 0,0,0}, - {"¶ì½¦«`¥Ò", 40, 0, 0, 0, 5, 0, 1000, 700,0,0}, + {"¶ì½¦«`¥Ò", 40, 0, 0, 0, 5, 0, 1000, 700,0,0}, {"¯S¯Å¥Ö¥Ò", 50, 0, 0, 0, 10, 0, 2500, 1000,0,0}, {"¿ûÅK²¯¥Ò", 80, 0, 0, 0, 25, 0, 5000, 3500,0,0}, {"Å]ªk©Ü­·", 80, 40, 0, 0, 20, 20, 15500, 10000,0,0}, - {"¥Õª÷²¯¥Ò",100, 30, 0, 0, 40, 20, 30000, 20000,0,0}, + {"¥Õª÷²¯¥Ò",100, 30, 0, 0, 40, 20, 30000, 20000,0,0}, {"¶Àª÷¸t¦ç",300,300,300, 30,100, 0,150000,100000,0,0}, {NULL, 0, 0, 0, 0, 0, 0, 0, 0,0,0} }; /*¦W¦r,»Ýhp,»Ýmp,»Ýspeed,§ðÀ»,¨¾Å@,³t«×,¶R»ù,½æ»ù,¯S§O,¹ÏÀÉ*/ -struct weapon footlist[] = +struct weapon footlist[] = { {"¤£¶R¸Ë³Æ", 0, 0, 0, 0, 0, 0, 0, 0,0,0}, {"¶ì½¦©ì¾c", 0, 0, 0, 0, 0, 10, 800, 500,0,0}, - {"ªF¬v¤ì®j", 0, 0, 0, 15, 0, 10, 1000, 700,0,0}, + {"ªF¬v¤ì®j", 0, 0, 0, 15, 0, 10, 1000, 700,0,0}, {"¯S¯Å«B¾c", 0, 0, 0, 0, 10, 10, 1500, 1000,0,0}, {"NIKE¹B°Ê¾c",70, 0, 0, 0, 10, 40, 8000, 5000,0,0}, {"Æs³½¥Ö¹u", 80, 20, 0, 10, 25, 20, 12000, 8000,0,0}, @@ -440,7 +440,7 @@ struct weapon footlist[] = {NULL, 0, 0, 0, 0, 0, 0, 0, 0,0,0} }; -struct royalset royallist[] = +struct royalset royallist[] = { {"T", "«ô³X¹ï¶H", 0, 0, 0, 0,NULL,NULL}, {"A", "¬Ó«°ÃM§L³s", 1, 10, 15, 100,"§A¯u¦n¡A¨Ó³­§Ú²á¤Ñ..","¦u½Ã¬PªÅªº¦w¥þ¬O«Ü¨¯­Wªº.."}, @@ -543,7 +543,7 @@ NULL, 0,0, 0,0, 0, 0, 0, 0, NULL, 0,0 }; #endif -struct magicset treatmagiclist[] = +struct magicset treatmagiclist[] = { {"ªvÀøªk³N", 0, 0, 0, 0, 0, 0}, {"®ðÀø³N", 5, 1, 20, 0, 10, 0}, @@ -552,9 +552,9 @@ struct magicset treatmagiclist[] = {"¤­®ð´Â¤¸", 100, 1, 1000, 0, 80, 0}, {"¥Õªê", 200, 2, 0, 2, 0, 0}, {NULL, 0, 0, 0, 0, 0, 0} -}; - -struct magicset thundermagiclist[] = +}; + +struct magicset thundermagiclist[] = { {"¹p¨tªk³N", 0, 0, 0, 0, 0, 0}, {"¹p©G", 10, 0, 20, 1, 5, 0}, @@ -567,7 +567,7 @@ struct magicset thundermagiclist[] = {NULL, 0, 0, 0, 0, 0, 0} }; -struct magicset icemagiclist[] = +struct magicset icemagiclist[] = { {"¦B¨tªk³N", 0, 0, 0, 0, 0, 0}, {"¦B©G", 10, 0, 20, 1, 5, 0}, @@ -580,7 +580,7 @@ struct magicset icemagiclist[] = {NULL, 0, 0, 0, 0, 0, 0} }; -struct magicset firemagiclist[] = +struct magicset firemagiclist[] = { {"ª¢¨tªk³N", 0, 0, 0, 0, 0, 0}, {"¤õ³N", 5, 0, 10, 1, 5, 0}, @@ -595,7 +595,7 @@ struct magicset firemagiclist[] = {NULL, 0, 0, 0, 0, 0, 0} }; -struct magicset earthmagiclist[] = +struct magicset earthmagiclist[] = { {"¤g¨tªk³N", 0, 0, 0, 0, 0, 0}, {"¤g©G", 10, 0, 20, 1, 5, 0}, @@ -608,7 +608,7 @@ struct magicset earthmagiclist[] = {NULL, 0, 0, 0, 0, 0, 0} }; -struct magicset windmagiclist[] = +struct magicset windmagiclist[] = { {"­·¨tªk³N", 0, 0, 0, 0, 0, 0}, {"­·©G", 10, 0, 20, 1, 5, 0}, @@ -621,19 +621,19 @@ struct magicset windmagiclist[] = {NULL, 0, 0, 0, 0, 0, 0} }; -struct magicset specialmagiclist[] = +struct magicset specialmagiclist[] = { {"¯S®íªk³N", 0, 0, 0, 0, 0, 0x00000000}, {"ÃzÆF¦aº»", 2000, 0, 80, 1, 20, 0x00000001}, {"¦aº»·~¤õ", 1000, 0, 50, 1, 20, 0x00000002}, {"¿Ä¦X", 5000, 0, 200, 1, 20, 0x00000004}, {"ª¢Å]µJ¼ö¦aº»", 3000, 0, 90, 1, 20, 0x00000008}, - {"¤CÁä¦uÅ@¯«", 4000, 0, 100, 1, 20, 0x00000010}, + {"¤CÁä¦uÅ@¯«", 4000, 0, 100, 1, 20, 0x00000010}, {NULL, 0, 0, 0, 0, 0, 0} }; /*¦W¦r Åé¤OMAXªk¤OMAX §ðÀ» ¨¾Å@ ³t«× °]Ä_ ¯S§O ¹ÏÀÉ*/ -struct playrule resultmanlist[] = +struct playrule resultmanlist[] = { {"¯üÄR¸­¶ð", 60,0, 20,0, 20, 20, 20, 150, "11101", 0,0}, {"µá¼Ú§Q®R", 60,0, 20,0, 30, 30, 30, 200, "01111", 0,0}, @@ -646,14 +646,14 @@ struct playrule resultmanlist[] = struct newendingset { - char *girl; /*¤k¥Íµ²§½ªºÂ¾·~*/ + char *girl; /*¤k¥Íµ²§½ªºÂ¾·~*/ char *boy; /*¨k¥Íµ²§½ªºÂ¾·~*/ int grade; /*µû¤À*/ }; typedef struct newendingset newendingset; /*¸U¯à*/ -struct newendingset endmodeall_purpose[] = +struct newendingset endmodeall_purpose[] = { {"¤k©Ê¾·~", "¨k¥Í¾·~", 0}, {"¦¨¬°³o­Ó°ê®a·s¤k¤ý", "¦¨¬°³o­Ó°ê®a·s°ê¤ý", 500}, @@ -700,7 +700,7 @@ struct newendingset endmodeall_purpose[] = }; /*¾Ô°«*/ -struct newendingset endmodecombat[] = +struct newendingset endmodecombat[] = { {"¤k©Ê¾·~", "¨k¥Í¾·~", 0}, {"³Q«Ê¬°«iªÌ ¾Ô¤h«¬", "³Q«Ê¬°«iªÌ ¾Ô¤h«¬", 420}, @@ -715,7 +715,7 @@ struct newendingset endmodecombat[] = }; /*Å]ªk*/ -struct newendingset endmodemagic[] = +struct newendingset endmodemagic[] = { {"¤k©Ê¾·~", "¨k¥Í¾·~", 0}, {"³Q«Ê¬°«iªÌ Å]ªk«¬", "³Q«Ê¬°«iªÌ Å]ªk«¬", 420}, @@ -730,7 +730,7 @@ struct newendingset endmodemagic[] = }; /*ªÀ¥æ*/ -struct newendingset endmodesocial[] = +struct newendingset endmodesocial[] = { {"¤k©Ê¾·~", "¨k¥Í¾·~", 0}, {"¦¨¬°°ê¤ýªºÃd¦m", "¦¨¬°¤k¤ýªº¾t°¨·Ý", 170}, @@ -744,7 +744,7 @@ struct newendingset endmodesocial[] = }; /*ÃÀ³N*/ -struct newendingset endmodeart[] = +struct newendingset endmodeart[] = { {"¤k©Ê¾·~", "¨k¥Í¾·~", 0}, {"¦¨¬°¤F¤p¤¡", "¦¨¬°¤F¤p¤¡", 100}, @@ -755,7 +755,7 @@ struct newendingset endmodeart[] = }; /*·t¶Â*/ -struct newendingset endmodeblack[] = +struct newendingset endmodeblack[] = { {"¤k©Ê¾·~", "¨k¥Í¾·~", 0}, {"Åܦ¨¤FÅ]¤ý", "Åܦ¨¤FÅ]¤ý", -1000}, @@ -769,7 +769,7 @@ struct newendingset endmodeblack[] = }; /*®a¨Æ*/ -struct newendingset endmodefamily[] = +struct newendingset endmodefamily[] = { {"¤k©Ê¾·~", "¨k¥Í¾·~", 0}, {"¥¿¦b·s®Q­×¦æ", "¥¿¦b·s­¦­×¦æ", 50}, diff --git a/include/pipstruct.h b/include/pipstruct.h index 99024e0f6..56bbdc153 100644 --- a/include/pipstruct.h +++ b/include/pipstruct.h @@ -20,7 +20,7 @@ struct rpgrec unsigned int age; /* ¦~ÄÖ 4 bytes */ unsigned char race; /* ºØ±Ú 1 bytes */ unsigned char subrace; /* °Æ·~ 1 bytes */ - unsigned short level; /* µ¥¯Å 2 bytes */ + unsigned short level; /* µ¥¯Å 2 bytes */ char family[20]; /* ®a±Ú 20 bytes */ char nick[20]; /* «Ê¸¹ 20 bytes */ int hp; /* Åé¤O 4 bytes */ diff --git a/include/struct.h b/include/struct.h index be0882982..5162bdebc 100644 --- a/include/struct.h +++ b/include/struct.h @@ -59,7 +59,7 @@ typedef struct char work[50]; } MEMORANDUM; -typedef struct +typedef struct { char data[48]; int mode; @@ -182,12 +182,12 @@ typedef struct #define UFO_HIDDEN BFLAG(18) /* ÁôÂèӷ½ */ #define UFO_CLOAK BFLAG(19) /* true if cloak was ON */ //#define UFO_ACL BFLAG(20) /* true if ACL was ON */ -#define UFO_NET BFLAG(21) /* visor.991030: ºô¸ôµ{¦¡ */ +#define UFO_NET BFLAG(21) /* visor.991030: ºô¸ôµ{¦¡ */ #define UFO_WEB BFLAG(22) /* visor.020325: WEB */ #define UFO_MPAGER BFLAG(10) /* lkchu.990428: ¹q¤l¶l¥ó¶Ç©I */ //#define UFO_NWLOG BFLAG(11) /* lkchu.990510: ¤£¦s¹ï¸Ü¬ö¿ý */ //#define UFO_NTLOG BFLAG(12) /* lkchu.990510: ¤£¦s²á¤Ñ¬ö¿ý */ -#define UFO_MESSAGE BFLAG(23) /* visor.991030: °T®§¥þÃö */ +#define UFO_MESSAGE BFLAG(23) /* visor.991030: °T®§¥þÃö */ #define UFO_PAGER1 BFLAG(26) /* visor.991030: ©I¥s¾¹¥þÃö */ @@ -209,7 +209,7 @@ typedef struct #define UFO_FCACHE BFLAG(30) /* ¦³¦n¤Í */ #define UFO_MQUOTA BFLAG(31) /* «H½c¤¤¦³«Ý²M²z¤§«H¥ó */ -#define UFO_UTMP_MASK (UFO_BIFF|UFO_BIFFN) +#define UFO_UTMP_MASK (UFO_BIFF|UFO_BIFFN) /* Thor.980805: ©w¸qufo¤¤¥Hutmp->ufo¬°¥»´Lªºflag, ¸Ñ¨M»Pcuser.ufo¤£¦P¨Bªº°ÝÃD */ /* ----------------------------------------------------- */ @@ -244,7 +244,7 @@ typedef struct #define UFO2_DEF_LOCALMAIL BFLAG(19) /* ¥u¦¬¯¸¤º«H */ #define UFO2_ACL BFLAG(24) /* true if ACL was ON */ -#define UFO2_REALNAME BFLAG(28) /* visor.991030: ¯u¹ê©m¦W */ +#define UFO2_REALNAME BFLAG(28) /* visor.991030: ¯u¹ê©m¦W */ #include "hdr.h" @@ -263,7 +263,7 @@ typedef struct VoteControlHeader char xname[32]; /* ¥DÀɦW */ /* Thor: match HDR ªº xname */ char date[9]; /* ¶}©l¤é´Á */ /* Thor: match HDR ªº date */ - char cdate[9]; /* µ²§ô¤é´Á */ /* Thor: ¥u¨ÑÅã¥Ü¡A¤£°µ¤ñ¸û */ + char cdate[9]; /* µ²§ô¤é´Á */ /* Thor: ¥u¨ÑÅã¥Ü¡A¤£°µ¤ñ¸û */ char owner[IDLEN + 1]; /* Á|¿ì¤H */ char title[TTLEN + 1]; /* §ë²¼¥DÃD */ char vgamble; /* ¬O§_¬°½ä½L '$':½ä½L ' ':¤@¯ë§ë²¼ */ @@ -302,7 +302,7 @@ typedef struct VoteControlHeader typedef struct VoteStudents { /* ¤¸´¼ªº¾Ç¸¹®æ¦¡ (s) 99 9 999 - char grad[3]; + char grad[3]; char major[2]; char first[4]; char last[4]; @@ -324,7 +324,7 @@ typedef struct VoteStudents typedef struct { char userid[IDLEN + 1]; - char numvotes; + char numvotes; unsigned int choice; } VLOG; @@ -436,7 +436,7 @@ typedef struct int chatcount; char msg[150]; /*°T®§¤º®e*/ char chat[10][150]; /*²á¤Ñ¤º®e*/ -} pipdata; +} pipdata; typedef struct { @@ -466,7 +466,7 @@ struct UTMP char realname[20]; unsigned int userlevel; char from[30]; /* remote host */ -#ifdef HAVE_SHOWNUMMSG +#ifdef HAVE_SHOWNUMMSG int num_msg; /* receive messages */ #endif int pal_max; /* friends max */ @@ -498,7 +498,7 @@ typedef struct int age; int numlogins; int numposts; - int point2; + int point2; } THRESHOLD; typedef struct BoardHeader @@ -679,7 +679,7 @@ typedef struct typedef struct { BRD bcache[MAXBOARD]; - int mantime[MAXBOARD]; /* ¦UªO¥Ø«e¥¿¦³¦h¤Ö¤H¦b¾\Ū */ + int mantime[MAXBOARD]; /* ¦UªO¥Ø«e¥¿¦³¦h¤Ö¤H¦b¾\Ū */ int number; time_t uptime; } BCACHE; @@ -687,7 +687,7 @@ typedef struct typedef struct { BANMAIL fwcache[MAXFIREWALL]; - int number; + int number; } FWCACHE; typedef struct @@ -702,8 +702,8 @@ typedef struct char verb[9]; /* °Êµü */ char chinese[7]; /* ¤¤¤å½Ķ */ char part1_msg[60]; /* ¤¶µü */ - char part2_msg[60]; /* °Ê§@ */ -} ChatAction; + char part2_msg[60]; /* °Ê§@ */ +} ChatAction; typedef struct @@ -812,7 +812,7 @@ typedef struct /* ----------------------------------------------------- */ /* acct.c ¤¤¹B¥Îªº¸ê®Æµ²ºc */ /* ----------------------------------------------------- */ -#define DENY_SEL_TALK 0x00000001 +#define DENY_SEL_TALK 0x00000001 #define DENY_SEL_POST 0x00000002 #define DENY_SEL_MAIL 0x00000004 #define DENY_SEL_AD 0x00000008 @@ -835,7 +835,7 @@ typedef struct #define DENY_MODE_ALL (DENY_MODE_TALK|DENY_MODE_MAIL|DENY_MODE_POST|DENY_MODE_NICK) -typedef struct +typedef struct { char email[60]; int num; @@ -870,7 +870,7 @@ typedef struct typedef struct { CLOCK start[13]; - CLOCK end[13]; + CLOCK end[13]; } CLASS_TIME; typedef struct @@ -941,7 +941,7 @@ typedef struct char host[26]; char ip[16]; char port[6]; -} BBSNET; +} BBSNET; #define TOPLOGINS (0) diff --git a/include/theme.h b/include/theme.h index 0e00d95bc..90aafc5d2 100644 --- a/include/theme.h +++ b/include/theme.h @@ -21,7 +21,7 @@ #define ICON_VOTED_BRD "\033[1;33m§ë\033[m" /* Á|¦æ§ë²¼¤¤ªº¬ÝªO */ //¤U¤@¦¸±À¤å®É¶¡­­¨î -#define NEXTPUSHTIME 15 +#define NEXTPUSHTIME 15 /* ----------------------------------------------------- */ /* °ò¥»ÃC¦â©w¸q¡A¥H§Q¤¶­±­×§ï */ @@ -66,7 +66,7 @@ //[¡ö]Â÷¶} [¡÷]ÂsÄý [f]¼Ò¦¡ [C]¼È¦s [F]Âà±H [Z]¤U¸ü [h]»¡©ú " #define NECKGEM1 "\ -[¡ö]Â÷¶} [¡÷]ÂsÄý [f]¼Ò¦¡ [C]¼È¦s [h]»¡©ú " +[¡ö]Â÷¶} [¡÷]ÂsÄý [f]¼Ò¦¡ [C]¼È¦s [h]»¡©ú " /*r2.20170802: disable some tips in case of confusion*/ #define NECKGEM2 "\033[44m\ @@ -79,7 +79,7 @@ #define NECKMAIL "\ [¡ö]Â÷¶} [¡÷,r]Ū«H [d]§R°£ [R]¦^«H [s]±H«H [x]Âà¶K [y]¸s²Õ¦^«H [h]»¡©ú\n\033[44m\ ½s¸¹ ¤é ´Á §@ ªÌ «H ¥ó ¼Ð ÃD \033[m" - + #define NECKVOTE "\ [¡ö]Â÷¶} [v]§ë²¼ [R]µ²ªG [E]­×§ï [^P]Á|¦æ [^Q]¬d¸ß/¤¤¤î/§ï´Á [h]»¡©ú\n\033[44m\ ½s¸¹ ¶}²¼¤é ¥D¿ì¤H §ë ²¼ ©v ¦® \033[m" diff --git a/include/xchat.h b/include/xchat.h index 57161c435..97757d793 100644 --- a/include/xchat.h +++ b/include/xchat.h @@ -47,7 +47,7 @@ #define MSG_CHATROOM 110 #define MSG_TOPIC 113 -#define MSG_ROOM 116 +#define MSG_ROOM 116 #define MSG_NICK 118 #define MSG_CLRSCR 120 @@ -96,7 +96,7 @@ nextword ( int ch; head = *str; - for (;;) { + for (;;) { ch = *head; if (!ch) { diff --git a/innbbsd/bbslink.c b/innbbsd/bbslink.c index 09319d648..a0c44a0a5 100644 --- a/innbbsd/bbslink.c +++ b/innbbsd/bbslink.c @@ -193,7 +193,7 @@ deal_sover( str_ncpy(sover.date, Gtime(mtime), sizeof(sover.date)); str_ncpy(sover.group, nf->newsgroup, sizeof(sover.group)); str_ncpy(sover.charset, nf->charset, sizeof(sover.charset)); - + queuefeed(nl, &sover); } @@ -495,12 +495,12 @@ send_outgoing( return; } } - + /* ¼g¤J¤å³¹ªºÀÉÀY */ fprintf(SERVERwfp, "Path: %s\r\n", MYBBSID); fprintf(SERVERwfp, "From: %s\r\n", sover->from); fprintf(SERVERwfp, "Newsgroups: %s\r\n", sover->group); - /*fprintf(SERVERwfp, "Subject: %s\r\n", sover->title);*/ + /*fprintf(SERVERwfp, "Subject: %s\r\n", sover->title);*/ output_rfc2047_qp(SERVERwfp, "Subject: ", sover->title, sover->charset, "\r\n"); fprintf(SERVERwfp, "Date: %s\r\n", sover->date); fprintf(SERVERwfp, "Organization: %s\r\n", *sover->charset == 'b' ? BOARDNAME : BBSNAME); /* itoc.040425: ­Y¤£¬O big5 ´N¥Î­^¤å¯¸¦W */ @@ -522,20 +522,20 @@ send_outgoing( } else if (cc == '.') { - /* If the text contained a period as the first character of the text + /* If the text contained a period as the first character of the text line in the original, that first period is doubled. */ if (str == BODY || str[-1] == '\n') fputc('.', SERVERwfp); } - + fputc(cc, SERVERwfp); - + } - + /* IHAVE/POST µ²§ô */ status = tcpcommand("."); - + if (node->xmode & INN_USEIHAVE) { if (status != NNTP_TOOKIT_VAL) diff --git a/innbbsd/channel.c b/innbbsd/channel.c index b553228b2..01871c08e 100644 --- a/innbbsd/channel.c +++ b/innbbsd/channel.c @@ -161,7 +161,7 @@ searchcmd( #define MAX_ARG_SIZE 1024 -static int +static int argify( char *line, char ***argvp) { @@ -442,7 +442,7 @@ channelreader( argv->argc = argify(data, &argv->argv); argv->dc = dp = searchcmd(argv->argv[0]); out = argv->out; - + if (dp) { if ((argv->argc < dp->minargc) || (argv->argc > dp->maxargc)) /* Àˬd argc ¬O§_º¡¨¬­n¨D */ @@ -680,7 +680,7 @@ inndchannel(void) /* initial history maintain time */ /* --------------------------------------------------- */ - time(&uptime1); + time(&uptime1); ptime = localtime(&uptime1); i = (HIS_MAINT_HOUR - ptime->tm_hour) * 3600 + (HIS_MAINT_MIN - ptime->tm_min) * 60; uptime1 += i; diff --git a/innbbsd/convcode.c b/innbbsd/convcode.c index 318ded54c..a4989a95f 100644 --- a/innbbsd/convcode.c +++ b/innbbsd/convcode.c @@ -33,7 +33,7 @@ conv_init(void) if (BtoG != NULL) return; - BGsize = BtoG_count << 1; /* ¨C­Óº~¦r 2-byte */ + BGsize = BtoG_count << 1; /* ¨C­Óº~¦r 2-byte */ GBsize = GtoB_count << 1; BtoG = (unsigned char *) malloc(BGsize + GBsize); GtoB = BtoG + BGsize; diff --git a/innbbsd/history.c b/innbbsd/history.c index 09642c465..bfa884601 100644 --- a/innbbsd/history.c +++ b/innbbsd/history.c @@ -21,7 +21,7 @@ typedef struct } HIS; -void +void HISmaint(void) /* ºûÅ@ history ÀÉ¡A±N¹L¦­ªº history §R°£ */ { int i, fd, total; @@ -71,7 +71,7 @@ void } -void +void HISadd( /* ±N (msgid, path, xname) ¦¹°t¹ï°O¿ý¦b history ¤¤ */ char *msgid, char *board, diff --git a/innbbsd/inntobbs.c b/innbbsd/inntobbs.c index bb7f1be65..9af805c92 100644 --- a/innbbsd/inntobbs.c +++ b/innbbsd/inntobbs.c @@ -39,7 +39,7 @@ typedef struct Header /* ¥u¹ï³o¨ÇÀÉÀY¦³¿³½ì */ -static header_t headertable[LASTHEADER] = +static header_t headertable[LASTHEADER] = { "Subject", SUBJECT_H, "From", FROM_H, @@ -60,7 +60,7 @@ char *BODY; char *SUBJECT, *FROM, *DATE, *PATH, *GROUP, *MSGID, *POSTHOST, *SITE, *CONTROL; -static int +static int header_cmp( header_t *a, header_t *b) { @@ -68,7 +68,7 @@ header_cmp( } -static int +static int header_value( char *inputheader) { @@ -174,7 +174,7 @@ is_loopback( while (ptr[1] == ' ' || ptr[1] == '\t') { /* while (*++ptr == ' ') ; */ - do + do { ++ptr; } while (*ptr == ' ' || *ptr == '\t'); diff --git a/innbbsd/nocem.c b/innbbsd/nocem.c index bcbd908df..ae0eea8e0 100644 --- a/innbbsd/nocem.c +++ b/innbbsd/nocem.c @@ -14,7 +14,7 @@ receive_nocem() ¡÷ NCMparse() §â notice parse ¥X¨Ó ¡÷ NCMverify() ÅçÃÒ¬O¤£¬O¯uªº ¡÷ NCMcancel() ¦A°e¦^ rec_article.c ªº cancel_article() ³B²z #endif - + #include "innbbsconf.h" @@ -55,7 +55,7 @@ search_issuer( for (i = 0; i < NCMCOUNT; i++) { find = NCMPERM + i; - if (strstr(issuer, find->issuer) && + if (strstr(issuer, find->issuer) && (!type || !strcmp(find->type, "*") || !str_cmp(find->type, type))) return find; } diff --git a/innbbsd/rec_article.c b/innbbsd/rec_article.c index 5fb683601..48fe9ad05 100644 --- a/innbbsd/rec_article.c +++ b/innbbsd/rec_article.c @@ -51,12 +51,12 @@ init_bshm(void) #if 0 /* itoc.030303.µù¸Ñ: RFC 822 ªº DATE Äæ¦ì¡FRFC 1123 ±N year §ï¦¨ 4-DIGIT */ -date-time := [ wday "," ] date time ; dd mm yy, hh:mm:ss zzz -wday := "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun" +date-time := [ wday "," ] date time ; dd mm yy, hh:mm:ss zzz +wday := "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun" date := 1*2DIGIT month 4DIGIT ; mday month year -month := "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" -time := hour zone ; ANSI and Military -hour := 2DIGIT ":" 2DIGIT [":" 2DIGIT] ; 00:00:00 - 23:59:59 +month := "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" +time := hour zone ; ANSI and Military +hour := 2DIGIT ":" 2DIGIT [":" 2DIGIT] ; 00:00:00 - 23:59:59 zone := "UT" / "GMT" / "EST" / "EDT" / "CST" / "CDT" / "MST" / "MDT" / "PST" / "PDT" / 1ALPHA / ( ("+" / "-") 4DIGIT ) #endif @@ -443,7 +443,7 @@ is_spam( #ifndef _NoCeM_ -static +static #endif newsfeeds_t * search_newsfeeds_bygroup( @@ -477,7 +477,7 @@ receive_article(void) if (firstboard) /* opus: ²Ä¤@­ÓªO¤~»Ý­n³B²z */ { - /* Thor.980825: gc patch: lib/str_decode ¥u¯à±µ¨ü decode §¹ strlen < 256 */ + /* Thor.980825: gc patch: lib/str_decode ¥u¯à±µ¨ü decode §¹ strlen < 256 */ str_ncpy(poolx, SUBJECT, 255); str_decode(poolx); diff --git a/lib/acl.c b/lib/acl.c index d4eedc1b4..4d7cc5fc4 100644 --- a/lib/acl.c +++ b/lib/acl.c @@ -174,7 +174,7 @@ acl_has( *str = '\0'; /* Thor.980825: µù¸Ñ: ±Nµ²§ô³B¶ñ0, §K¥ÍªK¸` */ str_lower(filter, filter); /* lkchu.981201: lower-case string */ - + if (addr) /* match user name */ { if ((luser != addr - filter) || memcmp(user, filter, luser)) diff --git a/lib/attr_lib.c b/lib/attr_lib.c index 368de4424..f93f5a969 100644 --- a/lib/attr_lib.c +++ b/lib/attr_lib.c @@ -16,10 +16,10 @@ #if 0 int key; - key < 0 is reserved. + key < 0 is reserved. key & 0xff == 0 is reserved. 0x000000?? < key < 0x0000ff?? is reserved by maple.org - sizeof(attr): key & 0xff + sizeof(attr): key & 0xff file: $userhome/.ATTR #endif diff --git a/lib/dl_lib.c b/lib/dl_lib.c index f26e7ccb9..0787b5ffe 100644 --- a/lib/dl_lib.c +++ b/lib/dl_lib.c @@ -19,14 +19,14 @@ typedef struct } DL_list; DL_list *dl_pool; -int dl_size, dl_head; +int dl_size, dl_head; #define DL_ALLOC_MIN 5 #if 1 extern void blog(char *, char *); #define TRACE blog -#endif +#endif void* DL_get( @@ -42,15 +42,15 @@ DL_get( return NULL; *t++ = 0; - - if(!dl_pool) + + if(!dl_pool) { /* Initialize DL entries */ dl_size = DL_ALLOC_MIN; /* dl_head = 0 */ dl_pool = (DL_list *)malloc(dl_size * sizeof(DL_list)); } - + p = dl_pool; tail = p + dl_head; while(p < tail) @@ -75,14 +75,14 @@ DL_get( #endif dl_head ++; } - + if(!p->handle) return NULL; - + return dlsym(p->handle,t); } -int +int DL_func(char *name, ...) { va_list args; diff --git a/lib/dns.c b/lib/dns.c index e519d8c14..d04324b18 100644 --- a/lib/dns.c +++ b/lib/dns.c @@ -333,7 +333,7 @@ dns_name( #ifdef HAVE_ETC_HOSTS char abuf[256]; FILE *fp; -#endif +#endif sprintf(name, INADDR_FMT, addr[0], addr[1], addr[2], addr[3]); @@ -440,17 +440,17 @@ dns_open( buf[n] *= 10; buf[n] += *cp++ - '0'; } - if (!*cp) + if (!*cp) break; } - if (n==3) + if (n==3) { cp = buf; goto ip; } } - /* Thor.980707: ÀH«K¼g¼g¡A­nÁ¿¨s§¹¥þmatch¦A»¡:p */ -#endif + /* Thor.980707: ÀH«K¼g¼g¡A­nÁ¿¨s§¹¥þmatch¦A»¡:p */ +#endif n = dns_query(host, T_A, &ans); if (n < 0) diff --git a/lib/file.c b/lib/file.c index 26259c3f5..b3ba9cd5a 100644 --- a/lib/file.c +++ b/lib/file.c @@ -122,7 +122,7 @@ f_exlock( ) { #if 0 - return flock(fd, LOCK_EX); + return flock(fd, LOCK_EX); #endif /* Thor.981205: ¥Î fcntl ¨ú¥Nflock, POSIX¼Ð·Ç¥Îªk */ fl.l_type = F_WRLCK; @@ -136,7 +136,7 @@ f_unlock( ) { #if 0 - return flock(fd, LOCK_UN); + return flock(fd, LOCK_UN); #endif /* Thor.981205: ¥Î fcntl ¨ú¥Nflock, POSIX¼Ð·Ç¥Îªk */ fl.l_type = F_UNLCK; @@ -149,7 +149,7 @@ f_unlock( # define DAO_MAP (MAP_SHARED) #endif -char* +char* f_map( char* fpath, int *fsize @@ -207,7 +207,7 @@ f_mv( /* exclusively create file [*.n] */ /* ----------------------------------------------------- */ -FILE* +FILE* f_new( char* fold, char* fnew @@ -358,11 +358,11 @@ usr_fpath( #if 0 str_lower(buf, user); /* lower case */ #endif - /* Thor.981027: ¨¾¤î buffer overflow, ÁöµM SunOS 4.1.x¤WµL¦¹±¡ªp, + /* Thor.981027: ¨¾¤î buffer overflow, ÁöµM SunOS 4.1.x¤WµL¦¹±¡ªp, ¥H«á¦A·Q¦nªº§ïªk */ str_ncpy(buf, user, sizeof(buf)); str_lower(buf, buf); - + *fpath++ = *buf; mak_fpath(fpath, buf, fname); } diff --git a/lib/record.c b/lib/record.c index bce7ea012..7b518a3d7 100644 --- a/lib/record.c +++ b/lib/record.c @@ -209,7 +209,7 @@ int rec_get( char* fpath, void* data, - int size, + int size, int pos ) { @@ -416,7 +416,7 @@ int rec_put( char* fpath, void* data, - int size, + int size, int pos ) { diff --git a/lib/shm.c b/lib/shm.c index 838e03af6..5259adeb2 100644 --- a/lib/shm.c +++ b/lib/shm.c @@ -7,7 +7,7 @@ void* shm_new( - int shmkey, + int shmkey, int shmsize ) { diff --git a/lib/string.c b/lib/string.c index 84a019f79..685db6734 100644 --- a/lib/string.c +++ b/lib/string.c @@ -8,7 +8,7 @@ char* str_add( - char* dst, + char* dst, char* src ) { @@ -22,7 +22,7 @@ str_add( void str_ansi( /* strip ANSI code */ - char* dst, + char* dst, char* str, int max ) @@ -74,7 +74,7 @@ str_cat( int str_cmp( - char* s1, + char* s1, char* s2 ) { @@ -196,7 +196,7 @@ isreturn( } -static inline int +static inline int is_space( const char c ) @@ -292,7 +292,7 @@ mm_getcharset( /* ----------------------------------------------------- */ -/* PaulLiu.030410: +/* PaulLiu.030410: RFC 2047 (Header) QP ³¡¤À¡A¸Ì­±³W©w '_' ªí¥Ü ' ' (US_ASCIIªºªÅ¥Õ) ¦Ó RFC 2045 (Body) QP ³¡¤À¡A'_' ÁÙ¬O '_'¡A¨S¦³¯S®í¥Î³~ ©Ò¥H¦b¦¹ mmdecode ¤À¤G°¦¼g @@ -543,8 +543,8 @@ str_folder( void setdirpath( - char* fpath, - char* direct, + char* fpath, + char* direct, char* fname ) { @@ -574,8 +574,8 @@ setdirpath( int str_from( - char* from, - char* addr, + char* from, + char* addr, char* nick ) { @@ -727,7 +727,7 @@ str_len( void str_lower( - char* dst, + char* dst, char* src ) { @@ -764,7 +764,7 @@ str_lowest( int str_ncmp( - char* s1, + char* s1, char* s2, int n ) @@ -873,7 +873,7 @@ str_ndup( char* crypt(); static char pwbuf[PASSLEN]; -char* +char* genpasswd( char* pw ) @@ -910,7 +910,7 @@ chkpasswd( ) { char* pw; - + /* if(!*passwd) return -1 */ /* Thor.990416: ©È¦³®Épasswd¬OªÅªº */ str_ncpy(pwbuf, test, PASSLEN); pw = crypt(pwbuf, passwd); @@ -1067,17 +1067,17 @@ str_stamp( #define NULL (char* ) 0 #endif -char* -str_str( - char* str, - char* tag /* non-empty lower case pattern */ +char* +str_str( + char* str, + char* tag /* non-empty lower case pattern */ ) -{ +{ int cc, c1, c2; char* p1, *p2; cc = *tag++; - + while ((c1 = *str)) { if (c1 >= 'A' && c1 <= 'Z') @@ -1093,33 +1093,33 @@ str_str( c2 = *p2; if (!c2) return str; - + p2++; c1 = *++p1; if (c1 >= 'A' && c1 <= 'Z') c1 |= 0x20; } while (c1 == c2); } - + str++; } return NULL; } -char* +char* str_sub( - char* str, - char* tag /* non-empty lowest case pattern */ + char* str, + char* tag /* non-empty lowest case pattern */ ) -{ +{ int cc, c1, c2; char* p1, *p2; int in_chi = 0; /* 1: «e¤@½X¬O¤¤¤å¦r */ int in_chii; /* 1: «e¤@½X¬O¤¤¤å¦r */ cc = *tag++; - + while ( (c1 = *str) ) { if (in_chi) @@ -1144,7 +1144,7 @@ str_sub( c2 = *p2; if (!c2) return str; - + p2++; c1 = *++p1; if (in_chii || c1 & 0x80) @@ -1154,14 +1154,14 @@ str_sub( } while (c1 == c2); } } - + str++; } return NULL; } -char* +char* str_tail( char* str ) @@ -1177,7 +1177,7 @@ str_tail( /* static char datemsg[32]; */ static char datemsg[40]; -char* +char* Btime( time_t *clock ) @@ -1194,7 +1194,7 @@ Btime( } -char* +char* Ctime( time_t *clock ) @@ -1208,7 +1208,7 @@ Ctime( return (datemsg); } -char* +char* Etime( time_t *clock ) @@ -1217,7 +1217,7 @@ Etime( return (datemsg); } -char* +char* Atime( /* Thor.990125: °²¸ËARPANET®É¶¡®æ¦¡ */ time_t *clock ) @@ -1229,7 +1229,7 @@ char* return (datemsg); } -char* +char* Now(void) { time_t now; @@ -1256,7 +1256,7 @@ str_trim( /* remove trailing space */ } } -char* +char* str_ttl( char* title ) @@ -1271,16 +1271,16 @@ str_ttl( return title; } -/*-------------------------------------------------------*/ -/* lib/str_xor.c ( NTHU CS MapleBBS Ver 3.10 ) */ -/*-------------------------------------------------------*/ +/*-------------------------------------------------------*/ +/* lib/str_xor.c ( NTHU CS MapleBBS Ver 3.10 ) */ +/*-------------------------------------------------------*/ /* author : thor.bbs@bbs.cs.nthu.edu.tw */ -/* target : included C for str xor-ing (signed mail) */ -/* create : 99/03/30 */ -/* update : / / */ -/*-------------------------------------------------------*/ - -//const char* +/* target : included C for str xor-ing (signed mail) */ +/* create : 99/03/30 */ +/* update : / / */ +/*-------------------------------------------------------*/ + +//const char* void str_xor( char* dst, /* Thor.990409: ¥ô·Nªø«×¥ô·Nbinary seq, ¦Ü¤Ö­n src¨º»òªø*/ @@ -1291,11 +1291,11 @@ str_xor( { register int cc; for(; *src; src++, dst++) - { + { if ((cc = *src ^ *dst)) *dst = cc; - } -} + } +} /* strlcat based on OpenBSDs strlcat */ diff --git a/lib/url_encode.c b/lib/url_encode.c index bbb0cd6f4..714b60de4 100644 --- a/lib/url_encode.c +++ b/lib/url_encode.c @@ -1,12 +1,12 @@ -/*-------------------------------------------------------*/ -/* lib/url_encode.c ( NTHU CS MapleBBS Ver 3.10 ) */ -/*-------------------------------------------------------*/ +/*-------------------------------------------------------*/ +/* lib/url_encode.c ( NTHU CS MapleBBS Ver 3.10 ) */ +/*-------------------------------------------------------*/ /* author : thor.bbs@bbs.cs.nthu.edu.tw */ -/* target : included C for URL encoding */ -/* create : 99/03/30 */ -/* update : / / */ -/*-------------------------------------------------------*/ - +/* target : included C for URL encoding */ +/* create : 99/03/30 */ +/* update : / / */ +/*-------------------------------------------------------*/ + #include "dao.h" void @@ -16,21 +16,21 @@ url_encode( ) { for(; *src; src++) - { + { if(*src == ' ') *dst++ = '+'; else if(*src == '/' || *src == '.' || *src == '&' || *src == '?' || *src == '=' ) *dst++ = *src; - else if(is_alnum(*src)) - *dst++ = *src; - else - { + else if(is_alnum(*src)) + *dst++ = *src; + else + { register int cc = *src; *dst++ = '%'; *dst++ = radix32[cc >> 4]; *dst++ = radix32[cc & 0xf]; - } - } - *dst = '\0'; -} + } + } + *dst = '\0'; +} diff --git a/lib/xsort.c b/lib/xsort.c index f1654bca0..587c03f70 100644 --- a/lib/xsort.c +++ b/lib/xsort.c @@ -48,7 +48,7 @@ swapfunc( static inline char* med3( - char* a, + char* a, char* b, char* c, int (*cmp) (void *lhs, void *rhs) diff --git a/maple/acct.c b/maple/acct.c index 05d90da44..832844abb 100644 --- a/maple/acct.c +++ b/maple/acct.c @@ -52,7 +52,7 @@ addmoney( if(acct_load(&acct, userid) >= 0) { double temp = (acct.money + addend); /* ÁקK·¸¦ì */ - if (temp < INT_MAX ) + if (temp < INT_MAX ) acct.money += addend; else { @@ -72,7 +72,7 @@ addpoint1( if(acct_load(&acct, userid) >= 0) { double temp = (acct.point1 + addend); /* ÁקK·¸¦ì */ - if (temp < INT_MAX ) + if (temp < INT_MAX ) acct.point1 += addend; acct_save(&acct); } @@ -88,7 +88,7 @@ addpoint2( if(acct_load(&acct, userid) >= 0) { double temp = (acct.point2 + addend); /* ÁקK·¸¦ì */ - if (temp < INT_MAX ) + if (temp < INT_MAX ) acct.point2 += addend; acct_save(&acct); } @@ -257,7 +257,7 @@ x_file( { clearange(3,20); } - + while ((desc = xlist[n])) { n++; @@ -275,13 +275,13 @@ x_file( move(n + 2, 2); else move(n + 2 -20, 2 + 44); - + prints("(\033[1;36m%2d\033[m) %s", n, desc); if(n<21) clrtohol(); - + if (mode == M_XFILES) { if(n<21) @@ -291,7 +291,7 @@ x_file( outs(flist[n - 1] + 4); /* statue.000703: µù¸Ñ: +4 ¥h±¼¥Ø¿ý */ clrtoeol(); } - + } } for(;n<20;n++) @@ -345,7 +345,7 @@ check_admin( if (!str_cmp(cuser.userid, ELDER)) return 1; - + fd = open(FN_ETC_ADMIN_DB, O_RDONLY); while(fd) { @@ -358,7 +358,7 @@ check_admin( return 1; } pos++; - } + } else { close(fd); @@ -374,7 +374,7 @@ check_admin( void bitmsg( - char* msg, + char* msg, char* str, int level ) @@ -484,12 +484,12 @@ acct_su( XO *xo; char path[80],id[20]; int level,ufo; - + if(!supervisor) { vmsg("¡· §A¤£¬O¶W¯Å¯¸°È¡I"); return; - } + } ufo = cuser.ufo; level = cuser.userlevel; memcpy(&cuser,u,sizeof(ACCT)); @@ -570,11 +570,11 @@ perm_log( { if ((u->userlevel & level) != (oldl & level)) { - sprintf(buf, "%s %s %s (%s) by %s\n", u->userid, + sprintf(buf, "%s %s %s (%s) by %s\n", u->userid, (u->userlevel & level) ? "¡½" : "¡¼", perm_tbl[i], Now(), cuser.userid); if (!str_cmp(cuser.userid, ELDER)) - pmsg2("ªO¥D²§°Ê¤£¥[¤J¤é»x"); + pmsg2("ªO¥D²§°Ê¤£¥[¤J¤é»x"); else f_cat(FN_SECURITY, buf); } @@ -618,7 +618,7 @@ acct_show( u->numlogins, diff / 60, diff % 60); prints("¤å³¹¼Æ¥Ø¡G%d ½g", u->numposts); - + prints(" (Àu¨}¿n¤À:%d/¦H¤å:%d/¹Ú¹ô:%d)\n", u->point1, u->point2, u->money); usr_fpath(buf, uid, fn_dir); @@ -685,35 +685,35 @@ acct_show( #endif } -void +void bm_setup( ACCT *u, int adm ) -{ +{ acct_show(u, adm); - + if ((u->userlevel & PERM_SYSOP) && !(cuser.userlevel & PERM_SYSOP) ) { outs("¦¹±b¸¹¬°¥»¯¸ªº¯¸ªø¡AµLªk§ó§ïÅv­­¡I"); return; } if (!str_cmp(cuser.userid, ELDER)) - pmsg2("ªO¥D²§°Ê¤£¥[¤J¤é»x"); + pmsg2("ªO¥D²§°Ê¤£¥[¤J¤é»x"); else { char tmp[80], why[80], buf[80]; pmsg2("ªO¥D²§°Ê¤w¥[¤J¯¸ªø¤é»x"); if (!vget(b_lines, 0, "½Ð¿é¤J²§°Ê²z¥Ñ¡G", why,40, DOECHO)) - { + { sprintf(why, "¥¼¿é¤J²z¥Ñ¡A¸T¤î²§°Ê"); pmsg2("½Ð¿é¤J²§°Ê²z¥Ñ"); return; - } + } sprintf(tmp, "\n\n%s %-12s ¹ï¨Ï¥ÎªÌ %-12s °õ¦æªO¥D²§°Ê\n²z¥Ñ: ", Now(), cuser.userid, u->userid); f_cat(FN_BLACKSU_LOG, tmp); - f_cat(FN_BLACKSU_LOG, why); + f_cat(FN_BLACKSU_LOG, why); } adm = vans("³]©wª©¥DÅv­­ Y)½T©w N)¨ú®ø Q)Â÷¶} [Q] "); if (adm == 'y' || adm == 'Y') @@ -751,7 +751,7 @@ seek_log_email( { close(fd); break; - } + } } return -1; } @@ -779,7 +779,7 @@ deny_log_email( strcpy(email.email,mail); email.deny = deny; rec_add(FN_VIOLATELAW_DB, &email, sizeof(EMAIL)); - } + } } static void @@ -792,7 +792,7 @@ deny_add_email( struct tm *p; time(&now); - + p = localtime(&now); str_lower(he->vmail, he->vmail); sprintf(buf, "%s # %02d/%02d/%02d %02d:%02d %s (%s)\n", @@ -818,7 +818,7 @@ select_mode( days = vans("³B»@´Á­­ 1)¤@¬P´Á 2)¨â¬P´Á 3)¤T¬P´Á 4)¤@­Ó¤ë 5)¥Ã¤[ [1] ") - '0'; mode = vans("³B»@¤è¦¡ 1)¸T¤î talk 2)Âê«H½c 3)¸T¤î post 4)¼ÊºÙ 5)¥þ³¡ 6)¦P guest [3] ") - '0'; } - + if(vans("§A½T©w¶Ü [y/N] ") != 'y') return 0; @@ -853,8 +853,8 @@ select_mode( case 5: adm |= DENY_MODE_ALL; break; case 6: adm |= DENY_MODE_GUEST;break; } - - } + + } return adm; } @@ -871,12 +871,12 @@ add_deny( time_t now; int check_time; char *cselect=NULL,*cdays=NULL,*cmode=NULL; - + memcpy(&x, u, sizeof(ACCT)); time(&now); check_time = (x.deny > now) ? 1 : 0; - + fp = fopen(FN_STOP_LOG,"w"); if(!adm) { @@ -897,7 +897,7 @@ add_deny( x.deny = now; memcpy(u, &x, sizeof(x)); acct_save(u); - return adm; + return adm; } if(adm & DENY_SEL) { @@ -924,7 +924,7 @@ add_deny( { x.userlevel |= (PERM_DENYTALK|PERM_DENYCHAT); cmode = " Talk "; - } + } else if(adm & DENY_MODE_MAIL) { x.userlevel |= (PERM_DENYMAIL); @@ -934,7 +934,7 @@ add_deny( { x.userlevel |= (PERM_DENYNICK); cmode = "§ó§ï¼ÊºÙ"; - } + } fprintf(fp,"%sÅv­­",cmode); } if(adm & DENY_MODE_GUEST) @@ -960,11 +960,11 @@ add_deny( else fprintf(fp,"´Á¶¡: %s%s¡A´Á­­¤@¹L¦Û°Ê´_Åv¡C\n\n",check_time ? "¤W¦¸³B»@¨ì´Á¤é²Ö¥[":"±q¤µ¤Ñ°_",cdays); } - fprintf(fp,"\033[1;32m¡° Origin: \033[1;33m%s \033[1;37m<%s>\n\033[1;31m¡» From: \033[1;36m%s\033[m\n",BOARDNAME,MYHOSTNAME,MYHOSTNAME); + fprintf(fp,"\033[1;32m¡° Origin: \033[1;33m%s \033[1;37m<%s>\n\033[1;31m¡» From: \033[1;36m%s\033[m\n",BOARDNAME,MYHOSTNAME,MYHOSTNAME); fclose(fp); sprintf(buf, "[%s³B»@] %s %s",cross ? "³s§¤":"", u->userid,cselect); - keeplog(FN_STOP_LOG, BRD_VIOLATELAW, buf, 3); + keeplog(FN_STOP_LOG, BRD_VIOLATELAW, buf, 3); usr_fpath(buf,x.userid,FN_STOPPERM_LOG); fp = fopen(buf,"a+"); f_suck(fp,FN_STOP_LOG); @@ -985,19 +985,19 @@ acct_setup( ACCT x; int (*sm)(char *mail); - + int i, num,tmp,mode; FILE *flog; char *str, buf[80], pass[PASSLEN]; char id[13]; - tmp = 0; + tmp = 0; - acct_show(u, adm); + acct_show(u, adm); memcpy(&x, u, sizeof(ACCT)); sm = NULL; - if (((u->userlevel & PERM_SYSOP) && strcmp(cuser.userid,u->userid)) && !check_admin(cuser.userid)) + if (((u->userlevel & PERM_SYSOP) && strcmp(cuser.userid,u->userid)) && !check_admin(cuser.userid)) { outs("¦¹±b¸¹¬°¥»¯¸ªº¯¸ªø¡AµLªk§ó§ï¡I"); return; @@ -1008,51 +1008,51 @@ acct_setup( if(supervisor) { if (!str_cmp(cuser.userid, ELDER)) - pmsg2("¬d¸ß°Ê§@¤£¥[¤J¤é»x"); + pmsg2("¬d¸ß°Ê§@¤£¥[¤J¤é»x"); else { char tmp[80], why[80]; pmsg2("¬d¸ß°Ê§@¤w¥[¤J¯¸ªø¤é»x"); if (!vget(b_lines, 0, "½Ð¿é¤J²z¥Ñ¡G", why, 40,DOECHO)) - { + { sprintf(why, "¥¼¿é¤J²z¥Ñ¡A¸T¤î¬d¸ß"); pmsg2("½Ð¿é¤J¬d¸ß²z¥Ñ"); return; - } + } sprintf(tmp, "\n\n%s %-12s ¹ï¨Ï¥ÎªÌ %-12s °õ¦æ¬d¸ß°Ê§@\n²z¥Ñ: ", Now(), cuser.userid, u->userid); f_cat(FN_BLACKSU_LOG, tmp); - f_cat(FN_BLACKSU_LOG, why); + f_cat(FN_BLACKSU_LOG, why); } - adm = vans("³]©w 1)¸ê®Æ 2)Åv­­ 3)³s§¤³B»@ 4)³æ¤H³B»@ 5)°ò¥»Åv­­ 6)ºX¼Ð 7)SU Q)¨ú®ø [Q] "); + adm = vans("³]©w 1)¸ê®Æ 2)Åv­­ 3)³s§¤³B»@ 4)³æ¤H³B»@ 5)°ò¥»Åv­­ 6)ºX¼Ð 7)SU Q)¨ú®ø [Q] "); } else { if (!str_cmp(cuser.userid, ELDER)) - pmsg2("¬d¸ß°Ê§@¤£¥[¤J¤é»x"); + pmsg2("¬d¸ß°Ê§@¤£¥[¤J¤é»x"); else { char tmp[80], why[80]; pmsg2("¬d¸ß°Ê§@¤w¥[¤J¯¸ªø¤é»x"); if (!vget(b_lines, 0, "½Ð¿é¤J¬d¸ß²z¥Ñ¡G", why,40,DOECHO)) - { + { sprintf(why, "¥¼¿é¤J²z¥Ñ¡A¸T¤î¬d¸ß"); pmsg2("½Ð¿é¤J¬d¸ß²z¥Ñ"); return; - } + } sprintf(tmp, "\n\n%s %-12s ¹ï¨Ï¥ÎªÌ %-12s °õ¦æ¬d¸ß°Ê§@\n²z¥Ñ: ", Now(), cuser.userid, u->userid); f_cat(FN_BLACKSU_LOG, tmp); - f_cat(FN_BLACKSU_LOG, why); + f_cat(FN_BLACKSU_LOG, why); } - adm = vans("³]©w 1)¸ê®Æ 2)Åv­­ 3)³s§¤³B»@ 4)³æ¤H³B»@ 5)°ò¥»Åv­­ 6)ºX¼Ð Q)¨ú®ø [Q] "); + adm = vans("³]©w 1)¸ê®Æ 2)Åv­­ 3)³s§¤³B»@ 4)³æ¤H³B»@ 5)°ò¥»Åv­­ 6)ºX¼Ð Q)¨ú®ø [Q] "); } if (adm == '6') - { + { su_setup(u); acct_save(u); } /* BLACK SU */ if (adm == '7' && supervisor) - acct_su(u); + acct_su(u); /* BLACK SU */ if (adm == '4') { @@ -1076,11 +1076,11 @@ acct_setup( } else break; - + flog = fopen(FN_SAMEEMAIL_LOG, "r"); tmp = 0; if (flog == NULL) return; - + for(i=1;i<=num;i++) { fscanf(flog,"%13s",buf); @@ -1088,15 +1088,15 @@ acct_setup( if(u != NULL) { if(strcmp(u->userid,id)) - tmp = add_deny(u,tmp,1); - else + tmp = add_deny(u,tmp,1); + else tmp = add_deny(u,tmp,0); } if(!tmp) break; } - - if(tmp & DENY_MODE_ALL) + + if(tmp & DENY_MODE_ALL) deny_log_email(u->vmail,(u->userlevel & PERM_DENYSTOP) ? -1 : u->deny); fclose(flog); break; @@ -1108,7 +1108,7 @@ acct_setup( system(command); } break; - } + } } if (adm == '5') { @@ -1195,15 +1195,15 @@ acct_setup( if (adm) { - i++; + i++; str = x.email; - - vget(i, 0, "E-mail «H½c¡G", str, sizeof(x.email), GCARRY); - + + vget(i, 0, "E-mail «H½c¡G", str, sizeof(x.email), GCARRY); + vget(++i, 0, "»{ÃÒ¸ê®Æ¡G", x.justify, 44, GCARRY); if(strlen(x.justify) > 4) { - vget(++i, 0, "¼W¥[¦³®Ä´Á­­(y/N)¡G", buf , 2,DOECHO); + vget(++i, 0, "¼W¥[¦³®Ä´Á­­(y/N)¡G", buf , 2,DOECHO); if (buf[0] == 'y' || buf[0] == 'Y') { time(&x.tvalid); @@ -1259,7 +1259,7 @@ acct_setup( vget(++i, 0, "»{ÃÒ¦a§}¡G", x.vmail, 44, GCARRY); vget(++i, 0, "¤W¯¸¦aÂI¡G", x.lasthost, 30, GCARRY); vget(++i, 0, "RFC 931 ¡G", x.ident, 44, GCARRY); - + if (vans("³]©wÅv­­(Y/N)?[N] ") == 'y') { set_perm: @@ -1341,7 +1341,7 @@ m_user(void) return 0; } -int +int m_bmset(void) { int ans; @@ -1405,7 +1405,7 @@ allow_addr( { int i; char *host; - char foo[64]; + char foo[64]; str_lower(foo, addr); @@ -1440,10 +1440,10 @@ find_same_email( /* mode : 1.find 2.add 3.del */ int pos=0,fd; char *fpath; SAME_EMAIL email; - - + + fpath = FN_ETC_EMAILADDR_ACL; - + if(mode >= 1 && mode <= 3) { fd = open(fpath,O_RDONLY); @@ -1456,7 +1456,7 @@ find_same_email( /* mode : 1.find 2.add 3.del */ if(!strcmp(mail,email.email)) break; pos++; - } + } else { pos = -1; @@ -1466,11 +1466,11 @@ find_same_email( /* mode : 1.find 2.add 3.del */ if(fd) close(fd); } - - + + if(mode == 1) { - if(pos>=0) + if(pos>=0) return email.num; else return 0; @@ -1499,7 +1499,7 @@ find_same_email( /* mode : 1.find 2.add 3.del */ rec_del(fpath,sizeof(SAME_EMAIL),pos,NULL,NULL); } else - { + { email.num--; rec_put(fpath,&email,sizeof(SAME_EMAIL),pos); } @@ -1516,7 +1516,7 @@ u_addr(void) int vtime; unsigned int tmp_perm; int popreturn; - + msg = NULL; more(FN_ETC_EMAIL, (char *)-1); strcpy(temp,cuser.email); @@ -1524,7 +1524,7 @@ u_addr(void) /* lkchu.981201 */ if (vget(b_lines - 1, 0, "E-Mail ¦a§}¡G", addr, sizeof(cuser.email), DOECHO)) { -#ifndef HAVE_SIMPLE_RFORM +#ifndef HAVE_SIMPLE_RFORM vtime = REG_REQUEST; #endif str_lower(addr, addr); @@ -1533,7 +1533,7 @@ u_addr(void) msg = "¤£¦X®æªº E-mail address"; pmsg(msg); return 0; - } + } else if (ban_addr(addr)) { msg = "¸T¤îµù¥Uªº E-mail address"; @@ -1543,7 +1543,7 @@ u_addr(void) #ifdef HAVE_WRITE else if (!allow_addr(addr)) { -#ifndef HAVE_SIMPLE_RFORM +#ifndef HAVE_SIMPLE_RFORM attr_put(cuser.userid,ATTR_REG_KEY,&vtime); #endif msg = "©|¥¼¥Ó½Ð³q¹Lªº E-mail ¥D¾÷"; @@ -1553,7 +1553,7 @@ u_addr(void) #endif else if (strcmp(temp,addr) && (seek_log_email(addr,1) != -1)) { - msg = "¼È®É¸T¤îµù¥Uªº E-mail address"; + msg = "¼È®É¸T¤îµù¥Uªº E-mail address"; pmsg(msg); return 0; } @@ -1564,7 +1564,7 @@ u_addr(void) pmsg(msg); return 0; } - + /* pcbug.990522: pop3»{ÃÒ. */ vget(b_lines -2, 0, "¬O§_¨Ï¥Î POP3 »{ÃÒ?[Y]", buf, 2, LCECHO); @@ -1599,7 +1599,7 @@ u_addr(void) if(!(popreturn = POP3_Check(ptr+1, title, buf))) { - logitfile(FN_VERIFY_LOG, "-POP3 Verify OK -", addr); + logitfile(FN_VERIFY_LOG, "-POP3 Verify OK -", addr); cuser.userlevel |= (PERM_VALID | PERM_POST | PERM_PAGE | PERM_CHAT); if (cuser.userlevel & PERM_DENYPOST) cuser.userlevel &= ~PERM_POST; @@ -1626,7 +1626,7 @@ u_addr(void) } usr_fpath(buf, cuser.userid, fn_dir); hdr_stamp(buf, HDR_LINK, &fhdr, FN_ETC_JUSTIFIED_POP3 ); - strcpy(fhdr.title, "[µù¥U¦¨¥\\] ±z¤w¸g³q¹L¨­¤À»{ÃÒ¤F¡I"); + strcpy(fhdr.title, "[µù¥U¦¨¥\\] ±z¤w¸g³q¹L¨­¤À»{ÃÒ¤F¡I"); strcpy(fhdr.owner,"SYSOP"); rec_add(buf, &fhdr, sizeof(fhdr)); board_main(); @@ -1685,7 +1685,7 @@ u_addr(void) cuser.vtime = vtime; strcpy(cuser.email, addr); acct_save(&cuser); - board_main(); + board_main(); gem_main(); talk_main(); } @@ -1773,7 +1773,7 @@ static char *UFO2_FLAGS[] = /* RESERVE */ "¡i«O¯d¡j", /* RESERVE */ "¡i«O¯d¡j", /* RESERVE */ "¡i«O¯d¡j", - /* RESERVE */ "¡i«O¯d¡j", + /* RESERVE */ "¡i«O¯d¡j", /* ACL */ "ACL", /* RESERVE */ "¡i«O¯d¡j", /* RESERVE */ "¡i«O¯d¡j", @@ -1781,7 +1781,7 @@ static char *UFO2_FLAGS[] = /* REALNAME */ "¯u¹ê©m¦W", /* RESERVE */ "¡i«O¯d¡j", /* RESERVE */ "¡i«O¯d¡j", - /* REALNAME */ "¡i«O¯d¡j" + /* REALNAME */ "¡i«O¯d¡j" }; @@ -1835,7 +1835,7 @@ u_setup(void) if (!nflag) len = 5; else if (nflag & (PERM_SYSOP|PERM_BOARD|PERM_ACCOUNTS|PERM_CHATROOM)) - len = 21; + len = 21; /* Thor.980910: »Ýª`·N¦³PERM_ADMIN°£¤F¥i¥Îacl, ÁÙ¶¶«K¤]¥i¥H¥ÎÁô¨­³N¤F:P */ else if (nflag & PERM_CLOAK) len = 20; @@ -1849,7 +1849,7 @@ u_setup(void) /* Thor.980805: ¸Ñ¨M ufo BIFFªº¦P¨B°ÝÃD */ nflag = (nflag & ~UFO_UTMP_MASK) | (cutmp->ufo & UFO_UTMP_MASK); - cutmp->ufo = cuser.ufo = nflag; + cutmp->ufo = cuser.ufo = nflag; /* Thor.980805: ­n¯S§Oª`·N cuser.ufo©Mcutmp->ufoªºUFO_BIFFªº¦P¨B°ÝÃD,¦A§ï */ // showansi = nflag & UFO_COLOR; @@ -1864,7 +1864,7 @@ u_setup(void) } else unlink(fpath); - + return 0; } @@ -1881,7 +1881,7 @@ ue_setup(void) else if (nflag & (PERM_SYSOP|PERM_ACCOUNTS)) len = 32; else if (nflag & PERM_ADMIN) - len = 28; + len = 28; else len = 24; @@ -2048,11 +2048,11 @@ m_setbrd( char tmp[80], why[80]; pmsg2("­×§ï°Ê§@¤w¥[¤J¯¸ªø¤é»x"); if (!vget(b_lines, 0, "½Ð¿é¤J­×§ï²z¥Ñ¡G", why,40, DOECHO)) - { + { sprintf(why, "¥¼¿é¤J²z¥Ñ¡A¸T¤î­×§ï"); pmsg2("½Ð¿é¤J­×§ï²z¥Ñ"); return 0; - } + } sprintf(tmp, "\n\n%s %-12s ¹ï¬ÝªO %-12s °õ¦æ­×§ï°Ê§@\n²z¥Ñ: ", Now(), cuser.userid, brd->brdname); f_cat(FN_BLACKSU_LOG, tmp); f_cat(FN_BLACKSU_LOG, why); @@ -2177,9 +2177,9 @@ m_setbrd( /* cache.090928 ¬ÝªO¤¬¥¸ÄÝ©Ê - ¤£¥i±À¤å®É²M°£©Ò¦³±À¤å¼Ò¦¡©M­­¨î */ if(brd->battr & BRD_PRH) { brd->battr &= ~BRD_PUSHDISCON; - brd->battr &= ~BRD_PUSHTIME; - brd->battr &= ~BRD_PUSHSNEER; - brd->battr &= ~BRD_PUSHDEFINE; + brd->battr &= ~BRD_PUSHTIME; + brd->battr &= ~BRD_PUSHSNEER; + brd->battr &= ~BRD_PUSHDEFINE; } if(brd->battr & BRD_NOBAN) @@ -2271,7 +2271,7 @@ brd_edit( { case 'v': bhdr->postlevel |= PERM_VALID; - rec_put(FN_BRD, bhdr, sizeof(BRD), bno); + rec_put(FN_BRD, bhdr, sizeof(BRD), bno); vmsg("³]©w§¹²¦"); break; case 'd': @@ -2362,7 +2362,7 @@ int static void getfield( - int line, + int line, int len, char* hint, char* desc, @@ -2404,9 +2404,9 @@ send_request(void) { RFORM_R form; int check; - + check = REG_SENT; - + strcpy(form.userid,cuser.userid); form.userno = cuser.userno; if(!vget(b_lines,0,"½Ð¿é¤J­ì¦] :",form.msg,80,DOECHO)) @@ -2428,8 +2428,8 @@ u_register(void) int ans; RFORM rform; #ifndef HAVE_SIMPLE_RFORM - int formstate=0; - + int formstate=0; + if(attr_get(cuser.userid,ATTR_REG_KEY,&formstate)>=0) { if(!(formstate)) @@ -2688,10 +2688,10 @@ ans_request(void) { int num,fd; RFORM_R form; - ACCT muser; + ACCT muser; char fpath[128],op,buf[128]; sprintf(fpath,"%s.tmp",FN_RFORM_R); - + rename(FN_RFORM_R,fpath); num = rec_num(fpath, sizeof(RFORM_R)); if (num <= 0) @@ -2707,7 +2707,7 @@ ans_request(void) move(2,0); prints("¥Ó½Ð¥N¸¹: %s\n", form.userid); prints("¥Ó½Ð²z¥Ñ: %s\n%s\n", form.msg, msg_separator); - clrtobot(); + clrtobot(); if ((acct_load(&muser, form.userid) < 0) || (muser.userno != form.userno)) { vmsg("¬dµL¦¹¤H"); @@ -2782,8 +2782,8 @@ ans_request(void) close(fd); unlink(fpath); } - - return 0; + + return 0; } #endif @@ -2791,14 +2791,14 @@ int m_register(void) { int num; -#ifndef HAVE_SIMPLE_RFORM +#ifndef HAVE_SIMPLE_RFORM int num2; char msg[128]; #endif char buf[80]; - + num = rec_num(FN_RFORM, sizeof(RFORM)); -#ifndef HAVE_SIMPLE_RFORM +#ifndef HAVE_SIMPLE_RFORM num2 = rec_num(FN_RFORM_R, sizeof(RFORM_R)); sprintf(msg,"¼f®Ö : 1)µù¥U³æ< %d µ§> 2)µù¥U³æ½Ð¨D< %d µ§> [1]",num,num2); #endif diff --git a/maple/banmail.c b/maple/banmail.c index baf794540..e55e518a9 100644 --- a/maple/banmail.c +++ b/maple/banmail.c @@ -157,7 +157,7 @@ banmail_edit( sprintf(modes,"%c%c%c%c%c%c",(banmail->mode&FW_OWNER)?'1':'0',(banmail->mode&FW_TITLE)?'1':'0', (banmail->mode&FW_TIME)?'1':'0',(banmail->mode&FW_PATH)?'1':'0', - (banmail->mode&FW_ORIGIN)?'1':'0',(banmail->mode&FW_CANCEL)?'1':'0'); + (banmail->mode&FW_ORIGIN)?'1':'0',(banmail->mode&FW_CANCEL)?'1':'0'); if(vget(b_lines, 0, "¾×«H¦Cªí¡G", banmail->data, sizeof(banmail->data), echo)) change++; @@ -172,8 +172,8 @@ banmail_edit( banmail->mode|=(modes[5]!='0')?FW_CANCEL:0; change++; } - - if(change) + + if(change) return 1; else return 0; @@ -218,7 +218,7 @@ banmail_change( { BANMAIL *banmail, mate; int pos, cur; - + pos = xo->pos; cur = pos - xo->top; banmail = (BANMAIL *) xo_pool + cur; diff --git a/maple/bbsd.c b/maple/bbsd.c index 24eab444b..96a8d051d 100644 --- a/maple/bbsd.c +++ b/maple/bbsd.c @@ -35,7 +35,7 @@ extern UCACHE *ushm; #ifdef HAVE_DETECT_CROSSPOST extern CHECKSUMCOUNT cksum; #endif - + /* Thor.990113: exports for anonymous log */ /* static */ char rusername[40]; @@ -62,7 +62,7 @@ extern time_t mode_lastchange; void blog( - char *mode, + char *mode, char *msg ) { @@ -138,10 +138,10 @@ u_exit( ve_backup(); /* ½s¿è¾¹¦Û°Ê³Æ¥÷ */ brh_save(); /* Àx¦s¾\Ū°O¿ýÀÉ */ -#ifdef HAVE_DETECT_CROSSPOST +#ifdef HAVE_DETECT_CROSSPOST attr_put(cuser.userid,ATTR_CROSS_KEY,&cksum); /* Àx¦s CrossPost ¬ö¿ý */ #endif - + } /* Thor.980405: Â÷¯¸®É¥²©w§R°£¼ö°T */ @@ -169,14 +169,14 @@ u_exit( { cuser.numlogins++; } -#ifdef HAVE_SONG +#ifdef HAVE_SONG cuser.request = tuser.request; if(cuser.request>500) cuser.request = 500; else if (cuser.request<=0) cuser.request = 0; #endif - cuser.money = tuser.money; + cuser.money = tuser.money; cuser.userlevel = tuser.userlevel; cuser.tvalid = tuser.tvalid; cuser.vtime = tuser.vtime; @@ -187,7 +187,7 @@ u_exit( cuser.numposts = tuser.numposts; if(tuser.staytime > cuser.staytime) cuser.staytime = tuser.staytime; - + strcpy(cuser.justify, tuser.justify); strcpy(cuser.vmail, tuser.vmail); #ifdef TRANUFO @@ -221,7 +221,7 @@ abort_bbs(void) { if (bbstate) u_exit("AXED"); - + exit(0); } @@ -406,7 +406,7 @@ acct_apply(void) cuser.point1 = 0; cuser.point2 = 0; cuser.money = 0; - + cuser.userlevel = PERM_DEFAULT; cuser.ufo2 = UFO2_COLOR | UFO2_MOVIE | UFO2_BNOTE; /* Thor.980805: µù¸Ñ, ¹w³]ºX¼Ðufo */ @@ -475,7 +475,7 @@ logattempt( #endif // str_stamp(fpath, &ap_start); -// sprintf(buf, "%s %cBBS\t%s\n", fpath, type, currtitle); +// sprintf(buf, "%s %cBBS\t%s\n", fpath, type, currtitle); /* Thor.990415: currtitle¤w¤º§tip */ /* sprintf(buf, "%s %cBBS\t%s ip:%08x\n", fpath, type, currtitle,tn_addr); */ /* Thor.980803: °lÂÜ ip address */ @@ -506,7 +506,7 @@ utmp_setup( { UTMP utmp; char *guestname[GUESTNAME]={GUEST_NAMES}; - + cutmp = NULL; /* Thor.980805: pal_cache¤¤·| check cutmp */ /*pal_cache();*/ /* by visor */ /* cutmp = NULL; */ @@ -520,11 +520,11 @@ utmp_setup( utmp.userlevel = cuser.userlevel; #ifdef HAVE_SHOWNUMMSG utmp.num_msg = 0; -#endif +#endif #ifdef HAVE_BOARD_PAL utmp.board_pal = -1; #endif - + strcpy(utmp.userid, cuser.userid); srand(time(0)); strcpy(utmp.username, ((!str_cmp(cuser.userid, "guest")||!HAS_PERM(PERM_VALID)||HAS_PERM(PERM_DENYNICK))&&!HAS_PERM(PERM_SYSOP)) ? guestname[rand()%GUESTNAME] : cuser.username); @@ -547,7 +547,7 @@ utmp_setup( pal_cache(); #ifdef HAVE_BANMSG banmsg_cache(); -#endif +#endif } @@ -572,8 +572,8 @@ tn_login(void) /* sprintf(currtitle, "%s@%s", rusername, fromhost); */ /* Thor.990415: ¬ö¿ýip, ©È¥¿¬d¤£¨ì */ sprintf(currtitle, "%s@%s ip:%08lx", rusername, fromhost,(int) tn_addr); - - + + /* by visor */ #if 0 move(20,0); @@ -581,8 +581,8 @@ tn_login(void) vkey(); sleep(10); exit(0); -#endif -/* by visor */ +#endif +/* by visor */ /* 081119.cache: ¥¿±`Åã¥Ü¶i¯¸µe­± */ move(b_lines, 0); @@ -594,17 +594,17 @@ tn_login(void) #ifdef loginAD /*090823.cache: ¶i¯¸¼s§i*/ - FILE *fp; - char buf[128]; + FILE *fp; + char buf[128]; move(18, 0); - if( ( fp = fopen("gem/@/@AD","r") ) ) - { + if( ( fp = fopen("gem/@/@AD","r") ) ) + { while(fgets(buf,sizeof(buf),fp)) outs(buf); fclose(fp); - } + } -#endif +#endif attempts = 0; for (;;) @@ -666,7 +666,7 @@ tn_login(void) /* lkchu.981201: ¨C¦¸¤W¯¸³£­n 'c' »á³Â·Ð :p */ (UFO_BIFF | UFO_BIFFN | UFO_SOCKET | UFO_NET) : (UFO_BIFF | UFO_BIFFN | UFO_SOCKET | UFO_NET | UFO_CLOAK)); - + if ((level & PERM_ADMIN) && (cuser.ufo2 & UFO2_ACL)) { @@ -717,7 +717,7 @@ tn_login(void) if (utmp_count(cuser.userno, 0) > 2) { - pmsg2("±z¤w¸g¹F¨ì¦h­«µn¤J¤W­­"); + pmsg2("±z¤w¸g¹F¨ì¦h­«µn¤J¤W­­"); login_abort("\n"); } } @@ -727,7 +727,7 @@ tn_login(void) else { /* guest */ logattempt(' '); - cuser.userlevel = level = 0; + cuser.userlevel = level = 0; /* Thor.981207: ©È¤H¶Ãª±, ±j¨î¼g¦^cuser.userlevel */ ufo = UFO_PAGER | UFO_QUIET | UFO_MESSAGE | UFO_PAGER1 |UFO_HIDDEN; cuser.ufo = ufo; @@ -735,9 +735,9 @@ tn_login(void) if (utmp_count(cuser.userno, 0) > MAXGUEST) { pmsg2("¥Ø«e¦b½u¤Wªºguest¹L¦h"); - login_abort("\n"); + login_abort("\n"); } - break; + break; } } @@ -770,7 +770,7 @@ tn_login(void) film_out(FILM_WELCOME, 0); - + #ifdef MODE_STAT memset(&modelog, 0, sizeof(UMODELOG)); mode_lastchange = ap_start; @@ -809,7 +809,7 @@ tn_login(void) if (!(level & PERM_SYSOP)) { #ifdef NEWUSER_LIMIT - /* Thor.980825: lkchu patch: ¬JµM¦³ NEWUSER_LIMIT, ÁÙ¬O¥[¤@¤U¦n¤F, + /* Thor.980825: lkchu patch: ¬JµM¦³ NEWUSER_LIMIT, ÁÙ¬O¥[¤@¤U¦n¤F, §_«h¤@ª½¦^µª FAQ ®¼²Öªº. :) */ if (start - cuser.firstlogin < 3 * 86400) { @@ -823,7 +823,7 @@ tn_login(void) { level &= ~(PERM_CHAT | PERM_PAGE | PERM_POST); } - + if(level & (PERM_DENYPOST | PERM_DENYTALK | PERM_DENYCHAT | PERM_DENYMAIL | PERM_DENYNICK)) { if(cuser.deny < check_deny && !(level & PERM_DENYSTOP)) @@ -834,7 +834,7 @@ tn_login(void) } } else if(!(level & PERM_DENYSTOP) && cuser.deny > check_deny) cuser.deny = check_deny; - + if (!(level & PERM_CLOAK)) ufo &= ~(UFO_CLOAK|UFO_HIDDEN); @@ -869,7 +869,7 @@ tn_login(void) int (*p)(int level, char *fpath); char fpath[128]; usr_fpath(fpath,cuser.userid,"gem"); - + p = DL_get("bin/mailgem.so:gcheck"); if(p) (*p)(0,fpath); @@ -880,13 +880,13 @@ tn_login(void) aloha_sync(); #ifdef HAVE_BANMSG banmsg_sync(NULL); /* ©Ú¦¬°T®§ */ -#endif +#endif ufo |= m_quota(); /* Thor.980804: µù¸Ñ, ¸ê®Æ¾ã²z½]®Ö¦³¥]§t BIFF check */ cuser.ufo = ufo; cuser.tcheck = start; } else - { + { if(m_query(cuser.userid)>0) ufo |= UFO_BIFF; } @@ -950,7 +950,7 @@ tn_login(void) #endif #ifdef NEWUSER_LIMIT - /* Thor.980825: lkchu patch: ¬JµM¦³ NEWUSER_LIMIT, ÁÙ¬O¥[¤@¤U¦n¤F, + /* Thor.980825: lkchu patch: ¬JµM¦³ NEWUSER_LIMIT, ÁÙ¬O¥[¤@¤U¦n¤F, §_«h¤@ª½¦^µª FAQ ®¼²Öªº. :) */ if (start - cuser.firstlogin < 3 * 86400) { @@ -984,7 +984,7 @@ tn_login(void) } #endif -#ifdef HAVE_ALOHA +#ifdef HAVE_ALOHA if (!(ufo & UFO_CLOAK)) /* lkchu.981201: ¦Û¤vÁô¨­´N¤£¥Î notify */ { void aloha(void); @@ -1021,7 +1021,7 @@ tn_login(void) more("gem/brd/Admin/J/A106LL7J",NULL); bell(); sleep(1); - bell(); + bell(); } #endif @@ -1094,11 +1094,11 @@ tn_main(void) // more("etc/@/virus",(char *)-1); // bell(); // vkey(); - more("etc/@/disconnect",(char *)-1); + more("etc/@/disconnect",(char *)-1); bell(); - vkey(); + vkey(); bell(); - vkey(); + vkey(); bell(); vkey(); more("etc/@/systembusy",(char *)-1); @@ -1108,25 +1108,25 @@ tn_main(void) vkey(); bell(); vkey(); - more("etc/@/sorry",(char *)-1); + more("etc/@/sorry",(char *)-1); bell(); - vkey(); - } + vkey(); + } #endif - sprintf(buf2, "%d.%d.%d.%d", addr[0], addr[1], addr[2], addr[3]); + sprintf(buf2, "%d.%d.%d.%d", addr[0], addr[1], addr[2], addr[3]); str_lower(buf,fromhost); - + if(acl_has(FN_ETC_BANIP_ACL, "", buf) > 0 || acl_has(FN_ETC_BANIP_ACL, "", buf2) > 0) exit(0); /* ±N login ªº³¡¤À²MªÅ */ - add_io(0, 0); - while(igetch() != I_TIMEOUT); + add_io(0, 0); + while(igetch() != I_TIMEOUT); add_io(0, 60); - - + + clear(); /*cache.080510: --ºû­×¥Î,¶}¯¸®É­n°O±o³]©w³o¬qÅܦ¨µù¸Ñ--*/ /*cache.080714: power user ¥i¥H¿é¤Jbusy¶}±Òloginµe­±´ú¸Õ*/ @@ -1152,7 +1152,7 @@ tn_main(void) //­t¸ü¹L°ª¸T¤îlogin if(load[0]>20) - { + { prints("\n¹ï¤£°_...\n\n¥Ñ©ó¥Ø«e­t¸ü¹L°ª, ½Ðµy«á¦A¨Ó..."); //pcman·|¦Û°Ê­«³s®É¶¡³]¤Óµu·|Åܦ¨ DOS «Ü¥i©È :P sleep(3); @@ -1161,14 +1161,14 @@ tn_main(void) //ÁקK¬ÝªO¤H®ð­t¼Æ currbno = -1; - + //getloadavg(load,3); prints( MYHOSTNAME " ¡ó " OWNER " ¡ó " BBSIP " [" BBSVERNAME " " BBSVERSION "]\n\ Åwªï¥úÁ{¡i\033[1;33;46m %s \033[m¡j¡C¨t²Î­t¸ü¡G%.2f %.2f %.2f - [%s] ½u¤W¤H¼Æ [%d/%d]", str_site, load[0],load[1],load[2],load[0]>16?"\033[1;37;41m¹L°ª\033[m":load[0]>8?"\033[1;37;42m°¾°ª\033[m":"\033[1;37;44m¥¿±`\033[m", ushm->count, MAXACTIVE); film_out(FILM_INCOME , 2); - + total_num = ushm->count+1; currpid = getpid(); cutmp = NULL; @@ -1180,10 +1180,10 @@ tn_main(void) /* cache.090823 ¨¾¤î¤H¼Æ¿ù»~Ãz¬µ */ if (ushm->count < 0) ushm->count = 0; - + /*tn_signals(); */ brh_load(); -#ifdef HAVE_FAVORITE +#ifdef HAVE_FAVORITE if(HAS_PERM(PERM_VALID)) favorite_main(); #endif @@ -1191,20 +1191,20 @@ tn_main(void) #ifdef HAVE_DETECT_CROSSPOST if(attr_get(cuser.userid,ATTR_CROSS_KEY,&cksum)<0) memset(&cksum,0,sizeof(CHECKSUMCOUNT)); -#endif +#endif - board_main(); + board_main(); gem_main(); - + talk_main(); -#ifdef HAVE_FORCE_BOARD +#ifdef HAVE_FORCE_BOARD force_board(); /* CdChen.990417: ±j¨î¾\Ū¤½§iªO */ #endif count_update(); - time(&ap_start); + time(&ap_start); #ifdef HAVE_CHK_MAILSIZE if(!HAS_PERM(PERM_DENYMAIL) && HAS_PERM(PERM_BASIC)) { @@ -1491,7 +1491,7 @@ main_signals(void) struct sigaction act; /* act.sa_mask = 0; */ /* Thor.981105: ¼Ð·Ç¥Îªk */ - sigemptyset(&act.sa_mask); + sigemptyset(&act.sa_mask); act.sa_flags = 0; act.sa_handler = reaper; @@ -1525,12 +1525,12 @@ int main(int argc, char *argv[]) start_daemon(argc > 1 ? strcmp("-i",argv[1]) ? atoi(argv[1]) : -1 : 0); main_signals(); - + /* --------------------------------------------------- */ /* attach shared memory & semaphore */ /* --------------------------------------------------- */ #ifdef HAVE_SEM - sem_init(); + sem_init(); #endif ushm_init(); bshm_init(); @@ -1562,7 +1562,7 @@ int main(int argc, char *argv[]) } time(&ap_start); - argc = *totaluser; + argc = *totaluser; if (argc >= MAXACTIVE - 5 /* || *avgload > THRESHOLD */ ) { sprintf(currtitle, @@ -1584,7 +1584,7 @@ int main(int argc, char *argv[]) #if 0 /* Thor.990121: §K±o¤Ï¬d®ÉÅý¤H¤[µ¥ */ - telnet_init(); + telnet_init(); sprintf(currtitle, "¥¿¶i¤J%s...\n", str_site); send(0, currtitle, strlen(currtitle), 0); @@ -1605,8 +1605,8 @@ int main(int argc, char *argv[]) addr = (unsigned char *) &tn_addr; sprintf(fromhost, "%d.%d.%d.%d", addr[0], addr[1], addr[2], addr[3]); - telnet_init(); - + telnet_init(); + tn_main(); } } diff --git a/maple/board.c b/maple/board.c index e557227eb..606a8116f 100644 --- a/maple/board.c +++ b/maple/board.c @@ -320,7 +320,7 @@ force_board (void) brh_get(brd->bstamp, bno); // while (brd->blast > brd_visit[bno]) { - while (brh_unread(brd->blast)) { + while (brh_unread(brd->blast)) { vmsg("¦³·s¤½§i!! ½Ð¥ý¾\\Ū§¹·s¤½§i«á¦AÂ÷¶}.."); XoPost(bno); xover(XZ_POST); @@ -387,7 +387,7 @@ Ben_Perm( if (!str_cmp(bname, DEFAULT_BOARD)) { -#ifdef HAVE_MODERATED_BOARD +#ifdef HAVE_MODERATED_BOARD extern int bm_belong(); #ifdef HAVE_WATER_LIST #ifdef HAVE_SYSOP_WATERLIST @@ -413,7 +413,7 @@ Ben_Perm( if (!postlevel || (postlevel & ulevel)) bits |= BRD_W_BIT; } - + } /* (moderated) ¯¦±K¬ÝªO¡G®Ö¹ï¬ÝªO¤§¦n¤Í¦W³æ */ @@ -425,20 +425,20 @@ Ben_Perm( extern int bm_belong(); bits = bm_belong(bname); /* Thor.980813: ¹ï¯µ±K¬Ýª©¦Ó¨¥, ¬O­«·s§PÂ_ªº */ - + if (readlevel & PERM_SYSOP) { if (readlevel & PERM_BOARD) ; else - bits |= BRD_F_BIT; + bits |= BRD_F_BIT; } - + } #ifdef HAVE_WATER_LIST else if(bm_belong(bname) == BRD_R_BIT) bits &= ~BRD_W_BIT; - + #endif #endif @@ -449,9 +449,9 @@ Ben_Perm( if ((ulevel & PERM_BM) && blist[0] > ' ' && is_bm(blist)) return (BRD_R_BIT | BRD_W_BIT | BRD_X_BIT); -#ifndef HAVE_BOARD_SEE +#ifndef HAVE_BOARD_SEE if (ulevel & PERM_ALLBOARD) - bits |= (BRD_W_BIT | BRD_X_BIT); + bits |= (BRD_W_BIT | BRD_X_BIT); #endif if (!str_cmp(cuser.userid, ELDER)) bits = BRD_R_BIT | BRD_W_BIT | BRD_X_BIT; @@ -538,8 +538,8 @@ brh_load(void) /* --------------------------------------------------- */ /* brh_size = n = ((size + BRH_WINDOW) & -BRH_PAGE) + BRH_PAGE; */ - - + + brh_size = n = size + BRH_WINDOW; brh_base = base = (int *) malloc(n); @@ -588,7 +588,7 @@ brh_load(void) if (bhno >= 0 && (bits[bhno] & BRD_R_BIT)) { - + bits[bhno] |= BRD_H_BIT;/* ¤w¦³¾\Ū°O¿ý */ bstp[bhno] = head[1]; /* ¤W¦¸¾\Ū®É¶¡ */ cbno = bhno; @@ -602,7 +602,7 @@ brh_load(void) #endif list += n; /* Thor.980904: µù¸Ñ: ³Ì«á¤@­Ótag */ - + if(list > tail) break; @@ -643,7 +643,7 @@ brh_load(void) /* --------------------------------------------------- */ strcpy(currboard, "©|¥¼¿ï©w"); -#ifdef HAVE_BOARD_PAL +#ifdef HAVE_BOARD_PAL cutmp->board_pal = brd_bno(currboard); #endif #ifdef HAVE_RESIST_WATER @@ -659,7 +659,7 @@ brh_save(void) BRD *bhdr, *bend; char *bits; - /* Thor.980830: lkchu patch: ÁÙ¨S load ´N¤£¥Î save */ + /* Thor.980830: lkchu patch: ÁÙ¨S load ´N¤£¥Î save */ if(!(base = brh_base)) return; @@ -760,10 +760,10 @@ XoPost( { if (LastBno >= 0) { - if (bshm->mantime[LastBno] > 0 )//¨¾¤î¤H®ðÅܦ¨­t¼Æ + if (bshm->mantime[LastBno] > 0 )//¨¾¤î¤H®ðÅܦ¨­t¼Æ bshm->mantime[LastBno]--; /* °h¥X¤W¤@­ÓªO */ else - bshm->mantime[LastBno] = 0;//­t¼Æªº¸ÜÂk¹s + bshm->mantime[LastBno] = 0;//­t¼Æªº¸ÜÂk¹s } bshm->mantime[bno]++; /* ¶i¤J·sªºªO */ @@ -835,7 +835,7 @@ XoPost( #endif ok=1; } - + } @@ -865,31 +865,31 @@ class_check( { short *cbase, *chead, *ctail; int pos, max, val, zap; - int bnum = 0; + int bnum = 0; BRD *brd; char *bits; if (!class_img) - return 0; + return 0; chn = CH_END - chn; switch(boardmode) { case 0: - cbase = (short *) class_img; + cbase = (short *) class_img; break; -#ifdef HAVE_PROFESS +#ifdef HAVE_PROFESS case 1: cbase = (short *) profess_img; break; -#endif -#ifdef HAVE_FAVORITE +#endif +#ifdef HAVE_FAVORITE case 2: cbase = (short *) favorite_img; break; -#endif +#endif default: - cbase = (short *) class_img; + cbase = (short *) class_img; } chead = cbase + chn; @@ -902,11 +902,11 @@ class_check( max = 0; brd = bshm->bcache; - bits = brd_bits; + bits = brd_bits; zap = (class_flag & BFO_YANK) ? 0 : BRD_Z_BIT; do - { + { chn = *chead++; if (chn >= 0) { @@ -914,7 +914,7 @@ class_check( /* cache.081207: ³B²z­þ¨Ç board ­n print */ /* thanks to gaod */ /* cache.090503: §Y®É¼öªù¬ÝªO */ -/* cache.091225: ¦C¥X©Ò¦³¦³¾\ŪÅv­­ªº¬ÝªO */ +/* cache.091225: ¦C¥X©Ò¦³¦³¾\ŪÅv­­ªº¬ÝªO */ if (brd[chn].readlevel != PERM_CHATROOM) { @@ -932,7 +932,7 @@ class_check( continue; } } - + // §Y®É¼öªù¬ÝªOÁ{¬É­È¦Û©w if (class_hot) { @@ -970,11 +970,11 @@ class_load( case 0: cbase = (short *) class_img; break; -#ifdef HAVE_PROFESS +#ifdef HAVE_PROFESS case 1: cbase = (short *) profess_img; break; -#endif +#endif #ifdef HAVE_FAVORITE case 2: cbase = (short *) favorite_img; @@ -1014,7 +1014,7 @@ class_load( /* cache.081207: ³B²z­þ¨Ç board ­n print */ /* thanks to gaod */ /* cache.090503: §Y®É¼öªù¬ÝªO */ -/* cache.091225: ¦C¥X©Ò¦³¦³¾\ŪÅv­­ªº¬ÝªO */ +/* cache.091225: ¦C¥X©Ò¦³¦³¾\ŪÅv­­ªº¬ÝªO */ if (brd[chn].readlevel != PERM_CHATROOM) { if (class_flag2 && @@ -1022,7 +1022,7 @@ class_load( (brd[chn].readlevel != PERM_BOARD && brd[chn].readlevel != PERM_SYSOP ))) continue; - + if ((val & BRD_F_BIT) && !(val & zap)) ; else @@ -1064,7 +1064,7 @@ XoClass( { XO xo, *xt; - /* Thor.980727: ¸Ñ¨M XO xoªº¤£½T©w©Ê, + /* Thor.980727: ¸Ñ¨M XO xoªº¤£½T©w©Ê, class_load¤º³¡·| initial xo.max, ¨ä¥L¤£½T©w */ xo.pos = xo.top = 0; @@ -1100,12 +1100,12 @@ class_body( case 0: img = class_img; break; -#ifdef HAVE_PROFESS +#ifdef HAVE_PROFESS case 1: img = profess_img; break; -#endif -#ifdef HAVE_FAVORITE +#endif +#ifdef HAVE_FAVORITE case 2: img = favorite_img; break; @@ -1121,8 +1121,8 @@ class_body( max = xo->max; if (max <= 0) return XO_QUIT; - - + + cnt = xo->top; chp = (short *) xo->xyz + cnt; n = 3; @@ -1177,7 +1177,7 @@ class_body( close(fd); } - num = cnt; + num = cnt; } else { @@ -1213,10 +1213,10 @@ class_body( close(fd); } - num = brd->bpost; + num = brd->bpost; } - str = brd->blast > brd_visit[chn] ? "\033[1;31m¡¹\033[m" : "¡¸"; + str = brd->blast > brd_visit[chn] ? "\033[1;31m¡¹\033[m" : "¡¸"; char tmp[BTLEN + 1]; @@ -1232,18 +1232,18 @@ class_body( brdtype = '-'; #ifdef HAVE_MODERATED_BOARD else if(brd->readlevel & PERM_BOARD) - brdtype = '.'; + brdtype = '.'; else if(brd->readlevel & PERM_SYSOP) brdtype = ')'; #endif else brdtype = ' '; - + /* ³B²z ¤H®ð */ /* cache.20090416: ¥épttÅܦâ*/ bno = brd - bshm->bcache; bno = bshm->mantime[bno]; if (brd->bvote) - str2 = "\033[1;33m §ë\033[m "; + str2 = "\033[1;33m §ë\033[m "; else if (bno > 999) str2 = "\033[1;32m Éq\033[m "; else if (bno > 799) @@ -1285,13 +1285,13 @@ class_body( // prints("%6d%s%c%-13s\033[%sm%-4s \033[m%s%c %.13s", num, str, prints("%6d%s%c%-13s\033[%sm%-4s \033[m%-32s %s", num, str, brdtype, brd->brdname, buf, brd->class, tmp, str2); - + strcpy(tmp, brd->BM); if (tmp[13] & 0x80) tmp[12] = '\0'; else tmp[13] = '\0'; - + prints("%-13s", tmp); } @@ -1489,10 +1489,10 @@ class_browse( if (XoClass(chn) == XO_NONE) return XO_NONE; - + if (class_hot) class_hot = 0; /* Â÷¶} HOT Class ¦A²M°£ class_hot ¼Ð°O */ - + } else { @@ -1554,7 +1554,7 @@ XoAuthor( BRD *brd; char author[IDLEN + 1]; XO xo_a, *xoTmp; -#ifndef HAVE_MMAP +#ifndef HAVE_MMAP XO *xo_t; #endif if (!HAS_PERM(PERM_VALID)) @@ -1583,7 +1583,7 @@ XoAuthor( #ifdef HAVE_MMAP int fsize; char *fimage; -#endif +#endif char folder[80]; HDR *head, *tail; @@ -1689,7 +1689,7 @@ class_find_same( char fpath[128]; int fd,i; HDR hdr; - + i = 0; usr_fpath(fpath,cuser.userid,FN_FAVORITE); if ((fd = open(fpath,O_RDONLY))) @@ -1719,7 +1719,7 @@ class_add(xo) int chn,fasize; char fpath[128]; if(boardmode == 2 || !HAS_PERM(PERM_VALID)) - return XO_NONE; + return XO_NONE; usr_fpath(fpath,cuser.userid,FN_FAVORITE); chp = (short *) xo->xyz + xo->pos; @@ -1727,7 +1727,7 @@ class_add(xo) if(chn < 0) { return XO_NONE; - } + } brd = bshm->bcache + chn; memset(&hdr,0,sizeof(HDR)); brd2gem(brd,&hdr); @@ -1826,7 +1826,7 @@ class_del( if(favorite_img) free(favorite_img); favorite_img = f_img(fpath,&fasize); - + logitfile(FN_FAVORITE_LOG,"< DEL >",hdr.xname); vmsg("¤w¦¨¥\\±q§Úªº³Ì·R²¾°£¡I"); if(!favorite_img) @@ -1899,7 +1899,7 @@ class_mov( return class_init(xo); } - + #endif #ifdef HAVE_COUNT_BOARD @@ -1962,7 +1962,7 @@ static KeyFunc class_cb[] = {'s', class_switch}, {'y', class_yank}, - {'i', class_yank2}, //¦C¥X©Ò¦³¦³¾\ŪÅv­­ªº¯µ±K/¦n¦³¬ÝªO + {'i', class_yank2}, //¦C¥X©Ò¦³¦³¾\ŪÅv­­ªº¯µ±K/¦n¦³¬ÝªO {'z', class_zap}, {'E', class_edit}, {'v', class_visit}, @@ -1996,7 +1996,7 @@ Class(void) return 0; } -void +void check_new( BRD *brd) { @@ -2027,7 +2027,7 @@ check_new( } #ifdef HAVE_INFO -int +int Information(void) { int chn; @@ -2040,7 +2040,7 @@ Information(void) #endif #ifdef HAVE_STUDENT -int +int Student(void) { int chn; @@ -2066,7 +2066,7 @@ Profess(void) } #endif -#ifdef HAVE_FAVORITE +#ifdef HAVE_FAVORITE int Favorite(void) { @@ -2084,9 +2084,9 @@ void board_main(void) { int fsize; -#ifdef HAVE_PROFESS +#ifdef HAVE_PROFESS int psize; -#endif +#endif struct stat st; #ifdef HAVE_FAVORITE int fasize; @@ -2115,17 +2115,17 @@ board_main(void) favorite_img = f_img(fpath,&fasize); } #endif - + if (class_img == NULL) { blog("CACHE", CLASS_IMGFILE); } -#ifdef HAVE_PROFESS - if (profess_img == NULL) +#ifdef HAVE_PROFESS + if (profess_img == NULL) { blog("CACHE", PROFESS_IMGFILE); } -#endif +#endif if (!cuser.userlevel) /* guest yank all boards */ { @@ -2244,7 +2244,7 @@ brd_list( { name = brd.brdname; if (!ll_has(name) && ( - (select == 'b') || + (select == 'b') || (select == 'g' && (str_str(brd.brdname, buf) || str_str(brd.title, buf)))|| (select == 'c' && str_str(brd.class, buf)))) { diff --git a/maple/cache.c b/maple/cache.c index 785f8244f..0aebd9160 100644 --- a/maple/cache.c +++ b/maple/cache.c @@ -17,9 +17,9 @@ #endif -#ifdef MODE_STAT -UMODELOG modelog; -time_t mode_lastchange; +#ifdef MODE_STAT +UMODELOG modelog; +time_t mode_lastchange; #endif extern int item_length[20]; @@ -183,13 +183,13 @@ utmp_new( xshm = ushm; -#ifdef HAVE_MAXRESERVE +#ifdef HAVE_MAXRESERVE if(HAS_PERM(PERM_ADMIN)) { -#endif +#endif uentp = xshm->uslot; utail = uentp + MAXACTIVE; -#ifdef HAVE_MAXRESERVE +#ifdef HAVE_MAXRESERVE } else { @@ -365,7 +365,7 @@ cmpclasstable( return ptr->userno == cuser.userno; } -void +void classtable_free(void) { int pos; @@ -373,7 +373,7 @@ classtable_free(void) rec_del(FN_CLASSTABLE_DB, sizeof(CLASS_TABLE_ALERT), pos, (void *)cmpclasstable, NULL); } -void +void classtable_main(void) { int fd, size=0; @@ -707,17 +707,17 @@ fwshm_load(void) rec_put(FN_ETC_BANMAIL_ACL, &data, sizeof(BANMAIL), pos); } head++; - } - - head = fwshm->fwcache; + } + + head = fwshm->fwcache; fw = open(FN_ETC_BANMAIL_ACL,O_RDONLY); fstat(fw, &st); - + if(!fstat(fw, &st) && (size = st.st_size) > 0) { if(size > MAXFIREWALL * sizeof(BANMAIL)) size = MAXFIREWALL * sizeof(BANMAIL); - + if (size) read(fw, head, size); fwshm->number = size / sizeof(BANMAIL); @@ -778,16 +778,16 @@ out_rle( while (--rl >= 0) { - if(cc=='\n' && film) + if(cc=='\n' && film) { - getyx(&y,&x); + getyx(&y,&x); outs("\033[m\0"); clrtoeol(); move(y + 1, 0/*item_length[count++]*/); } else outc(cc); - + } continue; @@ -812,7 +812,7 @@ out_rle( outs("\033[m\0"); clrtoeol(); move(y + 1, 0/*item_length[count++]*/); - + } else outc(cc); @@ -828,7 +828,7 @@ film_out( { int fmax, len, *shot; char *film, buf[FILM_SIZ]; - + if (row <= 0) clear(); else @@ -844,14 +844,14 @@ film_out( if (++len > 10) return FILM_MOVIE; } - + if (tag >= FILM_MOVIE) /* random select */ { tag += (time(0) & 7); /* 7 steps forward */ if (tag >= fmax) tag = FILM_MOVIE; } /* Thor.980804: ¥i¯à¬O¬G·Nªº§a? ²Ä¤@±i random select«e¤K­Ó¨ä¤¤¤@­Ó */ - + if (tag) { len = shot[tag]; @@ -862,13 +862,13 @@ film_out( { len = shot[1]; } - + if (len >= FILM_SIZ - 10) return tag; memcpy(buf, film, len); buf[len] = '\0'; - + if (tag > FILM_MOVIE) /* FILM_MOVIE */ { out_rle(buf,1); @@ -876,7 +876,7 @@ film_out( else { out_rle(buf,0); - } + } if (row < 0) /* help screen */ vmsg(NULL); diff --git a/maple/edit.c b/maple/edit.c index 591a9f7c9..24cd9d513 100644 --- a/maple/edit.c +++ b/maple/edit.c @@ -947,7 +947,7 @@ int keysnum; static int words_check(void) { - textline *p; + textline *p; unsigned char *str, *pend; int phonetic; /* ª`­µ¤å¼Æ¥Ø */ @@ -984,7 +984,7 @@ words_check(void) static void words_check(void) { - textline *p; + textline *p; char *str; wordsnum = 0; @@ -1037,7 +1037,7 @@ ve_quote( sprintf(buf + 128, " (%s)", quote_nick); else buf[128] = '\0'; - + sprintf(str, "¡° ¤Þ­z¡m%s%s¡n¤§»Ê¨¥¡G", quote_user, buf + 128); this = ve_line(this, str); @@ -1090,7 +1090,7 @@ ve_quote( #ifdef HAVE_ANONYMOUS /* Thor.980909: gc patch: °Î¦W¼Ò¦¡¤£°Ýñ¦WÀÉ */ if(curredit & EDIT_ANONYMOUS || cuser.ufo2 & UFO2_SIGN) - goto OUT_ve_quote; + goto OUT_ve_quote; #endif msg[27] = op = cuser.signature + '0'; @@ -1172,7 +1172,7 @@ quote_check(void) post_line++; } } - + #ifdef HAVE_RESIST_WATER if((post_line <= CHECK_QUOT) && (bbstate & BRD_CHECKWATER)) checkqt++; @@ -1218,7 +1218,7 @@ ve_header( #endif } else - { + { /* Thor.980613: ¦pªG¦bÂà¿ý¤å³¹, ©I¥s ve_header, ¥Ñ©ó¤£¬O¦b³QÂ઺ª©, ¦]¦¹Äݩʤ£¹ï, ¦³¥i¯à¨Ï¯µ±Kª©¥X²{ , BRD_ANONYMOUS ¥ç¦P*/ @@ -1255,7 +1255,7 @@ ve_header( postlog.number = 1; /* Thor.980613: ¬JµM«e­±¦³check, ¬°¦ó­n¦Acheck©O? */ - if (!(bbstate & BRD_NOSTAT)) + if (!(bbstate & BRD_NOSTAT)) rec_add(FN_POST_DB, &postlog, sizeof(postlog)); } @@ -1299,7 +1299,7 @@ ve_show_sign( { for(j=1;j<=3;j++) { - prints("\033[36m¡iñ¦WÀÉ.%d¡j\033[m\n",j); + prints("\033[36m¡iñ¦WÀÉ.%d¡j\033[m\n",j); for (i=0;i=0 && select <=5) { sprintf(title,"%s",objs[select]); @@ -1628,7 +1628,7 @@ select_title( } else *title = '\0'; - return 0; + return 0; } int @@ -1655,11 +1655,11 @@ ve_subject( strcpy(title, dft); else #else - *title = '\0'; + *title = '\0'; //select = select_title(title); -#endif +#endif } - return vget(row, 0, "¼ÐÃD¡G", select ? title+6:title, select ? + return vget(row, 0, "¼ÐÃD¡G", select ? title+6:title, select ? TTLEN - 5 : TTLEN + 1, GCARRY); } @@ -1688,7 +1688,7 @@ vedit( return -1; } bbsothermode |= OTHERSTAT_EDITING; - + tmp = vln = ve_alloc(); if (*fpath) @@ -1834,7 +1834,7 @@ vedit( if (isprint2(cc)) { ve_char(cc); - keysnum++; + keysnum++; } else { @@ -1972,7 +1972,7 @@ vedit( vx_cur = tmp; break; - + case KEY_DOWN: case Ctrl('N'): @@ -2038,7 +2038,7 @@ vedit( else { (*input_tool)(); - } + } break; } #endif @@ -2122,12 +2122,12 @@ vedit( every_U(); /*ve_char(27);*/ break; - + case KEY_ESC: - + ve_char(27); break; - + #ifdef SHOW_USER_IN_TEXT case Ctrl('Q'): @@ -2149,14 +2149,14 @@ vedit( */ /* cache.090922: ±±¨î½X */ - char *menu[] = + char *menu[] = { "IQ", "Id user¢×¢Ò(**s)", "Nick user¼ÊºÙ(**n)", -// "Login µn¤J¦¸¼Æ(**l)", -// "Post PO¤å¦¸¼Æ(**p)", - "Time ²{¦b®É¶¡(**t)", +// "Login µn¤J¦¸¼Æ(**l)", +// "Post PO¤å¦¸¼Æ(**p)", + "Time ²{¦b®É¶¡(**t)", "Quit Â÷¶}¿ï³æ ", NULL }; @@ -2170,30 +2170,30 @@ vedit( break; case 'n': ve_char(KEY_ESC); - ve_char('*'); + ve_char('*'); ve_char('n'); break; /* case 'l': ve_char(KEY_ESC); - ve_char('*'); + ve_char('*'); ve_char('l'); break; case 'p': ve_char(KEY_ESC); - ve_char('*'); + ve_char('*'); ve_char('p'); - break; + break; */ case 't': ve_char(KEY_ESC); - ve_char('*'); + ve_char('*'); ve_char('t'); - break; + break; default : break; } } break; - + #endif default: diff --git a/maple/favorite.c b/maple/favorite.c index 67a84f1d6..1be35119b 100644 --- a/maple/favorite.c +++ b/maple/favorite.c @@ -32,11 +32,11 @@ favorite_parse( FILE *fp,*fw; short *reserve; HDR *nop,*zap; - + sprintf(fpath,"%s.new",key); /* build classes */ bhead = bshm->bcache; - btail = bhead + bshm->number; + btail = bhead + bshm->number; if ((fw = fopen(fpath,"w")) == NULL) return CH_END; @@ -53,11 +53,11 @@ favorite_parse( } chx[1] = chp = (ClassHeader *) malloc(sizeof(ClassHeader) + count * sizeof(short)); - + nop = (HDR *)malloc(count * sizeof(HDR)); zap = (HDR *)malloc(count * sizeof(HDR)); reserve = (short *)malloc(count * sizeof(short)); - + memset(chp->title, 0, CH_TTLEN); memset(reserve, 0, count * sizeof(short)); memset(zap, 0, count * sizeof(HDR)); @@ -84,7 +84,7 @@ favorite_parse( i++; if (!strcasecmp(str, bp->brdname)) break; - + if (++bp >= btail) { @@ -127,14 +127,14 @@ favorite_parse( check = 1; continue; } - + chp->chno[count++] = i; fwrite(&hdr, sizeof(HDR), 1, fw); - + } memcpy(&(chp->chno[count]),reserve,count3 * sizeof(short)); count+=count3; - + fclose(fp); fwrite(zap, sizeof(HDR), count3, fw); fwrite(nop, sizeof(HDR), count2, fw); @@ -143,7 +143,7 @@ favorite_parse( free(reserve); free(zap); free(nop); - + if(check) { unlink(key); @@ -154,7 +154,7 @@ favorite_parse( unlink(fpath); } chp->count = count; - + if(count > 0) return 1; } @@ -205,7 +205,7 @@ favorite_sort(void) memset(chp->title, 0, CH_TTLEN); strcpy(chp->title, "Boards"); chx[0] = chp; -} +} void @@ -216,29 +216,29 @@ favorite_main(void) FILE *fp; short len, pos[3]; char fpath[128]; - + usr_fpath(fpath,cuser.userid,FN_FAVORITE); favorite_sort(); chn = favorite_parse(fpath); - + usr_fpath(fpath,cuser.userid,FN_FAVORITE_IMG); unlink(fpath); if (chn < 1) /* visor.990106: ©|¨S¦³§Úªº³Ì·R */ return; - len = sizeof(short) * 3; + len = sizeof(short) * 3; for (i = 0; i <= 1 ; i++) { pos[i] = len; len += CH_TTLEN + chx[i]->count * sizeof(short); } pos[i] = len; - + if ((fp = fopen(fpath, "w"))) { fwrite(pos, sizeof(short), 3, fp); for (i = 0; i <= 1; i++) - { + { chp = chx[i]; fwrite(chp->title, 1, CH_TTLEN, fp); fwrite(chp->chno, 1, chp->count * sizeof(short), fp); diff --git a/maple/gem.c b/maple/gem.c index 13d8177d7..6d3e1635b 100644 --- a/maple/gem.c +++ b/maple/gem.c @@ -55,10 +55,10 @@ gem_manage( int ch,len; char buf[100]; char *list; - + strcpy(buf,title); - - len = strlen(cuser.userid); + + len = strlen(cuser.userid); if((list = strrchr(buf,'[')) == NULL) return 0; @@ -109,7 +109,7 @@ gem_item( if (!(bbstate & STAT_BOARD)&&!HAS_PERM(PERM_ADMIN|PERM_GEM)&&(xmode & GEM_RESTRICT)) prints("\033[1;33m¸ê®Æ«O±K¡I\033[m\n"); else if(!HAS_PERM(PERM_SYSOP) && (xmode & GEM_LOCK)) - prints("\033[1;33m¸ê®Æ«O±K¡I\033[m\n"); + prints("\033[1;33m¸ê®Æ«O±K¡I\033[m\n"); else { if(xmode & GEM_BOARD) @@ -191,7 +191,7 @@ gem_head( } else { - buf[0] = '\n'; + buf[0] = '\n'; buf[1] = '\0'; } @@ -262,7 +262,7 @@ gem_check( if ((gtype & GEM_RESTRICT) && (level <= GEM_USER) && !gem_manage(ghdr->title)) return NULL; - + if ((gtype & GEM_LOCK) && (!HAS_PERM(PERM_SYSOP))) return NULL; @@ -402,7 +402,7 @@ gem_add( { vmsg("§AÁÙ¦³ÀÉ®×ÁÙ¨S½s§¹®@¡I"); return XO_FOOT; - } + } else if (vedit(fpath, NA)) { unlink(fpath); @@ -458,7 +458,7 @@ gem_edit( { vmsg("§AÁÙ¦³ÀÉ®×ÁÙ¨S½s§¹®@¡I"); return XO_FOOT; - } + } if (!(hdr = gem_check(xo, fpath, GEM_WRITE | GEM_FILE))) return XO_NONE; @@ -564,16 +564,16 @@ gem_state( struct stat st; int bno; - /* Thor.990107: Ernie patch: + /* Thor.990107: Ernie patch: gem.c gem_browse() ¦b¶i¤J ¸ô)ªº folder ®É¤@«ß op = GEM_VISIT ¨Ï±oªO¥D¥u¯à¦b gopher ³Ì¥~¼hÆ[¬ÝÀÉ®×ÄݩʤΠupdate proxy¡A¶i¤J gopher «K¥¢®Ä¡C ¸Ñ¨M¿ìªk: ¶i gem_state() ®É¦h§PÂ_¬O§_¬°¸ÓªOªO¥D¡A¦³§ó¦nªº¤è¦¡½Ð«ü¥¿ :) */ - if (!(bbstate & STAT_BOARD) && xo->key <= GEM_USER && !(HAS_PERM(PERM_SYSOP))) + if (!(bbstate & STAT_BOARD) && xo->key <= GEM_USER && !(HAS_PERM(PERM_SYSOP))) return XO_NONE; - + if(!(ghdr = gem_check(xo, fpath, GEM_READ))) return XO_NONE; @@ -675,7 +675,7 @@ gem_browse( /* browse article */ - /* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È */ + /* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È */ if ((xmode = more(fpath, MSG_GEM)) == -2) return XO_INIT; if(xmode == -1) @@ -700,7 +700,7 @@ gem_browse( static char GemFolder[80], GemAnchor[80], GemSailor[24]; static HDR *GemBuffer; -static int GemBufferSiz; /* , GemBufferNum; */ +static int GemBufferSiz; /* , GemBufferNum; */ /* Thor.990414: ´£«e«Å§iµ¹gem_head¥Î */ @@ -1078,7 +1078,7 @@ gem_anchor( /* Thor.981020: ³W©w¸ê·½¦^¦¬µ©¤£±o©wÁã, ¥t, ©ÞÁã«á, g«h·|¥á¤J¦^¦¬µ© */ if (xo->key < GEM_LMANAGER) /* Thor.981020: ¥u­nª©¥D¥H¤W§Y¥i¨Ï¥Îanchor */ - return XO_NONE; + return XO_NONE; /* Thor.981020: ¤£¶}©ñ¤@¯ëuser¨Ï¥Î¬O¬°¤F¨¾¤îª©¥D¸Õ¥X¥t¤@­Ó¤pbug:P */ ans = vans("ºëµØ°Ï A)©wÁã D)©ÞÁã J)´N¦ì Q)¨ú®ø [J] "); @@ -1155,8 +1155,8 @@ gem_gather( EnumTagHdr(hdr, dir, 0); } else - hdr = (HDR *) xo_pool + xo->pos - xo->top; - + hdr = (HDR *) xo_pool + xo->pos - xo->top; + if(hdr->xmode & POST_DELETE) return XO_FOOT; @@ -1198,7 +1198,7 @@ gem_gather( } xmode = hdr->xmode; - + /* Thor.981018: ¯S§Oª`·N, anchor ¨Sªk¦¬¿ý folder, ¦]µ{¦¡¤£¦n¼g(¸ó°Ïcopy), ¦¹®É¦P°Ïªºfolder¥i¥H¥Îcopy & paste, ¤£¦P°Ï´N¥u¦n¤@½g½g¦¬¿ý */ @@ -1224,7 +1224,7 @@ gem_gather( ptr = strchr(tmp,'.'); if(ptr) *ptr = '\0'; - ptr = strchr(tmp,'@'); + ptr = strchr(tmp,'@'); if(ptr) *ptr = '\0'; strncpy(ghdr.title, hdr->title,sizeof(ghdr.title) - IDLEN - 4); @@ -1283,9 +1283,9 @@ gem_tag( if ((ghdr = gem_check(xo, NULL, GEM_READ)) && (tag = Tagger(ghdr->chrono, pos = xo->pos, TAG_TOGGLE))) { move(3 + pos - xo->top, 7); - outc(tag > 0 ? '*' : ' '); + outc(tag > 0 ? '*' : ' '); } - + /* return XO_NONE; */ return xo->pos + 1 + XO_MOVE; /* lkchu.981201: ¸õ¦Ü¤U¤@¶µ */ } @@ -1307,7 +1307,7 @@ gem_cross( HDR *hdr, xpost,*ghdr; #ifdef HAVE_DETECT_CROSSPOST HDR bpost; -#endif +#endif int method=1, rc, tag, locus, battr; FILE *xfp; @@ -1328,8 +1328,8 @@ gem_cross( hdr = tag ? &xpost : (HDR *) xo_pool + (xo->pos - xo->top); - - if (!tag) + + if (!tag) { if(!(hdr->xmode & GEM_FOLDER) && !((hdr->xmode & (GEM_RESTRICT|GEM_RESERVED)) && (xo->key < GEM_MANAGER)) && !((hdr->xmode & GEM_LOCK) && !HAS_PERM(PERM_SYSOP))) @@ -1339,19 +1339,19 @@ gem_cross( return XO_HEAD; } else - return XO_HEAD; + return XO_HEAD; } - + rc = vget(2, 0, "(S)¦sÀÉ (Q)¨ú®ø¡H[Q] ", buf, 3, LCECHO); if (*buf != 's' && *buf != 'S') return XO_HEAD; - + locus = 0; dir = xo->dir; - battr = (bshm->bcache + brd_bno(xboard))->battr; + battr = (bshm->bcache + brd_bno(xboard))->battr; - do + do { if (tag) { @@ -1362,7 +1362,7 @@ gem_cross( if (!(hdr->xmode & GEM_FOLDER) && !((hdr->xmode & (GEM_RESTRICT|GEM_RESERVED)) && (xo->key < GEM_MANAGER)) && !((hdr->xmode & GEM_LOCK) && !HAS_PERM(PERM_SYSOP))) { - xo_fpath(fpath, dir, hdr); + xo_fpath(fpath, dir, hdr); brd_fpath(xfolder, xboard, fn_dir); method = hdr_stamp(xfolder, 'A', &xpost, buf); @@ -1385,7 +1385,7 @@ gem_cross( strcpy(xpost.owner, cuser.userid); strcpy(xpost.nick, cuser.username); - + strcpy(xpost.title, xtitle); @@ -1402,20 +1402,20 @@ gem_cross( cuser.userlevel &= ~PERM_POST; move_post(&bpost,BRD_VIOLATELAW,-2); - + board_main(); - } + } #endif } } while (locus < tag); - + if ( battr & BRD_NOCOUNT) { outs("Âà¿ý§¹¦¨¡A¤å³¹¤£¦C¤J¬ö¿ý¡A·q½Ð¥]²[¡C"); } else { - cuser.numposts += (tag == 0) ? 1 : tag; + cuser.numposts += (tag == 0) ? 1 : tag; vmsg("Âà¿ý§¹¦¨"); } } diff --git a/maple/mail.c b/maple/mail.c index 71d03f81d..c5653559e 100644 --- a/maple/mail.c +++ b/maple/mail.c @@ -121,7 +121,7 @@ ll_out( { LinkList *list; int cur_rownum,ch,crow; - + move(row, column); clrtobot(); @@ -148,7 +148,7 @@ ll_out( { move(row+2, 0); clrtobot(); - cur_rownum = row+1; + cur_rownum = row+1; } } } @@ -301,7 +301,7 @@ bsmtp( move(b_lines, 0); clrtoeol(); - + if(method) { prints("¡¹ ±H«Hµ¹ %s \033[5m...\033[m", rcpt); @@ -370,8 +370,8 @@ bsmtp( fprintf(fw, "From: %s\r\nTo: %s\r\nSubject: %s\r\nX-Sender: %s (%s)\r\n" "Date: %s\r\nMessage-Id: <%s@%s>\r\n" "X-Disclaimer: [%s] ¹ï¥»«H¤º®e®¤¤£­t³d\r\n\r\n", - from, rcpt, title, cuser.userid, cuser.username, - Atime(&stamp), msgid, str_host, + from, rcpt, title, cuser.userid, cuser.username, + Atime(&stamp), msgid, str_host, str_site); if (method & MQ_JUSTIFY) /* ¨­¤À»{ÃÒ«H¨ç */ @@ -412,7 +412,7 @@ bsmtp( sign.val.hash2 = str_hash2(buf, sign.val.hash); str_xor(sign.str, prikey); /* Thor.990413: ¤£¥[()ªº¸Ü, ®É¶¡§ÀªÅ¥Õ·|³Q¦Y±¼(ÅçÃÒ®É) */ - fprintf(fw,"\033[1;32m¡° X-Info: \033[33m%s\033[m\r\n\033[1;32m¡° X-Sign: \033[36m%s%s \033[37m(%s)\033[m\r\n", + fprintf(fw,"\033[1;32m¡° X-Info: \033[33m%s\033[m\r\n\033[1;32m¡° X-Sign: \033[36m%s%s \033[37m(%s)\033[m\r\n", buf, msgid, genpasswd(sign.str), Btime(&stamp)); } #endif @@ -449,7 +449,7 @@ bsmtp( /* --------------------------------------------------- */ sprintf(buf, "%s%-13s%c> %s %s %s\n\t%s\n\t%s\n", Btime(&stamp), cuser.userid, - ((method == MQ_JUSTIFY) ? '=' : '-'), rcpt, msgid, + ((method == MQ_JUSTIFY) ? '=' : '-'), rcpt, msgid, #ifdef HAVE_SIGNED_MAIL *prikey ? genpasswd(sign.str): "NoPriKey", #else @@ -473,14 +473,14 @@ bsmtp_file( char *str, buf[512], from[80], msgid[80],boundary[256]; char fname[256]; struct tm ntime, *xtime; - - + + cuser.numemail++; /* °O¿ý¨Ï¥ÎªÌ¦@±H¥X´X«Ê Internet E-mail */ chrono = time(&stamp); xtime = localtime(&chrono); ntime = *xtime; - + sprintf(fname,"mail_%04d%02d%02d.tgz",ntime.tm_year + 1900, ntime.tm_mon + 1, ntime.tm_mday); /* --------------------------------------------------- */ @@ -514,12 +514,12 @@ bsmtp_file( if (sock >= 0) { archiv32(chrono, msgid); - + sprintf(boundary,"----=_NextPart_%s",msgid); move(b_lines, 0); clrtoeol(); - + prints("¡¹ ±H«Hµ¹ %s \033[5m...\033[m", rcpt); refresh(); @@ -579,13 +579,13 @@ bsmtp_file( fprintf(fw, "From: %s\r\nTo: %s\r\nSubject: %s\r\nX-Sender: %s (%s)\r\n" "Date: %s\r\nMessage-Id: <%s@%s>\r\n" "X-Disclaimer: [%s] ¹ï¥»«H¤º®e®¤¤£­t³d\r\n", - from, rcpt, title, cuser.userid, cuser.username, - Atime(&stamp), msgid, str_host, + from, rcpt, title, cuser.userid, cuser.username, + Atime(&stamp), msgid, str_host, str_site); - + fprintf(fw,"MIME-Version: 1.0\r\nContent-Type: multipart/mixed;\r\n" "\tboundary=\"%s\"\r\n\r\n",boundary); - + fprintf(fw,"This is a multi-part message in MIME format.\r\n"); fprintf(fw,"--%s\r\nContent-Type: text/plain;\r\n\tcharset=\"big5\"\r\n" "Content-Transfer-Encoding: 8bit\r\n\r\nªþ¥ó¦WºÙ¡G%s\r\n",boundary,fname); @@ -665,7 +665,7 @@ int m_verify(void) { extern char rusername[]; /* Thor: °O¿ý RFC931, ©Èguest verify */ - time_t chrono; + time_t chrono; char info[79], *p; char sign[79], *q; char buf[160]; @@ -686,9 +686,9 @@ m_verify(void) return XEASY; } - move(13, 0); + move(13, 0); clrtobot(); - move(15, 0); + move(15, 0); outs("½Ð¨Ì§Ç¿é¤J«H¥½¨â¦æ X-Info X-Sign ¥H¶i¦æÅçÃÒ"); if(!vget(17, 0, ":", info, sizeof info, DOECHO) || @@ -706,14 +706,14 @@ m_verify(void) q += 11; while(*q == ' ') q++; - if(strlen(q) < 7 + 13) + if(strlen(q) < 7 + 13) { vmsg("¹q¤lñ³¹¦³»~"); return 0; } - + str_ncpy(s.str + 1, q, 8); /* Thor: ¼È­É¤@¤U s.str */ - chrono = chrono32(s.str); /* prefix 1 char */ + chrono = chrono32(s.str); /* prefix 1 char */ q += 7; /* real sign */ q[PASSLEN-1] = 0; /* ¸É§À0 */ @@ -724,8 +724,8 @@ m_verify(void) sprintf(buf,"(%s)", Btime(&chrono)); - if(chkpasswd(q, s.str) || strcmp(q + PASSLEN, buf)) - { + if(chkpasswd(q, s.str) || strcmp(q + PASSLEN, buf)) + { /* Thor.990413: log usage */ sprintf(buf,"%s@%s - XInfo:%s", rusername, fromhost, p); blog("VRFY",buf); @@ -773,7 +773,7 @@ m_total_size(void) if (!fstat(fd, &st) && (fsize = st.st_size) >= sizeof(HDR) && (base = (char *) malloc(fsize))) { - + f_exlock(fd); if ((fsize = read(fd, base, fsize)) >= sizeof(HDR)) @@ -782,7 +782,7 @@ m_total_size(void) tail = (HDR *) (base + fsize); do - { + { if(head->xid > 0) { total += head->xid; @@ -798,7 +798,7 @@ m_total_size(void) } while (++head < tail); } - + if(changed == 1) { lseek(fd, (off_t) 0, SEEK_SET); @@ -880,7 +880,7 @@ m_quota(void) #endif if (!(xmode & MAIL_READ)) ufo |= UFO_BIFF; - + #if 0 if ((count > limit) || (head->chrono <= (xmode & MAIL_MARKED ? mark_due : mail_due))) @@ -906,7 +906,7 @@ m_quota(void) write(fd, base, fsize); ftruncate(fd, fsize); } - + #else ufo &= ~UFO_MQUOTA; if (fsize > 0) @@ -916,7 +916,7 @@ m_quota(void) ftruncate(fd, fsize); } #endif - + } /* flock(fd, LOCK_UN); */ @@ -974,7 +974,7 @@ do_forward( char addr[64], fpath[64], cmd[256]; if(strstr(cuser.email,".bbs@")) - { + { vmsg("¨Ï¥Î BBS «H½c§@¬°»{ÃÒ«H½c/¨Ï¥Îµù¥U³æ»{ÃҪ̵Lªk¥´¥]¡I"); return; } @@ -1086,7 +1086,7 @@ int return XEASY; } - if ((ans == '2' && !(bbstate & STAT_BOARD)) || (ans == '3' && !(bbstate & STAT_BOARD))) + if ((ans == '2' && !(bbstate & STAT_BOARD)) || (ans == '3' && !(bbstate & STAT_BOARD))) /* tmp not STAT_BM */ { vmsg("¥u¦³ªO¥D¤~¯à¥´¥]¬ÝªO¤å³¹¤Î¬ÝªOºëµØ°Ï"); @@ -1094,7 +1094,7 @@ int } if(!(strstr(currboard,"P_"))) - { + { vmsg("«D­Ó¤HªO¼È¤£´£¨Ñ¥´¥]ªA°È,¯S®í­Ó¤H±MªO­Y»Ý¥´¥]½Ð¬¢¯¸°È"); return XEASY; } @@ -1246,13 +1246,13 @@ mail_hold( rec_add(folder, &mhdr, sizeof(HDR)); } -/* cache.091209: ¦Û°ÊÂà±H */ +/* cache.091209: ¦Û°ÊÂà±H */ int m_setforward(void) { char fpath[64], ip[50]; FILE *fp; - + usr_fpath(fpath, cuser.userid, FN_FORWARD); if (fp = fopen(fpath, "r")) { @@ -1263,9 +1263,9 @@ m_setforward(void) { ip[0] = '\0'; } - + vget(b_lines - 1, 0, "½Ð¿é¤J«H¥ó¦Û°ÊÂà±Hªº E-mail¡G", ip, 50, GCARRY); - + if (ip[0] && !not_addr(ip) && vans("½T©w¶}±Ò«H¥óÂà±H¥\\¯à(Y/N)¡H[N] ") == 'y') { @@ -1277,13 +1277,13 @@ m_setforward(void) return 0; } } - + unlink(fpath); pmsg2("¨ú®ø¦Û°ÊÂà±H©ÎµL®Ä E-mail"); return 0; } -/* cache.100129: ­««Ø«H½c¯Á¤Þ */ +/* cache.100129: ­««Ø«H½c¯Á¤Þ */ int m_setmboxdir(void) { @@ -1295,11 +1295,11 @@ m_setmboxdir(void) if (vans("½T©w­««Ø¯Á¤Þ(Y/N)¡H[N] ") == 'y') - { + { vget(b_lines - 1, 0, "½Ð¿é¤J±b¸¹ªº²Ä¤@­Ó­^¤å¦r¥À(¤p¼g)¡G", id, 5, GCARRY); - usr_fpath(upath, cuser.userid, NULL); + usr_fpath(upath, cuser.userid, NULL); sprintf(fpath1, "/home/bbs/usr/%s/%s", id, cuser.userid); @@ -1308,14 +1308,14 @@ m_setmboxdir(void) sprintf(fpath3, "mv .DIR.@ .DIR"); chdir(fpath1); - system(fpath2); + system(fpath2); system(fpath3); chdir("/home/bbs"); pmsg2("­««Ø§¹¦¨"); return 0; } - + pmsg2("¨ú®ø­««Ø«H½c¯Á¤Þ"); return 0; @@ -1368,7 +1368,7 @@ mail_external( return 0; } -/* cache.091209: ¦Û°ÊÂà±H«H¥ó*/ +/* cache.091209: ¦Û°ÊÂà±H«H¥ó*/ /* cuser.userid ±N¡u¼ÐÃD title¡BÀɮצb fpath¡vªº«H¥ó±Hµ¹ userid ªº¥~³¡«H½c */ static void forward_mail( @@ -1376,13 +1376,13 @@ forward_mail( { FILE *fp; char ip[80]; - + usr_fpath(ip, userid, FN_FORWARD); if ( ( fp = fopen(ip, "r") ) ) { fscanf(fp, "%s", ip); fclose(fp); - + if (ip[0]) bsmtp(fpath, title, ip, 0); } @@ -1396,9 +1396,9 @@ mail_send( char fpath[80], folder[80],ckforward[80]; int rc, userno=0; ACCT acct; - + int internet_mail; - + if (!(internet_mail = mail_external(rcpt))) { if ((userno = acct_userno(rcpt)) <= 0) @@ -1455,10 +1455,10 @@ mail_send( strcpy(mhdr.nick, cuser.username); /* :chuan: ¥[¤J nick */ strcpy(mhdr.title, ve_title); rc = rec_add(folder, &mhdr, sizeof(mhdr)); - forward_mail(fpath, rcpt, ve_title); + forward_mail(fpath, rcpt, ve_title); } else - { + { if(acct_load(&acct, rcpt) >= 0) { if (!title) @@ -1491,11 +1491,11 @@ mail_send( /* --------------------------------------------------- */ /* E-Mail ºô¸ô¶Ç©I by lkchu@dragon2.net */ /* --------------------------------------------------- */ - + if ((acct_load(&acct, rcpt) >= 0) && (acct.ufo & UFO_MPAGER)) { char *p; - + if ((p = str_str(acct.address, "bbc")) != NULL) /* §ä BBC ´y­z */ DL_func("bin/emailpage.so:vaEMailPager", p + 3, cuser.userid, ve_title); } @@ -1518,7 +1518,7 @@ mail_reply( return; } - + if(!(HAS_PERM(PERM_INTERNET))) return ; @@ -1870,7 +1870,7 @@ multi_send( strcpy(mhdr.title, title); mhdr.xmode = MAIL_MULTI; rec_add(buf, &mhdr, sizeof(HDR)); - forward_mail(fpath, userid, title); + forward_mail(fpath, userid, title); m_biff(cacct.userno); } while ((wp = wp->next)); @@ -2034,7 +2034,7 @@ hdr_outs( /* print HDR's subject */ mark = title + cc; cc = ' '; - + if(hdr->xmode & POST_LOCK && !HAS_PERM(PERM_SYSOP)) { outs(" ¦¹¤å³¹¤w¥[±KÂê©w¡I\033[m"); @@ -2146,7 +2146,7 @@ mbox_body( int num, max, tail; max = xo->max; - + if (max <= 0) { vmsg("±z¨S¦³¨Ó«H"); @@ -2229,7 +2229,7 @@ mbox_delete( { return mbox_load(xo); } -#else +#else if (!rec_del(dir, sizeof(HDR), pos, cmpchrono, NULL)) { hdr_fpath(fpath, dir, hdr); @@ -2408,7 +2408,7 @@ mbox_reply( pos = xo->pos; mhdr = (HDR *) xo_pool + pos - xo->top; memcpy(&hdr,mhdr,sizeof(HDR)); - mhdr = &hdr; + mhdr = &hdr; xmode = mhdr->xmode; if (xmode & MAIL_NOREPLY) @@ -2498,10 +2498,10 @@ static int mbox_other( XO *xo) { - + ACCT acct; - char path[80]; - + char path[80]; + if(!supervisor) return XO_NONE; @@ -2509,21 +2509,21 @@ mbox_other( { XO *xx; - //str_lower(id, acct.userid); + //str_lower(id, acct.userid); //sprintf(path,"usr/%c/%s/.DIR",*id,id); - + usr_fpath(path, acct.userid, fn_dir); usr_fpath(cmbox.dir, acct.userid, fn_dir); - + xz[XZ_MBOX - XO_ZONE].xo = xx = xo_new(path); xover(XZ_MBOX); free(xx); - + usr_fpath(cmbox.dir, cuser.userid, fn_dir); xz[XZ_MBOX - XO_ZONE].xo = xo; mbox_init(xo); - + } return XO_HEAD; } @@ -2543,7 +2543,7 @@ mail_stat( int limit_e,total_e; int limit_k,total_k; char buf[128]; - + limit_e = cuser.userlevel; if (limit_e & (PERM_SYSOP | PERM_MBOX)) limit_e = MAX_BBSMAIL; @@ -2551,14 +2551,14 @@ mail_stat( limit_e = MAX_VALIDMAIL; else limit_e = limit_e & PERM_VALID ? MAX_VALIDMAIL : MAX_NOVALIDMAIL; - + limit_k = cuser.userlevel; if (limit_k & (PERM_SYSOP | PERM_MBOX)) limit_k = MAX_MAIL_SIZE; else if (mode & CHK_MAIL_VALID) limit_k = MAIL_SIZE; else - limit_k = limit_k & PERM_VALID ? MAIL_SIZE : MAIL_SIZE_NO; + limit_k = limit_k & PERM_VALID ? MAIL_SIZE : MAIL_SIZE_NO; usr_fpath(buf, cuser.userid, fn_dir); total_e = rec_num(buf, sizeof(HDR)); @@ -2593,7 +2593,7 @@ mbox_edit( hdr_fpath(fpath, xo->dir, hdr); if (cuser.userlevel & PERM_SYSOP) { - vedit(fpath, NA); + vedit(fpath, NA); return mbox_head(xo); } return XO_NONE; @@ -2643,7 +2643,7 @@ mbox_title( XO *xo) { HDR *hdr,mhdr; - + if(!supervisor) return XO_NONE; @@ -2761,12 +2761,12 @@ static KeyFunc mbox_cb[] = {'m', mbox_mark}, #ifdef HAVE_MAILGEM {'z', mbox_gem}, -#endif +#endif {'R', mbox_reply}, {'y', mbox_reply}, {'c', mbox_stat}, #ifdef HAVE_MAILUNDELETE - {'U', mbox_clean}, + {'U', mbox_clean}, {'u', mbox_undelete}, #endif diff --git a/maple/menu.c b/maple/menu.c index 1f4f9f50e..ddbc0889a 100644 --- a/maple/menu.c +++ b/maple/menu.c @@ -80,7 +80,7 @@ yesterday(void) return 0; } -static int +static int day(void) { more("gem/@/@-day", 0); @@ -226,13 +226,13 @@ pad_draw(void) sprintf(str, "\033[1;37;46m£W\033[34;47m %s \033[33m(%s)", cuser.userid, cuser.username); len = strlen(str); strcat(str, " \033[30;46m" + (len & 1)); - + for (i = len >> 1; i < 41; i++) - strcat(str,"¢e"); + strcat(str,"¢e"); sprintf(str2, "\033[34;47m %.14s \033[37;46m£W\033[m\n%-70.70s\n%-70.70s\n%-70.70s\n", Etime(&(pad.tpad)), buf[0], buf[1], buf[2]); strcat(str, str2); - + f_cat(FN_NOTE_ALL, str); if (!(fpw = fopen(FN_NOTE_TMP, "w"))) @@ -276,12 +276,12 @@ goodbye(void) } else ans = vans("G)¦A§O" NICKNAME " M)³ø§i¯¸ªø N)¯d¨¥ªO Q)¨ú®ø¡H[Q] "); - + switch (ans) { case 'g': case 'y': - break; + break; case 'm': mail_sysop(); @@ -302,7 +302,7 @@ goodbye(void) #ifdef LOG_BMW /*bmw_save();*/ /* lkchu.981201: ¼ö°T°O¿ý³B²z */ #endif - + clear(); prints(" \033[1;31m ¡´ \033[1;36m ¢z¢w¢{¢z¢w¢{¢z¢w¢{¢z¢w¢¡ ¢z¢w¢¡¢z¢¡¢{¢z¢w¢{\n" " \033[1;31m¡´\033[1;37m¡³\033[1;33m¡´\033[1;37m¢¤¢¤¢¤\033[1;36m¢x ¢s¢x ¢x¢x ¢x¢x ¢x ¢x ¢¤ ¢| ¢}¢x¢¤¢§\033[1;37m¢¤¢¤¢¤¢¤\n" @@ -331,7 +331,7 @@ vs_head( unsigned int ufo; #ifdef COLOR_HEADER /* int color = (time(0) % 7) + 41; lkchu.981201: random color */ - int color = 44; //090911.cache: ¤Óªá¤F©T©w¤@ºØÃC¦â + int color = 44; //090911.cache: ¤Óªá¤F©T©w¤@ºØÃC¦â #endif #if 1 char *newyear[6]={ BOARDNAME "¯¬¤j®a·s¦~§Ö¼Ö ", @@ -369,12 +369,12 @@ vs_head( { if (ufo & UFO_BIFF) { - mid = NEWMAILMSG; // §A¦³·s±¡®Ñ + mid = NEWMAILMSG; // §A¦³·s±¡®Ñ spc = 15; } - else if (ufo & UFO_BIFFN) + else if (ufo & UFO_BIFFN) { - mid = NEWPASSMSG; // §A¦³·s¯d¨¥ + mid = NEWPASSMSG; // §A¦³·s¯d¨¥ spc = 15; } #if 1 @@ -397,12 +397,12 @@ vs_head( sec = now % 60; sprintf(ttl,"¶Z 2006 ¦~ÁÙ³Ñ %02d ®É %02d ¤À %02d ¬í",hour,min,sec); spc = strlen(ttl); - mid = ttl; + mid = ttl; mid[spc] = '\0'; } } -#endif +#endif #if 0 else if(aprilfirst) { @@ -422,13 +422,13 @@ vs_head( } spc = 67 - strlen(title) - spc - strlen(currboard); - + if(spc < 0) { mid[strlen(mid)+spc]= '\0'; spc = 0; } - + ufo = 1 - (spc & 1); memset(buf, ' ', spc >>= 1); buf[spc] = '\0'; @@ -473,7 +473,7 @@ movie(void) tag = film_out(tag, 2); } - + /* Thor: ¦P®É Åã¥Ü ©I¥s¾¹ ¦n¤Í¤W¯¸ Áô¨­ */ @@ -575,7 +575,7 @@ static MENU menu_boardadm[] = {"bin/adminutil.so:mail_to_all", PERM_SYSOP, - M_XMODE, "Alluser ¨t²Î³q§i"}, - + "bin/personal.so:personal_admin", PERM_BOARD|PERM_SYSOP, - M_XMODE, "Personal ­Ó¤HªO¼f®Ö", @@ -608,7 +608,7 @@ static MENU menu_accadm[] = {"bin/observe.so:Observe_list", PERM_SYSOP|PERM_BOARD, - M_XMODE, "2Observe ¨t²ÎÆ[¹î¦W³æ"}, #endif - + {menu_admin, PERM_MENU + 'U', M_XMENU, "µù¥UÁ`ºÞ"} }; @@ -618,7 +618,7 @@ static MENU menu_settingadm[] = {"bin/adminutil.so:m_xfile", PERM_SYSOP, - M_XFILES, "File ½s¿è¨t²ÎÀÉ®×"}, - + {"bin/adminutil.so:m_xhlp", PERM_SYSOP, - M_XFILES, "Hlp ½s¿è»¡©úÀÉ®×"}, @@ -630,13 +630,13 @@ static MENU menu_settingadm[] = {"bin/violate.so:Violate",PERM_SYSOP,- M_XMODE, "Violate ³B»@¦W³æ"}, - + {"bin/adminutil.so:special_search",PERM_SYSOP, - M_XMODE, "XSpecial ¯S®í·j´M"}, {"bin/adminutil.so:update_all",PERM_SYSOP, - M_XMODE, - "Database ¨t²Î¸ê®Æ®w§ó·s"}, - + "Database ¨t²Î¸ê®Æ®w§ó·s"}, + {menu_admin, PERM_MENU + 'X', M_XMENU, "¨t²Î¸ê®Æ"} }; @@ -760,15 +760,15 @@ static MENU menu_mail[] = {m_zip, PERM_VALID, M_XMODE, "Zip ¥´¥]¤U¸ü­Ó¤H¸ê®Æ"}, #endif -/* +/* #ifdef HAVE_SIGNED_MAIL {m_verify, PERM_VALID, M_XMODE, "Verify ÅçÃÒ«H¥ó¹q¤lñ³¹"}, #endif -*/ +*/ {mail_sysop, PERM_BASIC, M_SMAIL, "Yes Sir! ±H«Hµ¹¯¸ªø"}, - + {menu_main, PERM_MENU + 'R', M_MMENU, /* itoc.020829: ©È guest ¨S¿ï¶µ */ "¹q¤l¶l¥ó"} }; @@ -834,7 +834,7 @@ static MENU menu_talk[] = /* System menu */ /* ----------------------------------------------------- */ -static MENU menu_information[] = +static MENU menu_information[] = { {popmax, 0 , M_READA, @@ -891,7 +891,7 @@ static MENU menu_xyz[] = /* User menu */ /* ----------------------------------------------------- */ -static MENU menu_reg[] = +static MENU menu_reg[] = { {u_info, PERM_BASIC, M_XMODE, @@ -992,7 +992,7 @@ static MENU menu_special[] = { {"bin/personal.so:personal_apply",PERM_VALID, - M_XMODE, - "PBApply ¥Ó½Ð­Ó¤H¬ÝªO"}, + "PBApply ¥Ó½Ð­Ó¤H¬ÝªO"}, {"bin/bank.so:bank_main", PERM_VALID, - M_XMODE, "Bank ¡@»È¦æ"}, @@ -1058,13 +1058,13 @@ static MENU menu_service[] = INFO_EMPTY}, #endif -#ifdef HAVE_STUDENT +#ifdef HAVE_STUDENT {Student, 0, M_BOARD, STUDENT_EMPTY}, #endif /* 091007.cache: ©Ô¤HÄé²¼¨S·N¸q... */ - + {"bin/newboard.so:XoNewBoard", PERM_VALID, - M_XMODE, "Cosign ¡i ³s¸p¥Ó½Ð°Ï ¡j"}, @@ -1088,7 +1088,7 @@ static MENU menu_service[] = /* main menu */ /* ----------------------------------------------------- */ -#ifdef HAVE_CHANGE_SKIN +#ifdef HAVE_CHANGE_SKIN static int sk_windtop_init(void) { @@ -1157,7 +1157,7 @@ static MENU menu_main[] = {menu_xyz, 0, M_SMENU, "Xyz ¡i ¨t²Î¸ê°T°Ï ¡j"}, -#ifdef HAVE_CHANGE_SKIN +#ifdef HAVE_CHANGE_SKIN {skin_main, PERM_SYSOP,M_XMENU, "2Skin ¡i ¿ï¾Ü¤¶­±°Ï ¡j"}, #endif @@ -1178,7 +1178,7 @@ goodbye1(void) case 'g': case 'y': return 12345; - break; + break; case 'q': default: @@ -1235,10 +1235,10 @@ check_info(char *input) { #if defined(HAVE_INFO) || defined(HAVE_STUDENT) BRD *brd; -#endif +#endif char *name = NULL; name = input; -#ifdef HAVE_INFO +#ifdef HAVE_INFO if(!strcmp(input,INFO_EMPTY)) { brd = bshm->bcache + brd_bno(BRD_BULLETIN); @@ -1249,7 +1249,7 @@ check_info(char *input) name = INFO_HAVE; } } -#endif +#endif #ifdef HAVE_STUDENT if(!strcmp(input,STUDENT_EMPTY)) { @@ -1284,11 +1284,11 @@ menu(void) menu = menu_main; #endif depth = mmx = 0; - + for (;;) { level = cuser.userlevel; - + if (mode & MENU_LOAD) { for (max = -1;; menu++) @@ -1328,7 +1328,7 @@ menu(void) cmd = cc ^ PERM_MENU; /* default command */ utmp_mode(menu->umode); } - + if (mode & MENU_DRAW) { if (mode & MENU_FILM) @@ -1340,10 +1340,10 @@ menu(void) //prints("\n\033[30;47m ¿ï¶µ ¿ï¶µ»¡©ú °ÊºA¬ÝªO \033[m\n"); mode = 0; count = 0; - while(count<20) + while(count<20) item_length[count++] = 0; do - { + { move(MENU_YPOS + mode, MENU_XPOS + 2); if (mode <= max) { @@ -1362,14 +1362,14 @@ menu(void) if(refilm) { movie(); - cx = -1; + cx = -1; refilm = 0; } mmx = max; mode = 0; } - + switch (cmd) { case KEY_PGUP: @@ -1379,11 +1379,11 @@ menu(void) case KEY_PGDN: cc = (cc == max) ? 0 : max; break; - + case KEY_DOWN: if (++cc <= max) break; - + case KEY_HOME: cc = 0; break; @@ -1475,7 +1475,7 @@ menu(void) every_Z(); /* Thor: ctrl-Z everywhere */ goto menu_key; #endif - case Ctrl('U'): + case Ctrl('U'): every_U(); break; case Ctrl('B'): @@ -1483,7 +1483,7 @@ menu(void) break; case Ctrl('S'): every_S(); - break; + break; case 's': every_S(); break; @@ -1517,7 +1517,7 @@ menu(void) } } } - + if (cc != cx) { if (cx >= 0) diff --git a/maple/more.c b/maple/more.c index c66477113..cb3e33cd9 100644 --- a/maple/more.c +++ b/maple/more.c @@ -291,13 +291,13 @@ static void if ((ptr = strstr(word, str_post1)) || (ptr = strstr(word, str_post2))) { ptr[-1] = ptr[4] = '\0'; - prints(COLOR5 " %s " COLOR6 "%-*.*s" COLOR5 " %s " COLOR6 "%-13s\033[m", + prints(COLOR5 " %s " COLOR6 "%-*.*s" COLOR5 " %s " COLOR6 "%-13s\033[m", header1[0], d_cols + 53, d_cols + 53, word, ptr, ptr + 5); } else { /* ¤Ö¬ÝªO³oÄæ */ - prints(COLOR5 " %s " COLOR6 "%-*.*s\033[m", + prints(COLOR5 " %s " COLOR6 "%-*.*s\033[m", header1[0], d_cols + 72, d_cols + 72, word); } return; @@ -310,7 +310,7 @@ static void { /* ¨ä¥LÀÉÀY³£¥u¦³¤@Äæ */ word = str + header_len; - prints(COLOR5 " %s " COLOR6 "%-*.*s\033[m", + prints(COLOR5 " %s " COLOR6 "%-*.*s\033[m", header1[i], d_cols + 72, d_cols + 72, word); return; } @@ -365,7 +365,7 @@ more_slideshow(void) ch = KEY_PGDN; } - } + } else { struct timeval tv[9] = @@ -446,7 +446,7 @@ more( /* Ū¥XÀɮײĤ@¦C¡A¨Ó§PÂ_¯¸¤º«HÁÙ¬O¯¸¥~«H */ if (i == 0) { - header_len = + header_len = !memcmp(buf, str_author1, LEN_AUTHOR1) ? LEN_AUTHOR1 : /* ¡u§@ªÌ:¡vªí¯¸¤º¤å³¹ */ !memcmp(buf, str_author2, LEN_AUTHOR2) ? LEN_AUTHOR2 : /* ¡uµo«H¤H:¡vªíÂà«H¤å³¹ */ 0; /* ¨S¦³ÀÉÀY */ @@ -782,7 +782,7 @@ more( for (i = lino - b_lines - i; i > 0; i--) more_line(buf); - for (i = shift; i < 0; i++) + for (i = shift; i < 0; i++) { rscroll(); move(0, 0); @@ -817,7 +817,7 @@ more( free(fimage); -#endif // M3_USE_PMORE +#endif // M3_USE_PMORE if (!cmd) /* ÀÉ®×¥¿±`¨q§¹¡A­n³B²z footer */ { @@ -838,9 +838,9 @@ more( { FILE *fp; - if (fp = tbf_open()) + if (fp = tbf_open()) { - f_suck(fp, fpath); + f_suck(fp, fpath); fclose(fp); } } diff --git a/maple/myfavorite.c b/maple/myfavorite.c index 10314185a..a56266839 100644 --- a/maple/myfavorite.c +++ b/maple/myfavorite.c @@ -49,19 +49,19 @@ myfavorite_item( BRD *brd; char str[20],buf[10],*bits,*str2,buf2[20],brdtype; int chn,brdnew, bno; - + chn = myfavorite->recommend; brd = bshm->bcache + chn; - + brh_get(brd->bstamp, chn); - + // if(cuser.ufo2 & UFO2_ENHANCE) // sprintf(str,"%c\033[1;32m%c\033[m",(brd->readlevel & PERM_SYSOP) ? ')' : ' ',brd->blast > brd_visit[chn] ? '+' : ' '); // else // sprintf(str,"%c\033[1;32m%c\033[m",(brd->readlevel & PERM_SYSOP) ? ')' : ' ',brh_unread(brd->blast) ? '+' : ' '); brdnew = cuser.ufo2 & UFO2_BRDNEW; bits = brd_bits; - + sprintf(buf,"%d;3%d",brd->color/10,brd->color%10); if (!brdnew) @@ -97,9 +97,9 @@ myfavorite_item( close(fd); } - + } - + else { int fd, fsize; @@ -133,17 +133,17 @@ myfavorite_item( close(fd); } - num = brd->bpost; + num = brd->bpost; } - sprintf(str,"%s",brd->blast > brd_visit[chn] ? "\033[1;31m¡¹\033[m" : "¡¸"); + sprintf(str,"%s",brd->blast > brd_visit[chn] ? "\033[1;31m¡¹\033[m" : "¡¸"); /* 081122.cache:¬ÝªO©Ê½è,¤£­q¾\,¯µ±K,¦n¤Í,¤@¯ë */ if(bits[chn] & BRD_Z_BIT) brdtype = '-'; #ifdef HAVE_MODERATED_BOARD else if(brd->readlevel & PERM_BOARD) - brdtype = '.'; + brdtype = '.'; else if(brd->readlevel & PERM_SYSOP) brdtype = ')'; #endif @@ -193,12 +193,12 @@ myfavorite_item( //sprintf(buf,"%d;3%d",brd->color/10,brd->color%10); prints("%6d%s%c%-13s\033[%sm%-4s \033[m%-33.32s%s%.13s\n", num, str, - brdtype,brd->brdname, buf, brd->class, brd->title, brd->bvote ? "\033[1;33m §ë\033[m " : str2, brd->BM); - + brdtype,brd->brdname, buf, brd->class, brd->title, brd->bvote ? "\033[1;33m §ë\033[m " : str2, brd->BM); + //prints("%6d%s%c%-13s\033[%sm%-4s \033[m%-36.36s%c %.13s\n", num, str, //bits[chn] & BRD_Z_BIT ? '-' : ' ',brd->brdname, //buf,brd->class, brd->title, brd->bvote ? 'V' : ' ', brd->BM); - + } } else if(myfavorite->xmode & GEM_GOPHER) @@ -235,7 +235,7 @@ myfavorite_body( tail = num + XO_TALL; if (max > tail) max = tail; - + do { myfavorite_item(++num, myfavorite++); @@ -298,12 +298,12 @@ myfavorite_browse( HDR *ghdr; int xmode,op=0,chn; char fpath[80], title[TTLEN + 1]; - + ghdr = (HDR *) xo_pool + (xo->pos - xo->top); xmode = ghdr->xmode; /* browse folder */ - + if( xmode & GEM_HTTP) return XO_NONE; @@ -316,7 +316,7 @@ myfavorite_browse( if(ok == 1) { xover(XZ_POST); - time(&brd_visit[chn]); + time(&brd_visit[chn]); } } else if(xmode & GEM_GOPHER) @@ -334,7 +334,7 @@ myfavorite_browse( else { char buf[20]; - + op = xo->key; sprintf(buf,"MF/%s",ghdr->xname); @@ -353,7 +353,7 @@ myfavorite_find_same( { int max,i; HDR hdr; - + max = rec_num(dir,sizeof(HDR)); for(i=0;ipos + (ans == 'n'), 1); else rec_add(currdir, &hdr, sizeof(HDR)); - + logitfile(FN_FAVORITE_LOG,"< ADD >",hdr.xname); return myfavorite_load(xo); @@ -482,19 +482,19 @@ myfavorite_delete( if (vans(msg_del_ny) == 'y') { HDR *hdr; - + hdr = (HDR *) xo_pool + (xo->pos - xo->top); - + if(hdr->xmode & GEM_FOLDER) { char buf[20]; char fpath[64]; - + sprintf(buf,"MF/%s",hdr->xname); usr_fpath(fpath,cuser.userid,buf); remove_dir(fpath); } - + if (!rec_del(currdir, sizeof(HDR), xo->pos, NULL, NULL)) { logitfile(FN_FAVORITE_LOG,"< DEL >",hdr->xname); @@ -545,7 +545,7 @@ myfavorite_edit( XO *xo) { HDR *hdr; - + if(!HAS_PERM(PERM_VALID)) return XO_NONE; hdr = (HDR *) xo_pool + (xo->pos - xo->top); @@ -562,7 +562,7 @@ myfavorite_edit( brd_edit(chn); return myfavorite_init(xo); } - + } else if(hdr->xmode & GEM_FOLDER) { @@ -572,7 +572,7 @@ myfavorite_edit( return myfavorite_load(xo); } return XO_NONE; - + } @@ -615,13 +615,13 @@ myfavorite_search( pos = 0; hdr = (HDR *) xo_pool + (pos - xo->top); - + if(hdr->xmode & GEM_BOARD) { chn = hdr->recommend; brd = bshm->bcache + chn; //vmsg(ptr); - + if(strstr(brd->brdname, ptr) || strstr(brd->title, ptr)) return pos + XO_MOVE; } @@ -678,7 +678,7 @@ XoFavorite( last = xz[XZ_MYFAVORITE - XO_ZONE].xo; /* record */ strcpy(old,currdir); - + strcpy(currdir,folder); xz[XZ_MYFAVORITE - XO_ZONE].xo = xo = xo_new(folder); @@ -689,7 +689,7 @@ XoFavorite( xover(XZ_MYFAVORITE); free(xo); - + strcpy(currdir,old); xz[XZ_MYFAVORITE - XO_ZONE].xo = last; /* restore */ @@ -710,17 +710,17 @@ MyFavorite(void) return XO_HEAD; } -int +int myfavorite_find_chn( char *brdname) { BRD *bp; int max,i; // char *userid,bm[40]; - + bp = bshm->bcache; max = bshm->number; - + for(i=0;ibrdname,brdname)) @@ -736,7 +736,7 @@ myfavorite_find_chn( return i; } while(userid = (char *) strtok(NULL,"/")); } - else + else */ if(HAS_PERM(PERM_SYSOP) || HAS_PERM(PERM_ALLBOARD) /* || !(bp->readlevel & PERM_SYSOP) || bm_belong(brdname) & BRD_R_BIT || (bp->battr & BRD_FRIEND) */ || (Ben_Perm(bp, cuser.userlevel) & (BRD_R_BIT|BRD_F_BIT|BRD_X_BIT))) return i; @@ -744,7 +744,7 @@ myfavorite_find_chn( break; } } - + return -1; } @@ -757,10 +757,10 @@ myfavorite_parse( HDR hdr; sprintf(buf,"MF/%s",fpath); - + usr_fpath(fpath,cuser.userid,buf); max = rec_num(fpath,sizeof(HDR)); - + for(i=0;ixyz + xo->pos; chn = *chp; if(chn < 0) @@ -841,11 +841,11 @@ class_add( memset(&hdr,0,sizeof(HDR)); brd2myfavorite(brd,&hdr); - + rec_add(fpath,&hdr,sizeof(HDR)); logitfile(FN_FAVORITE_LOG,"< ADD >",hdr.xname); vmsg("¤w¥[¤J§Úªº³Ì·R"); - + return XO_FOOT; } diff --git a/maple/pmore.c b/maple/pmore.c index 6a4765593..3aab325af 100644 --- a/maple/pmore.c +++ b/maple/pmore.c @@ -420,7 +420,7 @@ static int debug = 0; #define ANSI_RESET ESC_STR "[m" #define ANSI_COLOR(x) ESC_STR "[" #x "m" //#define ANSI_CLRTOEND ESC_STR "[K" /* cache.080920 (by hpo14's fix): M3 is not support [K, it might be dangerous */ -#define ANSI_CLRTOEND "" +#define ANSI_CLRTOEND "" #define ANSI_MOVETO(y,x) ESC_STR "[" #y ";" #x "H" #define ANSI_REVERSE ANSI_COLOR(7) @@ -2460,8 +2460,8 @@ _pmore2( outs(ANSI_RESET ANSI_COLOR(1;33;44)); w -= strlen(s); outs(s); - while (w-- > 0) - outc(' '); + while (w-- > 0) + outc(' '); outs(ANSI_RESET ANSI_CLRTOEND); w = tolower(vkey()); diff --git a/maple/popupmenu.c b/maple/popupmenu.c index d55c56471..ac714bde0 100644 --- a/maple/popupmenu.c +++ b/maple/popupmenu.c @@ -19,7 +19,7 @@ static int do_menu(MENU pmenu[],XO *xo,int x,int y); /* 0 ¥Nªí¤£¬O¤¤¤å¦r */ /* ----------------------------------------- */ -static int +static int is_big5(char *src,int pos,int mode) { int wstate=0; @@ -42,7 +42,7 @@ is_big5(char *src,int pos,int mode) wstate = (*str<0)?((wstate==1)?0:1):0; word++; } - + if(wstate) return -1; @@ -52,7 +52,7 @@ is_big5(char *src,int pos,int mode) return 0; } -static int +static int do_cmd(MENU *mptr,XO *xo,int x,int y) { unsigned int mode; @@ -63,7 +63,7 @@ do_cmd(MENU *mptr,XO *xo,int x,int y) if(mptr->umode < 0) { p = DL_get(mptr->func); - if(!p) + if(!p) return 0; mptr->func = p; mptr->umode = - (mptr->umode); @@ -92,12 +92,12 @@ do_cmd(MENU *mptr,XO *xo,int x,int y) mode = (*func) (); return -1; } - + return -1; } /* verit . ­pºâ¦©±¼¦â½Xªº¹ê»Úªø«× */ -static int +static int count_len( char *data) { @@ -126,10 +126,10 @@ get_color(char *s,int len,int *fc,int *bc,int *bbc) char buf[32],*p,*e; int color; int state = 0,reset=0,exit = 0; - + memset(buf,0,sizeof(buf)); strncpy(buf,s+2,len-1); - + for( p = e = &buf[0] ; exit == 0 ; ++p) { if(*p == ';' || *p == 'm') @@ -137,9 +137,9 @@ get_color(char *s,int len,int *fc,int *bc,int *bbc) if(*p == 'm') exit = 1; *p = 0; - + color = atoi(e); - + if(color == 0) { *bbc = 0; @@ -163,7 +163,7 @@ get_color(char *s,int len,int *fc,int *bc,int *bbc) e = p+1; } } - + if(reset == 1) { if(!(state & 0x4)) @@ -173,14 +173,14 @@ get_color(char *s,int len,int *fc,int *bc,int *bbc) if(!(state & 0x1)) *bbc = 0; } - + if(state == 0) { *bc = 40; *fc = 37; *bbc = 0; } - + } static void @@ -189,12 +189,12 @@ vs_line(char *msg,int x,int y) char buf[512],color[16],*str,*tmp,*cstr; int len = count_len(msg); int word,slen,fc=37,bc=40,bbc=0; - + memset(buf,0,sizeof(buf)); - + sl[x].data[sl[x].len] = '\0'; str = tmp = sl[x].data; - + for(word=0;word0) buf[slen] = ' '; - + strcat(buf,msg); - + if(*str) { for(word=0;wordmateid,pmenu[tmp].func); utmp_mode(M_IDLE); } - + title = pmenu[tmp].desc; table_title = &pmenu[tmp]; - /* verit . °²¦p¨S¦³¥ô¦ó¿ï¶µ´N return */ + /* verit . °²¦p¨S¦³¥ô¦ó¿ï¶µ´N return */ if(num < 0) return 1; - - cur = old_cur = 0; - + + cur = old_cur = 0; + /* ¸õ¨ì¹w³]¿ï¶µ */ for( tmp=0; tmp<= num ; tmp++ ) { @@ -334,8 +334,8 @@ do_menu( break; } } - - + + draw_menu(table,num+1,title,x,y,cur); while(1) /* verit . user ¿ï¾Ü */ @@ -394,7 +394,7 @@ do_menu( draw_item(table[cur]->desc,1,x+cur,y); } } - + return 0; } @@ -416,14 +416,14 @@ draw_ans_item( } -static int +static int draw_menu_des(char *desc[],char *title,int x,int y,int cur) { int num; char buf[128]; char hotkey; hotkey = desc[0][0]; - + sprintf(buf," \033[0;40;37m¡Å¡Å¡Å¡Å¡Å¡Å¡Å¡Å¡Å¡Å¡Å¡Å¡Å¡Å¡Å¡Å¡Å¡Å\033[m "); vs_line(buf,x-2,y); sprintf(buf," \033[0;37;44m¢j%-31s \033[0;47;34m¢p\033[m ",title); @@ -449,7 +449,7 @@ popupmenu_ans(char *desc[],char *title,int x,int y) char t[64]; char hotkey; hotkey = desc[0][0]; - + vs_save(sl); sprintf(t,"¡i%s¡j",title); num = draw_menu_des(desc,t,x,y,0); @@ -509,7 +509,7 @@ popupmenu_ans(char *desc[],char *title,int x,int y) void popupmenu(MENU pmenu[],XO *xo,int x,int y) { - + vs_save(sl); do_menu(pmenu,xo,x,y); vs_restore(sl); @@ -518,10 +518,10 @@ popupmenu(MENU pmenu[],XO *xo,int x,int y) static void pcopy(char *buf,char *patten,int len) { int i,size; - + *buf = '\0'; size = strlen(patten); - + for(i=1;i<=len;i++) { strcpy(buf,patten); @@ -534,13 +534,13 @@ int pmsg(char *msg) char buf[ANSILINELEN]; char patten[ANSILINELEN]; int len,plen,cc; - + if(cuser.ufo2 & UFO2_ORIGUI) return vmsg(msg); - + vs_save(sl); - + len = (msg ? strlen(msg) : 0 ); if(len > 30) { @@ -548,7 +548,7 @@ int pmsg(char *msg) } else plen = 0; - + if(len > 0) { pcopy(patten,"¡Å",plen); diff --git a/maple/post.c b/maple/post.c index 001d11e9a..2d65c442f 100644 --- a/maple/post.c +++ b/maple/post.c @@ -56,7 +56,7 @@ zhangba_detect( { while(fgets(buf,sizeof(buf),fp)) for(i=0 ; i < ZHANGBA_PATTERNS ; i++) - if(strstr(buf, zhangba_patterns[i]) && (checked[i] != '1')) + if(strstr(buf, zhangba_patterns[i]) && (checked[i] != '1')) { checked[i] = '1'; num++; @@ -105,7 +105,7 @@ checksum_add( int sum=0,i,end; int *ptr; ptr = (int *)title; - end = strlen(title)/4; + end = strlen(title)/4; for(i=0;ifwcache; + head = fwshm->fwcache; tail = head + fwshm->number; while(fwshm->number && headbattr & BRD_NOREPLY) { - if (!HAS_PERM(PERM_ADMIN)) + if (!HAS_PERM(PERM_ADMIN)) { vmsg("¹ï¤£°_¡A¥»¬ÝªO¥Ø«e¸T¤îµoªí¤å³¹¡C"); return XO_FOOT; } - else - vmsg("½Ðª`·N¡A¥»¬ÝªO¥Ø«e¬O°ßŪª¬ºA¡C"); + else + vmsg("½Ðª`·N¡A¥»¬ÝªO¥Ø«e¬O°ßŪª¬ºA¡C"); } if (!(bbstate & STAT_POST)) @@ -419,7 +419,7 @@ do_post( sprintf(msg, "¦H¤å %d ½g(§t)¥H¤U¡A¤è¥i¦b¦¹¬ÝªOµoªí¤å³¹", th.point2); vmsg(msg); return XO_FOOT; - } + } } } @@ -458,7 +458,7 @@ do_post( utmp_mode(M_POST); fpath[0] = 0; time(&spendtime); - + if (vedit(fpath, YEA) < 0) { unlink(fpath); @@ -527,7 +527,7 @@ do_post( post.modifytimes = 0; post.pushtime = 0; post.recommend = 0; - strcpy(post.lastrecommend,cuser.userid); + strcpy(post.lastrecommend,cuser.userid); #ifdef HAVE_DETECT_CROSSPOST if(crosspost) @@ -554,18 +554,18 @@ do_post( } #endif -#ifdef HAVE_DETECT_VIOLATELAW +#ifdef HAVE_DETECT_VIOLATELAW if(banpost) { move_post(&post, BRD_BANPOSTLOG, -1); - } + } #endif -#ifdef HAVE_OBSERVE_LIST +#ifdef HAVE_OBSERVE_LIST if(observeshm_find(cuser.userno)) { move_post(&post, BRD_OBSERVE, -1); - } + } #endif move_post(&post,BRD_LOCALPOSTS,-3); @@ -580,7 +580,7 @@ do_post( if (mode && !banpost) #else if (mode) -#endif +#endif outgo_post(&post, currboard); clear(); @@ -602,7 +602,7 @@ do_post( pmsg2(buf); brd->blast = time(0); } - else + else { mode = BMIN(keysnum, spendtime) / 10; /* ¨C¤Q¦r/¬í ¤@¤¸ */ sprintf(buf, "³o¬O±zªº²Ä %d ½g¤å³¹¡AÀò±o %d ¹Ú¹ô¡C", ++cuser.numposts, mode); @@ -642,7 +642,7 @@ do_post( unlink(fpath); //vmsg(NULL); -#ifdef HAVE_DETECT_CROSSPOST +#ifdef HAVE_DETECT_CROSSPOST if(crosspost) remove_perm(); #endif @@ -676,7 +676,7 @@ do_reply( if((bbstate & BRD_NOREPLY) && !HAS_PERM(PERM_SYSOP)) msg = "¡¶ ¦^À³¦Ü (M)§@ªÌ«H½c (Q)¨ú®ø¡H[Q] "; else - msg = "¡¶ ¦^À³¦Ü (F)¬ÝªO (M)§@ªÌ«H½c (B)¤GªÌ¬Ò¬O (Q)¨ú®ø¡H[F] "; + msg = "¡¶ ¦^À³¦Ü (F)¬ÝªO (M)§@ªÌ«H½c (B)¤GªÌ¬Ò¬O (Q)¨ú®ø¡H[F] "; switch (vans(msg)) @@ -845,9 +845,9 @@ post_attr( return (brh_unread(BMAX(fhdr->chrono, fhdr->stamp)) ? 0 : 0x20 ) | 'E'; if (mode & POST_LOCK) - return 'L'; + return 'L'; - if(mode & POST_COMPLETE) + if(mode & POST_COMPLETE) return (brh_unread(BMAX(fhdr->chrono, fhdr->stamp)) ? 0 : 0x20 ) | 'S'; attr = brh_unread(BMAX(fhdr->chrono, fhdr->stamp)) ? 0 : 0x20; @@ -940,7 +940,7 @@ post_body( if (bbstate & STAT_POST) { if (vans("­n·s¼W¸ê®Æ¶Ü¡H(Y/N) [N] ") == 'y') - return post_add(xo); + return post_add(xo); } else { @@ -1059,10 +1059,10 @@ post_cross( HDR *hdr, xpost, xhdr; int method, rc, tag, locus, battr; FILE *xfp; -#ifdef HAVE_DETECT_CROSSPOST +#ifdef HAVE_DETECT_CROSSPOST HDR bhdr; #endif -#ifdef HAVE_CROSSPOSTLOG +#ifdef HAVE_CROSSPOSTLOG char cbuf[128]; HDR chdr; #endif @@ -1145,7 +1145,7 @@ post_cross( locus = 0; dir = xo->dir; - battr = (bshm->bcache + brd_bno(xboard))->battr; + battr = (bshm->bcache + brd_bno(xboard))->battr; do /* lkchu.981201: ¾ã§åÂà¶K */ { @@ -1220,7 +1220,7 @@ post_cross( if (rc == 's' && (!(battr & BRD_NOTRAN))) xpost.xmode = POST_OUTGO; -#ifdef HAVE_DETECT_CROSSPOST +#ifdef HAVE_DETECT_CROSSPOST memcpy(&bhdr,hdr,sizeof(HDR)); strcpy(bhdr.owner,cuser.userid); if(checksum_find(fpath,0,battr)) @@ -1235,7 +1235,7 @@ post_cross( board_main(); } #endif -#ifdef HAVE_CROSSPOSTLOG +#ifdef HAVE_CROSSPOSTLOG if (hdr->xname[0] != '@') { memcpy(&chdr,hdr,sizeof(HDR)); @@ -1247,7 +1247,7 @@ post_cross( #endif rec_bot(xfolder, &xpost, sizeof(xpost)); -#ifdef HAVE_DETECT_VIOLATELAW +#ifdef HAVE_DETECT_VIOLATELAW if (rc == 's' && (!(battr & BRD_NOTRAN)) && (!(seek_log(xpost.title,battr)))) #else if (rc == 's' && !(battr & BRD_NOTRAN)) @@ -1261,7 +1261,7 @@ post_cross( time_t now; struct tm *ptime; char add[180], tgt[30]; - + time(&now); ptime = localtime(&now); sprintf(tgt, "Âà¿ý¦Ü %s ¬ÝªO", xboard); @@ -1394,18 +1394,18 @@ post_history( chrono = fhdr->chrono; push = fhdr->pushtime; - - + + if(brh_unread(push)) brh_add(push,push,push); - + if(!brh_unread(chrono)) //if( !brh_unread(push)) return; if (--pos >= top) { - prev = fhdr[-1].chrono; + prev = fhdr[-1].chrono; } else { @@ -1443,10 +1443,10 @@ post_history( time_t prev, chrono, next, this; HDR buf; - + if (hdr->xmode & POST_BOTTOM) /* ¸m©³¤å¤£¥[¤J¾\Ū°O¿ý */ return; - + chrono = BMAX(hdr->chrono, hdr->stamp); if (!brh_unread(chrono)) /* ¦pªG¤w¦b brh ¤¤¡A´NµL»Ý°Ê§@ */ @@ -1533,7 +1533,7 @@ post_browse( hdr_fpath(fpath, dir, hdr); - /* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È */ + /* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È */ // if((key = more(fpath, MSG_POST)) == -1) // break; @@ -1625,7 +1625,7 @@ post_memo( char fpath[64]; brd_fpath(fpath, currboard, FN_NOTE); - /* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È */ + /* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È */ if (more(fpath, NULL) == -1) { vmsg("¥»¬ÝªO©|µL¡u³Æ§Ñ¿ý¡v"); @@ -1888,9 +1888,9 @@ post_delete( { lazy_delete(fhdr); /* Thor.980911: µù¸Ñ: ­×§ï xo_pool */ move(3 + cur, 0); - post_item(++pos, fhdr); + post_item(++pos, fhdr); return XO_FOOT; - } + } if(by_BM/* && (bbstate & BRD_NOTRAN) && !(fhdr->xmode & POST_BOTTOM)*/) vget(b_lines,0,"½Ð¿é¤J§R°£²z¥Ñ¡G",delete_reason,29,DOECHO); @@ -1906,10 +1906,10 @@ post_delete( if(vans("¬O§_°h¦^¤å³¹¡H[y/N]") == 'y') { if(vans("¬O§_µ¹¤©¦H¤å¡H[y/N]") == 'y') - { + { addpoint2(1, fhdr->owner); pmsg2("¦H°h§¹²¦¡I"); - } + } FILE *fp; time_t now = time(0); @@ -1952,13 +1952,13 @@ post_delete( cuser.numposts--; sprintf(buf, "%s¡A±zªº¤å³¹´î¬° %d ½g", MSG_DEL_OK, cuser.numposts); vmsg(buf); -#ifdef HAVE_DETECT_CROSSPOST +#ifdef HAVE_DETECT_CROSSPOST checksum_find(fpath,1,bbstate); #endif } lazy_delete(fhdr); /* Thor.980911: µù¸Ñ: ­×§ï xo_pool */ move(3 + cur, 0); - post_item(++pos, fhdr); + post_item(++pos, fhdr); } } return XO_FOOT; @@ -2011,9 +2011,9 @@ post_bottom( hdr = (HDR *) xo_pool + (xo->pos - xo->top); //if ((hdr->xmode & POST_BOTTOM) && !HAVE_PERM(PERM_SYSOP)) /* ¤w¸m©³´N¤£¯à¦A¸m©³ */ - // return post_delete(xo); - - //TODO: ¦h¼Ë¤Æ¸m©³¥\¯à + // return post_delete(xo); + + //TODO: ¦h¼Ë¤Æ¸m©³¥\¯à hdr_fpath(fpath, xo->dir, hdr); hdr_stamp(xo->dir, HDR_LINK | 'A', &post, fpath); @@ -2088,7 +2088,7 @@ post_lock( return XO_NONE; } -/*cache.080520: ·sª©Æ[¬Ý¤å³¹ÄÝ©Ê*/ +/*cache.080520: ·sª©Æ[¬Ý¤å³¹ÄÝ©Ê*/ static int post_state( XO *xo) @@ -2111,14 +2111,14 @@ post_state( move(b_lines - 10, 0); clrtobot(); - prints("\033[1;34m"MSG_BLINE"\033[m"); + prints("\033[1;34m"MSG_BLINE"\033[m"); prints("\n\033[1;33;44m \033[37m¤å³¹¥N½X¤Î¸ê°T¬d¸ß¡G %*s \033[m", 55,""); outs("\n\n \033[1;37m¡¹\033[m ¤å³¹¯Á¤Þ: "); outs(dir); outs("\n \033[1;37m¡¹\033[m ¤å³¹¥N½X: #"); outs("\033[1;32m"); outs(ghdr->xname); - outs("\033[m"); + outs("\033[m"); outs("\n \033[1;37m¡¹\033[m ¦nŪ³sµ²: " URL_PREFIX "/"); outs(buf); outs("/"); @@ -2133,11 +2133,11 @@ post_state( k=1; else if (ghdr->chrono < ghdr->stamp ) k=2; - else if (ghdr->chrono = ghdr->stamp) + else if (ghdr->chrono = ghdr->stamp) k=3; else k=4; - + if (ghdr->stamp = ghdr->pushtime) l=1; else @@ -2151,13 +2151,13 @@ post_state( { vmsg("±zªºÅv­­¤£¨¬"); return XO_HEAD; - } + } else { move(b_lines - 8, 0); clrtobot(); - prints("\033[1;34m"MSG_BLINE"\033[m"); + prints("\033[1;34m"MSG_BLINE"\033[m"); prints("\n\033[1;33;44m \033[37m¤å³¹¥N½X¤Î¸ê°T¬d¸ß¡G %*s \033[m", 55,""); if(ghdr->xmode & (POST_EXPIRE | POST_MDELETE | POST_DELETE | POST_CANCEL | POST_LOCK | POST_CURMODIFY)) { @@ -2180,14 +2180,14 @@ post_state( if (!stat(fpath, &st)) prints("\n \033[1;37m¡¹\033[m ³Ì«á¦s¨ú: %s\n \033[1;37m¡¹\033[m Àɮפj¤p: \033[1;32m%d\033[m bytes", Ctime(&st.st_mtime), st.st_size); - } + } vmsg(NULL); return XO_HEAD; } -#if 0 +#if 0 static int post_state( XO *xo) @@ -2251,14 +2251,14 @@ post_undelete( return XO_NONE; - fp = fopen(fpath,"r"); + fp = fopen(fpath,"r"); if(fp) { fgets(buf, 256, fp); fgets(buf, 256, fp); buf[strlen(buf)-1] = 0; ptr = strchr(buf, ':'); - ptr = ptr ? ptr+2:buf; + ptr = ptr ? ptr+2:buf; strncpy(fhdr->title,ptr,60); if(!HAS_PERM(PERM_SYSOP)) { @@ -2282,12 +2282,12 @@ post_undelete( cuser.numposts++; sprintf(buf, "´_­ì§R°£¡A±zªº¤å³¹¼W¬° %d ½g", cuser.numposts); vmsg(buf);*/ /* 20000724 visor: ¦³¤å³¹½g¼Æªº bug */ -#ifdef HAVE_DETECT_CROSSPOST - checksum_find(fpath,0,bbstate); +#ifdef HAVE_DETECT_CROSSPOST + checksum_find(fpath,0,bbstate); #endif } -#endif - } +#endif + } fhdr->xmode &= (~(POST_MDELETE | POST_DELETE | POST_CANCEL)); if (!rec_put(xo->dir, fhdr, sizeof(HDR), pos)) { @@ -2326,7 +2326,7 @@ post_expire( hdr_fpath(fpath,xo->dir,fhdr); if (fhdr->xmode & POST_EXPIRE) - fhdr->xmode &= ~POST_EXPIRE; + fhdr->xmode &= ~POST_EXPIRE; else fhdr->xmode |= POST_EXPIRE; fhdr->expire = time(0) + 86400 * 7; @@ -2391,7 +2391,7 @@ post_edit( int fd; time_t now; FILE *fp,*xfp; - + bno = brd_bno(currboard); brd = bshm->bcache + bno; @@ -2436,27 +2436,27 @@ post_edit( hdr->xmode |= POST_CURMODIFY; hdr->xid = cutmp->pid; rec_put(xo->dir, hdr, sizeof(HDR), pos); - + if(strcmp(brd->brdname,"test")) { HDR phdr; - + brd_fpath(mfolder, BRD_MODIFIED, FN_DIR); fd = hdr_stamp(mfolder, 'A', &phdr, mfpath); fp = fdopen(fd, "w"); f_suck(fp, fpath); fclose(fp); close(fd); - + strcpy(phdr.owner,hdr->owner); strcpy(phdr.nick,hdr->nick); strcpy(phdr.title,hdr->title); rec_add(mfolder, &phdr, sizeof(HDR)); } - + strcpy(ve_title,hdr->title); - + fp = fopen(fpath,"r"); sprintf(buf,"tmp/%s.header",cuser.userid); @@ -2471,7 +2471,7 @@ post_edit( sprintf(buf,"tmp/%s.edit",cuser.userid); xfp = fopen(buf,"w"); while (fgets(str, 256, fp)) - { + { if (!strcmp(str,"--\n")) break; fputs(str,xfp); @@ -2503,14 +2503,14 @@ post_edit( xfp = fopen(buf,"w"); if(temp) fputs(str,xfp); - + while (fgets(str, 256, fp) && *str != '\n') fputs(str,xfp); fclose(xfp); fclose(fp); - + sprintf(buf,"tmp/%s.edit",cuser.userid); if((temp = vedit(buf, NA)) < 0) @@ -2519,7 +2519,7 @@ post_edit( unlink(buf); sprintf(buf,"tmp/%s.edit",cuser.userid); unlink(buf); - sprintf(buf,"tmp/%s.footer",cuser.userid); + sprintf(buf,"tmp/%s.footer",cuser.userid); unlink(buf); sprintf(buf,"tmp/%s.recommend",cuser.userid); unlink(buf); @@ -2527,7 +2527,7 @@ post_edit( else { char tmp[128]; - + fp = fopen(fpath,"w"); sprintf(buf,"tmp/%s.header",cuser.userid); f_suck(fp, buf); @@ -2574,7 +2574,7 @@ post_edit( { vmsg("¥»ªO¤£¯à­×§ï¤å³¹!!"); } - else + else { /* cache.090922: Àˬd¾÷¨î */ if (hdr->modifytimes < 0) @@ -2652,11 +2652,11 @@ int post_edit(XO *xo) fp = fopen(fpath,"r"); sprintf(buf,"tmp/%s.header",cuser.userid); - xfp = fopen(buf,"w"); + xfp = fopen(buf,"w"); while (fgets(str, 256, fp) && *str != '\n') { - fputs(str,xfp); + fputs(str,xfp); } fputs("\n",xfp); fclose(xfp); @@ -2760,7 +2760,7 @@ void { FILE *fpr, *fpw; char srcfile[64], tmpfile[64], buf[ANSILINELEN]; - + hdr_fpath(srcfile, xo->dir, hdr); strcpy(tmpfile, "tmp/"); strcat(tmpfile, hdr->xname); @@ -2819,12 +2819,12 @@ post_title( vget(b_lines, 0, "¼ÐÃD¡G", mhdr.title, sizeof(mhdr.title), GCARRY); - if (HAS_PERM(PERM_ALLBOARD)) /* 0911105.cache: «D¬ÝªOÁ`ºÞ¥u¯à§ï¼ÐÃD */ - { + if (HAS_PERM(PERM_ALLBOARD)) /* 0911105.cache: «D¬ÝªOÁ`ºÞ¥u¯à§ï¼ÐÃD */ + { vget(b_lines, 0, "§@ªÌ¡G", mhdr.owner, 74 /* sizeof(mhdr.owner)*/, GCARRY); /* Thor.980727:lkchu patch: sizeof(mhdr.owner) = 80·|¶W¹L¤@¦æ */ vget(b_lines, 0, "¤é´Á¡G", mhdr.date, sizeof(mhdr.date), GCARRY); - } + } if (vans(msg_sure_ny) == 'y' && memcmp(fhdr, &mhdr, sizeof(HDR))) @@ -2834,7 +2834,7 @@ post_title( move(3 + cur, 0); post_item(++pos, fhdr); - /* 0911105.cache: ¶¶«K§ï¤º¤å¼ÐÃD */ + /* 0911105.cache: ¶¶«K§ï¤º¤å¼ÐÃD */ header_replace(xo, fhdr); } @@ -2903,18 +2903,18 @@ post_title( char fnew[80], fold[80]; HDR *hdr; - if(!str_cmp(head->brdname,BRD_LOCALPOSTS)) /* LocalPosts ª©¤£¬å */ - continue; + if(!str_cmp(head->brdname,BRD_LOCALPOSTS)) /* LocalPosts ª©¤£¬å */ + continue; - if(!str_cmp(head->brdname,brd_sysop)) /* SYSOP ª©¤£¬å */ - continue; + if(!str_cmp(head->brdname,brd_sysop)) /* SYSOP ª©¤£¬å */ + continue; - if(!str_cmp(head->brdname,BRD_CAMERA)) /* ActiveInfo ª©¤£¬å */ - continue; + if(!str_cmp(head->brdname,BRD_CAMERA)) /* ActiveInfo ª©¤£¬å */ + continue; #ifdef HAVE_CROSSPOSTLOG - if(!str_cmp(head->brdname,BRD_CROSSPOST)) /* CostPost ª©¤£¬å */ - continue; + if(!str_cmp(head->brdname,BRD_CROSSPOST)) /* CostPost ª©¤£¬å */ + continue; #endif /* Thor.0616:§ó§ïcurrboard,¥Hcancel post */ @@ -2947,13 +2947,13 @@ post_title( continue;*/ if(mode==1) - check_mode = strcmp(title, str_ttl(hdr->owner)); + check_mode = strcmp(title, str_ttl(hdr->owner)); else if(mode==2) check_mode = !((int)strstr(hdr->owner,title)|(int)strstr(hdr->title,title)); - else + else check_mode = strcmp(title, str_ttl(hdr->title)); - if ((xmode & (POST_MARKED | POST_CANCEL | POST_DELETE | POST_MDELETE | + if ((xmode & (POST_MARKED | POST_CANCEL | POST_DELETE | POST_MDELETE | POST_LOCK)) || check_mode ) { #if 0 @@ -2973,7 +2973,7 @@ post_title( cancel_post(hdr); hdr->xmode |= POST_MDELETE; - sprintf(hdr->title, "<< ¥»¤å³¹¸g %s °µ¨t²Î¥\\¯à§R°£ >>", cuser.userid); + sprintf(hdr->title, "<< ¥»¤å³¹¸g %s °µ¨t²Î¥\\¯à§R°£ >>", cuser.userid); /*hdr_fpath(fold, fpath, hdr); unlink(fold);*/ } @@ -2985,7 +2985,7 @@ post_title( close(fdr); goto contWhileOuter; } - fsize++; + fsize++; } close(fdr); fclose(fpw); @@ -3118,7 +3118,7 @@ post_resetscore( // return XO_FOOT; //} //else - //{ + //{ switch (vans("¡·µû¤À³]©w 1)¦Û­q 2)²M°£ [Q] ")) { case '1': @@ -3126,28 +3126,28 @@ post_resetscore( if(!HAS_PERM(PERM_SYSOP)) { pmsg2("¥Ø«e¸T¤î¦Û­q±À¤å¼Æ"); - return XO_FOOT; + return XO_FOOT; } if (!vget(b_lines, 0, "½Ð¿é¤J¼Æ¦r¡G", ans, 3, DOECHO)) return XO_FOOT; if((brd->battr & BRD_PUSHSNEER) || (brd->battr & BRD_PUSHDEFINE)) - pm = vans("½Ð¿ï¾Ü¥¿­t 1)¥¿ 2)­t [Q] "); + pm = vans("½Ð¿ï¾Ü¥¿­t 1)¥¿ 2)­t [Q] "); else pm = '1'; if (pm =='1') { - recommend = atoi(ans); + recommend = atoi(ans); } else if (pm == '2') { recommend = atoi(ans); - recommend = -recommend; + recommend = -recommend; } else - return XO_FOOT; + return XO_FOOT; if (recommend > 99 || recommend < -99) return XO_FOOT; @@ -3169,16 +3169,16 @@ post_resetscore( outc(post_attr(hdr)); return XO_LOAD; - //} + //} } else { - vmsg("±zªºÅv­­¤£¨¬¡I"); - return XO_FOOT; + vmsg("±zªºÅv­­¤£¨¬¡I"); + return XO_FOOT; } -} +} int @@ -3219,7 +3219,7 @@ post_recommend( } } - //§ó·s¸ê®Æ¾ÞµwºÐ + //§ó·s¸ê®Æ¾ÞµwºÐ pos = seek_rec(xo,hdr); if(pos < 0) @@ -3253,7 +3253,7 @@ post_recommend( { //addscore = 0; //switch(ans = vans("¡· µû½× 1)±À¤å 2)¼N¤å 3)¯d¨¥ ¡H[Q] ")) - //¦Ò¶q¹Ú¤j¤w¸g²ßºD±À¤å¬O½bÀY²Å¸¹ + //¦Ò¶q¹Ú¤j¤w¸g²ßºD±À¤å¬O½bÀY²Å¸¹ switch(ans = vans("¡· µû½× 1)±À¤å 2)¼N¤å ¡H[Q] ")) { case '1': @@ -3299,7 +3299,7 @@ post_recommend( if (eof<2) { zmsg("°Êµü¶·¬°¤@­Ó¤¤¤å¦r¤¸©ÎªÌ¨â­Ó­^¤å¦r¤¸"); - return XO_FOOT; + return XO_FOOT; } getans = vget(b_lines,0,"±À¤å¡G",msg,53,DOECHO); addscore = 1; @@ -3321,7 +3321,7 @@ post_recommend( getans = 0; break; } - } + } else getans = vget(b_lines,0,"±À¤å¡G",msg,53,DOECHO); @@ -3331,7 +3331,7 @@ post_recommend( else ans = 'n'; - //§ó·s¸ê®Æ¾ÞµwºÐ + //§ó·s¸ê®Æ¾ÞµwºÐ pos = seek_rec(xo,hdr); hdr->xmode &= ~POST_RECOMMEND_ING; hdr->xid = 0; @@ -3339,18 +3339,18 @@ post_recommend( if(pos < 0) return XO_NONE; - //Àu¦H¤å + //Àu¦H¤å if ( (brd->battr & (BRD_PUSHTIME | BRD_PUSHDISCON)) && (brd->battr & BRD_VALUE) ) { if (/*(hdr->recommend == 49) || */(hdr->recommend == 99)) - { + { if (addscore > 0) point = 1; else point = -1; } else if (/*(hdr->recommend == -49) || */(hdr->recommend == -99)) - { + { if (addscore > 0) point = 1; else @@ -3366,14 +3366,14 @@ post_recommend( hdr->pushtime = time(0); - //¦b item ¦³§PÂ_¥i¥H¥[§Ö¤@ÂIÂI - //¦Ò¶q¨ìª©¤å³¹¬Û®e°ÝÃD, µ¥¨ì¤峹²M°£«á­n§ó§ï§PÂ_ + //¦b item ¦³§PÂ_¥i¥H¥[§Ö¤@ÂIÂI + //¦Ò¶q¨ìª©¤å³¹¬Û®e°ÝÃD, µ¥¨ì¤峹²M°£«á­n§ó§ï§PÂ_ if (!(hdr->xmode & POST_RECOMMEND)) hdr->xmode |= POST_RECOMMEND; if(brd->battr & BRD_PUSHSNEER || brd->battr & BRD_PUSHDEFINE) - { - if(hdr->recommend < 125 && hdr->recommend > -125) + { + if(hdr->recommend < 125 && hdr->recommend > -125) { if(addscore == 1) hdr->recommend += 1; @@ -3385,12 +3385,12 @@ post_recommend( /* hdr->recommend +=addscore ; */ - } + } } - else //µL¼N¤å¬Û®e©Ê + else //µL¼N¤å¬Û®e©Ê { - if(hdr->recommend < 99) - hdr->recommend++; + if(hdr->recommend < 99) + hdr->recommend++; } strcpy(hdr->lastrecommend,cuser.userid); @@ -3407,7 +3407,7 @@ post_recommend( else if (addscore == -1) sprintf(add,"\x1b[1;31m¼N\x1b[m \x1b[1;33m%12s¡G\x1b[36m%-54.54s \x1b[m%5.5s\n",cuser.userid,msg,Btime(&hdr->pushtime)+3); else - sprintf(add,"\x1b[m\x1b[1;33m %12s¡G\x1b[36m%-54.54s \x1b[m%5.5s\n",cuser.userid,msg,Btime(&hdr->pushtime)+3); + sprintf(add,"\x1b[m\x1b[1;33m %12s¡G\x1b[36m%-54.54s \x1b[m%5.5s\n",cuser.userid,msg,Btime(&hdr->pushtime)+3); } else if(brd->battr & BRD_PUSHDEFINE) { @@ -3416,14 +3416,14 @@ post_recommend( else if (addscore == -1) sprintf(add,"\x1b[1;31m%02.2s\x1b[m \x1b[1;33m%12s¡G\x1b[36m%-54.54s \x1b[m%5.5s\n",verb,cuser.userid,msg,Btime(&hdr->pushtime)+3); else - sprintf(add,"\x1b[1;33m¡÷\x1b[m \x1b[1;33m%12s¡G\x1b[36m%-54.54s \x1b[m%5.5s\n",cuser.userid,msg,Btime(&hdr->pushtime)+3); - } - else + sprintf(add,"\x1b[1;33m¡÷\x1b[m \x1b[1;33m%12s¡G\x1b[36m%-54.54s \x1b[m%5.5s\n",cuser.userid,msg,Btime(&hdr->pushtime)+3); + } + else sprintf(add,"\x1b[1;33m¡÷ %12s¡G\x1b[36m%-54.54s \x1b[m%5.5s\n",cuser.userid,msg,Btime(&hdr->pushtime)+3); /* if(dashf(fpath)) f_cat(fpath,add); - */ + */ if((fd = open(fpath,O_WRONLY | O_APPEND)) >= 0) { f_exlock(fd); @@ -3438,14 +3438,14 @@ post_recommend( if(brd->battr & BRD_PUSHTIME) next = time(NULL) + NEXTPUSHTIME; /* ©w¸q¦btheme.h */ - //change_stamp(xo->dir, hdr); + //change_stamp(xo->dir, hdr); brh_add( hdr->pushtime, hdr->pushtime, hdr->pushtime); /* 091009.cache: Àu¨}¿n¤À */ if( point!=0 ) - { + { addpoint1(point, hdr->owner); - pmsg2("µû½×§¹¦¨¡I(§@ªÌÀu¤å§ó°Ê)"); + pmsg2("µû½×§¹¦¨¡I(§@ªÌÀu¤å§ó°Ê)"); } else zmsg("µû½×§¹¦¨¡I"); @@ -3454,13 +3454,13 @@ post_recommend( if (!HAVE_PERM(PERM_SYSOP)) record_recommend(hdr->chrono, msg); - // post_recommend_log(1,hdr); + // post_recommend_log(1,hdr); // brd->btime = time(0);[A //btime_update(currbno); brd->blast = hdr->pushtime; return XO_INIT; //move(3 + cur, 0); - //post_item(pos+1, hdr); + //post_item(pos+1, hdr); } else @@ -3525,12 +3525,12 @@ post_showBRD_setting( prints("\n ±À¤å¥\\¯à - %s ¼N¤å¥\\¯à - %s", (brd->battr & BRD_PRH) ? "Ãö³¬" : "\033[1;33m¶}±Ò\033[m", - (brd->battr & BRD_PUSHSNEER || brd->battr & BRD_PUSHDEFINE) ? "\033[1;33m¶}±Ò\033[m" : "Ãö³¬"); + (brd->battr & BRD_PUSHSNEER || brd->battr & BRD_PUSHDEFINE) ? "\033[1;33m¶}±Ò\033[m" : "Ãö³¬"); prints("\n ±À¤å­­¨î - %s ¦Û­q°Êµü - %s", (brd->battr & BRD_PUSHDISCON) ? "\033[1;36m¢×¢Ò\033[m" : (brd->battr & BRD_PUSHTIME) ? "\033[1;36m®É¶¡\033[m" : "¨S¦³", - (brd->battr & BRD_PUSHDEFINE) ? "\033[1;33m¶}±Ò\033[m" : "Ãö³¬"); + (brd->battr & BRD_PUSHDEFINE) ? "\033[1;33m¶}±Ò\033[m" : "Ãö³¬"); prints("\n ¤å³¹Ãþ§O - %s ¸Tª`­µ¤å - %s", (brd->battr & BRD_POSTFIX) ? "\033[1;33m¶}±Ò\033[m" : "Ãö³¬", @@ -3542,7 +3542,7 @@ post_showBRD_setting( if ((bbstate & STAT_BOARD) || HAS_PERM(PERM_BOARD)) prints("\n\n±z¥Ø«e \033[1;33m¾Ö¦³\033[m ¦¹¬ÝªOªººÞ²zÅv­­"); else - prints("\n\n±z¥Ø«e ¨S¦³ ¦¹¬ÝªOªººÞ²zÅv­­"); + prints("\n\n±z¥Ø«e ¨S¦³ ¦¹¬ÝªOªººÞ²zÅv­­"); vmsg(NULL); @@ -3556,7 +3556,7 @@ post_FriendSet( { if (!(bbstate & STAT_BOARD)) return XO_NONE; - //§PÂ_µ²§ô + //§PÂ_µ²§ô BRD *oldbrd, newbrd; int bno; @@ -3566,9 +3566,9 @@ post_FriendSet( memcpy(&newbrd, oldbrd, sizeof(BRD)); if(vans("½T©w­nÅܧó¬ÝªOÅv­­¡H[y/N] ") != 'y') - return XO_HEAD; + return XO_HEAD; - //§ó§ïºX¼Ð + //§ó§ïºX¼Ð if(newbrd.readlevel & PERM_SYSOP){ newbrd.readlevel = 0; vmsg("¥Ø«e¬°¤½¶}¬ÝªO"); @@ -3590,10 +3590,10 @@ post_FriendSet( post_battr_score( XO *xo) { - //§PÂ_¬O§_¬°ªO¥D + //§PÂ_¬O§_¬°ªO¥D if (!(bbstate & STAT_BOARD)) return XO_NONE; - //§PÂ_µ²§ô + //§PÂ_µ²§ô BRD *oldbrd, newbrd; int bno; @@ -3606,8 +3606,8 @@ post_battr_score( { case '1': if(vans("½T©w­nÅܧó±À¤å³]©w¡H[y/N] ") != 'y') - return XO_HEAD; - //§ó§ïºX¼Ð + return XO_HEAD; + //§ó§ïºX¼Ð if(newbrd.battr & BRD_PRH){ newbrd.battr &= ~BRD_PRH; vmsg("¤¹³\\±À¤å"); @@ -3615,9 +3615,9 @@ post_battr_score( else{ newbrd.battr |= BRD_PRH; newbrd.battr &= ~BRD_PUSHDISCON; - newbrd.battr &= ~BRD_PUSHTIME; - newbrd.battr &= ~BRD_PUSHSNEER; - newbrd.battr &= ~BRD_PUSHDEFINE; + newbrd.battr &= ~BRD_PUSHTIME; + newbrd.battr &= ~BRD_PUSHSNEER; + newbrd.battr &= ~BRD_PUSHDEFINE; vmsg("¸T¤î±À¤å"); } memcpy(oldbrd, &newbrd, sizeof(BRD)); @@ -3626,15 +3626,15 @@ post_battr_score( case '2': if(vans("½T©w­nÅܧó¼N¤å¼Ò¦¡¡H[y/N] ") != 'y') - return XO_HEAD; - //§ó§ïºX¼Ð + return XO_HEAD; + //§ó§ïºX¼Ð if(newbrd.battr & BRD_PUSHSNEER){ newbrd.battr &= ~BRD_PUSHSNEER; vmsg("Ãö³¬¼N¤å¼Ò¦¡"); } else{ newbrd.battr |= BRD_PUSHSNEER; - newbrd.battr &= ~BRD_PUSHDEFINE; + newbrd.battr &= ~BRD_PUSHDEFINE; vmsg("¶}±Ò¼N¤å¼Ò¦¡"); } memcpy(oldbrd, &newbrd, sizeof(BRD)); @@ -3643,15 +3643,15 @@ post_battr_score( case '3': if(vans("½T©w­nÅܧó¦Û­q±À¤å°Êµü¼Ò¦¡¡H[y/N] ") != 'y') - return XO_HEAD; - //§ó§ïºX¼Ð + return XO_HEAD; + //§ó§ïºX¼Ð if(newbrd.battr & BRD_PUSHDEFINE){ newbrd.battr &= ~BRD_PUSHDEFINE; vmsg("Ãö³¬¦Û­q±À¤å°Êµü"); } else{ newbrd.battr |= BRD_PUSHDEFINE; - newbrd.battr &= ~BRD_PUSHSNEER; + newbrd.battr &= ~BRD_PUSHSNEER; vmsg("¶}±Ò¦Û­q±À¤å°Êµü"); } memcpy(oldbrd, &newbrd, sizeof(BRD)); @@ -3660,8 +3660,8 @@ post_battr_score( case '4': if(vans("½T©w­nÅܧóID³s±À­­¨î¡H[y/N] ") != 'y') - return XO_HEAD; - //§ó§ïºX¼Ð + return XO_HEAD; + //§ó§ïºX¼Ð if(newbrd.battr & BRD_PUSHDISCON){ newbrd.battr &= ~BRD_PUSHDISCON; vmsg("¦PID¤¹³\\³s±À"); @@ -3676,8 +3676,8 @@ post_battr_score( case '5': if(vans("½T©w­nÅܧó®É¶¡³s±À­­¨î¡H[y/N] ") != 'y') - return XO_HEAD; - //§ó§ïºX¼Ð + return XO_HEAD; + //§ó§ïºX¼Ð if(newbrd.battr & BRD_PUSHTIME){ newbrd.battr &= ~BRD_PUSHTIME; vmsg("¤¹³\\§Ö³t³s±À"); @@ -3691,7 +3691,7 @@ post_battr_score( return XO_HEAD; default: - return XO_HEAD; + return XO_HEAD; } } @@ -3702,10 +3702,10 @@ post_battr_score( post_rule( XO *xo) { - //§PÂ_¬O§_¬°ªO¥D + //§PÂ_¬O§_¬°ªO¥D if (!(bbstate & STAT_BOARD)) return XO_NONE; - //§PÂ_µ²§ô + //§PÂ_µ²§ô BRD *oldbrd, newbrd; int bno; @@ -3718,8 +3718,8 @@ post_rule( { case '1': if(vans("½T©w­nÅܧó¬ÝªO°ßŪ³]©w¡H[y/N] ") != 'y') - return XO_HEAD; - //§ó§ïºX¼Ð + return XO_HEAD; + //§ó§ïºX¼Ð if(newbrd.battr & BRD_NOREPLY){ newbrd.battr &= ~BRD_NOREPLY; vmsg("¨ú®ø°ßŪ"); @@ -3728,9 +3728,9 @@ post_rule( newbrd.battr |= BRD_NOREPLY; newbrd.battr |= BRD_PRH; newbrd.battr &= ~BRD_PUSHDISCON; - newbrd.battr &= ~BRD_PUSHTIME; - newbrd.battr &= ~BRD_PUSHSNEER; - newbrd.battr &= ~BRD_PUSHDEFINE; + newbrd.battr &= ~BRD_PUSHTIME; + newbrd.battr &= ~BRD_PUSHSNEER; + newbrd.battr &= ~BRD_PUSHDEFINE; vmsg("¬ÝªO°ßŪ - ¸T¤îµo¤å¦^¤å¤Î±À¤å"); } memcpy(oldbrd, &newbrd, sizeof(BRD)); @@ -3739,8 +3739,8 @@ post_rule( case '2': if(vans("½T©w­nÅܧó§@ªÌ­×¤å³]©w¡H[y/N] ") != 'y') - return XO_HEAD; - //§ó§ïºX¼Ð + return XO_HEAD; + //§ó§ïºX¼Ð if(newbrd.battr & BRD_MODIFY){ newbrd.battr &= ~BRD_MODIFY; vmsg("¤¹³\\§@ªÌ­×¤å"); @@ -3755,8 +3755,8 @@ post_rule( case '3': if(vans("½T©w­nÅܧóÂà¿ý¤å³¹³]©w¡H[y/N] ") != 'y') - return XO_HEAD; - //§ó§ïºX¼Ð + return XO_HEAD; + //§ó§ïºX¼Ð if(newbrd.battr & BRD_NOFORWARD){ newbrd.battr &= ~BRD_NOFORWARD; vmsg("¤¹³\\Âà¿ý¤å³¹"); @@ -3802,7 +3802,7 @@ post_rule( return XO_HEAD; default: - return XO_HEAD; + return XO_HEAD; } } @@ -3915,14 +3915,14 @@ post_manage( { char re; - char *menu[] = + char *menu[] = { "BQ", "Title ­×§ï¬ÝªO¥DÃD", "Memo ½s¿è¶iªOµe­±", "Post ½s¿èµo¤å¤½§i", "Banmail ¬ÝªOÀÉ«H³]©w", - "Close ¬ÝªOµoªí³]©w", + "Close ¬ÝªOµoªí³]©w", # ifdef HAVE_RECOMMEND "Score ¬ÝªO±À¤å³]©w", # endif @@ -3981,7 +3981,7 @@ post_manage( return post_usies_BMlog(xo); case 'q': - return XO_HEAD; + return XO_HEAD; } return XO_HEAD; } @@ -4100,7 +4100,7 @@ KeyFunc post_cb[] = {XO_HEAD, post_head}, {XO_BODY, post_body}, - {'B', post_manage}, + {'B', post_manage}, {'r', post_browse}, {'s', post_switch}, {KEY_TAB, post_gem}, @@ -4110,12 +4110,12 @@ KeyFunc post_cb[] = {'d', post_delete}, {'v', post_visit}, {'q', post_state}, - {'S', post_complete}, //ªO¥D³B²z¼Ð°O + {'S', post_complete}, //ªO¥D³B²z¼Ð°O {'w', post_write}, {Ctrl('W'), post_spam}, {'e', post_expire}, {'U', post_unexpire}, - {'#', post_aid}, /* cache.090612: ¥H¤å³¹¥N½X(AID)§Ö³t´M¤å */ + {'#', post_aid}, /* cache.090612: ¥H¤å³¹¥N½X(AID)§Ö³t´M¤å */ {'i', post_showBRD_setting}, /* cache.081122:¬ÝªO¸ê°TÅã¥Ü */ {Ctrl('P'), post_add}, {Ctrl('N'), post_clean_delete}, @@ -4356,7 +4356,7 @@ XoXpost( /* Thor: call from post_cb */ else { if(strchr(head->owner,'.')) - continue; + continue; } sum++; @@ -4634,11 +4634,11 @@ xpost_browse( hdr_fpath(fpath, dir, hdr); - /* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È */ + /* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È */ // if ((key = more(fpath, MSG_POST)) == -1) // break; - comebackPos = hdr->xid; + comebackPos = hdr->xid; /* Thor.980911: ±q¦ê±µ¼Ò¦¡¦^¨Ó®É­n¦^¨ì¬Ý¹Lªº¨º½g¤å³¹¦ì¸m */ cmd = XO_HEAD; @@ -4674,13 +4674,13 @@ xpost_browse( if ((key = more(fpath, FOOTER_POST)) < 0) break; - /* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È */ + /* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È */ if(!key) key = vkey(); switch (key) { - case Ctrl('U'): + case Ctrl('U'): every_U(); continue; case Ctrl('B'): @@ -4728,13 +4728,13 @@ xpost_browse( } break; - case 'm': - if ((bbstate & STAT_BOARD) && !(xmode & POST_MARKED)) - { - hdr->xmode = xmode | POST_MARKED; - rec_put(dir, hdr, sizeof(HDR), hdr->xid); - } - break; + case 'm': + if ((bbstate & STAT_BOARD) && !(xmode & POST_MARKED)) + { + hdr->xmode = xmode | POST_MARKED; + rec_put(dir, hdr, sizeof(HDR), hdr->xid); + } + break; #ifdef HAVE_RECOMMEND case 'p': diff --git a/maple/socket.c b/maple/socket.c index 80d0138a9..3909248f6 100644 --- a/maple/socket.c +++ b/maple/socket.c @@ -93,14 +93,14 @@ POP3_Check( fflush(fsock); fgets(buf, 512, fsock); break; - + case 4: /* Verify Password */ fprintf(fsock, "pass %s\r\n", passwd); - fflush(fsock); + fflush(fsock); fgets(buf, 512, fsock); sock = -1; break; - + case 0: /* Successful Verification */ case 5: /* Quit */ fprintf(fsock, "quit\r\n"); @@ -109,7 +109,7 @@ POP3_Check( close(old_sock); return sock; } - + if(strncmp(buf, "+OK", 3) || strstr(buf, ".bbs")) { prints("»·ºÝ¨t²Î¶Ç¦^¿ù»~°T®§¦p¤U¡G(¦p¤£©ú¥Õ°T®§·N«ä¡A½Ð±N°T®§§iª¾¯¸ªø)\n"); @@ -146,7 +146,7 @@ Ext_POP3_Check( { if(!(fsock = fdopen(sock, "r+"))) { - close(sock); + close(sock); return 1; } step = 1; @@ -172,7 +172,7 @@ Ext_POP3_Check( pmsg("¤£¨ü«H¥ôªº POP3 ¥D¾÷¡A½Ð¨Ï¥Î Email ¦^«H»{ÃÒ¡I"); step = 8; logitfile("tmp/visor.log", site, "stat 1"); - break; + break; } step = 2; } @@ -182,7 +182,7 @@ Ext_POP3_Check( step = 9; break; } - + FD_ZERO(&rd); FD_SET(sock, &rd); nfds = select(nfds+1, &rd, NULL, NULL, &to); @@ -206,7 +206,7 @@ Ext_POP3_Check( logitfile("tmp/visor.log", site, "stat 2"); break; } - + FD_ZERO(&rd); FD_SET(sock, &rd); nfds = select(nfds+1, &rd, NULL, NULL, &to); @@ -230,7 +230,7 @@ Ext_POP3_Check( logitfile("tmp/visor.log", site, "stat 3"); break; } - + FD_ZERO(&rd); FD_SET(sock, &rd); nfds = select(nfds+1, &rd, NULL, NULL, &to); @@ -260,7 +260,7 @@ Ext_POP3_Check( logitfile("tmp/visor.log", site, "stat 4"); break; } - + FD_ZERO(&rd); FD_SET(sock, &rd); nfds = select(nfds+1, &rd, NULL, NULL, &to); @@ -315,7 +315,7 @@ Ext_POP3_Check( logitfile("tmp/visor.log", site, "stat 6"); break; } - + FD_ZERO(&rd); FD_SET(sock, &rd); nfds = select(nfds+1, &rd, NULL, NULL, &to); @@ -339,7 +339,7 @@ Ext_POP3_Check( logitfile("tmp/visor.log", site, "stat 7"); break; } - + FD_ZERO(&rd); FD_SET(sock, &rd); nfds = select(nfds+1, &rd, NULL, NULL, &to); diff --git a/maple/talk.c b/maple/talk.c index 099bdf5fc..ca0c4a42d 100644 --- a/maple/talk.c +++ b/maple/talk.c @@ -120,10 +120,10 @@ bmode( #endif int mode; char *word; - + if(!up) return "¤£¦b¯¸¤W"; - + #ifdef HAVE_SHOWNUMMSG if(up->num_msg > 9) { @@ -135,8 +135,8 @@ bmode( sprintf(modestr,"¦¬¨ì%s«Ê°T®§",nums[up->num_msg-1]); return (modestr); } -#endif - +#endif + mode = up->mode; if(mode == M_IDLE) { @@ -155,7 +155,7 @@ bmode( if ((mode != M_QUERY && !HAS_PERM(PERM_SEECLOAK) && (up->ufo & UFO_CLOAK))||(can_see(up)==2 && !HAS_PERM(PERM_SYSOP))) return (word); /* Thor.980805: µù¸Ñ: Áô¨­ªº¤H¤£·|³Qª¾¹D¸ò½Ötalk */ - + sprintf(modestr, "%s %s", word, up->mateid); return (modestr); } @@ -228,7 +228,7 @@ copyship( return; } shead++; - } + } } return; @@ -357,8 +357,8 @@ can_message( #ifdef HAVE_BANMSG if(can_banmsg(up)) /* ©Ú¦¬°T®§ */ - return NA; -#endif + return NA; +#endif if ( ufo & (UFO_MESSAGE)) /* »·Â÷¹ÐÄÛ */ return NA; @@ -384,7 +384,7 @@ can_override( return NA; ufo = up->ufo; - + if(ufo & (UFO_REJECT|UFO_NET)) return NA; @@ -550,7 +550,7 @@ pal_cache(void) { cache = NULL; } - + } } @@ -567,11 +567,11 @@ pal_cache(void) free(pal_ship); pal_ship = NULL; } - - + + if(ship_total) { - shead = pal_ship = (PAL_SHIP *)malloc((ship_total+1)*sizeof(PAL_SHIP)); + shead = pal_ship = (PAL_SHIP *)malloc((ship_total+1)*sizeof(PAL_SHIP)); phead = (PAL *) fimage; ptail = (PAL *) (fimage + fsize); if(pal_ship) @@ -585,20 +585,20 @@ pal_cache(void) shead->pal_no = phead->userno; shead++; } - } while (++phead < ptail); + } while (++phead < ptail); } else pal_ship = NULL; } else pal_ship = NULL; - + if(fimage) free(fimage); cuser.ufo = ufo; } /* 2003.01.01 verit : ­«¾ã ¤W¯¸³qª¾¦W³æ */ -void +void aloha_sync(void) { char fpath[128]; @@ -651,7 +651,7 @@ aloha_sync(void) if (size <= 0) unlink(fpath); } - + void pal_sync( @@ -838,29 +838,29 @@ pal_search( str_lower(bufl, buf); buflen = strlen(bufl); - + pos = num = xo->pos; max = xo->max; do { pos += step; - if (pos < 0) + if (pos < 0) pos = max - 1; else if (pos >= max) pos = 0; - + if (str_str((phead + pos)->userid, bufl) || str_str((phead + pos)->ship, bufl)) { move(b_lines, 0); clrtoeol(); - if(fimage) + if(fimage) free(fimage); return pos + XO_MOVE; } } while (pos != num); } - if(fimage) + if(fimage) free(fimage); return XO_FOOT; @@ -994,7 +994,7 @@ pal_change( #if 0 char old_ftype, fpath[64]; #endif - + pos = xo->pos; cur = pos - xo->top; pal = (PAL *) xo_pool + cur; @@ -1003,7 +1003,7 @@ pal_change( old_ftype = pal->ftype; usr_fpath(fpath, pal->userid, FN_FRIEND_BENZ); #endif - + mate = *pal; pal_edit(pal, GCARRY); if (memcmp(pal, &mate, sizeof(PAL))) @@ -1016,7 +1016,7 @@ pal_change( #if 0 if (xo->dir[0] == 'b') /* lkchu.981201: moderator board */ return XO_FOOT; - + if ( !(old_ftype & PAL_BAD) && (pal->ftype & PAL_BAD) ) /* lkchu.981201: ­ì¥»¬O¦n¤Í, §ï¦¨·l¤Í­n rec_del */ { @@ -1031,7 +1031,7 @@ pal_change( bmw.recver = cuser.userno; strcpy(bmw.userid, cuser.userid); rec_add(fpath, &bmw, sizeof(BMW)); - } + } #endif return XO_FOOT; @@ -1173,7 +1173,7 @@ bmw_item( /* lkchu.990206: ¦n¤Í¼s¼· */ if (!(*bmw->userid)) strcpy(bmw->userid, "²³®a¦n¤Í"); - + prints("%5d %02d:%02d %-13s¡¸%-50.50s\n", num, ptime->tm_hour, ptime->tm_min, bmw->userid, bmw->msg); } @@ -1204,7 +1204,7 @@ bmw_item( else prints("%5d \033[32m%-13s¡¹%-57.57s\033[m\n", num, bmw->userid, bmw->msg); - } + } } } @@ -1340,7 +1340,7 @@ bmw_write( { up = benz->caller; } - + if ((up || (up = utmp_find(benz->sender))) && can_message(up)) /* lkchu.990104: Åý¥H«eªº bmw ¤]¥i¥H¦^ */ { @@ -1363,13 +1363,13 @@ bmw_write( bmw_edit(up, buf, &bmw, 0); } } -#ifdef HAVE_BANMSG +#ifdef HAVE_BANMSG else if(up && !(up->ufo & UFO_MESSAGE) && can_banmsg(up)) { vmsg("¹ï¤è¤£·QÅ¥¨ì±zªºÁn­µ!!"); return XO_INIT; } -#endif +#endif } return XO_NONE; } @@ -1398,14 +1398,14 @@ KeyFunc bmw_cb[] = {XO_LOAD, bmw_load}, {XO_HEAD, bmw_head}, {XO_BODY, bmw_body}, - + {'d', bmw_delete}, {'m', bmw_mail}, {'w', bmw_write}, {'q', bmw_query}, {Ctrl('Q'), bmw_query}, {'s', bmw_init}, - {KEY_TAB, bmw_mode}, + {KEY_TAB, bmw_mode}, {'h', bmw_help} }; @@ -1448,7 +1448,7 @@ bm_image(void) { int *userno,*ubase; int c = count; - + ubase = userno = (int *)malloc(count*sizeof(int)); up = pal; @@ -1458,7 +1458,7 @@ bm_image(void) *userno++ = (up->ftype == PAL_BAD) ? -(up->userno) : up->userno; #else *userno++ = up->userno; -#endif +#endif up++; } while (--c); @@ -1638,8 +1638,8 @@ do_query( userid, (HAS_PERM(PERM_SYSOPX) || !(acct->userlevel & PERM_DENYNICK)) ? acct->username : GUEST_1, acct->numlogins, acct->numposts, acct->userlevel & PERM_VALID ? "¤w" : "¥¼"); - prints(" ¤W¦¸(\033[1;33m%s\033[m)¨Ó¦Û(%s)\n", - Ctime(&acct->lastlogin), ((acct->ufo & UFO_HIDDEN)&&!HAS_PERM(PERM_SYSOP)) ? + prints(" ¤W¦¸(\033[1;33m%s\033[m)¨Ó¦Û(%s)\n", + Ctime(&acct->lastlogin), ((acct->ufo & UFO_HIDDEN)&&!HAS_PERM(PERM_SYSOP)) ? HIDDEN_SRC : acct->lasthost); #if defined(REALINFO) && defined(QUERY_REALNAMES) @@ -1649,9 +1649,9 @@ do_query( #endif if (HAS_PERM(PERM_SYSOP)) prints(" ¯u¹ê©m¦W: %s", acct->realname); - + /* °²³]¤W¦¸ login ¤w¹L 6 ¤p®É¡A«K¤£¦b¯¸¤W¡A´î¤Ö utmp_find */ - + outs(" [°ÊºA] "); /* up = (acct->lastlogin < time(0) - 6 * 3600) ? NULL : utmp_find(userno); */ up = utmp_find(userno); @@ -1659,7 +1659,7 @@ do_query( outs((!up || (up && ((!HAS_PERM(PERM_SEECLOAK) && (up->ufo & UFO_CLOAK)) || (can_see(up)==2)) && !HAS_PERM(PERM_SYSOP))) ? "¤£¦b¯¸¤W":bmode(up, 1)); outs("\033[m"); /* Thor.981108: ¬°º¡¨¬ cigar ¹ý©³Áô¨­ªº­n¨D, ¤£¹L¥Î fingerÁÙ¬O¥i¥H¬Ý¨ì:p */ - + #if 0 /* Query ®É¥i¦P®É¬Ý¨ä¤Í½Ë´y­z©Î´c¦æ */ @@ -1682,34 +1682,34 @@ do_query( else if(acct->money >= 10000000) rich=5; else if(acct->money >= 1000000) - rich=4; + rich=4; else if(acct->money >= 100000) rich=3; else if(acct->money >= 10000) - rich=2; + rich=2; else if(acct->money >= 1000) - rich=1; + rich=1; else rich=0; - if (acct->point1 > 10) + if (acct->point1 > 10) prints(" [Àu¨}¿n¤À] \033[1;32m%d\033[m [¦H¤å] %d [¸gÀÙ] %s", acct->point1, acct->point2, fortune[rich]); - else if (acct->point2 > 1) + else if (acct->point2 > 1) prints(" [Àu¨}¿n¤À] %d [¦H¤å] \033[1;31m%d\033[m [¸gÀÙ] %s", acct->point1, acct->point2, fortune[rich]); else prints(" [Àu¨}¿n¤À] %d [¦H¤å] %d [¸gÀÙ] %s", acct->point1, acct->point2, fortune[rich]); - if (paling == 2) + if (paling == 2) ; else { /* deny nick can't have plans. statue.2001.02.11 */ - if(HAS_PERM(PERM_SYSOPX)) + if(HAS_PERM(PERM_SYSOPX)) showplans(userid); else if(!(acct->userlevel & PERM_DENYNICK) && (acct->userlevel & PERM_VALID)) showplans(userid); - } - + } + vmsg(NULL); move(b_lines, 0); @@ -1742,9 +1742,9 @@ my_query( #define BMW_FORMAT "\033[1;33;46m¡¹%s \033[37;45m %s \033[m" #define BMW_FORMAT_BC "\033[1;37;45m¡¹%s \033[1;33;46m %s \033[m" -/* patch by visor : BMW_LOCAL_MAX >= BMW_PER_USER +/* patch by visor : BMW_LOCAL_MAX >= BMW_PER_USER ¥H§K¶i¤JµL­­°j°é */ -#define BMW_LOCAL_MAX 10 +#define BMW_LOCAL_MAX 10 static BMW bmw_lslot[BMW_LOCAL_MAX],bmw_sentlot[BMW_LOCAL_MAX]; @@ -1801,7 +1801,7 @@ bmw_send( *mhead = *bmw; ushm->mbase = mslot[i] = mhead; - /* Thor.981206: »Ýª`·N, ­Yushm mapping¤£¦P, + /* Thor.981206: »Ýª`·N, ­Yushm mapping¤£¦P, «h¤£¦P°¦ bbsd ¤¬call·|core dump, °£«D³o¤]¥Îoffset, ¤£¹L°£¤F -i, À³¸Ó¬O«D¥²­n */ @@ -1828,9 +1828,9 @@ bmw_edit( save_foot(sl); str = bmw->msg; - + memset(str,0,sizeof(bmw->msg)); - + str[0] = cc; str[1] = '\0'; @@ -1854,18 +1854,18 @@ bmw_edit( { vmsg(MSG_USR_LEFT); if (!cc) - restore_foot(sl); + restore_foot(sl); return; } } /* lkchu.981230: §Q¥Î xover ¾ã¦X bmw */ if (up) - strcpy(bmw->userid, up->userid); + strcpy(bmw->userid, up->userid); /* lkchu.990103: ­Y¬O¦Û¤v°e¥Xªº bmw, ¦s¹ï¤èªº userid */ else *bmw->userid = '\0'; /* lkchu.990206: ¦n¤Í¼s¼·³]¬° NULL */ - + time(&bmw->btime); usr_fpath(fpath, userid, FN_BMW); rec_add(fpath, bmw, sizeof(BMW)); @@ -1880,7 +1880,7 @@ bmw_edit( #ifndef BMW_TIME fprintf(fp, "¡¸%s¡G%s\n", up ? up->userid : "²³®a¦n¤Í", str); -#else +#else /* Thor.980821: ¼ö°T°O¿ý¥[¤W®É¶¡ */ fprintf(fp, "¡¸%s%s¡G%s\n", up ? up->userid : "²³®a¦n¤Í", bmw_timemsg(), str); #endif @@ -1921,8 +1921,8 @@ bmw_choose(void) vmsg(err_uid); return 0; } -#endif - +#endif + up = ubase; do { @@ -1936,10 +1936,10 @@ bmw_choose(void) sprintf(buf, "¡¹[%s]", up->userid); bmw_edit(up, buf, &bmw, 0); } - + return 0; - - } + + } } while (++up <= uceil); return 0; @@ -1959,20 +1959,20 @@ static void bmw_display(int max,int pos) i++; move(i,0); prints(" \033[1;36mùï¢w¢w¢w¢w¢w¢wùô\033[43;37m ¹Ú¤j¶W¬¯¤ô²y¦^ÅU \033[40;36mùò¢w¢w¢w¢w¢w¢wùñ\033[m"); - + i++; for (max=0;max<8 ;max++) - { + { bmw = bmw_lslot[max]; if (max == pos) bmw2 = bmw; - + if(max == pos) sprintf(color,"1;45"); else sprintf(color,"0"); - + if (strstr(bmw.msg,"¡¹¼s¼½")) sprintf(buf, " \033[1;45;37m[%-12s]\033[%sm %-58s\033[m", bmw.userid,color,(bmw.msg+8)); else @@ -1981,7 +1981,7 @@ static void bmw_display(int max,int pos) outs(buf); i++; } - + move(i, 0); outs(" \033[1;36m¢u¢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¢w¢t\033[m\n"); sent = 0; @@ -1997,11 +1997,11 @@ static void bmw_display(int max,int pos) break; } } - if (!sent) + if (!sent) prints(" \033[32m©|¥¼¶Ç°Tµ¹ %s\033[m",bmw2.userid); move(i+2, 0); prints(" \033[1;36mùõ¢w¢w¢w¢w¢w¢wùô\033[43;37m ¾Þ§@ (¡ö¡BEnter)Â÷¶} (¡ô¡õ)¿ï¾Ü (¨ä¥L)¦^°T \033[40;36mùò¢w¢w¢w¢w¢w¢wù÷\033[m "); - + } @@ -2026,7 +2026,7 @@ static void bmw_display(int max,int pos) if (cuser.ufo2 & UFO2_REPLY || replymode) vs_save(slt); /* °O¿ý bmd_display ¤§«eªº screen */ - + mode = bbsmode; /* lkchu.981201: save current mode */ utmp_mode(M_BMW_REPLY); @@ -2054,7 +2054,7 @@ static void bmw_display(int max,int pos) bmw = bmw_lslot[pos]; if (cuser.ufo2 & UFO2_REPLY || replymode) bmw_display(max, pos); - else + else { if (strstr(bmw.msg,"¡¹¼s¼½")) sprintf(buf, BMW_FORMAT_BC, bmw.userid, (bmw.msg)+8); @@ -2070,7 +2070,7 @@ static void bmw_display(int max,int pos) if (cc == '\n') /* lkchu.981201: «ö Enter ¿ï¾Ü½u¤W user */ { screenline slp[b_lines + 1]; - + vs_save(slp); bmw_choose(); memcpy(&slp[b_lines - 1], &sl, sizeof(screenline) * 2); @@ -2141,10 +2141,10 @@ static void bmw_display(int max,int pos) userno = bmw.sender; /* Thor.980805: ¨¾¤î¨t²Î¨ó´M¦^¦© */ if(!userno) { - vmsg("¨t²Î°T®§µLªk¦^¦©"); + vmsg("¨t²Î°T®§µLªk¦^¦©"); // vmsg("±z¨Ã¤£¬O¹ï¤èªº¦n¤Í¡AµLªk¦^¦©¤W¯¸³qª¾"); /* lkchu.981201: ¦n¤Í¥i¦^¦© */ - + break; } if(bmw.caller->ufo & UFO_REJECT) @@ -2154,7 +2154,7 @@ static void bmw_display(int max,int pos) } up = bmw.caller; -#if 1 +#if 1 if ((up < uhead) || (up > uhead + MAXACTIVE /*ushm->offset*/)) /* lkchu.981201: comparison of distinct pointer types */ { @@ -2192,7 +2192,7 @@ static void bmw_display(int max,int pos) /* bmw_edit(up, "¡¹¦^À³¡G", &bmw, cc); */ /* Thor.981214: ¬°¨Ï¦^¦©¤£­P§Ë²V */ sprintf(buf,"¡¹[%s]", up->userid); - bmw_edit(up, buf, &bmw, cc); + bmw_edit(up, buf, &bmw, cc); break; } } @@ -2229,7 +2229,7 @@ bmw_reply(void) restore_foot(sl); /* Thor.981222: ·Q²M±¼message */ return; } - + mode = bbsmode; /* lkchu.981201: save current mode */ utmp_mode(M_BMW_REPLY); @@ -2263,7 +2263,7 @@ bmw_reply(void) if (cc == '\n') /* lkchu.981201: «ö Enter ¿ï¾Ü½u¤W user */ { screenline slp[b_lines + 1]; - + vs_save(slp); bmw_choose(); memcpy(&slp[b_lines - 1], &sl, sizeof(screenline) * 2); @@ -2319,10 +2319,10 @@ bmw_reply(void) userno = bmw.sender; /* Thor.980805: ¨¾¤î¨t²Î¨ó´M¦^¦© */ if(!userno) { - vmsg("¨t²Î°T®§µLªk¦^¦©"); + vmsg("¨t²Î°T®§µLªk¦^¦©"); /* vmsg("±z¨Ã¤£¬O¹ï¤èªº¦n¤Í¡AµLªk¦^¦©¤W¯¸³qª¾");*/ /* lkchu.981201: ¦n¤Í¥i¦^¦© */ - + break; } if(bmw.caller->ufo & UFO_REJECT) @@ -2332,7 +2332,7 @@ bmw_reply(void) } up = bmw.caller; -#if 1 +#if 1 if ((up < uhead) || (up > uhead + MAXACTIVE /*ushm->offset*/)) /* lkchu.981201: comparison of distinct pointer types */ { @@ -2370,7 +2370,7 @@ bmw_reply(void) /* bmw_edit(up, "¡¹¦^À³¡G", &bmw, cc); */ /* Thor.981214: ¬°¨Ï¦^¦©¤£­P§Ë²V */ sprintf(buf,"¡¹[%s]", up->userid); - bmw_edit(up, buf, &bmw, cc); + bmw_edit(up, buf, &bmw, cc); break; } } @@ -2426,7 +2426,7 @@ pal_list( break; } } - + break; case 'a': while (acct_get("½Ð¿é¤J¥N¸¹(¥u«ö ENTER µ²§ô·s¼W): ", &acct) > 0) @@ -2502,7 +2502,7 @@ aloha(void) BMW *bmw, benz; int userno; struct stat st; - + /* lkchu.981201: ¦n¤Í³qª¾ */ usr_fpath(fpath, cuser.userid, FN_FRIEND_BENZ); @@ -2530,7 +2530,7 @@ aloha(void) userno = bmw->recver; /* up = bmw->caller; */ up = utmp_find(userno); /* lkchu.981201: frienz ¤¤ªº utmp µL®Ä */ - + if (up >= ubase && up <= uceil && up->userno == userno && !(cuser.ufo & UFO_CLOAK) && can_message(up)) /* Thor.980804: Áô¨­¤W¯¸¤£³qª¾, ¯¸ªø¯SÅv */ @@ -2635,9 +2635,9 @@ loginNotify(void) if (up >= ubase && up <= uceil && up->userno == userno && !(cuser.ufo & UFO_CLOAK) && userno != cuser.userno && can_see(up) !=2) /* Thor.980804: Áô¨­¤W¯¸¤£³qª¾, ¯¸ªø¯SÅv */ -#if 0 +#if 0 /* Thor.980805: ¤£·|¦^¦©¤F, ³æ¦V call-in */ - && is_pal(userno) && + && is_pal(userno) && userno != cuser.userno && !(cuser.ufo & UFO_QUIET)) /* Thor.980707: ¤£´M¦Û¤v */ /* Thor.980804: »·Â÷¹ÐÄۮɤ£³qª¾,¥H¨¾¦^¦© */ #endif @@ -2645,7 +2645,7 @@ loginNotify(void) /* benz.sender = is_pal(userno) ? cuser.userno : 0; */ /* lkchu.980806: ¦n¤Í¤~¥i¥H reply */ if(!is_bad(userno) || (up->userlevel & PERM_SYSOP)) - { + { benz.sender = 0; benz.recver = userno; bmw_send(up, &benz); @@ -2682,7 +2682,7 @@ talk_save(void) { char fpath[64]; struct stat st; - + usr_fpath(fpath, cuser.userid, FN_TALK_LOG); stat(fpath, &st); @@ -2690,15 +2690,15 @@ talk_save(void) { char buf[64]; HDR fhdr; - + usr_fpath(buf, cuser.userid, fn_dir); hdr_stamp(buf, HDR_LINK, &fhdr, fpath); strcpy(fhdr.title, "[³Æ §Ñ ¿ý] ²á¤Ñ¬ö¿ý"); strcpy(fhdr.owner, cuser.userid); fhdr.xmode = MAIL_READ | MAIL_NOREPLY; - rec_add(buf, &fhdr, sizeof(fhdr)); + rec_add(buf, &fhdr, sizeof(fhdr)); - } + } unlink(fpath); return; @@ -2707,29 +2707,29 @@ talk_save(void) /* lkchu.981201: ©ñ¶i¨p¤H«H½c¤º/²M°£/«O¯d */ if (dashf(fpath)) { - + switch (vans("¥»¦¸²á¤Ñ¬ö¿ý³B²z (M)³Æ§Ñ¿ý (C)²M°£¡H[M] ")) { case 'c': unlink(fpath); break; - + default: { char buf[64]; HDR fhdr; - + usr_fpath(buf, cuser.userid, fn_dir); hdr_stamp(buf, HDR_LINK, &fhdr, fpath); strcpy(fhdr.title, "[³Æ §Ñ ¿ý] ²á¤Ñ¬ö¿ý"); strcpy(fhdr.owner, cuser.userid); fhdr.xmode = MAIL_READ | MAIL_NOREPLY; - rec_add(buf, &fhdr, sizeof(fhdr)); + rec_add(buf, &fhdr, sizeof(fhdr)); unlink(fpath); } break; - } + } } #endif @@ -2745,8 +2745,8 @@ bmw_save(void) char ans; char fpath[64],buf[128]; struct stat st; - - + + usr_fpath(fpath, cuser.userid, FN_BMW); fd = f_open(fpath); /* lkchu.990428: ­Y size ¬° 0 ·|³Q unlink ±¼ */ if (fd >= 0) @@ -2780,30 +2780,30 @@ bmw_save(void) case 'r': close(fd); break; - + case 'm': { FILE *fout; char buf[80], folder[80]; HDR fhdr; - + usr_fpath(folder, cuser.userid, fn_dir); if ((fout = fdopen(hdr_stamp(folder, 0, &fhdr, buf), "w"))) - { + { BMW bmw; - - while (read(fd, &bmw, sizeof(BMW)) == sizeof(BMW)) + + while (read(fd, &bmw, sizeof(BMW)) == sizeof(BMW)) { struct tm *ptime = localtime(&bmw.btime); - - fprintf(fout, "%s%s(%02d:%02d)¡G%s\033[m\n", + + fprintf(fout, "%s%s(%02d:%02d)¡G%s\033[m\n", bmw.sender == cuser.userno ? "¡¸" : "\033[32m¡¹", bmw.userid, ptime->tm_hour, ptime->tm_min, bmw.msg); } fclose(fout); } close(fd); - + fhdr.xmode = MAIL_READ | MAIL_NOREPLY; strcpy(fhdr.title, "[³Æ §Ñ ¿ý] ¼ö°T¬ö¿ý"); strcpy(fhdr.owner, cuser.userid); @@ -2812,11 +2812,11 @@ bmw_save(void) unlink(fpath); } break; - + default: close(fd); break; - } + } } } @@ -2869,8 +2869,8 @@ bmw_rqst(void) /* lkchu.981230: §Q¥Î xover ¾ã¦X bmw */ usr_fpath(buf, cuser.userid, FN_BMW); - rec_add(buf, &bmw[i], sizeof(BMW)); - + rec_add(buf, &bmw[i], sizeof(BMW)); + bmw_lslot[locus++] = *mptr; } while (++i < j); @@ -2883,20 +2883,20 @@ bmw_rqst(void) else sprintf(buf, BMW_FORMAT, mptr->userid, mptr->msg); - /* Thor.980827: ¬°¤F¨¾¤î¦C¦L¤@¥b(more)®É¼ö°T¦Ó«á¦C¦L¶W¹L½d³ò½ð¤H, + /* Thor.980827: ¬°¤F¨¾¤î¦C¦L¤@¥b(more)®É¼ö°T¦Ó«á¦C¦L¶W¹L½d³ò½ð¤H, ¬G¦s¤U´å¼Ð¦ì¸m */ - cursor_save(); + cursor_save(); outz(buf); - /* Thor.980827: ¬°¤F¨¾¤î¦C¦L¤@¥b(more)®É¼ö°T¦Ó«á¦C¦L¶W¹L½d³ò½ð¤H, + /* Thor.980827: ¬°¤F¨¾¤î¦C¦L¤@¥b(more)®É¼ö°T¦Ó«á¦C¦L¶W¹L½d³ò½ð¤H, ¬GÁÙ­ì´å¼Ð¦ì¸m */ cursor_restore(); refresh(); bell(); -#ifdef HAVE_SHOWNUMMSG +#ifdef HAVE_SHOWNUMMSG cutmp->num_msg++; -#endif +#endif } } } @@ -2999,10 +2999,10 @@ talk_speak( #ifdef LOG_TALK char mywords[80], itswords[80], itsuserid[40]; FILE *fp; - + /* lkchu: make sure that's empty */ mywords[0] = itswords[0] = '\0'; - + strcpy(itsuserid, page_requestor); strtok(itsuserid, " ("); #endif @@ -3140,7 +3140,7 @@ talk_speak( case Ctrl('H'): /* lkchu.981201: backspace */ itswords[str_len(itswords) - 1] = '\0'; break; - + default: if (str_len(itswords) < sizeof(itswords)) { @@ -3195,11 +3195,11 @@ talk_speak( mywords[0] = '\0'; } break; - + case Ctrl('H'): mywords[str_len(mywords) - 1] = '\0'; break; - + default: if (str_len(mywords) < sizeof(mywords)) { @@ -3216,19 +3216,19 @@ talk_speak( talk_char(&mywin, ch); -#ifdef EVERY_BIFF - /* Thor.980805: ¦³¤H¦b®ÇÃä«öenter¤~»Ý­ncheck biff */ +#ifdef EVERY_BIFF + /* Thor.980805: ¦³¤H¦b®ÇÃä«öenter¤~»Ý­ncheck biff */ if(ch=='\n') { - static int old_biff,old_biffn; - int biff = cutmp->ufo & UFO_BIFF; - if (biff && !old_biff) - talk_string(&mywin, "¡» ¾´! ¶l®t½Ä¶i¨Ó¤F!\n"); + static int old_biff,old_biffn; + int biff = cutmp->ufo & UFO_BIFF; + if (biff && !old_biff) + talk_string(&mywin, "¡» ¾´! ¶l®t½Ä¶i¨Ó¤F!\n"); old_biff = biff; - biff = cutmp->ufo & UFO_BIFFN; + biff = cutmp->ufo & UFO_BIFFN; if (biff && !old_biffn) talk_string(&mywin, "¡» ¾´! ±z¦³¯«¯µ¯d¨¥!\n"); - old_biffn = biff; + old_biffn = biff; } #endif } @@ -3367,11 +3367,11 @@ talk_page( #if defined(__OpenBSD__) /* lkchu */ if (!(h = gethostbyname(MYHOSTNAME))) - return -1; + return -1; memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_port = 0; - memcpy(&sin.sin_addr, h->h_addr, h->h_length); + memcpy(&sin.sin_addr, h->h_addr, h->h_length); #else @@ -3421,7 +3421,7 @@ talk_page( outs("¦A"); bell(); - if (kill(pid, SIGUSR1)) + if (kill(pid, SIGUSR1)) /* Thor.990201:µù¸Ñ:¨ä¹ê³oªºkill,¤]¥u¬O¬Ý¬Ý¹ï¤è¬O¤£¬OÁÙ¦b½u¤W¦Ó¤w:p ­«µosignal¨ä¹ê¦ü¥G talk_rqst¤£·|¦A³Q¥s */ { @@ -3448,10 +3448,10 @@ talk_page( * starlight, ¦ý¦b starlight ¦^À³«e«o°¨¤WÂ÷¶}, ´« page backspace, * backspace©|¥¼¦^À³«e, ¦pªG starlight ¦^À³¤F, starlight ´N·|³Q accept, * ¦Ó¤£¬O backspace. - * + * * ¦¹®É¦b¿Ã¹õ¤¤¥¡, ¬Ý¨ìªº page_requestor·|¬O backspace, ¥i¬O¨Æ¹ê¤W, * talkªº¹ï¶H¬O starlight, ³y¦¨Âû¦PÀnÁ¿! - * + * * ¼È®É¤£¤©­×¥¿, ¥H§@¬°ªá¤ßªÌªºÃg»@:P */ @@ -3526,12 +3526,12 @@ static char *msg_pickup_way[PICKUP_WAYS] = "°ÊºA", "¼ÊºÙ", "¶¢¸m" -#ifdef HAVE_BOARD_PAL +#ifdef HAVE_BOARD_PAL ,"ªO¤Í" #endif }; -static char +static char ck_state( int in1, int in2, @@ -3549,7 +3549,7 @@ ck_state( } else return ' '; -} +} @@ -3565,10 +3565,10 @@ ulist_body( #ifdef HAVE_BOARD_PAL int isbpal; - + isbpal = (cutmp->board_pal != -1); #endif - + max = xo->max; if (max <= 0) { @@ -3588,40 +3588,40 @@ ulist_body( { up = pp->utmp; -#if 0 +#if 0 if(supervisor) { sprintf(ship,"%s,%d,%d",up->userid,pp->type,up->userno); vmsg(ship); } #endif - + if ((userno = up->userno) && (up->userid[0]) && !((up->ufo & UFO_CLOAK) && !HAS_PERM(PERM_SEECLOAK) && (up->userno != cuser.userno)) ) { if ((diff = up->idle_time)) sprintf(buf, "%2d", diff); else buf[0] = '\0'; - + paltmp = (pp->type == 1 || pp->type == 2); fcolor = (userno == self) ? 3 : paltmp; -#ifdef HAVE_BOARD_PAL - if(isbpal && is_boardpal(up) && userno != self) +#ifdef HAVE_BOARD_PAL + if(isbpal && is_boardpal(up) && userno != self) fcolor = 6; #else - if(userno != self) + if(userno != self) fcolor = 6; #endif colortmp = (pp->type == 1 || pp->type == 3); - if(paltmp && colortmp == 1) + if(paltmp && colortmp == 1) fcolor = 3; - else if (!paltmp && colortmp == 1) + else if (!paltmp && colortmp == 1) fcolor = 4; - - if (is_bad(userno)) + + if (is_bad(userno)) fcolor = 2; if(cuser.ufo2 & UFO2_SHIP) @@ -3629,7 +3629,7 @@ ulist_body( strcpy(ship," "); copyship(ship,userno); } - + ufo = up->ufo; @@ -3638,19 +3638,19 @@ ulist_body( colortmp = 1; - if(ufo & UFO_CLOAK) + if(ufo & UFO_CLOAK) fcolor = 5; else if(fcolor == 0) - colortmp = 0; + colortmp = 0; strcpy(color,wcolor[fcolor]); prints("%5d%c%s%-13s%-22.21s%s%-16.15s%c%c %-16.16s%s", cnt,(up->ufo & UFO_WEB)?'*':' ', color, up->userid, - (HAS_PERM(PERM_SYSOP) && (cuser.ufo2 & UFO2_REALNAME))? up->realname : up->username , + (HAS_PERM(PERM_SYSOP) && (cuser.ufo2 & UFO2_REALNAME))? up->realname : up->username , colortmp > 0 ? "\033[m" : "", - (cuser.ufo2 & UFO2_SHIP) ? ship : ((up->ufo & UFO_HIDDEN)&&!HAS_PERM(PERM_SYSOP)) ? + (cuser.ufo2 & UFO2_SHIP) ? ship : ((up->ufo & UFO_HIDDEN)&&!HAS_PERM(PERM_SYSOP)) ? HIDDEN_SRC : up->from , diff,diffmsg, bmode(up, 0), buf); } @@ -3721,7 +3721,7 @@ static int (*ulist_cmp[]) (PICKUP *i, PICKUP *j) = ulist_cmp_mode, ulist_cmp_nick, ulist_cmp_idle -#ifdef HAVE_BOARD_PAL +#ifdef HAVE_BOARD_PAL ,ulist_cmp_board #endif }; @@ -3743,7 +3743,7 @@ ulist_init( self = cuser.userno; filter = cuser.ufo2 & UFO2_PAL; - + if(cutmp->pid <= 0 || cutmp->userno <= 0) reset_utmp(); @@ -3768,21 +3768,21 @@ ulist_init( if (userno <= 0 || (up->pid <= 0 && !HAS_PERM(PERM_SYSOP|PERM_SEECLOAK))) continue; if (!seecloak && (up->ufo & UFO_CLOAK)) - continue; + continue; tmp = can_see(up); - if(is_bad(userno)) + if(is_bad(userno)) { bfriend_num++; bad = 1; } else bad = 0; - + if (((seecloak || !(up->ufo & UFO_CLOAK)) && (tmp != 2)) || HAS_PERM(PERM_SYSOP|PERM_SEECLOAK) || up->userno == cuser.userno) { #ifdef HAVE_BOARD_PAL - if(isbpal && is_boardpal(up)) - board_pals++; + if(isbpal && is_boardpal(up)) + board_pals++; #endif ispal = is_pal(userno); @@ -3823,7 +3823,7 @@ ulist_init( if (userno <= 0) continue; if ((userno == self) || ((seecloak || !(up->ufo & UFO_CLOAK))&&(can_see(up)!=2 || HAS_PERM(PERM_SYSOP)) && (!filter || is_pal(userno)))) - { + { *pp++ = up; } } while (++up <= uceil); @@ -3840,16 +3840,16 @@ ulist_init( xsort(ulist_pool, max, sizeof(PICKUP), ulist_cmp[pickup_way - 1]); } total_num = max; - + /* cache.101023: shmÃz¬µ³y¦¨¤H¼Æ¶Ã±¼«áªº¦Û°Ê­×¥¿ */ #ifdef AUTO_FIX_INFO ushm->count = total_num; - + extern BCACHE *bshm; if ((fd = brd_bno(currboard)) >= 0) bshm->mantime[fd] = board_pals; /* ³Ì«á¬Ýªº¨º­ÓªO¤H¼Æ§ó·s */ -#endif - +#endif + return ulist_head(xo); } @@ -3894,7 +3894,7 @@ ulist_toggle( int ans, max; ans = pickup_way + 1; ans %= PICKUP_WAYS; - + pickup_way = ans; max = xo->max; if (max <= 1) @@ -3929,7 +3929,7 @@ ulist_search( str_lower(bufl, buf); buflen = strlen(bufl); /* Thor: ¥²©w¤j©ó0 */ - + pos = num = xo->pos; max = xo->max; pp = ulist_pool; @@ -3943,7 +3943,7 @@ ulist_search( /* Thor.990124: id «h±qÀY match */ /* if (str_ncmp(pp[pos]->userid, bufl, buflen)==0 */ - + if (str_str(pp[pos].utmp->userid, bufl) /* lkchu.990127: §ä³¡¥÷ id ¦n¹³¤ñ¸û¦n¥Î :p */ || str_str(pp[pos].utmp->username, bufl)) /* Thor.990124: ¥i¥H§ä ³¡¤À nickname */ { @@ -3987,7 +3987,7 @@ ulist_makepal( userno = up->userno; if (userno > 0 && !is_pal(userno) && !is_bad(userno) /* ©|¥¼¦C¤J¦n¤Í¦W³æ */ && (userno != cuser.userno)) /* lkchu.981217: ¦Û¤v¤£¥i¬°¦n¤Í */ - + { PAL pal; char buf[80]; @@ -4027,7 +4027,7 @@ ulist_makebad( userno = up->userno; if (userno > 0 && !is_pal(userno) && !is_bad(userno) /* ©|¥¼¦C¤J¦n¤Í¦W³æ */ && (userno != cuser.userno)) /* lkchu.981217: ¦Û¤v¤£¥i¬°¦n¤Í */ - + { PAL pal; char buf[80]; @@ -4184,12 +4184,12 @@ ulist_write( sprintf(buf, "¡¹[%s]", up->userid); bmw_edit(up, buf, &bmw, 0); } -#ifdef HAVE_BANMSG +#ifdef HAVE_BANMSG else if(!(up->ufo & UFO_MESSAGE) && can_banmsg(up)) { vmsg("¹ï¤è¤£·QÅ¥¨ì±zªºÁn­µ!!"); } -#endif +#endif return XO_INIT; } return XO_NONE; @@ -4218,7 +4218,7 @@ ulist_su( { XO *tmp; ACCT acct; - char path[80]; + char path[80]; int level,ufo; ufo = cuser.ufo; level = cuser.userlevel; @@ -4229,7 +4229,7 @@ ulist_su( memcpy(&cuser,&acct,sizeof(ACCT)); cuser.userlevel = level; cuser.ufo = ufo; - usr_fpath(path,acct.userid,".DIR"); + usr_fpath(path,acct.userid,".DIR"); tmp = xz[XZ_MBOX - XO_ZONE].xo; xz[XZ_MBOX - XO_ZONE].xo = xo_new(path); free(tmp); @@ -4237,7 +4237,7 @@ ulist_su( tmp = xz[XZ_BMW - XO_ZONE].xo; xz[XZ_BMW - XO_ZONE].xo = xo_new(path); free(tmp); - pal_cache(); + pal_cache(); return ulist_init(xo); } /* BLACK SU */ @@ -4291,10 +4291,10 @@ ulist_fromchange( XO *xo) { char *str, buf[34]; - + if (!HAS_PERM(PERM_ADMIN)) return XO_NONE; - + strcpy(buf, str = cutmp->from); vget(b_lines, 0, "½Ð¿é¤J·sªº¬G¶m¡G", buf, sizeof(cutmp->from), GCARRY); if (strcmp(buf, str)) @@ -4382,7 +4382,7 @@ ulist_pager( cuser.ufo ^= UFO_PAGER1; cutmp->ufo ^= UFO_PAGER1; } - else + else { cuser.ufo ^= UFO_PAGER; cutmp->ufo ^= UFO_PAGER; @@ -4409,7 +4409,7 @@ ulist_message( cuser.ufo ^= UFO_MESSAGE; cutmp->ufo ^= UFO_MESSAGE; } - else + else { cuser.ufo ^= UFO_QUIET; cutmp->ufo ^= UFO_QUIET; @@ -4433,7 +4433,7 @@ ulist_realname( { cuser.ufo2 ^= UFO2_REALNAME; // cutmp->ufo ^= UFO_REALNAME; - } + } return ulist_init(xo); } @@ -4451,7 +4451,7 @@ ulist_mp( XO *xo) { int tmp; - + if(!HAS_PERM(PERM_VALID)) return XO_NONE; tmp = t_pal(); @@ -4466,7 +4466,7 @@ ulist_readmail( { if (HAS_PERM(PERM_DENYMAIL)) vmsg("±zªº«H½c³QÂê¤F¡I"); - else + else xover(XZ_MBOX); return ulist_init(xo); } @@ -4487,7 +4487,7 @@ ulist_del( ans = vans("¬O§_§R°£(y/N)¡G"); if (ans == 'y' || ans == 'Y') - { + { up = ulist_pool[xo->pos].utmp; userno = up->userno; @@ -4500,7 +4500,7 @@ ulist_del( if(pal->userno!=userno) tmp = tmp + 1; else - { + { rec_del(fpath,sizeof(PAL),tmp,NULL,NULL); break; } @@ -4648,7 +4648,7 @@ KeyFunc ulist_cb[] = #ifdef HAVE_CHANGE_FROM {Ctrl('F'), ulist_fromchange}, #endif - + #if 0 {'/', ulist_search}, #endif @@ -4685,7 +4685,7 @@ t_message(void) cuser.ufo ^= UFO_MESSAGE; cutmp->ufo ^= UFO_MESSAGE; } - else + else { cuser.ufo ^= UFO_QUIET; cutmp->ufo ^= UFO_QUIET; @@ -4710,7 +4710,7 @@ t_pager(void) cuser.ufo ^= UFO_PAGER1; cutmp->ufo ^= UFO_PAGER1; } - else + else { cuser.ufo ^= UFO_PAGER; cutmp->ufo ^= UFO_PAGER; @@ -4995,7 +4995,7 @@ talk_rqst(void) sin.sin_family = AF_INET; sin.sin_port = port; memcpy(&sin.sin_addr, h->h_addr, h->h_length); - + #else sin.sin_family = AF_INET; @@ -5047,12 +5047,12 @@ void talk_main(void) { char fpath[64]; - + xz[XZ_ULIST - XO_ZONE].xo = &ulist_xo; xz[XZ_ULIST - XO_ZONE].cb = ulist_cb; xz[XZ_PAL - XO_ZONE].cb = pal_cb; - + /* lkchu.981230: §Q¥Î xover ¾ã¦X bmw */ usr_fpath(fpath, cuser.userid, FN_BMW); xz[XZ_BMW - XO_ZONE].xo = xo_new(fpath); @@ -5142,8 +5142,8 @@ banmsg_cache(void) } up->banmsg_max = count; - - if(fimage) + + if(fimage) free(fimage); } @@ -5375,7 +5375,7 @@ banmsg_change( { BANMSG *banmsg, mate; int pos, cur; - + pos = xo->pos; cur = pos - xo->top; banmsg = (BANMSG *) xo_pool + cur; diff --git a/maple/visio.c b/maple/visio.c index 5875d5ee9..5a04a0b03 100644 --- a/maple/visio.c +++ b/maple/visio.c @@ -156,7 +156,7 @@ static int scrollcnt, tc_col, tc_row; static screenline vbuf[t_lines]; -//static +//static screenline *cur_slp; /* current screen line pointer */ @@ -884,7 +884,7 @@ expand_esc_star_visio(char *buf, const char *src, int szbuf) return 2; case 't': // current time strlcpy(buf, Now(), szbuf); - return 1; + return 1; } // unknown characters, return from star. @@ -925,7 +925,7 @@ outx( str++; str++; str++; - break; + break; case 'n': /* **n Åã¥Ü¼ÊºÙ */ outs(cuser.username); str++; @@ -940,18 +940,18 @@ outx( str++; str++; str++; - break; + break; default: str++; - break; + break; } } else { - str--; + str--; } str--; - str--; + str--; str--; ch = *str; outc(ch); @@ -966,9 +966,9 @@ outx( /* while ((ch = *str)) { - - - + + + switch (ch) { case 1: @@ -987,8 +987,8 @@ outx( outc(ch); str++; } -*/ - +*/ + } #endif @@ -1084,7 +1084,7 @@ cursor_save(void) cursor_restore(void) { move(old_row, old_col); - + cur_pos = old_pos; /* Thor.990401: ¦hÁÙ­ì¤@­Ó */ } @@ -1158,7 +1158,7 @@ int vmsg( char *msg) /* length < 54 */ { - + if (msg) { move(b_lines, 0); @@ -1171,11 +1171,11 @@ vmsg( move(b_lines, 0); clrtoeol(); color =time(0)%6+31; -#ifdef HAVE_COLOR_VMSG +#ifdef HAVE_COLOR_VMSG prints("\033[1;%dm ¢j¢k¢l¢m¢n¢o¢p \033[1;37m½Ð«ö¥ô·NÁäÄ~Äò \033[1;%dm¢p\033[m ",color,color); -#else - outs("\033[1;37;45m ¡´ ½Ð«ö¥ô·NÁäÄ~Äò ¡´ \033[m"); -#endif +#else + outs("\033[1;37;45m ¡´ ½Ð«ö¥ô·NÁäÄ~Äò ¡´ \033[m"); +#endif } return vkey(); } @@ -1184,9 +1184,9 @@ vmsg( static inline void zkey(void) /* press any key or timeout */ { - /* static */ struct timeval tv = {1, 100}; + /* static */ struct timeval tv = {1, 100}; /* Thor.980806: man page °²³] timeval struct¬O·|§ïÅܪº */ - + int rset; rset = 1; @@ -1298,7 +1298,7 @@ grayout(int type) char *prefix[3] = { "\033[1;30m", "\033[1;37m", "\033[0;37m" }; char buf[ANSILINELEN]; register int i; - + vs_save(slp); memcpy(newslp, slp, sizeof(newslp)); @@ -1439,7 +1439,7 @@ igetch(void) #ifdef HAVE_SHOWNUMMSG if(cutmp) cutmp->num_msg = 0; -#endif +#endif break; } if ((cc == 0) || (errno != EINTR)) @@ -1478,7 +1478,7 @@ igetch(void) outz("\033[41;5;1;37mĵ§i¡I§A¤w¸g¶¢¸m¹L¤[¡A¨t²Î±N¦b¤T¤À«á±N§A½ð°£¡I\033[m"); refresh(); } -#endif // KICK_IDLE_TIMEOUT +#endif // KICK_IDLE_TIMEOUT if (cc) { cutmp->idle_time = idle; @@ -1522,7 +1522,7 @@ igetch(void) continue; } - if ((cc == Ctrl('R')) && (bbstate & STAT_STARTED) && !(bbstate & STAT_LOCK) + if ((cc == Ctrl('R')) && (bbstate & STAT_STARTED) && !(bbstate & STAT_LOCK) && !(imode & IM_REPLY)) /* lkchu.990513: Âê©w®É¤£¥i¦^°T */ { /* @@ -1550,7 +1550,7 @@ igetch(void) #define MATCH_END 0x8000 -/* Thor.990204: µù¸Ñ: ¥NªíMATCH§¹µ², ­n¹À´N¸É¨¬, +/* Thor.990204: µù¸Ñ: ¥NªíMATCH§¹µ², ­n¹À´N¸É¨¬, ­n¹À´Nºû«ù­ìª¬, ¤£¨q¥X¥i¯àªº­È¤F */ static void @@ -1686,7 +1686,7 @@ vget_match( struct dirent *de; DIR *dirp; int cc; - int cd; + int cd; char fpath[16]; /* Thor.981203: USER name¦Ü¤Ö¥´¤@¦r, ¥Î"<="·|¤ñ¸û¦n¶Ü? */ @@ -1718,7 +1718,7 @@ vget_match( data = de->d_name; if (*data <= ' ' || *data == '.') continue; - + // if (str_ncmp(prefix, data, len)) if (len && str_ncmp(prefix, data, len)) continue; @@ -1742,7 +1742,7 @@ vget_match( { cc = 'z'; /* Â÷¶} for °j°é */ break; - } + } row = 3; } } @@ -1863,7 +1863,7 @@ int vget(int line,int col,unsigned char *prompt,unsigned char *data,int max,int if (ch == '\n') { data[len] = '\0'; - if ((echo & (GET_BRD | GET_LIST)) && len > 0) + if ((echo & (GET_BRD | GET_LIST)) && len > 0) /* Thor.990204:­n¨D¿é¤J¥ô¤@¦r¤~¥Nªí¦Û°Ê match, §_«hºâcancel */ { ch = len; diff --git a/maple/window.c b/maple/window.c index 3282a363d..aa6df425c 100644 --- a/maple/window.c +++ b/maple/window.c @@ -8,7 +8,7 @@ /* modify : itoc.bbs@bbs.tnfsh.tn.edu.tw */ /*-------------------------------------------------------*/ -/* 90929.cache: ²Ä¤GºØ¹Ï§Î¿ï³æ */ +/* 90929.cache: ²Ä¤GºØ¹Ï§Î¿ï³æ */ #include "bbs.h" @@ -45,7 +45,7 @@ static void memset(data, 0, sizeof(data)); strncpy(data, slt[i].data, slt[i].len); str = data; - + move(x, 0); clrtoeol(); diff --git a/maple/xchatd.c b/maple/xchatd.c index a9f0777eb..5858456a7 100644 --- a/maple/xchatd.c +++ b/maple/xchatd.c @@ -949,13 +949,13 @@ chat_mud( { ChatRoom *room; - room = cu->room; + room = cu->room; if (!ROOMOP(cu)) { return; } - mudshm_init(); + mudshm_init(); send_to_room(room, "¡° §ó·s" CHATROOMNAME "°ÊºAµü", 0, MSG_MESSAGE); } @@ -975,7 +975,7 @@ chat_topic( send_to_user(cu, msg_not_op, 0, MSG_MESSAGE); return; } - + if(strstr(msg,"\\033")) { send_to_user(cu, "¡° ¤£¦X®æªº¸ÜÃD", 0, MSG_MESSAGE); @@ -1159,7 +1159,7 @@ chat_do_user_list( if (!cu->userno) continue; */ /* Thor.980717: ¬JµM cu ³£ªÅ¤F¨ºÁÙ¶i¨Ó·F»ò? */ - if (!user->userno) + if (!user->userno) continue; room = user->room; @@ -1179,7 +1179,7 @@ chat_do_user_list( /* Thor.980717:¤W­zlogic¦³»~ */ /* Thor.980717: viewer check */ - if ((myroom != room) && (RESTRICTED(cu) || + if ((myroom != room) && (RESTRICTED(cu) || (room && SECRET(room) && !CHATSYSOP(cu)))) continue; @@ -1419,7 +1419,7 @@ chat_setroom( modestr++; } - /* Thor.980602: ¤£­ã Main room Âê°_ or ¯µ±K, ³o¦¨¦óÅé²Î? + /* Thor.980602: ¤£­ã Main room Âê°_ or ¯µ±K, ³o¦¨¦óÅé²Î? Â÷¶}ªº´N¶i¤£¨Ó, ­n¬Ý¤]¬Ý¤£¨ì? ·Q­n½ð¤H¤]½ð¤£¶i main room, ¤£·|«Ü©_©Ç¶Ü? */ if(str_equal(MAIN_NAME, room->name)) @@ -1579,7 +1579,7 @@ chat_cloak( { char buf[128]; ChatRoom *room; - + cu->uflag ^= PERM_CLOAK; room = cu->room; @@ -1909,7 +1909,7 @@ login_user( #ifndef STAND_ALONE /* Thor.980629: ¼È®É­É¥Î invalid_chatid Âo°£ ¨S¦³PERM_CHATªº¤H */ - + if (!valid_chatid(chatid) || !(level & PERM_CHAT) || (level & PERM_DENYCHAT)) { /* Thor.981012: ¹ý©³¤@¨Ç, ³s denychat¤]BAN±¼, §K±o client§@©Ç */ @@ -2155,7 +2155,7 @@ chat_kick( { /* Thor.980604: ¥Î userid¤]¹À³q */ xuser = cuser_by_userid(twit); } - + if (xuser == NULL) { sprintf(buf, msg_no_such_id, twit); @@ -2183,7 +2183,7 @@ chat_kick( if (room == &mainroom) xuser->uptime = 0; /* logout_user(xuser); */ else - enter_room(xuser, MAIN_NAME, (char *) NULL); + enter_room(xuser, MAIN_NAME, (char *) NULL); /* Thor.980602: ¨ä¹ê½ð´N½ð,¤£­nshow¥XxxxÂ÷¶}¤Fªº°T®§¤ñ¸û¦n */ } @@ -2214,7 +2214,7 @@ chat_makeop( : "¡° " SYSOPNICK " ±N %s ªº Op Åv¤O¦¬¦^", cu->chatid); send_to_room(room, buf, 0, MSG_MESSAGE); } - + return; } @@ -2233,7 +2233,7 @@ chat_makeop( xuser = cuser_by_userid(newop); } #endif - + if (xuser == NULL) { @@ -2297,7 +2297,7 @@ chat_invite( xuser = cuser_by_userid(invitee); } #endif - + if (xuser == NULL) { sprintf(buf, msg_no_such_id, invitee); @@ -2504,7 +2504,7 @@ person_action( } else { - + if (*party == '\0') { party = "¤j®a"; @@ -2518,7 +2518,7 @@ person_action( { xuser = cuser_by_userid(party); } - + if (xuser == NULL) { sprintf(buf, msg_no_such_id, party); @@ -2542,7 +2542,7 @@ person_action( } } sprintf(buf, "\x1b[1;32m%s \x1b[31m%s\x1b[33m %s \x1b[31m%s\x1b[m", - cu->chatid, cap->part1_msg, party, cap->part2_msg); + cu->chatid, cap->part1_msg, party, cap->part2_msg); } send_to_room(cu->room, buf, cu->userno, MSG_MESSAGE); return 1; @@ -2561,7 +2561,7 @@ static char *dscrb[] = { "\x1b[1;37m¡i Verb + Nick¡G °Êµü + ¹ï¤è¦W¦r ¡j\x1b[36m ¨Ò¡G//kick piggy\x1b[m", "\x1b[1;37m¡i Verb + Message¡G°Êµü + ­n»¡ªº¸Ü ¡j\x1b[36m ¨Ò¡G//sing ¤Ñ¤Ñ¤ÑÂÅ\x1b[m", - "\x1b[1;37m¡i Verb¡G°Êµü ¡j ¡ô¡õ¡G¸ܭ«´£\x1b[m", + "\x1b[1;37m¡i Verb¡G°Êµü ¡j ¡ô¡õ¡G¸ܭ«´£\x1b[m", "\x1b[1;37m¡i Verb + Nick¡G °Êµü + ¹ï¤è¦W¦r ¡j\x1b[36m ¨Ò¡G//kick piggy\x1b[m", "\x1b[1;37m¡i Verb¡G°Êµü ¡j ¡ô¡õ¡G­Ó¤HÃþ°Êµü\x1b[m", NULL @@ -2980,7 +2980,7 @@ cuser_serve( static int -/* start_daemon(mode) +/* start_daemon(mode) int mode; */ servo_daemon( int inetd) @@ -3019,7 +3019,7 @@ servo_daemon( #ifdef SOLARIS #define RLIMIT_RSS RLIMIT_AS /* Thor.981206: port for solaris 2.6 */ -#endif +#endif setrlimit(RLIMIT_RSS, &limit); @@ -3207,7 +3207,7 @@ main_signals(void) /* Thor.981206: ²Î¤@ POSIX ¼Ð·Ç¥Îªk */ /* act.sa_mask = 0; */ /* Thor.981105: ¼Ð·Ç¥Îªk */ - sigemptyset(&act.sa_mask); + sigemptyset(&act.sa_mask); act.sa_flags = 0; act.sa_handler = sig_trap; @@ -3246,7 +3246,7 @@ attach_shm( int shmkey, int shmsize) { void *shmptr; - int shmid; + int shmid; shmid = shmget(shmkey, shmsize, 0); if (shmid < 0) @@ -3257,7 +3257,7 @@ attach_shm( { shmsize = 0; } - + shmptr = (void *) shmat(shmid, NULL, 0); if (shmsize) @@ -3284,7 +3284,7 @@ void mudshm_init(void) { ChatAction *head; - int fw,size; + int fw,size; struct stat st; @@ -3293,11 +3293,11 @@ mudshm_init(void) head = party_data = mud->chat_party; fw = open(FN_CHAT_PARTY_DB,O_RDONLY); fstat(fw, &st); - + if(!fstat(fw, &st) && (size = st.st_size) > 0) { if(size > PARTY_MAX * sizeof(ChatAction)) - size = PARTY_MAX * sizeof(ChatAction); + size = PARTY_MAX * sizeof(ChatAction); memset(head,0,PARTY_MAX * sizeof(ChatAction)); if (size) read(fw, head, size); @@ -3316,12 +3316,12 @@ mudshm_init(void) if (size) read(fw, head, size); } - close(fw); + close(fw); head = speak_data = mud->chat_speak; fw = open(FN_CHAT_SPEAK_DB,O_RDONLY); fstat(fw, &st); - + if(!fstat(fw, &st) && (size = st.st_size) > 0) { if(size > SPEAK_MAX * sizeof(ChatAction)) @@ -3335,7 +3335,7 @@ mudshm_init(void) head = condition_data = mud->chat_condition; fw = open(FN_CHAT_CONDITION_DB,O_RDONLY); fstat(fw, &st); - + if(!fstat(fw, &st) && (size = st.st_size) > 0) { if(size > CONDITION_MAX * sizeof(ChatAction)) @@ -3396,10 +3396,10 @@ main( "\t-h help\n", argv[0]); exit(0); - } + } } - servo_daemon(sock); + servo_daemon(sock); /* start_daemon(argc); */ setgid(BBSGID); @@ -3442,7 +3442,7 @@ main( for (FBI = &mainuser; (cu = *FBI);) { -#ifdef CHATROOM_KICK_TIMEOUT_USER +#ifdef CHATROOM_KICK_TIMEOUT_USER if (cu->uptime < tcheck) { cuser_free(cu); @@ -3462,7 +3462,7 @@ main( maxfds = sock; FBI = &(cu->unext); -#ifdef CHATROOM_KICK_TIMEOUT_USER +#ifdef CHATROOM_KICK_TIMEOUT_USER } #endif } @@ -3481,7 +3481,7 @@ main( rset = mainfset; xset = mainfset; - /* Thor.981206: for future reservation bug */ + /* Thor.981206: for future reservation bug */ tv_tmp = tv; nfds = select(maxfds, &rset, NULL, &xset, &tv_tmp); @@ -3591,7 +3591,7 @@ main( value = sizeof(sin); sock = accept(0, (struct sockaddr *) &sin, (socklen_t *) &value); - + if (sock > 0) { if ((cu = userpool)) diff --git a/maple/xover.c b/maple/xover.c index 86e85ad02..a409b2db2 100644 --- a/maple/xover.c +++ b/maple/xover.c @@ -202,7 +202,7 @@ hdr_prune( if(!post) { if ((fwrite(hdr, sizeof(HDR), 1, fpw) != 1)) - { + { close(fdr); fclose(fpw); unlink(fnew); @@ -218,7 +218,7 @@ hdr_prune( cancel_post(hdr); if(!post) { - + hdr_fpath(fold, folder, hdr); unlink(fold); } @@ -511,7 +511,7 @@ xo_prune( #ifdef HAVE_MAILUNDELETE else if(bbsmode == M_RMAIL) hdr_prune(xo->dir, 0, 0 , 2); -#endif +#endif else hdr_prune(xo->dir, 0, 0 , 0); @@ -549,7 +549,7 @@ xo_copy( { outz("¡¹ ¦¹ªO¤å³¹¤£¥iÂà¶K"); return XO_NONE; - } + } } tag = AskTag("«þ¨©¨ì¼È¦sÀÉ"); @@ -585,7 +585,7 @@ xo_copy( if ((hdr->xmode & (GEM_LOCK)) && !HAS_PERM(PERM_SYSOP)) continue; - + if (!(hdr->xmode & GEM_FOLDER)) /* ¬d hdr ¬O§_ plain text */ { @@ -634,7 +634,7 @@ deny_forward(void) { unsigned int level; - /* Thor.980602: ·Q±N©Ò¦³°ÊºAÅv­­ªº§ïÅܲΤ@©ñ¦Ülogin³B, ·Pı¤ñ¸û¤£Âø + /* Thor.980602: ·Q±N©Ò¦³°ÊºAÅv­­ªº§ïÅܲΤ@©ñ¦Ülogin³B, ·Pı¤ñ¸û¤£Âø ¦P®É deny_mail§Æ±æ¯à³æ¿W§@¬° BAN mailªº§@¥Î ¨Ã²Î¤@±N PERM_CHAT, PERM_PAGE, PERM_POST µ¥ ¦Û°ÊÅܧóªºÅv­­, ²Î¤@ºÞ²z, »P¤â°ÊÅܧóÅv­­¤À§O */ @@ -682,7 +682,7 @@ xo_forward( { outz("¡¹ ¦¹ªO¤å³¹¤£¥iÂà¶K"); return XO_NONE; - } + } } /* @@ -729,13 +729,13 @@ xo_forward( sprintf(fpath, "¬dµL¦¹¤H¡G%s", rcpt); zmsg(fpath); return XO_FOOT; - } - } + } + } else if (!str_cmp(rcpt, userid)) { /* userno = cuser.userno; */ /* Thor.981027: ±Hºë¿ï¶°µ¹¦Û¤v¤£³qª¾¦Û¤v */ method = MF_SELF; - + if(mail_stat(CHK_MAIL_NOMSG)) { vmsg("§Aªº«H½c®e¶q¶W¹L¤W­­¡AµLªk¨Ï¥Î¥»¥\\¯à¡I"); @@ -743,8 +743,8 @@ xo_forward( return XO_FOOT; } else - chk_mailstat = 0; - + chk_mailstat = 0; + } else { @@ -789,7 +789,7 @@ xo_forward( if((hdr->xmode & (POST_LOCK|GEM_RESTRICT|GEM_RESERVED)) && !(HAS_PERM(PERM_ALLBOARD) || (bbstate & STAT_BOARD))) continue; - + if((hdr->xmode & GEM_LOCK) && !HAS_PERM(PERM_SYSOP)) continue; @@ -943,7 +943,7 @@ xo_uquery_lite( move(b_lines - 8, 0); clrtobot(); /* ÁקKµe­±´Ý¯d */ - prints("\033[1;34m"MSG_BLINE"\033[m"); + prints("\033[1;34m"MSG_BLINE"\033[m"); prints("\n\033[1;33;44m \033[37m¤å³¹§@ªÌ¤Î¸ê°T¬d¸ß¡G %*s \033[m\n", 55,""); prints("\n"); // clrtobot(); @@ -954,7 +954,7 @@ xo_uquery_lite( move(b_lines - 1, 0); clrtobot(); /* ÁקKµe­±´Ý¯d */ prints("\n"); - + /* xo->pos = cpos; */ return XO_HEAD; } @@ -1170,7 +1170,7 @@ xo_thread( if (!vget(b_lines, 0, "¦V«e§ä´M 0)­º½g¥¼Åª 1)¥½½g¤wŪ ", s_unread, sizeof(s_unread), GCARRY)) return XO_FOOT; /* Thor.980911: §ä¨ì®É, «h¨S²MXO_FOOT, ¦A¬Ý¬Ý«ç»ò§ï */ - if (*s_unread == '0') + if (*s_unread == '0') op |= RS_FIRST; /* Thor.980909: ¦V«e§ä´M­º½g¥¼Åª */ near = xo->dir[0]; @@ -1405,8 +1405,8 @@ xo_thread( } -/* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È, ¥H«K¬Ý¤@¥b¥i¥H¥Î []... - ch ¬°¥ý«emore()¤¤©Ò«öªºkey */ +/* Thor.990204: ¬°¦Ò¼{more ¶Ç¦^­È, ¥H«K¬Ý¤@¥b¥i¥H¥Î []... + ch ¬°¥ý«emore()¤¤©Ò«öªºkey */ int xo_getch( XO *xo, @@ -1502,8 +1502,8 @@ xover( XO *xo=NULL; KeyFunc *xcmd=NULL; KeyFunc *cb; - - + + #if 1 /* Thor.0613: »²§U°T®§ */ static int msg = 0; @@ -1617,7 +1617,7 @@ xover( if (pos == num) { void *p = DL_get((char *) cb->func); - if(p) + if(p) { cb->func = p; pos = cb->key = cmd; @@ -1634,7 +1634,7 @@ xover( cmd = (*(cb->func)) (xo); if (cmd == XO_QUIT) - { + { xo_user_level--; return; } @@ -1671,7 +1671,7 @@ xover( } /* Thor.990220:µù¸Ñ: end of while(cmd!=XO_NONE) */ - utmp_mode(sysmode); + utmp_mode(sysmode); /* Thor.990220:µù¸Ñ:¥Î¨Ó¦^´_ event handle routine ¦^¨Ó«áªº¼Ò¦¡ */ pos = xo->pos; @@ -1686,7 +1686,7 @@ xover( } cmd = vkey(); - + /* ------------------------------------------------- */ /* switch Zone */ /* ------------------------------------------------- */ @@ -1702,8 +1702,8 @@ xover( cmd = XO_INIT; continue; } - - + + if (cmd == Ctrl('Z')) { every_Z(); @@ -1770,7 +1770,7 @@ xover( /* cmd = XO_LAST; *//* try to load the last XO in future */ if(zone == XZ_MBOX) { - + #ifdef HAVE_MAILUNDELETE int deltotal; char fpath[256]; @@ -1784,7 +1784,7 @@ xover( hdr_prune(fpath, 0, 0 , 3); } } -#endif +#endif if(mail_stat(CHK_MAIL_VALID)) { vmsg("§Aªº«H½c®e¶q¶W¹L¤W­­¡A½Ð¾ã²z¡I"); @@ -1830,7 +1830,7 @@ xover( { cmd = xo_jump(cmd); } - else + else { /* ----------------------------------------------- */ /* keyboard mapping */ @@ -1839,7 +1839,7 @@ xover( if (cmd == KEY_RIGHT || cmd == '\n') { if(zone == XZ_ULIST) - cmd = 'q'; //¨Ï¥ÎªÌ¦W³æ·| Q + cmd = 'q'; //¨Ï¥ÎªÌ¦W³æ·| Q else cmd = 'r'; } @@ -1894,7 +1894,7 @@ xover( ¯¸ªø·|µLªk¦¬¿ý¤å³¹ */ cmd = gem_gather(xo); /* ¦¬¿ý¤å³¹¨ìºëµØ°Ï */ } -#ifdef HAVE_MAILGEM +#ifdef HAVE_MAILGEM else if(cmd == 'G' && HAS_PERM(PERM_MBOX)) { static int (*mgp)(XO *xo); @@ -1904,7 +1904,7 @@ xover( if(mgp) cmd = (*mgp)(xo); else - vmsg("°ÊºA³sµ²¥¢±Ñ¡A½ÐÁpµ¸¨t²ÎºÞ²z­û¡I"); + vmsg("°ÊºA³sµ²¥¢±Ñ¡A½ÐÁpµ¸¨t²ÎºÞ²z­û¡I"); } else cmd = (*mgp)(xo); @@ -1969,15 +1969,15 @@ every_Z_Orig(void) int cmd; char select; screenline sl[b_lines + 1]; - + save_foot(sl); cmd = 0; outz(MSG_ZONE_SWITCH); select = vkey(); - -#ifdef HAVE_FAVORITE + +#ifdef HAVE_FAVORITE if(select == 'p') { outz(MSG_ZONE_ADVANCE); @@ -1985,16 +1985,16 @@ every_Z_Orig(void) if(select != 'w' && select != 'u') select = ' '; } -#endif - +#endif + switch(select) { -#ifdef HAVE_FAVORITE +#ifdef HAVE_FAVORITE case 'f': restore_foot(sl); Favorite(); break; -#endif +#endif case 'a': cmd = XZ_GEM; break; @@ -2157,8 +2157,8 @@ every_Z(void) } #endif - - + + memcpy(&xy,&(xz[XZ_OTHER - XO_ZONE]),sizeof(XZ)); tmpbno = currbno; @@ -2188,11 +2188,11 @@ every_Z(void) vs_restore(sl); utmp_mode(tmpmode); - + xo_stack_level--; boardmode = savemode; -} +} #endif @@ -2219,10 +2219,10 @@ every_U(void) #endif extern int pickup_way; - int tmpway = pickup_way; + int tmpway = pickup_way; if (bbsmode == M_READA) /* guessi.061218: ¶i¤J¬ÝªO«á ^U ¹w³]±Æ¦C */ pickup_way = 1; - + memcpy(&xy,&(xz[XZ_OTHER - XO_ZONE]),sizeof(XZ)); cmd = XZ_ULIST; @@ -2249,7 +2249,7 @@ every_B(void) stat = bbstate; tmpmode = bbsmode; vs_save(sl); - + u_lock(); vs_restore(sl); diff --git a/so/bank.c b/so/bank.c index 5b9349623..cf32ecef9 100644 --- a/so/bank.c +++ b/so/bank.c @@ -13,7 +13,7 @@ #include "bbs.h" /* void log_bank( - int mode, + int mode, int a, int b, char *who) @@ -37,7 +37,7 @@ void log_bank( } else if(mode == 5) sprintf(c_buf, "%s %s ¶×¤J¹ڹô(%d)\n", c_time, cuser.userid, a); - + f_cat(FN_BANK, c_buf); } */ @@ -50,16 +50,16 @@ int point1_money(void) ACCT acct; if(acct_load(&acct, cuser.userid) >= 0) - money = acct.money; + money = acct.money; else { - pmsg2("¬dµL±zªº±b¤á¸ê°T..."); + pmsg2("¬dµL±zªº±b¤á¸ê°T..."); return 0; } - + clearange(0, 22); vs_bar("¹Ú¹ôÂà´«"); - + move(2,0); prints("§Aªº¨­¤W¦³ %9d ¹Ú¹ô\n\n %9d Àu¨}ÂI¼Æ" ,acct.money, acct.point1); @@ -68,7 +68,7 @@ int point1_money(void) pmsg2("Àu¨}ÂI¼Æ¤£¨¬"); return 0; } - + vget(8, 0, "­nÂà´«¦h¤ÖÀu¨}ÂI¼Æ¡H", buf, 8, DOECHO); if((num = atoi(buf)) <= 0) return 0; @@ -83,11 +83,11 @@ int point1_money(void) } temp = (int)temp; - + if(acct_load(&acct, cuser.userid) >= 0) { acct.money = temp; - acct.point1 -= num; + acct.point1 -= num; } acct_save(&acct); @@ -119,14 +119,14 @@ TransferAccount(void) char str[128]; int selfmoney, pay; double temp; - + clearange(0, 22); vs_bar("¶×´Ú"); move (9, 8); prints("\033[1;33mÂà±b¬ÛÃö³W©w¡G \033[36m¢°. ¤@¦¸³Ì¤Ö­nµ¹ 100 ¹Ú¹ô(µ|«e)¡C\n\ ¢±. ¦¬¤âÄò¶O 10 %%¡C\033[m"); - + if (acct_get("­n¶×µ¹½Ö¡G",&acct)<1) return 0; if(acct.userno == cuser.userno) @@ -135,21 +135,21 @@ TransferAccount(void) return 0; } strcpy(userid,acct.userid); - + clearange(1,21); move(3,0); - + if(acct_load(&selfacct, cuser.userid) >= 0) - selfmoney = selfacct.money; + selfmoney = selfacct.money; else { - pmsg2("¬dµL±zªº±b¤á¸ê°T..."); + pmsg2("¬dµL±zªº±b¤á¸ê°T..."); return 0; } - + prints("§A¦Û¤vªº¨­¤WÁÙ¦³ %9d ¹Ú¹ô¡C\n",selfacct.money); - prints("\n%-12s«h¦³ %9d ¹Ú¹ô¡C",userid, acct.money); - + prints("\n%-12s«h¦³ %9d ¹Ú¹ô¡C",userid, acct.money); + if(!vget(7,0,"§A­n¶×´Ú¦h¤Ö¹Ú¹ô¡G",buf,10,DOECHO)) return 0; @@ -163,38 +163,38 @@ TransferAccount(void) else if ((int)atoi(buf) > selfacct.money) { pmsg2("¶×´Úª÷ÃB¶W¹L¯à¶×¥Xªº¤W­­"); - return 0; + return 0; } else if (temp>INT_MAX) { pmsg2("¶×´Úª÷ÃB¶W¹L¹ï¤è¯à±µ¨üªº¤W­­"); - return 0; + return 0; } - + pay = (int)(atoi(buf)*1.1); - + move(9,0); prints("±ýÂà %d ¤¸¹Ú¹ô(µ|«e)¡A¹ê»Ú¤ä¥I %d ¹Ú¹ô(µ|«á)", (int)atoi(buf), pay); move(11,0); clrtobot(); - + if (!vget(b_lines, 0, "¶×´Ú²z¥Ñ¡G", str, 60, DOECHO)) - return 0; + return 0; if(vans("½T©w­nµ¹¥L¶Ü¡H [Y/n]") != 'n') { now = time(0); str_stamp(date, &now); - + usr_fpath(folder, userid, FN_DIR); - fp = fdopen(hdr_stamp(folder, 0, &xhdr, fpath),"w"); + fp = fdopen(hdr_stamp(folder, 0, &xhdr, fpath),"w"); strcpy(xhdr.owner, cuser.userid); strcpy(xhdr.nick, cuser.username); sprintf(xhdr.title, "¶×´Ú³qª¾"); strcpy(xhdr.date, date); - + fprintf(fp,"§@ªÌ: %s (%s)\n",cuser.userid,cuser.username); fprintf(fp,"¼ÐÃD: ¶×´Ú³qª¾\n"); fprintf(fp,"®É¶¡: %s\n",date); @@ -202,12 +202,12 @@ TransferAccount(void) fprintf(fp,"\n\n¶×´Ú²z¥Ñ¡G%s\n",str); fclose(fp); rec_add(folder, &xhdr, sizeof(HDR)); - + acct.money += (int)atoi(buf); selfacct.money -= pay; acct_save(&acct); acct_save(&selfacct); - + time_t now; char c_time[25], c_buf[100]={}; now = time(0); @@ -217,7 +217,7 @@ TransferAccount(void) f_cat(FN_BANK, c_buf); } - + pmsg2("¥æ©ö§¹¦¨"); return 0; } @@ -247,10 +247,10 @@ money_back(void) ACCT acct; char buf[128]; char fpath[80]; - int fd; + int fd; double m1 = 0; double m2 = 0; - double m3 = 0; + double m3 = 0; MONEY oldwealth; //if (acct_get("­n°e½ÖÂIºq¦¸¼Æ¡G", &acct) < 1) @@ -266,33 +266,33 @@ money_back(void) clrtobot(); usr_fpath(fpath,acct.userid,FN_MONEY); - //Ū¨úMONEY + //Ū¨úMONEY if ((fd = open(fpath, O_RDONLY)) < 0) - { - pmsg2("¬dµL¦¹ ID ªºÂ¹ڹô¸ê®Æ..."); - return 0; + { + pmsg2("¬dµL¦¹ ID ªºÂ¹ڹô¸ê®Æ..."); + return 0; } read(fd, &oldwealth, sizeof(MONEY)); - + m1 = oldwealth.money; m2 = oldwealth.save; m3 = oldwealth.request; - m1 = ((m1+m2)/2) - 1; //½Ð¦Û¦æ­×§ï + m1 = ((m1+m2)/2) - 1; //½Ð¦Û¦æ­×§ï if (m1 >= INT_MAX ) m1 = INT_MAX; - if (m2 >= INT_MAX ) + if (m2 >= INT_MAX ) m2 = INT_MAX; - //¬°¤F¤è«K©Ò¥H¨S¦³¬å±¼Â°O¿ý, ¹ï¤è¥i¯à¬~¿ú + //¬°¤F¤è«K©Ò¥H¨S¦³¬å±¼Â°O¿ý, ¹ï¤è¥i¯à¬~¿ú //if (acct.money > 65535) - //{ - // pmsg2("¤£²Å¦X¶×¤J¸ê®æ..."); - // return 0; + //{ + // pmsg2("¤£²Å¦X¶×¤J¸ê®æ..."); + // return 0; //} - + //if (acct.money < 10) //{ //pmsg2("¤£²Å¦X¶×¤J¸ê®æ..."); @@ -313,16 +313,16 @@ money_back(void) f_cat(FN_BANK, c_buf); pmsg2("¹ڹô¶×¤J§¹²¦"); - - unlink(buf); + + unlink(buf); close(fd); - return 0; - + return 0; + } - + return 0; - + } @@ -336,11 +336,11 @@ int bank_main(void) if(acct_load(&acct, cuser.userid) >= 0) { money = acct.money; - point1 = acct.point1; + point1 = acct.point1; } else { - pmsg2("¬dµL±zªº±b¤á¸ê°T..."); + pmsg2("¬dµL±zªº±b¤á¸ê°T..."); return 0; } @@ -354,7 +354,7 @@ int bank_main(void) prints(" ¢². §ë¸ê\n\n"); prints(" ¢³. ¶×´Úµ¹¨ä¥L¤H\n"); prints("\n"); - + move (4,2); prints("¹Ú¹ô %d ",money); move (6,2); @@ -371,7 +371,7 @@ int bank_main(void) else if(*buf == '4') TransferAccount(); else - pmsg2("Â÷¶}»È¦æ"); + pmsg2("Â÷¶}»È¦æ"); return 0; } diff --git a/so/cleanrecommend.c b/so/cleanrecommend.c index 451d0bc1d..dc7c95164 100644 --- a/so/cleanrecommend.c +++ b/so/cleanrecommend.c @@ -37,11 +37,11 @@ cleanrecommend_log( { FILE *fp; time_t now; - + if(fp = fopen(FN_RECOMMEND_LOG,"a+")) { time(&now); - + fprintf(fp,"%24.24s %s ¬å %s ªO %s(%s) ",ctime(&now),cuser.userid,currboard,title,name); if(!mode) fprintf(fp,"¤¤ %s ªº¯d¨¥ %s\n",rmsg->userid,rmsg->msg); @@ -58,25 +58,25 @@ cleanrecommend_item( int num, RMSG *cleanrecommend) { - + char tmp[10],*pn; - + pn = tmp; - + if(cleanrecommend->pn == POSITIVE) { pn = "\033[1;33m+"; prints("%4d%s%2s\033[m%-12s %-54s%-5s\n", num,pn,cleanrecommend->verb,cleanrecommend->userid,cleanrecommend->msg,cleanrecommend->rtime); - } + } else if(cleanrecommend->pn == NEGATIVE) { pn = "\033[1;31m-"; - prints("%4d%s%2s\033[m%-12s %-54s%-5s\n", num,pn,cleanrecommend->verb,cleanrecommend->userid,cleanrecommend->msg,cleanrecommend->rtime); + prints("%4d%s%2s\033[m%-12s %-54s%-5s\n", num,pn,cleanrecommend->verb,cleanrecommend->userid,cleanrecommend->msg,cleanrecommend->rtime); } else { pn = " "; - prints("%4d%s%2s\033[m%-12s %-54s%-5s\n", num,pn,cleanrecommend->verb,cleanrecommend->userid,cleanrecommend->msg,cleanrecommend->rtime); + prints("%4d%s%2s\033[m%-12s %-54s%-5s\n", num,pn,cleanrecommend->verb,cleanrecommend->userid,cleanrecommend->msg,cleanrecommend->rtime); } } @@ -102,10 +102,10 @@ cleanrecommend_body( /* if((counter = max) > 127) counter = 127; - + if(counter < -127) counter = -127; -*/ +*/ if (max > tail) max = tail; @@ -113,7 +113,7 @@ cleanrecommend_body( { cleanrecommend_item(++num, cleanrecommend++); } while (num < max); - + return XO_NONE; } @@ -174,11 +174,11 @@ cleanrecommend_delete( { RMSG *rmsg; int pos, cur; - + pos = xo->pos; cur = pos - xo->top; rmsg = (RMSG *) xo_pool + cur; - + if (!rec_del(xo->dir, sizeof(RMSG), xo->pos, NULL, NULL)) { cleanrecommend_log(rmsg,0); @@ -194,10 +194,10 @@ cleanrecommend_change( { RMSG *cleanrecommend, mate; int pos, cur; - + if(!HAS_PERM(PERM_BOARD)) return XO_NONE; - + pos = xo->pos; cur = pos - xo->top; cleanrecommend = (RMSG *) xo_pool + cur; @@ -257,7 +257,7 @@ clean( HDR *hdr,phdr; int pos, cur; char fpath[128],buf[256],tmp[128],recommenddb[128],*c2; - FILE *fp; + FILE *fp; RMSG rmsg; int i,chrono,pushstart; struct stat st; @@ -277,11 +277,11 @@ clean( if(!hdr->recommend || hdr->xmode & (POST_DELETE | POST_CANCEL | POST_MDELETE | POST_LOCK | POST_CURMODIFY)) return XO_NONE; - + chrono = hdr->chrono; strcpy(title,hdr->title); strcpy(name,hdr->xname); - + hdr_fpath(fpath,xo->dir,hdr); sprintf(recommenddb,"tmp/%s.recommenddb",cuser.userid); sprintf(tmp,"tmp/%s.clean",cuser.userid); @@ -293,7 +293,7 @@ clean( if(fp = fopen(fpath,"r")) { - + /* if(brd->battr & BRD_PUSHSNEER) { @@ -319,7 +319,7 @@ clean( memset(&rmsg, 0, sizeof(RMSG)); if(!strncmp(buf,"\033[1;32m¡°",9)) pushstart = 1; - + if(pushstart) { if(!strncmp(buf,"\033[1;32m¡°",9)) @@ -329,20 +329,20 @@ clean( } c2 = strrchr(buf,'\n') - 5; strncpy(rmsg.rtime, c2, 5); - + c2 -= 58; strncpy(rmsg.msg, c2, 54); - + c2 -= 19; strncpy(rmsg.userid, c2, 12); - + c2 = strchr(buf, 'm'); strncpy(rmsg.verb, c2+1, 2); - + if((battr & BRD_PUSHDEFINE) && !strncmp(rmsg.verb,"¡÷",2) ) rmsg.pn = COMMENT; else if(!strncmp(rmsg.verb,"\033[m\033[1;33",2)) - rmsg.pn = COMMENT; + rmsg.pn = COMMENT; /*else if(strncmp(buf, "\033[1;33¡÷", 8)) rmsg.pn = POSITIVE;*/ else @@ -364,7 +364,7 @@ clean( rec_add(recommenddb,&rmsg,sizeof(RMSG)); */ // } - + } else f_cat(tmp,buf); @@ -376,7 +376,7 @@ clean( xz[XZ_OTHER - XO_ZONE].cb = cleanrecommend_cb; xover(XZ_OTHER); free(xoo); - + for(i=0;idir, O_RDWR, 0600)) == -1) return XO_NONE; - + fstat(fd, &st); total = st.st_size / sizeof(HDR); if(pos > total) - pos = total; - + pos = total; + f_exlock(fd); while(pos >= -1) { @@ -420,7 +420,7 @@ clean( break; } - if(++pos >= 0) + if(++pos >= 0) { phdr.recommend = counter; phdr.xmode &= ~POST_RECOMMEND; diff --git a/so/innbbs.c b/so/innbbs.c index 579ba4165..5d9a3035a 100644 --- a/so/innbbs.c +++ b/so/innbbs.c @@ -24,7 +24,7 @@ nl_item( int num, nodelist_t *nl) { - prints("%6d %-13s%-*.*s %s(%d)\n", num, + prints("%6d %-13s%-*.*s %s(%d)\n", num, nl->name, d_cols + 45, d_cols + 45, nl->host, nl->xmode & INN_USEIHAVE ? "IHAVE" : "POST", nl->port); } @@ -35,7 +35,7 @@ nl_query( { move(3, 0); clrtobot(); - prints("\n\nÂà«H¯¸¥x¡G%s\n¯¸¥x¦ì§}¡G%s\n¯¸¥x¨ó©w¡G%s(%d)\n³Q Áý «H¡G%s", + prints("\n\nÂà«H¯¸¥x¡G%s\n¯¸¥x¦ì§}¡G%s\n¯¸¥x¨ó©w¡G%s(%d)\n³Q Áý «H¡G%s", nl->name, nl->host, nl->xmode & INN_USEIHAVE ? "IHAVE" : "POST", nl->port, nl->xmode & INN_FEEDED ? "¬O" : "§_"); vmsg(NULL); } @@ -150,7 +150,7 @@ nf_item( outgo = income = 'X'; } - prints("%6d %-13s%-*.*s %c-%c %-13s %.7s\n", num, + prints("%6d %-13s%-*.*s %c-%c %-13s %.7s\n", num, nf->path, d_cols + 32, d_cols + 32, nf->newsgroup, outgo, income, nf->board, nf->charset); } @@ -200,9 +200,9 @@ nf_query( move(3, 0); clrtobot(); prints("\n\nÂà«H¯¸¥x¡G%s\n¯¸¥x¦ì§}¡G%s\n¯¸¥x¨ó©w¡G%s(%d)\n" - "Âà«H¸s²Õ¡G%s%s\n¥»¯¸¬ÝªO¡G%s (%s%s)\n¨Ï¥Î¦r¶°¡G%s", - nf->path, nl.host, nl.xmode & INN_USEIHAVE ? "IHAVE" : "POST", nl.port, - nf->newsgroup, nf->xmode & INN_ERROR ? " (\033[1;33m¦¹¸s²Õ¤£¦s¦b\033[m)" : "", + "Âà«H¸s²Õ¡G%s%s\n¥»¯¸¬ÝªO¡G%s (%s%s)\n¨Ï¥Î¦r¶°¡G%s", + nf->path, nl.host, nl.xmode & INN_USEIHAVE ? "IHAVE" : "POST", nl.port, + nf->newsgroup, nf->xmode & INN_ERROR ? " (\033[1;33m¦¹¸s²Õ¤£¦s¦b\033[m)" : "", nf->board, outgo, income, nf->charset); if (rc && !(nl.xmode & INN_FEEDED)) prints("\n¥Ø«e½g¼Æ¡G%d", nf->high); @@ -244,7 +244,7 @@ nf_add( if ((high = atoi(ans)) >= 0) nf.high = high; } - + if (old) rec_put(fpath, &nf, sizeof(newsfeeds_t), pos); @@ -293,7 +293,7 @@ ncm_item( int num, ncmperm_t *ncm) { - prints("%6d %-*.*s%-23.23s %s\n", num, + prints("%6d %-*.*s%-23.23s %s\n", num, d_cols + 44, d_cols + 44, ncm->issuer, ncm->type, ncm->perm ? "¡³" : "¢®"); } @@ -304,7 +304,7 @@ ncm_query( { move(3, 0); clrtobot(); - prints("\n\nµo¦æ¯¸¥x¡G%s\n¬å«HºØÃþ¡G%s\n¤¹³\\¬å«H¡G%s", + prints("\n\nµo¦æ¯¸¥x¡G%s\n¬å«HºØÃþ¡G%s\n¤¹³\\¬å«H¡G%s", ncm->issuer, ncm->type, ncm->perm ? "¡³" : "¢®"); vmsg(NULL); } @@ -395,8 +395,8 @@ spam_item( path = spam->path; board = spam->board; - prints("%6d %-13s%-13s[%s] ¥]§t %.*s\n", - num, *path ? path : "©Ò¦³¯¸¥x", *board ? board : "©Ò¦³¬ÝªO", + prints("%6d %-13s%-13s[%s] ¥]§t %.*s\n", + num, *path ? path : "©Ò¦³¯¸¥x", *board ? board : "©Ò¦³¬ÝªO", spam_compare(spam->xmode), d_cols + 30, spam->detail); } @@ -412,7 +412,7 @@ spam_query( move(3, 0); clrtobot(); - prints("\n\n¾A¥Î¯¸¥x¡G%s\n¾A¥Î¬ÝªO¡G%s\n¤ñ¸û¶µ¥Ø¡G%s\n¤ñ¸û¤º®e¡G%s", + prints("\n\n¾A¥Î¯¸¥x¡G%s\n¾A¥Î¬ÝªO¡G%s\n¤ñ¸û¶µ¥Ø¡G%s\n¤ñ¸û¤º®e¡G%s", *path ? path : "©Ò¦³¯¸¥x", *board ? board : "©Ò¦³¬ÝªO", spam_compare(spam->xmode), spam->detail); vmsg("­Yº¡¨¬¦¹³W«h¡A·|³Qµø¬°¼s§i¦ÓµLªkÂà«H¶i¨Ó"); } @@ -564,7 +564,7 @@ a_innbbs(void) return 0; } - + dirty = 0; @@ -573,7 +573,7 @@ a_innbbs(void) cur = 0; data = NULL; - + do { @@ -611,7 +611,7 @@ a_innbbs(void) if (redraw) { - + vs_head("Âà«H³]©w", str_site); prints(NECKINNBBS, d_cols, ""); @@ -630,7 +630,7 @@ a_innbbs(void) redraw = 0; } - + ch = vkey(); switch (ch) @@ -662,7 +662,7 @@ a_innbbs(void) dirty = 1; i = cur + pageno * XO_TALL; rec_del(fpath, recsiz, i, NULL, NULL); - cur = i ? ((i - 1) % XO_TALL) : 0; + cur = i ? ((i - 1) % XO_TALL) : 0; reload = 1; } redraw = 1; @@ -682,7 +682,7 @@ a_innbbs(void) if (vget(b_lines, 0, "ÃöÁä¦r¡G", buf, sizeof(buf), DOECHO)) { str_lower(buf, buf); - for (i = pageno * XO_TALL + cur + 1; i <= num; i++) + for (i = pageno * XO_TALL + cur + 1; i <= num; i++) { if (search_func(data + i * recsiz, buf)) { @@ -699,15 +699,15 @@ a_innbbs(void) ch = xo_cursor(ch, pagemax, num, &pageno, &cur, &redraw); break; } - + } while (ch != 'q'); - + free(data); if (dirty) rec_sync(fpath, recsiz, sync_func, NULL); - + return 0; } diff --git a/so/personal.c b/so/personal.c index d1a559ecf..d6658a360 100644 --- a/so/personal.c +++ b/so/personal.c @@ -24,11 +24,11 @@ personal_log( FILE *fp; time_t now; char tag[3][5] = {"¥Ó½Ð","¶}ªO","©Úµ´"}; - + if(fp = fopen(FN_PERSONAL_LOG,"a+")) { time(&now); - + fprintf(fp,"%24.24s ",ctime(&now)); fprintf(fp,"%s ",(admin) ? cuser.userid : personal->userid); fprintf(fp,"%s ",tag[admin]); @@ -107,28 +107,28 @@ personal_apply(void) struct tm *t; time_t now; int thisyear,enteryear; - + now = time(0); t = localtime(&now); - - - + + + if(cuser.numposts < 20 || cuser.numlogins < 500) { vmsg("¸ê®æ¤£²ÅµLªk¥Ó½Ð­Ó¤HªO"); return 0; } - + c = strchr(cuser.email,'@'); if(c == NULL || (strcmp(c+1,validemail[0]) && strcmp(c+1,validemail[1]))) { vmsg("±zªº E-mail ¤£¦X®æ!"); return 0; } - + thisyear = t->tm_year - 11; enteryear = (cuser.email[3]-'0') * 10 + (cuser.email[4]-'0'); - + //¦Ê¦~ÂÎ ecchi float 2012/4/25 if( (thisyear - enteryear)%100 > 5) { @@ -140,9 +140,9 @@ personal_apply(void) for(i=0;ipos; cur = pos - xo->top; personal = (PB *) xo_pool + cur; @@ -369,18 +369,18 @@ mail2usr( char folder[50],fpath[128]; char title[2][30] = {"±zªº­Ó¤HªO³q¹L¥Ó½ÐÅo¡I","±zªº­Ó¤HªO¥Ó½Ð®Ñ³Q°h¦^¡I"}; FILE *fp; - + now = time(0); - + memset(&hdr,0,sizeof(hdr)); usr_fpath(folder, personal->userid, fn_dir); - hdr_stamp(folder, 0 , &hdr, fpath); + hdr_stamp(folder, 0 , &hdr, fpath); strcpy(hdr.owner,"SYSOP"); strcpy(hdr.nick, SYSOPNICK); strcpy(hdr.title,title[admin]); rec_add(folder, &hdr, sizeof(HDR)); - + if(fp = fopen(fpath,"w")) { fprintf(fp,"§@ªÌ: SYSOP (%s)\n¼ÐÃD: %s\n®É¶¡: %s\n",SYSOPNICK,title[admin],ctime(&now)); @@ -394,12 +394,12 @@ mail2usr( fprintf(fp,"\x1b[1;33m°h¥ó²z¥Ñ: %s\x1b[m\n\n",msg); f_suck(fp,"gem/@/@deny"); } - + fclose(fp); } return 0; - - + + } int @@ -422,33 +422,33 @@ personal_sort( HDR *sort; int max,fd,total; struct stat st; - + if ((fd = open(gem, O_RDWR, 0600)) < 0) return 0; - + if (fstat(fd, &st) || (total = st.st_size) <= 0) { close(fd); return 0; } f_exlock(fd); - + sort = (HDR *) malloc(total); read(fd,sort,total); - + max = total / sizeof(HDR); - + qsort(sort,max,sizeof(HDR),sort_compare); - + lseek(fd, (off_t) 0, SEEK_SET); write(fd,sort,total); f_unlock(fd); close(fd); free(sort); - + return 0; - - + + } static int @@ -463,31 +463,31 @@ personal_open( int bno; ACCT acct; char gem[5][20] = {"gem/@/@Person_A_E","gem/@/@Person_F_J","gem/@/@Person_K_O","gem/@/@Person_P_T","gem/@/@Person_U_Z"}; - + pos = xo->pos; cur = pos - xo->top; - personal = (PB *) xo_pool + cur; - + personal = (PB *) xo_pool + cur; + if(personal->state & PB_OPEN) return XO_NONE; - + if(brd_bno(personal->brdname) >= 0) { vmsg("ªO¦W¹p¦P"); return XO_NONE; } - + if ( bshm->number >= MAXBOARD) { vmsg("¶W¹L¨t²Î©Ò¯à®e¯Ç¬Ýª©­Ó¼Æ¡A½Ð½Õ¾ã¨t²Î°Ñ¼Æ"); return XO_NONE; } - + if(vans("½T©w­n¶}³]¦¹¬ÝªO¶Ü¡H[y/N]") != 'y') return XO_NONE; memset(&newboard,0,sizeof(newboard)); - + strcpy(newboard.brdname,personal->brdname); sprintf(newboard.title,"¡³ %s",personal->brdtitle); newboard.color = 7; @@ -503,13 +503,13 @@ personal_open( if ((bno = brd_bno("")) >= 0) { rec_put(FN_BRD, &newboard, sizeof(newboard), bno); - } + } else if(rec_add(FN_BRD, &newboard, sizeof(newboard)) < 0) { vmsg("µLªk«Ø¥ß·sªO"); return XO_NONE; } - + sprintf(fpath, "gem/brd/%s", newboard.brdname); mak_dirs(fpath); mak_dirs(fpath + 4); @@ -528,7 +528,7 @@ personal_open( if((index = (tolower(newboard.brdname[2]) - 'a') / 5) == 5) index--; rec_add(gem[index], &hdr, sizeof(HDR)); - + personal_sort(gem[index]); personal->state = PB_OPEN; @@ -536,7 +536,7 @@ personal_open( rec_put(xo->dir, personal, sizeof(PB), pos); move(3 + cur, 0); personal_item(++pos, personal); - + mail2usr(personal,0); if(acct_load(&acct, personal->userid) >= 0) if(!(acct.userlevel & PERM_BM)) @@ -548,7 +548,7 @@ personal_open( personal_log(personal,1); vmsg("·sªO¦¨¥ß"); - + return XO_FOOT; } @@ -568,7 +568,7 @@ personal_deny( if(!vget(b_lines,0,"©Úµ´¶}ªO²z¥Ñ: ",msg,sizeof(msg),DOECHO)) return XO_NONE; - + if(vans("½T©w©Úµ´¦¹¥Ó½Ð¶Ü¡H[y/N]") != 'y') return XO_NONE; diff --git a/so/pip.c b/so/pip.c index c1a47bb1d..e1c2f556e 100644 --- a/so/pip.c +++ b/so/pip.c @@ -222,7 +222,7 @@ void pip_new_game(void) vs_head(NICKNAME PIPNAME, BoardName); /*¤pÂû©R¦W*/ getdata(2, 0, "À°¤pÂû¨ú­Ó¦nÅ¥ªº¦W¦r§a(½Ð¤£­n¦³ªÅ®æ): ", buf, 11, DOECHO, 0); - if (!buf[0]) + if (!buf[0]) return; strcpy(d.name, buf); /*1:¤½ 2:¥À */ diff --git a/so/shop.c b/so/shop.c index 37ab7b0e0..eb44ea67d 100644 --- a/so/shop.c +++ b/so/shop.c @@ -16,7 +16,7 @@ int cloak_temp(void) { time_t now; char c_time[25],c_buf[128]; - + now = time(0); strncpy(c_time, ctime(&now), 24); c_time[24] = '\0'; @@ -36,10 +36,10 @@ int cloak_temp(void) } if(acct_load(&acct, cuser.userid) >= 0) - money = acct.money; + money = acct.money; else { - pmsg2("¬dµL±zªº±b¤á¸ê°T..."); + pmsg2("¬dµL±zªº±b¤á¸ê°T..."); return 0; } @@ -53,26 +53,26 @@ int cloak_temp(void) if(vans("½T©wÁʶR¶Ü¡H [y/N]") != 'y') return 0; - acct.money -= 65536; + acct.money -= 65536; acct_save(&acct); cuser.ufo ^= UFO_CLOAK; cutmp->ufo ^= UFO_CLOAK; - + // acct_save(&cuser); pmsg2("­n²{¨­½Ð­«·s¤W¯¸"); sprintf(c_buf,"%s %s ÁʶR Áô¨­ Åv­­\n",c_time,cuser.userid); f_cat(FN_SHOP,c_buf); - + return 0; - + } int hidefrom_temp(void) { time_t now; char c_time[25],c_buf[128]; - + now = time(0); strncpy(c_time, ctime(&now), 24); c_time[24] = '\0'; @@ -100,10 +100,10 @@ int hidefrom_temp(void) } if(acct_load(&acct, cuser.userid) >= 0) - money = acct.money; + money = acct.money; else { - pmsg2("¬dµL±zªº±b¤á¸ê°T..."); + pmsg2("¬dµL±zªº±b¤á¸ê°T..."); return 0; } @@ -116,19 +116,19 @@ int hidefrom_temp(void) if(vans("½T©wÁʶR¶Ü¡H [y/N]") != 'y') return 0; - acct.money -= 4194304; + acct.money -= 4194304; acct_save(&acct); - + cuser.ufo ^= UFO_HIDDEN; cutmp->ufo ^= UFO_HIDDEN; - + acct_save(&cuser); pmsg2("¬G¶m¤wÁôÂÃ"); sprintf(c_buf,"%s %s ÁʶR ÁôÂìG¶m Åv­­\n",c_time,cuser.userid); f_cat(FN_SHOP,c_buf); - + return 0; - + } int sysop(void) @@ -144,14 +144,14 @@ int shop_main(void) ACCT acct; if(acct_load(&acct, cuser.userid) >= 0) { - money = acct.money; + money = acct.money; } else { - pmsg2("¬dµL±zªº±b¤á¸ê°T..."); + pmsg2("¬dµL±zªº±b¤á¸ê°T..."); return 0; } - + clear(); move(0,0); @@ -165,7 +165,7 @@ int shop_main(void) (2) ÁʶR¥Ã¤[Áô¨­³N (»Ý­n¹Ú¹ô 1048576 ¤¸/¦¸)\n\n\ (3) ÁʶRÁôÂìG¶m (»Ý­n¹Ú¹ô 4194304 ¤¸/¦¸)\n\n\ (4) ÁʶR¯¸ªøÅv­­\033[1;31m HOT\033[m (»Ý­n¹Ú¹ô 10000000 ¤¸)\n"); - + if(!vget(b_lines, 0, "½Ð¿ï¾Ü±z­nªºªA°È¡G [Q] Â÷¶} ",buf,2,DOECHO)) return 0; @@ -174,11 +174,11 @@ int shop_main(void) else if(*buf == '2') pmsg2("¦¹¥\\¯à©|¥¼¶}©ñ"); else if(*buf == '3') - pmsg2("Sorry, we've closed this function..."); + pmsg2("Sorry, we've closed this function..."); //hidefrom_temp(); else if(*buf == '4') sysop(); else - pmsg2("ÁÂÁÂ¥úÁ{"); + pmsg2("ÁÂÁÂ¥úÁ{"); return 0; } diff --git a/so/song.c b/so/song.c index bf153e804..1f3360cba 100644 --- a/so/song.c +++ b/so/song.c @@ -470,7 +470,7 @@ XO *xo) fputs(tmp, xfp); } now = time(0); - sprintf(buf, "\033[1;33m%s\033[m ·Q¹ï \033[1;33m%s\033[m »¡ %s\n\033[30m%s\033[m\n", cuser.userid, acct.userid , want_say, ctime(&now)); + sprintf(buf, "\033[1;33m%s\033[m ·Q¹ï \033[1;33m%s\033[m »¡ %s\n\033[30m%s\033[m\n", cuser.userid, acct.userid , want_say, ctime(&now)); //sprintf(buf, "%s\n", ctime(&now)); fputs(buf, xfp); fclose(fp); diff --git a/so/vote.c b/so/vote.c index 36b855ad7..e35a2fa64 100644 --- a/so/vote.c +++ b/so/vote.c @@ -242,7 +242,7 @@ char *path) strncpy(buf3, account + 3, 2); strncpy(buf4, account + 5, 4); buf1[2] = buf2[1] = buf3[2] = buf4[4] = '\0'; - + fd = open(path, O_RDONLY); while (fd) { @@ -294,7 +294,7 @@ char *path) stud[item].admis[0] = '\0'; stud[item].first[0] = '\0'; stud[item].last[0] = '\0'; - + sprintf(buf, "%2d%s", item, ")°|¨t¡G"); if (vget(item + 3, 0, buf, stud[item].inst, sizeof(tmp.inst), GCARRY)) { @@ -303,7 +303,7 @@ char *path) vmsg("¾Ç¸¹®æ¦¡¿ù»~¡I"); vget(item + 3, 0, buf, stud[item].inst, sizeof(tmp.inst), GCARRY); } - + sprintf(buf, "%s", "³¡¡G"); for (;;) { @@ -314,7 +314,7 @@ char *path) else break; } - + sprintf(buf, "%s", "¤J¾Ç¦~«×¡G"); for (;;) { @@ -347,9 +347,9 @@ char *path) else break; } - + stud[item].end = '\n'; - } + } /* stud[item].grad[0] = '\0'; stud[item].major[0] = '\0'; @@ -368,7 +368,7 @@ char *path) if (!vget(item + 3, 33, buf, stud[item].last, sizeof(tmp.last), GCARRY)) strcpy(stud[item].last, stud[item].first); stud[item].end = '\n'; - } + } */ else break; @@ -839,14 +839,14 @@ char *account) strcpy(server, ptr + 1); else return 0; - + strncpy(year, account + 3, 2); - + if( atoi(year) <= 97 )// Ecchi.100331: 98¦~¥H«e¤J¾Çªº«H½c¡A±b¸¹³¡¤À§ÀºÝ³£­n®ø¥h¤@½X strncpy(addr, account, 8); else strcpy(addr, account); - + sprintf(line, "½Ð¿é¤J %s ¤u§@¯¸±b¸¹ªº±K½X¡G", server); if (!Get_Socket(server, &sock)) diff --git a/so/xyz.c b/so/xyz.c index 6a06e829f..4cad2f72b 100644 --- a/so/xyz.c +++ b/so/xyz.c @@ -31,7 +31,7 @@ x_siteinfo(void) prints("µ{¦¡ª©¥»¡G %s [%s]\033[m\n", BBSVERNAME, BBSVERSION); prints("¯¸¤W¤H¼Æ¡G %d/%d\n", ushm->count, MAXACTIVE); prints("¨t²Î­t¸ü¡G %.2f %.2f %.2f [%s]\n" - , load[0], load[1], load[2], load[0] > 10 ? "\033[1;41;37m¹L°ª\033[m" : load[0] > 5 ? + , load[0], load[1], load[2], load[0] > 10 ? "\033[1;41;37m¹L°ª\033[m" : load[0] > 5 ? "\033[1;42;37mµy°ª\033[m" : "\033[1;44;37m¥¿±`\033[m"); prints("¯Á¤Þ¸ê®Æ¡G BRD %d KB, ACCT %d KB, HDR %d KB\n", sizeof(BRD), sizeof(ACCT), sizeof(HDR)); prints("\n"); @@ -41,7 +41,7 @@ x_siteinfo(void) prints("\033[1mDreamBBS.2010 Modified: Pang-Wei Tsai(cache)\033[m\n"); prints("\033[1;33mInternet Technology Lab\033[37m, Institute of CCE, National Cheng Kung University.\033[m\n"); prints("\n"); -#ifdef Modules +#ifdef Modules prints("\033[1;30mModules & Plug-in: \033[m\n\n"); //¼Ò²Õ¤Æªº©ñ¦b³oÃä diff --git a/util/account.c b/util/account.c index ec192b98e..1c8d9453b 100644 --- a/util/account.c +++ b/util/account.c @@ -687,7 +687,7 @@ main(void) static char tmp_file[] = "run/tmp"; static char log_file[] = "run/usies="; // static char brd_file[] = FN_BRD_USIES; - + char buf[256], ymd[16]; FILE *fp, *fpw; @@ -887,12 +887,12 @@ main(void) // keeplog("run/over.log", NULL, title, 2); - /* ¥H¤U¬O¯µ±K¬ö¿ý */ + /* ¥H¤U¬O¯µ±K¬ö¿ý */ sprintf(title, "[°O¿ý] %s¤å³¹Æ[¬Ý¬ö¿ý", date); keeplog(FN_BROWSE_LOG, BRD_SECRET, title, 3); sprintf(title, "[°O¿ý] %s°Î¦WªO¬ö¿ý", date); - keeplog(FN_ANONYMOUS_LOG, BRD_SECRET, title, 3); + keeplog(FN_ANONYMOUS_LOG, BRD_SECRET, title, 3); /* ¥Ñ©ó¤@ª½³B©ó¶}Àɪ¬ºA, ¬O¬G¤£ log by statue ­×§ï SIG_USR1 ¥i±N log dump ¥X¨Ó by visor */ @@ -970,7 +970,7 @@ main(void) keeplog(FN_BBSNET_LOG, BRD_SECRET, title, 2); #endif - /* ¥H¤U¬O¤½¶}¬ö¿ý */ + /* ¥H¤U¬O¤½¶}¬ö¿ý */ //sprintf(date, "[%2d ¤ë %2d ¤é] ", ptime.tm_mon + 1, ptime.tm_mday); sprintf(title, "[°O¿ý] %s¤å³¹½g¼Æ²Î­p", date); @@ -990,7 +990,7 @@ main(void) sprintf(title, "[°O¿ý] %s¥»¤é¬å±b¸¹¬ö¿ý", date); keeplog(FN_REAPER_LOG, NULL, title, 2); - + sprintf(title, "[°O¿ý] %s°½ÃiªO¥D¬ö¿ý", date); keeplog(FN_LAZYBM_LOG, NULL, title, 2); diff --git a/util/acpro.c b/util/acpro.c index 83c70565e..19d2e2329 100644 --- a/util/acpro.c +++ b/util/acpro.c @@ -270,15 +270,15 @@ profess_image(void) FILE *fp; short len, pos[CH_MAX]; ClassHeader *chp; - + class_sort(); class_parse(PROFESS_INIFILE); - + if (chn < 2) /* lkchu.990106: ©|¨S¦³¤ÀÃþ */ return; - + len = sizeof(short) * (chn + 1); - + for (i = 0; i < chn; i++) { pos[i] = len; diff --git a/util/addsong.c b/util/addsong.c index 8f0334641..7e0b093ef 100644 --- a/util/addsong.c +++ b/util/addsong.c @@ -117,10 +117,10 @@ main( } for (ch = '0'; ch <= '9'; ch++) { - fname[0] = ch; + fname[0] = ch; fname[1] = '\0'; traverse(fpath); } - } + } return 0; } diff --git a/util/backup.c b/util/backup.c index e9eb98439..a8b7f7cfb 100644 --- a/util/backup.c +++ b/util/backup.c @@ -35,9 +35,9 @@ log_backup( fp = fopen("run/backup.log_backup","a+"); fprintf(fp,"%24.24s %s\n",ctime(&now),msg); - + fclose(fp); - + } static void @@ -75,7 +75,7 @@ bk_usr( char start[4] = {'a','e','l','s'}, end[4] = {'d','k','r','z'}; char buf[256], fpath[256], *fname; char ch; - + chdir(BBSHOME); sprintf(buf,"usr %c-%c backup start", start[day], end[day]); @@ -113,11 +113,11 @@ bk_brd( char *ptr, cmd[256]; //chdir(BBSHOME); - + if(day != 4 && day != 5) return; - + if (chdir(BBSHOME "/brd") || !(dirp = opendir("."))) return; @@ -126,9 +126,9 @@ bk_brd( sprintf(cmd, "%s/brd/brd%02d%02d", bk_path, mon, mday); mkdir(cmd, 0700); - + chdir(BBSHOME "/brd"); - + while ( ( de = readdir(dirp) ) ) { ptr = de->d_name; @@ -159,7 +159,7 @@ bk_gem(void) char *ptr, cmd[256]; //chdir(BBSHOME); - + if (chdir(BBSHOME "/gem/brd") || !(dirp = opendir("."))) return; @@ -167,9 +167,9 @@ bk_gem(void) sprintf(cmd, "%s/gem/gem%02d%02d", bk_path, mon, mday); mkdir(cmd, 0700); - + chdir(BBSHOME "/gem/brd"); - + while ( ( de = readdir(dirp) ) ) { ptr = de->d_name; @@ -190,17 +190,17 @@ bk_system_src(void) char system_folders[5][9] = {"bin","etc","innd","newboard","dreambbs"}; char path[64],cmd[256]; int i; - + chdir(BBSHOME); - + log_backup("system backup start"); sprintf(path,"%s/system/system%02d%02d",bk_path, mon, mday); mkdir(path, 0755); - + sprintf(cmd,"gzip -c .USR > %s/USR.gz", path); system(cmd); - + sprintf(cmd,"gzip -c .BRD > %s/BRD.gz", path); system(cmd); @@ -209,7 +209,7 @@ bk_system_src(void) sprintf(cmd,"tar zcf %s/%s.tgz %s", path, system_folders[i], system_folders[i]); system(cmd); } - + sprintf(cmd,"touch %s/gem.tar", path); system(cmd); sprintf(cmd,"tar rvf %s/gem.tar gem/.DIR", path); @@ -228,16 +228,16 @@ bk_system_src(void) } sprintf(cmd,"tar rvf %s/gem.tar gem/@",path); system(cmd); - + sprintf(cmd,"gzip -9 %s/gem.tar",path); system(cmd); log_backup("system backup complete"); - + } -int +int main( int argc, char *argv[]) @@ -247,7 +247,7 @@ main( setgid(BBSGID); setuid(BBSUID); chdir(BBSHOME); - + time(&now); t = localtime(&now); @@ -260,13 +260,13 @@ main( printf("Something error!\n"); return 0; } - + bk_path = "/var/backup"; mon = t->tm_mon+1; mday = t->tm_mday; - + bk_system_src(); if(day >= 0 && day <= 3) bk_usr(day); diff --git a/util/base64encode.c b/util/base64encode.c index 2e0ada802..2ba6ede2f 100644 --- a/util/base64encode.c +++ b/util/base64encode.c @@ -21,12 +21,12 @@ base64_encode(FILE *in,FILE *out) char dest[73]; unsigned char c1,c2,c3; int n; - + dst = dest; - + while((n=fread(base,1,sizeof(base),in))) { - + c1 = base[0]; c2 = base[1]; c3 = base[2]; @@ -76,9 +76,9 @@ main( stdin = fopen(argv[1],"r"); } if(stdin) - base64_encode(stdin,stdout); + base64_encode(stdin,stdout); else - fprintf(stdout,"error open file\n"); + fprintf(stdout,"error open file\n"); return 0; } diff --git a/util/bbsmail.c b/util/bbsmail.c index fe4c6512e..6151e0b23 100644 --- a/util/bbsmail.c +++ b/util/bbsmail.c @@ -136,7 +136,7 @@ mail2bbs( /* 091209.cache: ­­¦¬¯¸¤º«H */ if(acct_load(&acct, userid) >= 0) { - if (acct.ufo2 & UFO2_DEF_LOCALMAIL) + if (acct.ufo2 & UFO2_DEF_LOCALMAIL) { sprintf(buf, "BBS user <%s> no income mail", userid); mailog(buf); @@ -237,21 +237,21 @@ mail2bbs( else if (!memcmp(buf, "Subject: ", 9)) { str_ansi(title, buf + 9, sizeof(title)); - /* str_decode(title); */ - /* LHD.051106: ­Y¥i¯à¸g RFC 2047 QP encode «h¦³¥i¯à¦h¦æ subject */ - if (strstr(buf + 9, "=?")) - { - while (fgets(buf, sizeof(buf), stdin)) - { - if (buf[0] == ' ' || buf[0] == '\t') /* ²Ä¤G¦æ¥H«á·|¥HªÅ¥Õ©Î TAB ¶}ÀY */ - str_ansi(title + strlen(title), strstr(buf, "=?"), sizeof(title)); - else - { + /* str_decode(title); */ + /* LHD.051106: ­Y¥i¯à¸g RFC 2047 QP encode «h¦³¥i¯à¦h¦æ subject */ + if (strstr(buf + 9, "=?")) + { + while (fgets(buf, sizeof(buf), stdin)) + { + if (buf[0] == ' ' || buf[0] == '\t') /* ²Ä¤G¦æ¥H«á·|¥HªÅ¥Õ©Î TAB ¶}ÀY */ + str_ansi(title + strlen(title), strstr(buf, "=?"), sizeof(title)); + else + { str_decode(title); - goto start; - } - } - } + goto start; + } + } + } } else if (!memcmp(buf, "Content-Type: ", 14)) @@ -331,7 +331,7 @@ mail2bbs( // my_biff(userid); /* Thor.980827: ¥[¤W parent process id¡A¥H«K§ì©U§£«H */ - sprintf(buf, "[%d] %s => %s", getppid(), sender, userid); + sprintf(buf, "[%d] %s => %s", getppid(), sender, userid); mailog(buf); return 0; diff --git a/util/bmw-dump.c b/util/bmw-dump.c index bfc1f78e5..50e30caf8 100644 --- a/util/bmw-dump.c +++ b/util/bmw-dump.c @@ -52,12 +52,12 @@ main( count = 0; - - while (read(inf, &bmw, sizeof(BMW)) == sizeof(BMW)) + + while (read(inf, &bmw, sizeof(BMW)) == sizeof(BMW)) { struct tm *ptime = localtime(&bmw.btime); count++; - printf("%s%s(%02d:%02d)¡G%s\033[m\n", + printf("%s%s(%02d:%02d)¡G%s\033[m\n", bmw.sender == acct.userno ? "¡¸" : "\033[32m¡¹", bmw.userid, ptime->tm_hour, ptime->tm_min, bmw.msg); } diff --git a/util/brdcheck.c b/util/brdcheck.c index 7c082af9f..f5b32e0f1 100644 --- a/util/brdcheck.c +++ b/util/brdcheck.c @@ -7,7 +7,7 @@ /* update : */ /*-------------------------------------------------------*/ -//½Ð¥ý³Æ¥÷©Ò¦³¸ê®Æ, ¨ÃÀˬd¬O§_·sDIR.oµ²ºc¬O§_¦s¦b +//½Ð¥ý³Æ¥÷©Ò¦³¸ê®Æ, ¨ÃÀˬd¬O§_·sDIR.oµ²ºc¬O§_¦s¦b #include "bbs.h" @@ -52,9 +52,9 @@ main( sprintf(buf, "%s/" ".DIR", str); if ((fd = open(buf, O_RDONLY)) < 0) { - printf("brd/%s is missing, cp DIR.o\n", buf); + printf("brd/%s is missing, cp DIR.o\n", buf); //sprintf(buf2, "cp %s/.DIR.o %s/.DIR", str, str); - //system(buf2); + //system(buf2); } else continue; diff --git a/util/brdmail.c b/util/brdmail.c index 15255e0b2..fb2cf0cc8 100644 --- a/util/brdmail.c +++ b/util/brdmail.c @@ -250,7 +250,7 @@ mail2brd( brd->btime = -1; /* Thor.0827: ¥[¤W parent process id¡A¥H«K§ì©U§£«H */ - sprintf(buf, "[%d] %s => %s", getppid(), sender, brdname); + sprintf(buf, "[%d] %s => %s", getppid(), sender, brdname); mailog(buf); return 0; diff --git a/util/brdstat.c b/util/brdstat.c index 637b9b783..6ba39145e 100644 --- a/util/brdstat.c +++ b/util/brdstat.c @@ -34,7 +34,7 @@ #define TWOWEEK_HOUR (14 * 24) #define WEEK_HOUR (7 * 24) #define DAY_HOUR (1 * 24) -#define HOUR (1) +#define HOUR (1) HDR hotboard[MAX_HOTBOARD]; @@ -183,7 +183,7 @@ save_hot(void) fd = open(FN_HOTBOARD,O_WRONLY); write(fd,hotboard,sizeof(HDR)*hotcount); close(fd); - + } static void @@ -225,7 +225,7 @@ count_board( struct stat st; int pos; - + int hour; int day; int week; @@ -234,20 +234,20 @@ count_board( int threemonth; int halfyear; int year; - + xtime = localtime(&now); ntime = *xtime; memset(&bcount,0,sizeof(BSTATCOUNT)); - + brd_fpath(fpath,brd->brdname,FN_BRD_STATCOUNT); brd_fpath(flog,brd->brdname,FN_BRD_STAT); - + fd = open(flog,O_RDONLY); if(fd < 0) return; - + if(fstat(fd,&st) || (count = st.st_size / sizeof(BSTAT)) <= 0) { close(fd); @@ -257,7 +257,7 @@ count_board( size = read(fd,base,sizeof(BSTAT) * count); count = size / sizeof(BSTAT); tail = head + count; - + hour = count; day = (count > DAY_HOUR) ? (count - DAY_HOUR + 1) : 1; week = (count > WEEK_HOUR) ? (count - WEEK_HOUR + 1) : 1; @@ -266,14 +266,14 @@ count_board( threemonth = (count > THREEMONTH_HOUR) ? (count - THREEMONTH_HOUR + 1) : 1; halfyear = (count > HALFYEAR_HOUR) ? (count - HALFYEAR_HOUR + 1) : 1; year = (count > YEAR_HOUR) ? (count - YEAR_HOUR + 1) : 1; - + pos = 1; - + rec_get(fpath,&bcount,sizeof(BSTATCOUNT),0); memset(&bcount,0,sizeof(BSTAT) * 8); - + do { if(hour <= pos) @@ -312,11 +312,11 @@ count_board( bcount.threemonth.chrono = now; bcount.halfyear.chrono = now; bcount.year.chrono = now; - + memcpy(tmp,&(bcount.lhour[1]),sizeof(BSTAT) * 23); memcpy(bcount.lhour,tmp,sizeof(BSTAT) * 23); memcpy(&(bcount.lhour[23]),&(bcount.hour),sizeof(BSTAT)); - + if(ntime.tm_hour == 0) { memcpy(tmp,&(bcount.lday[1]),sizeof(BSTAT) * 23); @@ -345,9 +345,9 @@ count_board( ftruncate(fd,size); } - - rec_put(fpath,&bcount,sizeof(BSTATCOUNT),0); - + + rec_put(fpath,&bcount,sizeof(BSTATCOUNT),0); + free(base); close(fd); } @@ -358,9 +358,9 @@ main(void) { BRD *bcache, *head, *tail; BSTAT bstat; - + char fpath[128]; - + time_t now; struct tm ntime, *xtime; @@ -407,10 +407,10 @@ main(void) head->n_news = 0; head->n_bans = 0; strcpy(bstat.type,"¨C¤p®É"); - + brd_fpath(fpath,head->brdname,FN_BRD_STAT); rec_add(fpath,&bstat,sizeof(BSTAT)); - + count_board(head,now); // } } diff --git a/util/camera.c b/util/camera.c index 8d7261456..4de3f640a 100644 --- a/util/camera.c +++ b/util/camera.c @@ -99,7 +99,7 @@ play( if (number >= MOVIE_MAX -1) return 1; - /* str_rle(data); */ + /* str_rle(data); */ /* Thor.980804: µ¥ºâ§¹³Ì«á¦A¨ÓÀ£ÁY, ¤£µMÀ£ÁY½X¤]³Qµø§@´«¦æ©Î¦æ¼Æ¤£°÷¤F */ head = data; @@ -152,12 +152,12 @@ main( int j,k; #endif char *ptr,*str, *fname, fpath[80], buf[FILM_SIZ + 1]; -#ifdef HAVE_RAND_INCOME +#ifdef HAVE_RAND_INCOME char fincome[128]; int pos; time_t now; struct stat st; - struct tm *xtime ,ptime; + struct tm *xtime ,ptime; #endif FCACHE *fshm; FILE *fp; @@ -186,14 +186,14 @@ main( { now = time(NULL); xtime = localtime(&now); - ptime = *xtime; + ptime = *xtime; sprintf(fincome,"gem/brd/%s/@/@income",BRD_CAMERA); fd = open(fincome,O_RDONLY); if((fd>=0) && !fstat(fd, &st) && (size = st.st_size) > 0) { size /= sizeof(HDR); pos = ((rand() / size) + ptime.tm_mon + ptime.tm_mday + ptime.tm_year + rand()) % size; - if(pos < 0) + if(pos < 0) pos += size; lseek(fd, (off_t) (sizeof(HDR) * pos), SEEK_SET); read(fd, &hdr, sizeof(HDR)); @@ -208,7 +208,7 @@ main( close(fd); } else -#endif +#endif mirror(fpath); } @@ -232,7 +232,7 @@ main( while (fread(&hdr, sizeof hdr, 1, fp) == 1) { /* Thor.981110: ­­¨î¯Å«h¤£©ñ¤Jmovie¤¤ */ - if(hdr.xmode & (GEM_RESTRICT|GEM_LOCK)) + if(hdr.xmode & (GEM_RESTRICT|GEM_LOCK)) continue; *str = hdr.xname[7]; @@ -256,7 +256,7 @@ main( for(k=0;k<=3 && ptr;k++) { ptr = strchr(ptr,'\n'); - if(ptr) + if(ptr) ptr++; } if(!ptr) @@ -283,14 +283,14 @@ main( if (size > 0) { buf[size] = '\0'; - play(buf); + play(buf); } } else { /* °w¹ï·í¨S¦³ @error-camera ®Éªº³B²z */ strcpy(buf,"°ÊºA¬Ýª©¿ù»~\n½ÐÁpµ¸¨t²ÎºÞ²z­û\n"); play(buf); - } + } } #ifdef HAVE_SONG_TO_CAMERA sprintf(fpath, "brd/%s/.DIR",BRD_ORDERSONGS); @@ -303,7 +303,7 @@ main( /* --------------------------------------------------- */ fshm = (FCACHE *) shm_new(FILMSHM_KEY, sizeof(FCACHE)); - memcpy(fshm, &image, sizeof(image.shot) + tail); + memcpy(fshm, &image, sizeof(image.shot) + tail); /* Thor.980805: ¦A¥[¤W shotªº³¡¤À */ image.shot[0] = fshm->shot[0] = i; /* Á`¦@¦³´X¤ù ? */ diff --git a/util/checkemail.c b/util/checkemail.c index 7256b566e..5945c0577 100644 --- a/util/checkemail.c +++ b/util/checkemail.c @@ -15,7 +15,7 @@ typedef struct { - char email[60]; + char email[60]; int num; } MAP; MAP map[MAX_AC]; @@ -63,7 +63,7 @@ reaper( { str_lower(buf, acct.email); if(!check_in(buf)) - { + { strcpy(map[total].email,buf); map[total].num = 1; total++; @@ -107,7 +107,7 @@ main( int ch; char *fname, fpath[256],bpath[256]; int i,fd; - + fd = open(FN_ETC_EMAILADDR_ACL".new", O_WRONLY | O_CREAT | O_TRUNC, 0600); memset(map,0,MAX_AC * sizeof(MAP)); @@ -133,8 +133,8 @@ main( traverse(fpath); } close(funo); - - + + printf("total user %d\n",total); for(i=0;i 1) + rename(FN_ETC_EMAILADDR_ACL".new",bpath); + if(argc > 1) { sprintf(fpath,"mail %s.bbs@"MYHOSTNAME" < " FN_CHECKMAIL_MAIL,argv[1]); system("mail SYSOP.bbs@" MYHOSTNAME " < " FN_CHECKMAIL_MAIL); diff --git a/util/classtable_alert.c b/util/classtable_alert.c index f6f636b1d..f90c2e381 100644 --- a/util/classtable_alert.c +++ b/util/classtable_alert.c @@ -141,7 +141,7 @@ init(void) time_t now; struct tm *p; - + up = ushm->uslot; uceil = (void *) up + ushm->offset; @@ -284,21 +284,21 @@ main( char *argv[]) { char fpath[128]; - + chdir(BBSHOME); - ushm = attach_shm(UTMPSHM_KEY, sizeof(UCACHE)); + ushm = attach_shm(UTMPSHM_KEY, sizeof(UCACHE)); if(!ushm) { exit(1); } - - + + sprintf(fpath,"%s.new",FN_CLASSTABLE_DB); f_mv(FN_CLASSTABLE_DB, fpath); bcache(fpath); - + init(); diff --git a/util/clean_acl.c b/util/clean_acl.c index 7602aa530..8413c9569 100644 --- a/util/clean_acl.c +++ b/util/clean_acl.c @@ -33,7 +33,7 @@ main( { FILE *fp,*fd; char buf[256],tmp[256],*ptr; - + if(argc > 2) { fp = fopen(argv[1],"r"); @@ -47,7 +47,7 @@ main( if(strstr(buf,".epaper.com.tw")) continue; if(strstr(buf,MYHOSTNAME)) - continue; + continue; strcpy(tmp,buf); ptr = (char *)strchr(buf,'#'); if(ptr) @@ -61,7 +61,7 @@ main( fclose(fd); } fclose(fp); - } + } } return 0; } diff --git a/util/counter.c b/util/counter.c index cea97096f..914d4bdf9 100644 --- a/util/counter.c +++ b/util/counter.c @@ -49,7 +49,7 @@ main( struct tm ntime, *xtime ,ptime; FILE *fp; char ymd[80],flag; - + if(argc > 1) { if(*argv[1] == 'r') flag = 1; @@ -62,18 +62,18 @@ main( now = time(NULL); xtime = localtime(&now); ntime = *xtime; - + sprintf(ymd, "%02d/%02d/%02d", ntime.tm_year % 100, ntime.tm_mon + 1, ntime.tm_mday); - - fp = fopen("etc/counter","a+"); + + fp = fopen("etc/counter","a+"); count = attach_shm(COUNT_KEY, sizeof(COUNTER)); - + now = count->samehour_max_time; xtime = localtime(&now); ptime = *xtime; - + if (flag == 1) { printf("\nhour_max_login = %d \n",count->hour_max_login); diff --git a/util/dump-brdstat.c b/util/dump-brdstat.c index d6bb9bf8e..e1158d87a 100644 --- a/util/dump-brdstat.c +++ b/util/dump-brdstat.c @@ -34,7 +34,7 @@ #define TWOWEEK_HOUR (14 * 24) #define WEEK_HOUR (7 * 24) #define DAY_HOUR (1 * 24) -#define HOUR (1) +#define HOUR (1) /* ----------------------------------------------------- */ @@ -115,9 +115,9 @@ count_board( char fpath[128]; memset(&bcount,0,sizeof(BSTATCOUNT)); - + brd_fpath(fpath,brd->brdname,FN_BRD_STATCOUNT); - + rec_get(fpath,&bcount,sizeof(BSTATCOUNT),0); printf("%-15s%10d %10d %10d %10d\n",brd->brdname, bcount.threemonth.n_reads,bcount.threemonth.n_posts, @@ -130,7 +130,7 @@ int main(void) { BRD *bcache, *head, *tail; - + chdir(BBSHOME); umask(077); diff --git a/util/expire.c b/util/expire.c index ae497d584..3165ffb03 100644 --- a/util/expire.c +++ b/util/expire.c @@ -367,7 +367,7 @@ main( db.days = ((argc > 1) && (number = atoi(argv[1])) > 0) ? number : DEF_DAYS; db.maxp = ((argc > 2) && (number = atoi(argv[2])) > 0) ? number : DEF_MAXP; db.minp = ((argc > 3) && (number = atoi(argv[3])) > 0) ? number : DEF_MINP; - + memset(&key,0,sizeof(key)); /* --------------------------------------------------- */ @@ -384,9 +384,9 @@ main( fprintf(stderr,"Error open .BRD file\n"); exit(1); } - + count = read(fd,table,sizeof(BRD)*MAXBOARD); - count/=sizeof(BRD); + count/=sizeof(BRD); close(fd); /* --------------------------------------------------- */ diff --git a/util/gem-index.c b/util/gem-index.c index 7308aa12a..c5946a4d8 100644 --- a/util/gem-index.c +++ b/util/gem-index.c @@ -126,16 +126,16 @@ int gindex(void) #ifdef COLOR_INDEX /* Thor.980307: ¥[¤WÃC¦â¸Õ¸Õ¬O§_¤ñ¸û©ö§ä */ - if (xmode & GEM_FOLDER) + if (xmode & GEM_FOLDER) { - fprintf(fndx, "%s\033[1;37;%dm%s\033[m\n", + fprintf(fndx, "%s\033[1;37;%dm%s\033[m\n", buf, 41 + (level % 6) , hdr.title); } else fprintf(fndx, "%s%s\n", buf, hdr.title); #else - if (xmode & GEM_FOLDER) + if (xmode & GEM_FOLDER) fprintf(fndx, "*%s%s\n", buf+1, hdr.title); else fprintf(fndx, "%*d. %s\n", 4 * level + 3, count, hdr.title); diff --git a/util/ipconv.c b/util/ipconv.c index f0da95ec1..80a1cafae 100644 --- a/util/ipconv.c +++ b/util/ipconv.c @@ -4,10 +4,10 @@ void main(int argc,char **argv) { FILE *fp; unsigned int a; - + if(argc !=2) return; - + fp = fopen(argv[1],"r"); if(fp) { diff --git a/util/mailexpire.c b/util/mailexpire.c index 95818de3c..5f0dc9a3f 100644 --- a/util/mailexpire.c +++ b/util/mailexpire.c @@ -137,14 +137,14 @@ main( strcpy(fname = fpath, "usr/@"); fname = (char *) strchr(fname, '@'); - + if(argc > 1) { expire(argv[1]); } else { - + for (ch = 'a'; ch <= 'z'; ch++) { fname[0] = ch; diff --git a/util/mailpost.c b/util/mailpost.c index 824c6397d..b9da513b4 100644 --- a/util/mailpost.c +++ b/util/mailpost.c @@ -299,7 +299,7 @@ verify_user( } close(fh); } - + if (!done) { sprintf(buf, "Invalid [%s] %s", buf2, myfrom); @@ -499,7 +499,7 @@ mailpost(void) if (!readline(mybuf)) return 0; - if (strncasecmp(mybuf, "From ", 5)) + if (strncasecmp(mybuf, "From ", 5)) return post_article(); /* junk */ dirty = *myfrom = *mysub = *myname = *mypasswd = *myboard = *mytitle = 0; diff --git a/util/mailtoall.c b/util/mailtoall.c index 1f461a9c4..02ff9b824 100644 --- a/util/mailtoall.c +++ b/util/mailtoall.c @@ -15,7 +15,7 @@ BCACHE *bshm; -typedef struct +typedef struct { char id[IDLEN+1]; char brd[IDLEN+1]; @@ -28,7 +28,7 @@ attach_shm( register int shmkey, register int shmsize) { register void *shmptr; - register int shmid; + register int shmid; shmid = shmget(shmkey, shmsize, 0); if (shmid < 0) @@ -36,17 +36,17 @@ attach_shm( shmid = shmget(shmkey, shmsize, IPC_CREAT | 0600); } else - { + { shmsize = 0; } - + shmptr = (void *) shmat(shmid, NULL, 0); if (shmsize) memset(shmptr, 0, shmsize); return shmptr; -} +} static int check_in_memory(char *bm,char *id) @@ -86,7 +86,7 @@ to_bm( bm = (char *)malloc(MAXBOARD*(IDLEN+1)*3); memset(bm,0,MAXBOARD*(IDLEN+1)*3); - ptr = bm; + ptr = bm; head = bhdr = bshm->bcache; tail = bhdr + bshm->number; @@ -127,9 +127,9 @@ to_bm( break; } } while (++head < tail); - + send_to_all(title,fpath,bm); - + unlink(fpath); free(bm); return 0; @@ -199,10 +199,10 @@ main( char *argv[]) { int mode; - + bshm = attach_shm(BRDSHM_KEY, sizeof(BCACHE)); - if(argc>3) + if(argc>3) { mode = atoi(argv[1]); switch(mode) @@ -214,9 +214,9 @@ main( to_bm(argv[2],argv[3]); break; } - + } - unlink(argv[2]); + unlink(argv[2]); return 0; } diff --git a/util/makeUSR.c b/util/makeUSR.c index bfe9b6ebc..88d75af94 100644 --- a/util/makeUSR.c +++ b/util/makeUSR.c @@ -14,7 +14,7 @@ #undef FAKE_IO typedef struct -{ +{ char userid[IDLEN+1]; } MAP; MAP map[100000]; @@ -78,7 +78,7 @@ traverse( closedir(dirp); } -int +int main(void) { int ch, mode = 0; @@ -105,11 +105,11 @@ main(void) fname[1] = '\0'; traverse(fpath); } -#ifndef FAKE_IO +#ifndef FAKE_IO { SCHEMA slot; int fd,num; - + fd = open(".USR.new", O_CREAT | O_TRUNC | O_WRONLY, 0600); for(num = 1; num <= total; num++) { @@ -120,7 +120,7 @@ main(void) } close(fd); } -#endif - +#endif + return 0; } diff --git a/util/makefw.c b/util/makefw.c index 86cbe7a35..37ead50a4 100644 --- a/util/makefw.c +++ b/util/makefw.c @@ -55,7 +55,7 @@ expire( char buf[256]; int fd; BANMAIL head; - + sprintf(buf,"%s/%s",brd,BANMAIL_ACL); fd = open(buf,O_RDONLY); if(fd>=0 && total < (MAXOFILEWALL-1)) @@ -78,7 +78,7 @@ expire( memset(&(fwoshm->fwocache[total]),0,sizeof(FW)); } } - + static void rewrite(void) { @@ -87,9 +87,9 @@ rewrite(void) char fpath[128]; int pos; time_t now; - + now = time(0); - + head = fwoshm->fwocache; while(head->name[0]) { @@ -120,14 +120,14 @@ main( struct dirent *de; DIR *dirp; char *ptr; - + setgid(BBSGID); setuid(BBSUID); chdir(BBSHOME); fwoshm = attach_shm(FWOSHM_KEY,sizeof(FWOCACHE)); - + rewrite(); if (chdir("brd") || !(dirp = opendir("."))) @@ -145,7 +145,7 @@ main( printf("usage : %d (%d)\n",total,MAXOFILEWALL); if(total >= MAXOFILEWALL) printf("out of memory!"); - + exit(0); } diff --git a/util/msgall.c b/util/msgall.c index 761d102e6..ce5d50ef3 100644 --- a/util/msgall.c +++ b/util/msgall.c @@ -95,15 +95,15 @@ main( { UTMP *up, *uceil; BMW bmw; - + chdir(BBSHOME); if(argc < 2) { printf("Usage: msgall \n"); exit(0); } - - ushm = attach_shm(UTMPSHM_KEY, sizeof(UCACHE)); + + ushm = attach_shm(UTMPSHM_KEY, sizeof(UCACHE)); strcpy(bmw.msg,argv[1]); up = ushm->uslot; diff --git a/util/outgo.c b/util/outgo.c index d1bd08adb..77a7066dc 100644 --- a/util/outgo.c +++ b/util/outgo.c @@ -27,7 +27,7 @@ outgo_post( strcpy(bntp.title,hdr->title); rec_add("innd/out.bntp",&bntp,sizeof(bntp_t)); - /* + /* char *fpath, buf[256]; fpath = "innd/out.bntp"; @@ -47,7 +47,7 @@ main( int start,end,fd; char *board; HDR hdr; - + if(argc > 3) { board = argv[1]; diff --git a/util/readBENZ.c b/util/readBENZ.c index 2d5eaf803..26b868281 100644 --- a/util/readBENZ.c +++ b/util/readBENZ.c @@ -10,7 +10,7 @@ int main(void) { #if 0 char c; - + for (c = 'a'; c <= 'z'; c++) { #endif @@ -38,14 +38,14 @@ int main(void) strcpy(buf, "/home/bbs/usr/p/pcbug/benz"); if ((fd = open(buf, O_RDWR)) < 0) /* continue; */exit(1); - + while(read(fd, &bmw, sizeof(bmw))) { printf("ID:%-13s sender:%-4d recver:%-4d msg:%s\n" , bmw.userid, bmw.sender, bmw.recver, bmw.msg); }; - - + + #if 0 } diff --git a/util/readFRIENZ.c b/util/readFRIENZ.c index 1fd58e81b..a8a4b3e38 100644 --- a/util/readFRIENZ.c +++ b/util/readFRIENZ.c @@ -10,7 +10,7 @@ int main(void) { #if 0 char c; - + for (c = 'a'; c <= 'z'; c++) { #endif @@ -38,14 +38,14 @@ int main(void) strcpy(buf, "/home/bbs/usr/p/pcbug/frienz"); if ((fd = open(buf, O_RDWR)) < 0) /* continue; */exit(1); - + while(read(fd, &bmw, sizeof(bmw))) { printf("ID:%-13s sender:%-4d recver:%-4d msg:%s\n" , bmw.userid, bmw.sender, bmw.recver, bmw.msg); }; - - + + #if 0 } diff --git a/util/readUSR.c b/util/readUSR.c index a331945fe..2b8e8a10e 100644 --- a/util/readUSR.c +++ b/util/readUSR.c @@ -13,11 +13,11 @@ int main(void) struct stat st; struct tm *tm_t; char userid[IDLEN+1]; - + if((fd = open(BBSHOME "/.USR", O_RDONLY)) < 0) { printf("ERROR at open file"); - + exit(1); } fstat(fd, &st); @@ -30,15 +30,15 @@ int main(void) tm_t = localtime(&usr[n].uptime); strncpy(userid, usr[n].userid, IDLEN); userid[IDLEN]='\0'; - printf("uptime:%d/%d userid:%-12s\n", + printf("uptime:%d/%d userid:%-12s\n", tm_t->tm_mon, tm_t->tm_mday, userid); if(n % 25 == 0) fd=getchar(); } } - - - - - + + + + + diff --git a/util/reaper.c b/util/reaper.c index 7160e8077..4aca13a10 100644 --- a/util/reaper.c +++ b/util/reaper.c @@ -51,7 +51,7 @@ #define DAY_LAZYBM 30 #endif -#ifdef EADDR_GROUPING +#ifdef EADDR_GROUPING /* Thor.980930: 3­Ó¥H¤Waccount¦P¤@email§Yª`·N */ #define EMAIL_REG_LIMIT 3 #endif @@ -101,7 +101,7 @@ static int funo; static int max_uno; static SCHEMA schema; -REAPER_TIME reaper_time[] = +REAPER_TIME reaper_time[] = { {701,1002},{117,229},{0,0} }; @@ -216,7 +216,7 @@ datemsg( ¸ê®Æµ²ºc: chain: int hash, int link_userno plist: int next_userno - ¼È®É¹w¦ôemail addrÁ`¼Æ¤£¶W¹L100000, + ¼È®É¹w¦ôemail addrÁ`¼Æ¤£¶W¹L100000, ¼È®É¹w¦ôuserÁ`¼Æ¤£¶W¹L 100000 */ @@ -229,7 +229,7 @@ typedef struct { static Chain *chain; static int *plist; static int numC; - + static void eaddr_group( int userno, @@ -311,7 +311,7 @@ report_eaddr_group(void) { ACCT acct; char buf[512]; - if (s.userid[0]<=' ') + if (s.userid[0]<=' ') { fprintf(faddr,"==> %d) has been reapered\n", j); continue; @@ -323,7 +323,7 @@ report_eaddr_group(void) fprintf(faddr,"==> %d)%-13s can't open\n", j, s.userid); continue; } - if (read(fd, &acct, sizeof(acct)) != sizeof(acct)) + if (read(fd, &acct, sizeof(acct)) != sizeof(acct)) { fprintf(faddr,"==> %d)%-13s can't read\n", j, s.userid); continue; @@ -350,7 +350,7 @@ static int char *list; int num; - + num = 0; len = strlen(userid); @@ -454,7 +454,7 @@ reaper( num = bm_list(acct.userid,bmlist); fprintf(fbml, "%5d) %-13s%s %-6d %-2d %s\n", fd, acct.userid, buf, login, num, bmlist); bms++; -#if 0 +#if 0 if(*bmlist == '\0') { char fl[256]; @@ -474,8 +474,8 @@ reaper( if(fd >= 0) close(fd); } -#endif - +#endif + } #ifdef CHECK_LAZYBM if(life < due_lazybm) @@ -493,7 +493,7 @@ reaper( fprintf(fcri, "%5d) %-13s%s[%s] %d\n", fd, acct.userid, buf, data, login); criminal++; } - + if (login <= 3 && life < due_newusr) life = 0; @@ -544,7 +544,7 @@ reaper( usr_fpath(fph,acct.userid,"gem"); f_rm(fph); } -#endif +#endif } visit++; @@ -587,7 +587,7 @@ check_vacation(void) { struct tm ptime,*xtime; int now,i; - + now = time(NULL); xtime = localtime((time_t *)&now); ptime = *xtime; @@ -607,17 +607,17 @@ main(void) time_t start, end; struct stat st; char *fname, fpath[256]; - - + + setuid(BBSUID); setgid(BBSGID); chdir(BBSHOME); bshm = attach_shm(BRDSHM_KEY, sizeof(BCACHE)); - + if(bshm->uptime < 0) bshm = NULL; - + vacation = check_vacation(); flog = fopen(FN_REAPER_LOG, "w"); if (flog == NULL) @@ -639,7 +639,7 @@ main(void) fmah = fopen(FN_MATCH_LOG, "w"); if (fmah == NULL) exit(1); - + #ifdef CHECK_LAZYBM fbm = fopen(FN_LAZYBM_LOG, "w"); if (fbm == NULL) @@ -678,7 +678,7 @@ main(void) #ifdef EADDR_GROUPING chain = (Chain *) malloc(max_uno * sizeof(Chain)); plist = (int *) malloc((max_uno + 1) * sizeof(int)); - if (!chain || !plist) + if (!chain || !plist) { fprintf(faddr,"out of memory....\n"); exit(1); @@ -721,7 +721,7 @@ main(void) fclose(fcri); fprintf(fbml, "\n¥Ø«e¾á¥ô¹Ú¤§¤j¦aªºªO¥D¤H¼Æ: %d\n\n",bms); fclose(fbml); - + fclose(fmah); time(&end); diff --git a/util/redir.c b/util/redir.c index 12ef976e6..f78855048 100644 --- a/util/redir.c +++ b/util/redir.c @@ -21,7 +21,7 @@ #include "bbs.h" -#define FNAME_DB_SIZE 2048 +#define FNAME_DB_SIZE 2048 typedef char FNAME[9]; static FNAME *n_pool; diff --git a/util/remboxdir.c b/util/remboxdir.c index 11e066ec0..0e0c99932 100644 --- a/util/remboxdir.c +++ b/util/remboxdir.c @@ -21,7 +21,7 @@ #include "bbs.h" -#define FNAME_DB_SIZE 2048 +#define FNAME_DB_SIZE 2048 typedef char FNAME[9]; static FNAME *n_pool; @@ -225,10 +225,10 @@ int main(int argc,char *argv[]) { /* generate .DIR.@ */ - + usr_fpath(upath, cuser.userid, ".DIR.@"); - usr_fpath(upath2, cuser.userid, NULL); - + usr_fpath(upath2, cuser.userid, NULL); + if ((fh = fopen(upath, "wb"))) { for (ch = 0; ch < n_head; ch++) diff --git a/util/resetvmail.c b/util/resetvmail.c index b0737d9cd..3889a9a10 100644 --- a/util/resetvmail.c +++ b/util/resetvmail.c @@ -50,7 +50,7 @@ reaper( close(fd); if(acct.userlevel & PERM_VALID) { - + if ((ptr = strstr(acct.email,"cloud.yzu.edu.tw"))); else if ((ptr = strstr(acct.email,"mozart.yzu.edu.tw"))); else if ((ptr = strstr(acct.email,"wind.yzu.edu.tw"))); @@ -68,7 +68,7 @@ reaper( strcpy(acct.vmail,acct.email);*/ } } - + acct_save(&acct); } @@ -120,6 +120,6 @@ main(void) fname[0] = ch; fname[1] = '\0'; traverse(fpath); - } + } return 0; } diff --git a/util/rmbadmail.c b/util/rmbadmail.c index fe9b1c23a..de190d474 100644 --- a/util/rmbadmail.c +++ b/util/rmbadmail.c @@ -27,11 +27,11 @@ reaper( HDR *head, *tail = NULL, *base; struct stat st; time_t now; - + now = time(0) - 60; - + printf("> processing account %-20s ",lowid); - + sprintf(buf,"%s/.DIR",fpath); if((fd = open(buf,O_RDONLY)) >= 0) { @@ -65,7 +65,7 @@ reaper( } ptr = strchr(folder,'@') + 1 ; *ptr++ = '/'; - + while ((de = readdir(dirp))) { check = 0; @@ -86,7 +86,7 @@ reaper( if(!check) { strcpy(ptr,fname); - if(!(!stat(folder,&st) && (st.st_atime > now))) + if(!(!stat(folder,&st) && (st.st_atime > now))) { u_size += st.st_size; ulink++; @@ -121,7 +121,7 @@ expire( HDR *head, *tail = NULL, *base; struct stat st; time_t now; - + now = time(0) - 60; printf("> processing board %-20s ",lowid); @@ -200,7 +200,7 @@ expire( } } } - closedir(dirp); + closedir(dirp); } if((*str)++ == '9') *str = 'A'; @@ -265,7 +265,7 @@ main( else { strcpy(fname = fpath, "usr/@"); - fname = (char *) strchr(fname, '@'); + fname = (char *) strchr(fname, '@'); for (ch = 'a'; ch <= 'z'; ch++) { fname[0] = ch; @@ -295,12 +295,12 @@ main( { strcpy(fpath, "brd"); traverse(fpath,2); - } + } } else { printf("syntax : rmbadmail [-a|-b] [account|board]\n"); - } + } printf("total unlink %10d unlink size : %10d\n",ulink,u_size); printf("total reserve %10d reserve size : %10d\n",reserve,r_size); return 0; diff --git a/util/stopperm.c b/util/stopperm.c index 1529a4f7a..24a2d6762 100644 --- a/util/stopperm.c +++ b/util/stopperm.c @@ -39,7 +39,7 @@ reaper( if(!strcmp(acct.email,kmail)) { - fprintf(flog,"%-13s\n",acct.userid); + fprintf(flog,"%-13s\n",acct.userid); total++; } } @@ -71,7 +71,7 @@ traverse( closedir(dirp); } -static int +static int same_mail2( char *mail, char *file) @@ -106,7 +106,7 @@ same_mail2( fname[0] = ch; fname[1] = '\0'; traverse(fpath); - } + } fclose(flog); close(funo); return total; @@ -213,7 +213,7 @@ seek_log_email( { close(fd); break; - } + } } close(fd); return -1; @@ -233,7 +233,7 @@ deny_log_email( if(deny > email.deny || deny == -1) email.deny = deny; email.times++; - rec_put(FN_VIOLATELAW_DB, &email, sizeof(EMAIL), pos); + rec_put(FN_VIOLATELAW_DB, &email, sizeof(EMAIL), pos); } else { @@ -254,7 +254,7 @@ deny_add_email( struct tm *p; time(&now); - + p = localtime(&now); str_lower(he->vmail, he->vmail); sprintf(buf, "%s # %02d/%02d/%02d %02d:%02d %s (%s)\n", @@ -280,7 +280,7 @@ add_deny_exer( memcpy(&x, u, sizeof(ACCT)); time(&now); - check_time = (x.deny > now) ? 1 : 0; + check_time = (x.deny > now) ? 1 : 0; if(!strncmp(u->justify,"reg:",4)) adm = (adm & ~DENY_MODE_ALL)|DENY_MODE_GUEST; @@ -292,7 +292,7 @@ add_deny_exer( x.deny = now; memcpy(u, &x, sizeof(x)); acct_save(u); - return adm; + return adm; } if(adm & DENY_SEL) { @@ -319,17 +319,17 @@ add_deny_exer( { x.userlevel |= (PERM_DENYTALK|PERM_DENYCHAT); cmode = " Talk "; - } + } else if(adm & DENY_MODE_MAIL) { x.userlevel |= (PERM_DENYMAIL); cmode = " Mail "; } - else if(adm & DENY_MODE_NICK) + else if(adm & DENY_MODE_NICK) { x.userlevel |= (PERM_DENYNICK); cmode = "§ó§ï¼ÊºÙ"; - } + } fprintf(fp,"%sÅv­­",cmode); } if(adm & DENY_MODE_GUEST) @@ -354,11 +354,11 @@ add_deny_exer( else fprintf(fp,"´Á¶¡: %s%s¡A´Á­­¤@¹L¦Û°Ê´_Åv¡C\n\n",check_time ? "¤W¦¸³B»@¨ì´Á¤é²Ö¥[":"±q¤µ¤Ñ°_",cdays); } - fprintf(fp,"\033[1;32m¡° Origin: \033[1;33m%s \033[1;37m<%s>\n\033[1;31m¡» From: \033[1;36m%s\033[m\n",BOARDNAME,MYHOSTNAME,MYHOSTNAME); + fprintf(fp,"\033[1;32m¡° Origin: \033[1;33m%s \033[1;37m<%s>\n\033[1;31m¡» From: \033[1;36m%s\033[m\n",BOARDNAME,MYHOSTNAME,MYHOSTNAME); fclose(fp); sprintf(buf, "[%s³B»@] %s %s",cross ? "³s§¤":"", u->userid,cselect); - keeplog(FN_STOP_LOG, BRD_VIOLATELAW, buf, 3); + keeplog(FN_STOP_LOG, BRD_VIOLATELAW, buf, 3); usr_fpath(buf,x.userid,FN_STOPPERM_LOG); unlink(buf); fp = fopen(buf,"a+"); @@ -385,17 +385,17 @@ setup( FILE *flog; char buf[80]; char fpath[128]; - + u = &x; sprintf(fpath,"%s.%s",FN_SAMEEMAIL_LOG,file); num = same_mail2(email,file); flog = fopen(fpath, "r"); - - if (!flog) + + if (!flog) return; - + for(i=1;i<=num;i++) { fscanf(flog,"%13s",buf); @@ -404,22 +404,22 @@ setup( if(u != NULL) { if(strcmp(u->userid,id)) - add_deny_exer(u,mode,1,exer); - else + add_deny_exer(u,mode,1,exer); + else add_deny_exer(u,mode,NULL,exer); } } - - if(mode & DENY_MODE_ALL) + + if(mode & DENY_MODE_ALL) deny_log_email(email,(x.userlevel & PERM_DENYSTOP) ? -1 : x.deny); - fclose(flog); + fclose(flog); unlink(fpath); } /* stopperm id email mode */ -int +int main( int argc, char *argv[]) diff --git a/util/template.c b/util/template.c index 0592b5aaf..673045065 100644 --- a/util/template.c +++ b/util/template.c @@ -103,6 +103,6 @@ main(void) fname[0] = ch; fname[1] = '\0'; traverse(fpath); - } + } return 0; } diff --git a/util/tranBRD.c b/util/tranBRD.c index c16bc898d..e44f5cd78 100644 --- a/util/tranBRD.c +++ b/util/tranBRD.c @@ -56,7 +56,7 @@ main( BRDOLD old; BRD brd; FILE *fp; - + setgid(BBSGID); setuid(BBSUID); chdir(BBSHOME); @@ -139,7 +139,7 @@ main( brd.expiremin = key->minp; brd.expireday = key->days; } - + printf("%04d %-13s %-5s %-40s %-20s %5d %5d %5d\n", num, brd.brdname, brd.class, brd.title, brd.BM, brd.expiremax, brd.expiremin, brd.expireday); write(outf,&brd,sizeof(BRD)); diff --git a/util/transacct.c b/util/transacct.c index b5326676a..3942a3f83 100644 --- a/util/transacct.c +++ b/util/transacct.c @@ -12,7 +12,7 @@ #if 0 -½Ð¥ý³Æ¥÷©Ò¦³¸ê®Æ, ¨ÃÀˬd¬O§_·s¸ê®Æµ²ºc¬O¥¿½Tªº +½Ð¥ý³Æ¥÷©Ò¦³¸ê®Æ, ¨ÃÀˬd¬O§_·s¸ê®Æµ²ºc¬O¥¿½Tªº #endif @@ -141,7 +141,7 @@ typedef struct #define UFO2_DEF_ANONY BFLAG(16) /* ¹w³]¤£°Î¦W */ #define UFO2_DEF_LEAVE BFLAG(17) /* ¹w³]¤£Â÷¯¸ */ #define UFO2_ACL BFLAG(24) /* true if ACL was ON */ -#define UFO2_REALNAME BFLAG(28) /* visor.991030: ¯u¹ê©m¦W */ +#define UFO2_REALNAME BFLAG(28) /* visor.991030: ¯u¹ê©m¦W */ static unsigned int @@ -193,15 +193,15 @@ trans_ufo2( if (oldufo2 & OLDUFO2_CIRCLE) ufo |= UFO2_CIRCLE; - + if (oldufo2 & OLDUFO2_ORIGUI) - ufo |= UFO2_ORIGUI; + ufo |= UFO2_ORIGUI; if (oldufo2 & OLDUFO2_DEF_ANONY) - ufo |= UFO2_DEF_ANONY; + ufo |= UFO2_DEF_ANONY; // if (oldufo2 & OLDUFO2_DEF_LEAVE) -// ufo |= UFO2_DEF_LEAVE; +// ufo |= UFO2_DEF_LEAVE; if (oldufo2 & OLDUFO2_ACL) ufo |= UFO2_ACL; @@ -256,11 +256,11 @@ trans_acct( str_ncpy(new->ident, old->ident, sizeof(new->ident)); new->request = (int)m3; - new->money = (int)m1; + new->money = (int)m1; new->point1 =0; /* Àu¨}¿n¤À */ new->point2 =0; /* ¦H¤å */ - + } typedef struct @@ -310,22 +310,22 @@ main( if ((argc == 2) && str_cmp(str, argv[1])) continue; -//Ū¨úMONEY - sprintf(buf, "%s/" FN_MONEY, str); //.MONEY¦ü¥G©w¸q¦¨FN_MONEY +//Ū¨úMONEY + sprintf(buf, "%s/" FN_MONEY, str); //.MONEY¦ü¥G©w¸q¦¨FN_MONEY if ((fd = open(buf, O_RDONLY)) < 0) continue; read(fd, &oldwealth, sizeof(MONEY)); close(fd); -//¥ý¤£°õ¦æ¬å±¼ªº°Ê§@ unlink(buf2); +//¥ý¤£°õ¦æ¬å±¼ªº°Ê§@ unlink(buf2); m1 = oldwealth.money; m2 = oldwealth.save; m3 = oldwealth.request; - m1 = ((m1+m2)/100000); //½Ð¦Û¦æ­×§ï + m1 = ((m1+m2)/100000); //½Ð¦Û¦æ­×§ï - if (m1 >= INT_MAX ) + if (m1 >= INT_MAX ) m1 = INT_MAX; sprintf(buf, "%s/" FN_ACCT, str); diff --git a/util/tranufo.c b/util/tranufo.c index b3700a14d..1f75d0780 100644 --- a/util/tranufo.c +++ b/util/tranufo.c @@ -134,6 +134,6 @@ main(void) fname[0] = ch; fname[1] = '\0'; traverse(fpath); - } + } return 0; } diff --git a/util/userno.c b/util/userno.c index f0b1d1dc1..a580c68f4 100644 --- a/util/userno.c +++ b/util/userno.c @@ -12,7 +12,7 @@ #include "bbs.h" typedef struct -{ +{ int userno; char userid[IDLEN+1]; } MAP; @@ -79,7 +79,7 @@ traverse( closedir(dirp); } -int +int main(void) { int ch; @@ -123,7 +123,7 @@ main(void) fprintf(flog, "userno %d is the same ~~\n",map[i-1].userno); } if(k==0) - fprintf(flog, "userno %d is empty!\n", i); + fprintf(flog, "userno %d is empty!\n", i); } return 0; } diff --git a/util/utmp-dump.c b/util/utmp-dump.c index 8c8f8a82b..84ccb0acc 100644 --- a/util/utmp-dump.c +++ b/util/utmp-dump.c @@ -52,10 +52,10 @@ bmode( static char modestr[32]; int mode; char *word; - + if(!up) return "¤£¦b¯¸¤W"; - + mode = up->mode; if(mode == M_IDLE) { @@ -73,8 +73,8 @@ bmode( return (word); if ((mode != M_QUERY && !HAS_PERM(PERM_SEECLOAK) && (up->ufo & UFO_CLOAK))||(can_see(up)==2 && !HAS_PERM(PERM_SYSOP))) - return (word); - + return (word); + sprintf(modestr, "%s %s", word, up->mateid); return (modestr); } @@ -311,14 +311,14 @@ pal_cache(void) { cache = NULL; } - + } } pal_pool = cache; up->pal_max = pal_count = count; - - if(fimage) + + if(fimage) free(fimage); cuser.ufo = ufo; } @@ -345,7 +345,7 @@ static char *msg_pickup_way[PICKUP_WAYS] = "¶¢¸m" }; -static char +static char ck_state( int in1, int in2, @@ -363,7 +363,7 @@ ck_state( } else return ' '; -} +} @@ -377,7 +377,7 @@ ulist_body( char buf[8],color[20],ship[80],*wcolor[7] = {"\033[m",COLOR_PAL,COLOR_BAD,COLOR_BOTH,COLOR_OPAL,COLOR_CLOAK,COLOR_BOARDPAL}; // pal = cuser.ufo; - + max = xo->max; if (max <= 0) { @@ -399,13 +399,13 @@ ulist_body( sprintf(buf, "%2d", diff); else buf[0] = '\0'; - + fcolor = (userno == self) ? 3 : is_pal(userno); colortmp = can_see(up); if(is_pal(userno) && colortmp == 1) fcolor = 3; else if (!is_pal(userno) && colortmp == 1) fcolor = 4; - + if (is_bad(userno)) fcolor = 2; ufo = up->ufo; @@ -417,15 +417,15 @@ ulist_body( colortmp = 1; if(ufo & UFO_CLOAK) fcolor = 5; else if(fcolor == 0) - colortmp = 0; + colortmp = 0; strcpy(color,wcolor[fcolor]); printf("%5d %s%-13s%-22.21s%s%-16.15s%c%c %-16.16s%s\n", cnt, color, up->userid, - (HAS_PERM(PERM_SYSOP) && (cuser.ufo2 & UFO2_REALNAME))? up->realname : up->username, + (HAS_PERM(PERM_SYSOP) && (cuser.ufo2 & UFO2_REALNAME))? up->realname : up->username, colortmp > 0 ? "\033[m" : "", - (cuser.ufo2 & UFO2_SHIP) ? ship : ((up->ufo & UFO_HIDDEN)&&!HAS_PERM(PERM_SYSOP)) ? + (cuser.ufo2 & UFO2_SHIP) ? ship : ((up->ufo & UFO_HIDDEN)&&!HAS_PERM(PERM_SYSOP)) ? HIDDEN_SRC : up->from , diff,diffmsg, bmode(up, 0), buf); } @@ -493,7 +493,7 @@ ulist_init( self = cuser.userno; filter = cuser.ufo2 & UFO2_PAL; - + seecloak = HAS_PERM(PERM_SEECLOAK); up = ushm->uslot; @@ -507,7 +507,7 @@ ulist_init( if (userno <= 0 || (up->pid <= 0 && !HAS_PERM(PERM_SYSOP|PERM_SEECLOAK))) continue; if (!seecloak && (up->ufo & UFO_CLOAK)) - continue; + continue; tmp = can_see(up); if(is_bad(userno)) bfriend_num++; if (((seecloak || !(up->ufo & UFO_CLOAK)) && (tmp != 2)) || HAS_PERM(PERM_SYSOP|PERM_SEECLOAK) || up->userno == cuser.userno) @@ -592,10 +592,10 @@ main( XO xo; char fpath[128]; int fd; - + chdir(BBSHOME); - - ushm = attach_shm(UTMPSHM_KEY, sizeof(UCACHE)); + + ushm = attach_shm(UTMPSHM_KEY, sizeof(UCACHE)); cutmp = &utmp; usr_fpath(fpath,argv[1],".ACCT"); fd = open(fpath,O_RDONLY);