--- sbbs/src/sbbs3/sbbsdefs.h 2018/04/24 16:41:23 1.1.1.1 +++ sbbs/src/sbbs3/sbbsdefs.h 2018/04/24 16:43:24 1.1.1.2 @@ -2,13 +2,13 @@ /* Synchronet constants, macros, and structure definitions */ -/* $Id: sbbsdefs.h,v 1.1.1.1 2018/04/24 16:41:23 root Exp $ */ +/* $Id: sbbsdefs.h,v 1.1.1.2 2018/04/24 16:43:24 root Exp $ */ /**************************************************************************** * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2006 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -50,22 +50,22 @@ /* Constants */ /*************/ -#define VERSION "3.14" /* Version: Major.minor */ -#define REVISION 'a' /* Revision: lowercase letter */ -#define VERSION_NUM (31400 + (tolower(REVISION)-'a')) -#define VERSION_HEX (0x31400 + (tolower(REVISION)-'a')) +#define VERSION "3.15" /* Version: Major.minor */ +#define REVISION 'b' /* Revision: lowercase letter */ +#define VERSION_NUM (31500 + (tolower(REVISION)-'a')) +#define VERSION_HEX (0x31500 + (tolower(REVISION)-'a')) #define VERSION_NOTICE "Synchronet BBS for "PLATFORM_DESC\ " Version " VERSION #define SYNCHRONET_CRC 0x9BCDD162 -#define COPYRIGHT_NOTICE "Copyright 2006 Rob Swindell" -#define COPYRIGHT_CRC 0xE16A6CC1 +#define COPYRIGHT_NOTICE "Copyright 2011 Rob Swindell" +#define COPYRIGHT_CRC 0x3D5C1DE9 #define Y2K_2DIGIT_WINDOW 70 #define FNOPEN_BUF_SIZE (2*1024) -#define ILLEGAL_FILENAME_CHARS "\\/|<>+[]:=\";,%" +#define ILLEGAL_FILENAME_CHARS "\\/|<>:\";,%" #define BIND_FAILURE_HELP "!Another application or service may be using this port" #define UNKNOWN_LOAD_ERROR "Unknown load error - Library mismatch?" @@ -76,6 +76,8 @@ #define JAVASCRIPT_BRANCH_LIMIT 99999999 #define JAVASCRIPT_YIELD_INTERVAL 10000 #define JAVASCRIPT_GC_INTERVAL 100 +#define JAVASCRIPT_LOAD_PATH "load" +#define JAVASCRIPT_LOAD_PATH_LIST "load_path_list" typedef struct { ulong counter; @@ -84,7 +86,7 @@ typedef struct { ulong gc_interval; ulong gc_attempts; BOOL auto_terminate; - BOOL* terminated; + volatile BOOL* terminated; str_list_t exit_func; } js_branch_t; @@ -99,6 +101,8 @@ typedef struct { #define MAX_FILES 10000 /* Maximum number of files per dir */ #define MAX_USERXFER 500 /* Maximum number of dest. users of usrxfer */ +#define MAX_TEXTDAT_ITEM_LEN 2000 + #define LEN_DIR 63 /* Maximum length of directory paths */ #define LEN_CMD 63 /* Maximum length of command lines */ @@ -153,7 +157,7 @@ typedef struct { #define SM_CELERITY (1L<<10) /* Expand Celerity color codes in messages */ #define SM_RENEGADE (1L<<11) /* Expand Renegade color codes in messages */ #define SM_ECHO_PW (1L<<12) /* Echo passwords locally */ -#define SM_LOCAL_TZ (1L<<13) /* Use local timezone representations */ +#define SM_UNUSED (1L<<13) /* Defaults to *on* (used to SM_LOCAL_TZ) */ #define SM_AUTO_DST (1L<<14) /* Automatic Daylight Savings Toggle (US) */ #define SM_R_SYSOP (1L<<15) /* Allow remote sysop logon/commands */ #define SM_QUOTE_EM (1L<<16) /* Allow quoting of e-mail */ @@ -278,8 +282,9 @@ typedef struct { /* Bit values for cfg.file_misc */ #define FM_NO_LFN (1<<0) /* No long filenames in listings */ - /* Bit values for cfg.msg_misc */ + /* Bit values for cfg.msg_misc (upper 16-bits default to on) */ #define MM_REALNAME (1<<16) /* Allow receipt of e-mail using real names */ +#define MM_EMAILSIG (1<<17) /* Include user signatures in e-mail msgs */ /* errormsg() codes */ #define ERR_OPEN "opening" /* opening a file */ @@ -292,6 +297,7 @@ typedef struct { #define ERR_CHK "checking" /* checking */ #define ERR_LEN "checking length" #define ERR_EXEC "executing" /* executing */ +#define ERR_CHDIR "changing directory" #define ERR_CREATE "creating" /* creating */ #define ERR_LOCK "locking" /* locking */ #define ERR_UNLOCK "unlocking" /* unlocking */ @@ -367,8 +373,8 @@ typedef enum { /* Values for xtrn_t /* Bits in xtrn_t.misc */ #define MULTIUSER (1<<0) /* allow multi simultaneous users */ -#define XTRN_ANSI (1<<1) /* user must have ANSI, same as ^^^ */ -#define IO_INTS (1<<2) /* Intercept I/O interrupts */ +#define XTRN_ANSI (1<<1) /* LEGACY (not used) */ +#define XTRN_STDIO (1<<2) /* Intercept Standard I/O (aka IO_INTS) */ #define MODUSERDAT (1<<3) /* Program can modify user data */ #define WWIVCOLOR (1<<4) /* Program uses WWIV color codes */ #define EVENTONLY (1<<5) /* Program executes as event only */ @@ -387,6 +393,9 @@ typedef enum { /* Values for xtrn_t #define XTRN_SH (1<<18) /* Use command shell to execute */ #define XTRN_PAUSE (1<<19) /* Force a screen pause on exit */ #define XTRN_NOECHO (1<<20) /* Don't echo stdin to stdout */ +#define QUOTEWRAP (1<<21) /* Word-wrap the quoted text */ +#define XTRN_CONIO (1<<31) /* Intercept Windows Console I/O (Drwy) */ + /* Bits in cfg.xtrn_misc */ #define XTRN_NO_MUTEX (1<<0) /* Do not use exec_mutex for FOSSIL VXD */ @@ -407,6 +416,7 @@ typedef enum { /* Values for xtrn_t #define QWK_NOCTRL (1L<<12) /* No extraneous control files */ #define QWK_EXT (1L<<13) /* QWK Extended (QWKE) format */ #define QWK_MSGID (1L<<14) /* Include "@MSGID" in msgs */ +#define QWK_HEADERS (1L<<16) /* Include HEADERS.DAT file */ #define QWK_DEFAULT (QWK_FILES|QWK_ATTACH|QWK_EMAIL|QWK_DELMAIL) @@ -418,8 +428,8 @@ typedef enum { /* Values for xtrn_t #define CHAT_SPLITP (1<<4) /* Split screen private chat */ -#define INVALID_DIR 0xffff /* Invalid directory value */ -#define INVALID_SUB 0xffff /* Invalid sub-board value */ +#define INVALID_DIR ((uint)-1) /* Invalid directory value */ +#define INVALID_SUB ((uint)-1) /* Invalid sub-board value */ #define KEY_BUFSIZE 1024 /* Size of keyboard input buffer */ #define SAVE_LINES 4 /* Maximum number of lines to save */ @@ -652,6 +662,7 @@ typedef enum { /* Values for xtrn_t #define SS_RLOGIN (1L<<26) /* Current login via BSD RLogin */ #define SS_FILEXFER (1L<<27) /* File transfer in progress, halt spy */ #define SS_SSH (1L<<28) /* Current login via SSH */ +#define SS_MOFF (1L<<29) /* Disable automatic messages */ /* Bits in 'mode' for getkey and getstr */ #define K_NONE 0 /* Use as a place holder for no mode flags */ @@ -677,6 +688,7 @@ typedef enum { /* Values for xtrn_t #define K_LEFTEXIT (1L<<19) /* Allow exit by backspacing/arrowing left */ #define K_USEOFFSET (1L<<20) /* Use getstr_offset for cursor position */ #define K_NOSPIN (1L<<21) /* Do not honor the user's spinning cursor */ +#define K_ANSI_CPR (1L<<22) /* Expect ANSI Cursor Position Report */ /* Bits in 'mode' for putmsg and printfile */ #define P_NOABORT (1<<0) /* Disallows abortion of a message */ @@ -728,9 +740,9 @@ enum { /* readmail and delmailidx /* Bits in the mode of external() */ #define EX_SH (1<<0) /* Use command shell to load other process */ -#define EX_OUTR (1<<1) /* Copy DOS output to remote */ -#define EX_OUTL (1<<2) /* Use _lputc() for local DOS output */ -#define EX_INR (1<<3) /* Trap int 16h keyboard input requests */ +#define EX_STDOUT (1<<1) /* Copy DOS output to remote */ +#define EX_OUTL (1<<2) /* Use _lputc() for local output (*legacy*) */ +#define EX_STDIN (1<<3) /* Trap int 16h keyboard input requests */ #define EX_WWIV WWIVCOLOR /* Expand WWIV color codes to ANSI sequence */ #define EX_SWAP (1<<5) /* Swap out for this external (*legacy*) */ #define EX_POPEN (1<<7) /* Leave COM port open (*legacy*) */ @@ -740,6 +752,8 @@ enum { /* readmail and delmailidx #define EX_NATIVE XTRN_NATIVE /* Native 32-bit application */ #define EX_CHKTIME XTRN_CHKTIME /* Check time left */ #define EX_NOECHO XTRN_NOECHO /* Don't echo stdin to stdout */ +#define EX_STDIO (EX_STDIN|EX_STDOUT) +#define EX_CONIO (1<<31) /* Intercept Windows console I/O (doorway) */ #if defined(__unix) #define EX_WILDCARD EX_SH /* Expand wildcards using 'sh' on Unix */ @@ -813,12 +827,13 @@ enum { /* Values of mode for userl #define REALSYSOP (useron.level>=SYSOP_LEVEL) #define FLAG(x) (ulong)(1UL<<(x-'A')) #define CLS outchar(FF) -#define WHERE __LINE__,__FILE__ -#define SAVELINE { slatr[slcnt]=latr; \ +#define WHERE __LINE__,getfname(__FILE__) +#define SAVELINE { if(slcnt