From: nveid Date: Tue, 11 Jan 2011 00:45:50 +0000 (+0000) Subject: Draft: X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=8d50224e06c8ea6e1a099553e27391b7646f798e;p=cobramush.git Draft: Ignore-this: f143a5b7dbb6dc823b688561d3bb02a6 1) LUA Makefile update - put lua files in correct order in helpfile, and added auto swig generation code from mushlua.i to make mushlua_wrappers.c.. 2) Updated MANIFEST to represent all current files in dist including LUA required files. 3) indent.pro ran on all C & H files in distribution 4) mkhlpvers removed. It was defunct from pennmush changes version creation. Replaced its use with genchanges in Makefile --- diff --git a/MANIFEST b/MANIFEST index 2aa9e44..8ffd660 100644 --- a/MANIFEST +++ b/MANIFEST @@ -46,7 +46,6 @@ game/txt/hlp/pennv180.hlp game/txt/hlp/pennvOLD.hlp game/txt/nws/base.nws COPYRITE -Configure I18N INSTALL MANIFEST @@ -56,7 +55,6 @@ README README.SQL README.SSL UPGRADING -config_h.SH confmagic.h options.h.dist hdrs/access.h @@ -92,6 +90,7 @@ hdrs/log.h hdrs/malias.h hdrs/match.h hdrs/mushdb.h +hdrs/mushlua.h hdrs/mushtype.h hdrs/mymalloc.h hdrs/mysocket.h @@ -219,6 +218,8 @@ src/version.c src/warnings.c src/wild.c src/wiz.c +src/mushlua.c +src/mushlua.i utils/clwrapper.sh utils/customize.pl utils/fixdepend.pl @@ -226,7 +227,6 @@ utils/gentables.c utils/ln-dir.sh utils/make_access_cnf.sh utils/mkcmds.sh.SH -utils/mkvershlp.pl utils/penn-install utils/update-cnf.pl utils/update.pl @@ -241,3 +241,169 @@ win32/options.h win32/patches.h win32/pennmush.dsp win32/pennmush.dsw +Configure Portability tool +config_h.SH Produces config.h +game/lua/path.lua +game/lua/README +game/lua/test.lua +game/mush.lua +game/txt/changes/0.5b +game/txt/changes/0.65b +game/txt/changes/0.66b +game/txt/changes/0.67 +game/txt/changes/0.6b +game/txt/changes/0.70 +game/txt/changes/0.70-1 +game/txt/changes/0.70-2 +game/txt/changes/0.70-3 +game/txt/changes/0.71 +game/txt/changes/0.71p1 +game/txt/changes/0.71p2 +game/txt/changes/0.71p3 +game/txt/changes/0.72 +game/txt/changes/0.72p1 +game/txt/changes/0.72p2 +game/txt/changes/0.72p4 +game/txt/changes/0.73 +game/txt/changes/0.73p1 +game/txt/changes/0.73p2 +game/txt/changes/0.80 +game/txt/changes/kv0.0.1a +game/txt/changes/kv0.0.2a +game/txt/changes/kv0.0.3b +game/txt/changes/kv0.0.4b +game/txt/genchanges.rb +game/txt/hlp/cobra_vts.hlp +game/txt/nws/index.nws +lua/COPYRIGHT +lua/etc/all.c +lua/etc/lua.hpp +lua/etc/lua.ico +lua/etc/lua.pc +lua/etc/luavs.bat +lua/etc/Makefile +lua/etc/min.c +lua/etc/noparser.c +lua/etc/README +lua/etc/strict.lua +lua/HISTORY +lua/INSTALL +lua/Makefile +lua/README +lua/src/lapi.c +lua/src/lapi.h +lua/src/lapi.o +lua/src/lauxlib.c +lua/src/lauxlib.h +lua/src/lauxlib.o +lua/src/lbaselib.c +lua/src/lbaselib.o +lua/src/lcode.c +lua/src/lcode.h +lua/src/lcode.o +lua/src/ldblib.c +lua/src/ldblib.o +lua/src/ldebug.c +lua/src/ldebug.h +lua/src/ldebug.o +lua/src/ldo.c +lua/src/ldo.h +lua/src/ldo.o +lua/src/ldump.c +lua/src/ldump.o +lua/src/lfunc.c +lua/src/lfunc.h +lua/src/lfunc.o +lua/src/lgc.c +lua/src/lgc.h +lua/src/lgc.o +lua/src/liblua.a +lua/src/linit.c +lua/src/linit.o +lua/src/liolib.c +lua/src/liolib.o +lua/src/llex.c +lua/src/llex.h +lua/src/llex.o +lua/src/llimits.h +lua/src/lmathlib.c +lua/src/lmathlib.o +lua/src/lmem.c +lua/src/lmem.h +lua/src/lmem.o +lua/src/loadlib.c +lua/src/loadlib.o +lua/src/lobject.c +lua/src/lobject.h +lua/src/lobject.o +lua/src/lopcodes.c +lua/src/lopcodes.h +lua/src/lopcodes.o +lua/src/loslib.c +lua/src/loslib.o +lua/src/lparser.c +lua/src/lparser.h +lua/src/lparser.o +lua/src/lstate.c +lua/src/lstate.h +lua/src/lstate.o +lua/src/lstring.c +lua/src/lstring.h +lua/src/lstring.o +lua/src/lstrlib.c +lua/src/lstrlib.o +lua/src/ltable.c +lua/src/ltable.h +lua/src/ltable.o +lua/src/ltablib.c +lua/src/ltablib.o +lua/src/ltm.c +lua/src/ltm.h +lua/src/ltm.o +lua/src/lua +lua/src/luac +lua/src/lua.c +lua/src/luac.c +lua/src/luac.o +lua/src/luaconf.h +lua/src/lua.h +lua/src/lualib.h +lua/src/lua.o +lua/src/lundump.c +lua/src/lundump.h +lua/src/lundump.o +lua/src/lvm.c +lua/src/lvm.h +lua/src/lvm.o +lua/src/lzio.c +lua/src/lzio.h +lua/src/lzio.o +lua/src/Makefile +lua/src/print.c +lua/src/print.o +lua/test/bisect.lua +lua/test/cf.lua +lua/test/echo.lua +lua/test/env.lua +lua/test/factorial.lua +lua/test/fibfor.lua +lua/test/fib.lua +lua/test/globals.lua +lua/test/hello.lua +lua/test/life.lua +lua/test/luac.lua +lua/test/printf.lua +lua/test/README +lua/test/readonly.lua +lua/test/sieve.lua +lua/test/sort.lua +lua/test/table.lua +lua/test/trace-calls.lua +lua/test/trace-globals.lua +lua/test/xd.lua +src/.indent.pro +src/mushlua_wrappers.c +utils/makedist.sh +utils/preparedist.sh +utils/transition.c +win32/switches.h diff --git a/MANIFEST.new b/MANIFEST.new deleted file mode 100644 index e15f8cf..0000000 --- a/MANIFEST.new +++ /dev/null @@ -1,243 +0,0 @@ -game/data/README -game/README -game/access.README -game/aliascnf.dst -game/getdate.README -game/getdate.template -game/mushcnf.dst -game/namescnf.dst -game/restart.dst -game/restrictcnf.dst -game/log/README -game/save/README -game/txt/evt/index.evt -game/txt/evt/pennmush.evt -game/txt/Makefile -game/txt/README -game/txt/changes.txt -game/txt/compose.sh.SH -game/txt/connect.txt -game/txt/down.txt -game/txt/full.txt -game/txt/guest.txt -game/txt/index-files.pl -game/txt/motd.txt -game/txt/newuser.txt -game/txt/quit.txt -game/txt/register.txt -game/txt/hlp/cobra_attr.hlp -game/txt/hlp/cobra_chat.hlp -game/txt/hlp/cobra_cmd.hlp -game/txt/hlp/cobra_code.hlp -game/txt/hlp/cobra_conf.hlp -game/txt/hlp/cobra_division.hlp -game/txt/hlp/cobra_flag.hlp -game/txt/hlp/cobra_func.hlp -game/txt/hlp/cobra_mail.hlp -game/txt/hlp/cobra_pueb.hlp -game/txt/hlp/cobramush.hlp -game/txt/hlp/cobratop.hlp -game/txt/hlp/index.hlp -game/txt/hlp/pennv174.hlp -game/txt/hlp/pennv175.hlp -game/txt/hlp/pennv176.hlp -game/txt/hlp/pennv177.hlp -game/txt/hlp/pennv180.hlp -game/txt/hlp/pennvOLD.hlp -game/txt/nws/base.nws -COPYRITE -I18N -INSTALL -MANIFEST -Makefile.SH -Patchlevel -README -README.SQL -README.SSL -UPGRADING -confmagic.h -options.h.dist -hdrs/access.h -hdrs/ansi.h -hdrs/atr_tab.h -hdrs/attrib.h -hdrs/boolexp.h -hdrs/bufferq.h -hdrs/case.h -hdrs/chunk.h -hdrs/command.h -hdrs/compile.h -hdrs/conf.h -hdrs/copyrite.h -hdrs/cron.h -hdrs/csrimalloc.h -hdrs/dbdefs.h -hdrs/dbio.h -hdrs/division.h -hdrs/extchat.h -hdrs/externs.h -hdrs/extmail.h -hdrs/flags.h -hdrs/function.h -hdrs/game.h -hdrs/getpgsiz.h -hdrs/help.h -hdrs/htab.h -hdrs/ident.h -hdrs/intrface.h -hdrs/lock.h -hdrs/log.h -hdrs/malias.h -hdrs/match.h -hdrs/mushdb.h -hdrs/mushtype.h -hdrs/mymalloc.h -hdrs/mysocket.h -hdrs/myssl.h -hdrs/oldflags.h -hdrs/parse.h -hdrs/pcre.h -hdrs/privtab.h -hdrs/ptab.h -hdrs/pueblo.h -hdrs/shs.h -hdrs/strtree.h -hdrs/version.h -hints/a-u-x.sh -hints/aix.sh -hints/darwin.sh -hints/darwin-fink.sh -hints/dec_osf.sh -hints/freebsd.sh -hints/hpux-gcc.sh -hints/hpux.sh -hints/irix.sh -hints/irix_6.sh -hints/linux_2.sh -hints/mingw32.sh -hints/next.sh -hints/openbsd.sh -hints/os2.sh -hints/solaris_2.sh -hints/sunos_4.sh -hints/ultrix.sh -hints/win32-gcc.sh -hints/win32.sh -os2/GCCOPT.CMD -os2/Makefile -os2/Penn-OS2.htm -os2/config.h -po/Makefile -src/Makefile.SH -src/SWITCHES -src/access.c -src/announce.c -src/atr_tab.c -src/attrib.c -src/boolexp.c -src/bsd.c -src/bufferq.c -src/chunk.c -src/cmdlocal.dst -src/cmds.c -src/command.c -src/comp_h.c -src/comp_w.c -src/comp_w8.c -src/compress.c -src/conf.c -src/cque.c -src/create.c -src/cron.c -src/csrimalloc.c -src/db.c -src/destroy.c -src/division.c -src/extchat.c -src/extmail.c -src/filecopy.c -src/flaglocal.dst -src/flags.c -src/funcrypt.c -src/function.c -src/fundb.c -src/fundiv.c -src/funlist.c -src/funlocal.dst -src/funmath.c -src/funmisc.c -src/funstr.c -src/funtime.c -src/funufun.c -src/game.c -src/gmalloc.c -src/help.c -src/htab.c -src/ident.c -src/info_slave.c -src/local.dst -src/lock.c -src/log.c -src/look.c -src/malias.c -src/match.c -src/memcheck.c -src/move.c -src/mycrypt.c -src/mymalloc.c -src/mysocket.c -src/myssl.c -src/notify.c -src/parse.c -src/pcre.c -src/player.c -src/plyrlist.c -src/portmsg.c -src/predicat.c -src/privtab.c -src/prog.c -src/ptab.c -src/rob.c -src/rplog.c -src/services.c -src/set.c -src/shs.c -src/sig.c -src/speech.c -src/sql.c -src/strdup.c -src/strtree.c -src/strutil.c -src/switchinc.c -src/tables.c -src/timer.c -src/unparse.c -src/utils.c -src/version.c -src/warnings.c -src/wild.c -src/wiz.c -utils/clwrapper.sh -utils/customize.pl -utils/fixdepend.pl -utils/gentables.c -utils/ln-dir.sh -utils/make_access_cnf.sh -utils/mkcmds.sh.SH -utils/mkvershlp.pl -utils/penn-install -utils/update-cnf.pl -utils/update.pl -win32/README.mingw -win32/README.txt -win32/cmds.h -win32/cobramush.sln -win32/config.h -win32/confmagic.h -win32/funs.h -win32/options.h -win32/patches.h -win32/pennmush.dsp -win32/pennmush.dsw -Configure Portability tool -config_h.SH Produces config.h diff --git a/Makefile.SH b/Makefile.SH index 34e4504..37c4a23 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -40,7 +40,7 @@ $spitshell >Makefile < /dev/null 2>&1 @make touchswitches > /dev/null 2>&1 @make autogen > /dev/null 2>&1 - @(prcs diff -r$(VS) -N pennmush `cat MANIFEST` | grep -v 'Index:') + @(prcs diff -r$(VS) -N cobramush `cat MANIFEST` | grep -v 'Index:') checkin: versions autogen @prcs checkin @@ -285,10 +285,10 @@ touchswitches: @touch src/SWITCHES dist.tar: indent distclean versions touchswitches autogen - makedist -c pennmush - tar -cvf /tmp/dist.tar pennmush + makedist -c cobramush + tar -cvf /tmp/dist.tar cobramush -pgp -sb /tmp/dist.tar - -rm -rf pennmush + -rm -rf cobramush CSRImalloc.tar.Z: (cd src/CSRI; make clean) diff --git a/U/d_lua.U b/U/d_lua.U index 5f9594f..af7bb00 100644 --- a/U/d_lua.U +++ b/U/d_lua.U @@ -15,7 +15,7 @@ if $test -f lua/src/lua.c -o -f ../lua/src/lua.c ; then ;; esac else - echo "Can not find LUA source directory. Check your CobraMUSH installation.">&4 + echo "Can not find LUA source directory. Check your LUA installation.">&4 exit 1 fi diff --git a/hdrs/access.h b/hdrs/access.h index 11637ec..f2b3c42 100644 --- a/hdrs/access.h +++ b/hdrs/access.h @@ -6,29 +6,29 @@ * It's organized into a linked list of access rules. */ struct access { - char host[BUFFER_LEN]; /**< The host pattern */ - char comment[BUFFER_LEN]; /**< A comment about the rule */ - dbref who; /**< Who created this rule if sitelock used */ - int can; /**< Bitflags of what the host can do */ - int cant; /**< Bitflags of what the host can't do */ - struct access *next; /**< Pointer to next rule in the list */ + char host[BUFFER_LEN]; /**< The host pattern */ + char comment[BUFFER_LEN]; /**< A comment about the rule */ + dbref who; /**< Who created this rule if sitelock used */ + int can; /**< Bitflags of what the host can do */ + int cant; /**< Bitflags of what the host can't do */ + struct access *next; /**< Pointer to next rule in the list */ }; /* These flags are can/can't - a site may or may not be allowed to do them */ -#define ACS_CONNECT 0x1 /* Connect to non-guests */ -#define ACS_CREATE 0x2 /* Create new players */ -#define ACS_GUEST 0x4 /* Connect to guests */ -#define ACS_REGISTER 0x8 /* Site can use the 'register' command */ +#define ACS_CONNECT 0x1 /* Connect to non-guests */ +#define ACS_CREATE 0x2 /* Create new players */ +#define ACS_GUEST 0x4 /* Connect to guests */ +#define ACS_REGISTER 0x8 /* Site can use the 'register' command */ /* These flags are set in the 'can' bit, but they mark special processing */ -#define ACS_SITELOCK 0x10 /* Marker for where to insert @sitelock */ -#define ACS_SUSPECT 0x20 /* All players from this site get SUSPECT */ -#define ACS_DENY_SILENT 0x40 /* Don't log failed attempts */ -#define ACS_REGEXP 0x80 /* Treat the host pattern as a regexp */ +#define ACS_SITELOCK 0x10 /* Marker for where to insert @sitelock */ +#define ACS_SUSPECT 0x20 /* All players from this site get SUSPECT */ +#define ACS_DENY_SILENT 0x40 /* Don't log failed attempts */ +#define ACS_REGEXP 0x80 /* Treat the host pattern as a regexp */ -#define ACS_GOD 0x100 /* God can connect from this site */ -#define ACS_DIRECTOR 0x200 /* Directors can connect from this site */ -#define ACS_ADMIN 0x400 /* Admins can connect from this site */ +#define ACS_GOD 0x100 /* God can connect from this site */ +#define ACS_DIRECTOR 0x200 /* Directors can connect from this site */ +#define ACS_ADMIN 0x400 /* Admins can connect from this site */ /* This is the usual default access */ #define ACS_DEFAULT (ACS_CONNECT|ACS_CREATE|ACS_GUEST) @@ -49,13 +49,13 @@ void write_access_file(void); int site_can_access(const char *hname, int flag, dbref who); struct access *site_check_access(const char *hname, dbref who, int *rulenum); int format_access(struct access *ap, int rulenum, - dbref who - __attribute__ ((__unused__)), char *buff, char **bp); + dbref who + __attribute__ ((__unused__)), char *buff, char **bp); int add_access_sitelock(dbref player, const char *host, dbref who, int can, - int cant); + int cant); int remove_access_sitelock(const char *pattern); void do_list_access(dbref player); int parse_access_options (const char *opts, dbref *who, int *can, int *cant, dbref player); -#endif /* __ACCESS_H */ +#endif /* __ACCESS_H */ diff --git a/hdrs/ansi.h b/hdrs/ansi.h index 848e859..b09b297 100644 --- a/hdrs/ansi.h +++ b/hdrs/ansi.h @@ -66,4 +66,4 @@ #define ANSI_END "m" -#endif /* __ANSI_H */ +#endif /* __ANSI_H */ diff --git a/hdrs/atr_tab.h b/hdrs/atr_tab.h index 02e3d6c..d32c0d4 100644 --- a/hdrs/atr_tab.h +++ b/hdrs/atr_tab.h @@ -258,4 +258,4 @@ ATTR attr[] = { {NULL, 0, NULL_CHUNK_REFERENCE, 0, TRUE_BOOLEXP, TRUE_BOOLEXP, 0, NULL} }; -#endif /* __ATR_TAB_H */ +#endif /* __ATR_TAB_H */ diff --git a/hdrs/attrib.h b/hdrs/attrib.h index 82168a2..ee5d228 100644 --- a/hdrs/attrib.h +++ b/hdrs/attrib.h @@ -12,19 +12,19 @@ */ struct attr { - char const *name; /**< Name of attribute */ - int flags; /**< Attribute flags */ - chunk_reference_t data; /**< The attribute's value, compressed */ - dbref creator; /**< The attribute's creator's dbref */ - boolexp write_lock; /**< Attribute lock set */ - boolexp read_lock; /**< Attribute read lock */ - time_t last_modified; /**< Timestamp of last modification */ - ATTR *next; /**< Pointer to next attribute in list */ + char const *name; /**< Name of attribute */ + int flags; /**< Attribute flags */ + chunk_reference_t data; /**< The attribute's value, compressed */ + dbref creator; /**< The attribute's creator's dbref */ + boolexp write_lock; /**< Attribute lock set */ + boolexp read_lock; /**< Attribute read lock */ + time_t last_modified; /**< Timestamp of last modification */ + ATTR *next; /**< Pointer to next attribute in list */ }; struct aget_oi { - ATTR *attribute_part; - dbref found_on; + ATTR *attribute_part; + dbref found_on; }; @@ -46,27 +46,27 @@ extern int good_atr_name(char const *s); extern ATTR *atr_match(char const *string); extern ATTR *atr_sub_branch(ATTR *branch); extern void atr_new_add(dbref thing, char const *RESTRICT atr, - char const *RESTRICT s, dbref player, int flags, - unsigned char derefs, boolexp wlock, boolexp rlock, - time_t modtime); + char const *RESTRICT s, dbref player, int flags, + unsigned char derefs, boolexp wlock, boolexp rlock, + time_t modtime); extern int atr_add(dbref thing, char const *RESTRICT atr, - char const *RESTRICT s, dbref player, int flags); + char const *RESTRICT s, dbref player, int flags); extern int atr_clr(dbref thing, char const *atr, dbref player); extern ATTR *atr_get(dbref thing, char const *atr); extern ATTR *atr_get_noparent(dbref thing, char const *atr); typedef int (*aig_func) (dbref, dbref, dbref, const char *, ATTR *, void *); extern int atr_iter_get(dbref player, dbref thing, char const *name, - int mortal, aig_func func, void *args); + int mortal, aig_func func, void *args); extern ATTR *atr_complete_match(dbref player, char const *atr, dbref privs); extern void atr_free(dbref thing); extern void atr_cpy(dbref dest, dbref source); extern char const *convert_atr(int oldatr); extern int atr_comm_match(dbref thing, dbref player, int type, int end, - char const *str, int just_match, char *atrname, - char **abp, dbref *errobj); + char const *str, int just_match, char *atrname, + char **abp, dbref *errobj); extern int atr_comm_divmatch(dbref thing, dbref player, int type, int end, - char const *str, int just_match, char *atrname, - char **abp, dbref *errobj); + char const *str, int just_match, char *atrname, + char **abp, dbref *errobj); extern int one_comm_match(dbref thing, dbref player, const char *atr, const char *str); extern int do_set_atr(dbref thing, char const *RESTRICT atr, @@ -75,13 +75,13 @@ extern void do_atrlock(dbref player, char const *arg1, char const *arg2, char wr extern void do_atrchown(dbref player, char const *arg1, char const *arg2); extern int string_to_atrflag(dbref player, const char *p); extern int string_to_atrflagsets(dbref player, const char *p, int *setbits, - int *clrbits); + int *clrbits); extern const char *atrflag_to_string(int mask); extern void init_atr_name_tree(void); extern int can_read_attr_internal(dbref player, dbref obj, ATTR *attr); extern int can_write_attr_internal(dbref player, dbref obj, ATTR *attr, - int safe); + int safe); extern unsigned const char *atr_get_compressed_data(ATTR *atr); extern char *atr_value(ATTR *atr); extern char * @@ -90,33 +90,33 @@ safe_atr_value(ATTR *atr) /* possible attribute flags */ -#define AF_ODARK 0x1 /* OBSOLETE! Leave here but don't use */ -#define AF_INTERNAL 0x2 /* no one can see it or set it */ -#define AF_PRIVILEGE 0x4 /* Only privileged players can change it */ -#define AF_NUKED 0x8 /* OBSOLETE! Leave here but don't use */ -#define AF_LOCKED 0x10 /* Only creator of attrib can change it. */ -#define AF_NOPROG 0x20 /* won't be searched for $ commands. */ -#define AF_MDARK 0x40 /* Only admins can see it */ -#define AF_PRIVATE 0x80 /* Children don't inherit it */ -#define AF_NOCOPY 0x100 /* atr_cpy (for @clone) doesn't copy it */ -#define AF_VISUAL 0x200 /* Everyone can see this attribute */ -#define AF_REGEXP 0x400 /* Match $/^ patterns using regexps */ -#define AF_CASE 0x800 /* Match $/^ patterns case-sensitive */ -#define AF_SAFE 0x1000 /* This attribute may not be modified */ -#define AF_STATIC 0x10000 /* OBSOLETE! Leave here but don't use */ -#define AF_COMMAND 0x20000 /* INTERNAL: value starts with $ */ -#define AF_LISTEN 0x40000 /* INTERNAL: value starts with ^ */ -#define AF_NODUMP 0x80000 /* INTERNAL: attribute is not saved */ -#define AF_LISTED 0x100000 /* INTERNAL: Used in @list attribs */ -#define AF_PREFIXMATCH 0x200000 /* Subject to prefix-matching */ -#define AF_VEILED 0x400000 /* On ex, show presence, not value */ -#define AF_DEBUG 0x800000 /* Show debug when evaluated */ -#define AF_NEARBY 0x1000000 /* Override AF_VISUAL if remote */ -#define AF_PUBLIC 0x2000000 /* Override SAFER_UFUN */ -#define AF_ANON 0x4000000 /* INTERNAL: Attribute doesn't exist in the database */ -#define AF_POWINHERIT 0x8000000 /* Execute with powers of object it's on */ -#define AF_MHEAR 0x20000000 /* ^-listens can be triggered by %! */ -#define AF_AHEAR 0x40000000 /* ^-listens can be triggered by anyone */ +#define AF_ODARK 0x1 /* OBSOLETE! Leave here but don't use */ +#define AF_INTERNAL 0x2 /* no one can see it or set it */ +#define AF_PRIVILEGE 0x4 /* Only privileged players can change it */ +#define AF_NUKED 0x8 /* OBSOLETE! Leave here but don't use */ +#define AF_LOCKED 0x10 /* Only creator of attrib can change it. */ +#define AF_NOPROG 0x20 /* won't be searched for $ commands. */ +#define AF_MDARK 0x40 /* Only admins can see it */ +#define AF_PRIVATE 0x80 /* Children don't inherit it */ +#define AF_NOCOPY 0x100 /* atr_cpy (for @clone) doesn't copy it */ +#define AF_VISUAL 0x200 /* Everyone can see this attribute */ +#define AF_REGEXP 0x400 /* Match $/^ patterns using regexps */ +#define AF_CASE 0x800 /* Match $/^ patterns case-sensitive */ +#define AF_SAFE 0x1000 /* This attribute may not be modified */ +#define AF_STATIC 0x10000 /* OBSOLETE! Leave here but don't use */ +#define AF_COMMAND 0x20000 /* INTERNAL: value starts with $ */ +#define AF_LISTEN 0x40000 /* INTERNAL: value starts with ^ */ +#define AF_NODUMP 0x80000 /* INTERNAL: attribute is not saved */ +#define AF_LISTED 0x100000 /* INTERNAL: Used in @list attribs */ +#define AF_PREFIXMATCH 0x200000 /* Subject to prefix-matching */ +#define AF_VEILED 0x400000 /* On ex, show presence, not value */ +#define AF_DEBUG 0x800000 /* Show debug when evaluated */ +#define AF_NEARBY 0x1000000 /* Override AF_VISUAL if remote */ +#define AF_PUBLIC 0x2000000 /* Override SAFER_UFUN */ +#define AF_ANON 0x4000000 /* INTERNAL: Attribute doesn't exist in the database */ +#define AF_POWINHERIT 0x8000000 /* Execute with powers of object it's on */ +#define AF_MHEAR 0x20000000 /* ^-listens can be triggered by %! */ +#define AF_AHEAR 0x40000000 /* ^-listens can be triggered by anyone */ /* external predefined attributes. */ extern ATTR attr[]; @@ -131,14 +131,14 @@ safe_atr_value(ATTR *atr) #define AL_CREATOR(alist) ((alist)->creator) #define AL_FLAGS(alist) ((alist)->flags) #define AL_DEREFS(alist) ((alist)->data?chunk_derefs((alist)->data):0) -#define AL_WLock(alist) ((alist)->write_lock) -#define AL_RLock(alist) ((alist)->read_lock) -#define AL_MODTIME(alist) ((alist)->last_modified) +#define AL_WLock(alist) ((alist)->write_lock) +#define AL_RLock(alist) ((alist)->read_lock) +#define AL_MODTIME(alist) ((alist)->last_modified) /* Errors from ok_player_alias */ -#define OPAE_SUCCESS 1 -#define OPAE_INVALID -1 -#define OPAE_TOOMANY -2 -#define OPAE_NULL -3 +#define OPAE_SUCCESS 1 +#define OPAE_INVALID -1 +#define OPAE_TOOMANY -2 +#define OPAE_NULL -3 -#endif /* __ATTRIB_H */ +#endif /* __ATTRIB_H */ diff --git a/hdrs/boolexp.h b/hdrs/boolexp.h index 8eb32de..e0ec958 100644 --- a/hdrs/boolexp.h +++ b/hdrs/boolexp.h @@ -22,7 +22,7 @@ extern int sizeof_boolexp(boolexp b); extern int eval_boolexp(dbref player, boolexp b, dbref target, unsigned char *switches); extern boolexp parse_boolexp(dbref player, const char *buf, lock_type ltype); extern boolexp parse_boolexp_d(dbref player, const char *buf, lock_type ltype, - int derefs); + int derefs); extern void free_boolexp(boolexp b); boolexp getboolexp(FILE * f, const char *ltype); void putboolexp(FILE * f, boolexp b); @@ -33,4 +33,4 @@ enum u_b_f { from unparse_boolexp.() For @decompile. */ }; extern char *unparse_boolexp(dbref player, boolexp b, enum u_b_f flag); -#endif /* BOOLEXP_H */ +#endif /* BOOLEXP_H */ diff --git a/hdrs/bufferq.h b/hdrs/bufferq.h index 7c1e6ce..ef77331 100644 --- a/hdrs/bufferq.h +++ b/hdrs/bufferq.h @@ -14,12 +14,12 @@ typedef struct bufferq BUFFERQ; struct bufferq { - char *buffer; /**< Pointer to start of buffer */ - char *buffer_end; /**< Pointer to insertion point in buffer */ - int buffer_size; /**< Size allocated to buffer, in bytes */ - int num_buffered; /**< Number of strings in the buffer */ - char last_string[BUFFER_LEN]; /**< Cache of last string inserted */ - char last_type; /**< Cache of type of last string inserted */ + char *buffer; /**< Pointer to start of buffer */ + char *buffer_end; /**< Pointer to insertion point in buffer */ + int buffer_size; /**< Size allocated to buffer, in bytes */ + int num_buffered; /**< Number of strings in the buffer */ + char last_string[BUFFER_LEN]; /**< Cache of last string inserted */ + char last_type; /**< Cache of type of last string inserted */ }; #define BufferQSize(b) ((b)->buffer_size) @@ -31,9 +31,9 @@ extern BUFFERQ *allocate_bufferq(int lines); extern BUFFERQ *reallocate_bufferq(BUFFERQ * bq, int lines); extern void free_bufferq(BUFFERQ * bq); extern void add_to_bufferq(BUFFERQ * bq, int type, dbref player, - const char *msg); + const char *msg); extern char *iter_bufferq(BUFFERQ * bq, char **p, dbref *player, int *type, - time_t * timestamp); + time_t * timestamp); extern int bufferq_lines(BUFFERQ * bq); extern int isempty_bufferq(BUFFERQ * bq); #endif diff --git a/hdrs/case.h b/hdrs/case.h index e995c2c..ae1912d 100644 --- a/hdrs/case.h +++ b/hdrs/case.h @@ -10,4 +10,4 @@ #define DOWNCASE(x) (isupper((unsigned char)x) ? tolower((unsigned char)x) : (x)) #define UPCASE(x) (islower((unsigned char)x) ? toupper((unsigned char)x) : (x)) #endif -#endif /* CASE_H */ +#endif /* CASE_H */ diff --git a/hdrs/chunk.h b/hdrs/chunk.h index 25fa8cf..c79a74b 100644 --- a/hdrs/chunk.h +++ b/hdrs/chunk.h @@ -12,10 +12,10 @@ typedef u_int_32 chunk_reference_t; #define NULL_CHUNK_REFERENCE 0 chunk_reference_t chunk_create(unsigned char const *data, u_int_16 len, - unsigned char derefs); + unsigned char derefs); void chunk_delete(chunk_reference_t reference); u_int_16 chunk_fetch(chunk_reference_t reference, - unsigned char *buffer, u_int_16 buffer_len); + unsigned char *buffer, u_int_16 buffer_len); u_int_16 chunk_len(chunk_reference_t reference); unsigned char chunk_derefs(chunk_reference_t reference); void chunk_migration(int count, chunk_reference_t ** references); @@ -32,4 +32,4 @@ void chunk_fork_parent(void); void chunk_fork_child(void); void chunk_fork_done(void); -#endif /* _CHUNK_H_ */ +#endif /* _CHUNK_H_ */ diff --git a/hdrs/command.h b/hdrs/command.h index 643a205..31d9fe4 100644 --- a/hdrs/command.h +++ b/hdrs/command.h @@ -17,7 +17,7 @@ typedef unsigned char switch_mask[NUM_SWITCH_BYTES]; #define CMD_T_PLAYER 0x10000000 #define CMD_T_ANY 0xF4000000 #define CMD_T_GOD 0x08000000 -#define CMD_T_DIVISION 0x04000000 +#define CMD_T_DIVISION 0x04000000 /* Any unknown or undefined switches will be passed in switches, instead of causing error */ #define CMD_T_SWITCHES 0x02000000 @@ -35,7 +35,7 @@ typedef unsigned char switch_mask[NUM_SWITCH_BYTES]; /* Command will fail if object is fixed */ #define CMD_T_NOFIXED 0x00200000 -#define CMD_T_NORPMODE 0x00002000 +#define CMD_T_NORPMODE 0x00002000 /* INTERNAL : Command is listed in @list commands */ #define CMD_T_LISTED 0x00080000 @@ -105,7 +105,7 @@ void command_name(COMMAND_INFO *cmd __attribute__ ((__unused__)), \ char *args_left[MAX_ARG] __attribute__ ((__unused__)), \ char *arg_right __attribute__ ((__unused__)), \ char *args_right[MAX_ARG] __attribute__ ((__unused__)), \ - int fromport) + int fromport) /** Common command prototype macro */ #define COMMAND_PROTO(command_name) \ @@ -115,33 +115,33 @@ void command_name (COMMAND_INFO *cmd, dbref player, dbref cause, switch_mask sw, typedef struct command_info COMMAND_INFO; typedef void (*command_func) (COMMAND_INFO *, dbref, dbref, switch_mask, char *, - char *, char *, char *, char *[MAX_ARG], char *, - char *[MAX_ARG], int fromport); + char *, char *, char *, char *[MAX_ARG], char *, + char *[MAX_ARG], int fromport); /** A hook specification. */ struct hook_data { - dbref obj; /**< Object where the hook attribute is stored. */ - char *attrname; /**< Attribute name of the hook attribute */ + dbref obj; /**< Object where the hook attribute is stored. */ + char *attrname; /**< Attribute name of the hook attribute */ }; /** A command. * This structure represents a command in the table of available commands. */ struct command_info { - const char *name; /**< Canonical name of the command */ - const char *restrict_message; /**< Message sent when command is restricted */ - command_func func; /**< Function to call when command is run */ - unsigned int type; /**< Types of objects that can use the command */ - switch_mask sw; /**< Bitflags of switches this command can take */ + const char *name; /**< Canonical name of the command */ + const char *restrict_message; /**< Message sent when command is restricted */ + command_func func; /**< Function to call when command is run */ + unsigned int type; /**< Types of objects that can use the command */ + switch_mask sw; /**< Bitflags of switches this command can take */ boolexp lock; /** Hooks on this command. */ struct { - struct hook_data before; /**< Hook to evaluate before command */ - struct hook_data after; /**< Hook to evaluate after command */ - struct hook_data ignore; /**< Hook to evaluate to decide if we should ignore hardcoded command */ - struct hook_data override; /**< Hook to override command with $command */ + struct hook_data before; /**< Hook to evaluate before command */ + struct hook_data after; /**< Hook to evaluate after command */ + struct hook_data ignore; /**< Hook to evaluate to decide if we should ignore hardcoded command */ + struct hook_data override; /**< Hook to override command with $command */ } hooks; }; @@ -152,10 +152,10 @@ typedef struct command_list COMLIST; * added dynamically, outside of this array. */ struct command_list { - const char *name; /**< Command name */ - const char *switches; /**< Space-separated list of switch names */ - command_func func; /**< Function to call when command is run */ - unsigned int type; /**< Types of objects that can use the command */ + const char *name; /**< Command name */ + const char *switches; /**< Space-separated list of switch names */ + command_func func; /**< Function to call when command is run */ + unsigned int type; /**< Types of objects that can use the command */ const char *command_lock; /**< Command Lock Boolexp */ }; @@ -166,8 +166,8 @@ typedef struct switch_value SWITCH_VALUE; * associates switch names with switch numbers */ struct switch_value { - const char *name; /**< Name of the switch */ - int value; /**< Number of the switch */ + const char *name; /**< Name of the switch */ + int value; /**< Number of the switch */ }; typedef struct com_sort_struc COMSORTSTRUC; @@ -177,8 +177,8 @@ typedef struct com_sort_struc COMSORTSTRUC; * to command data. */ struct com_sort_struc { - struct com_sort_struc *next; /**< Pointer to next in list */ - COMMAND_INFO *cmd; /**< Command data */ + struct com_sort_struc *next; /**< Pointer to next in list */ + COMMAND_INFO *cmd; /**< Command data */ }; /** Permissions for commands. @@ -186,8 +186,8 @@ struct com_sort_struc { * (e.g. "player") with the appropriate bitmask */ struct command_perms_t { - const char *name; /**< Permission name */ - unsigned int type; /**< Bitmask for this permission */ + const char *name; /**< Permission name */ + unsigned int type; /**< Bitmask for this permission */ }; #define SWITCH_NONE 0 @@ -226,4 +226,4 @@ extern void do_command_delete(dbref player, char *name); extern void generic_command_failure(dbref player, dbref cause, char *string, int fromport); extern int command_lock(const char *command, const char *lock); -#endif /* __COMMAND_H */ +#endif /* __COMMAND_H */ diff --git a/hdrs/compile.h b/hdrs/compile.h index b7f4b59..ac7f435 100644 --- a/hdrs/compile.h +++ b/hdrs/compile.h @@ -69,4 +69,4 @@ void NORETURN WIN32_CDECL Win32_Exit(int exit_code); #endif -#endif /* __COMPILE_H */ +#endif /* __COMPILE_H */ diff --git a/hdrs/conf.h b/hdrs/conf.h index 8408190..211b3ed 100644 --- a/hdrs/conf.h +++ b/hdrs/conf.h @@ -14,23 +14,23 @@ #include "htab.h" /* TwinCheck Ooref define */ -#define OOREF(x,y,z) ((ooref == NOTHING || x == ooref) ? (y) : (z && y)) +#define OOREF(x,y,z) ((ooref == NOTHING || x == ooref) ? (y) : (z && y)) -#define OOREF_DECL char __ooref_set = 0 +#define OOREF_DECL char __ooref_set = 0 -#define ENTER_OOREF if(options.twinchecks && ooref == NOTHING) { \ - ooref = executor; \ - __ooref_set = 1; \ - } +#define ENTER_OOREF if(options.twinchecks && ooref == NOTHING) { \ + ooref = executor; \ + __ooref_set = 1; \ + } -#define LEAVE_OOREF if(__ooref_set) { \ - ooref = NOTHING; \ - __ooref_set = 0; \ - } +#define LEAVE_OOREF if(__ooref_set) { \ + ooref = NOTHING; \ + __ooref_set = 0; \ + } /* New Guest Setup Configuration */ -#define GUEST_KEYWORD "GUEST" -#define GUEST_DESCRIBE "A newcomer to this world, treat it with kindness." +#define GUEST_KEYWORD "GUEST" +#define GUEST_DESCRIBE "A newcomer to this world, treat it with kindness." /* limit on player name length */ #define PLAYER_NAME_LIMIT (options.player_name_len) @@ -40,7 +40,7 @@ #define ATTRIBUTE_NAME_LIMIT 1024 /* Loose limit on command/function name length */ #define COMMAND_NAME_LIMIT 64 -#define MAX_ZONES 30 +#define MAX_ZONES 30 #define NUM_SWITCH_BYTES 22 #define MAX_DIVISION_DEPTH 1000 @@ -88,9 +88,9 @@ */ #define SPILLOVER_THRESHOLD 0 /* #define SPILLOVER_THRESHOLD (MAX_OUTPUT / 2) */ -#define COMMAND_TIME_MSEC 1000 /* time slice length in milliseconds */ -#define COMMAND_BURST_SIZE 100 /* commands allowed per user in a burst */ -#define COMMANDS_PER_TIME 1 /* commands per time slice after burst */ +#define COMMAND_TIME_MSEC 1000 /* time slice length in milliseconds */ +#define COMMAND_BURST_SIZE 100 /* commands allowed per user in a burst */ +#define COMMANDS_PER_TIME 1 /* commands per time slice after burst */ /* Set this somewhere near the recursion limit */ @@ -102,19 +102,19 @@ extern void do_config_list(dbref player, const char *type, int lc); typedef struct options_table OPTTAB; typedef int (*config_func) (const char *opt, const char *val, void *loc, - int maxval, int source); + int maxval, int source); /** Runtime configuration parameter. * This structure represents a runtime configuration option. */ typedef struct confparm { - const char *name; /**< name of option. */ + const char *name; /**< name of option. */ /** the function handler. */ config_func handler; - void *loc; /**< place to put this option. */ - int max; /**< max: string length, integer value. */ - int overridden; /**< Has the default been overridden? */ - const char *group; /**< The option's group name */ + void *loc; /**< place to put this option. */ + int max; /**< max: string length, integer value. */ + int overridden; /**< Has the default been overridden? */ + const char *group; /**< The option's group name */ } COBRA_CONF; /** Runtime configuration options. @@ -122,173 +122,173 @@ typedef struct confparm { * that are typically set in mush.cnf. */ struct options_table { - char mud_name[128]; /**< The name of the mush */ - int port; /**< The port to listen for connections */ - int ssl_port; /**< The port to listen for SSL connections */ - char input_db[256]; /**< Name of the input database file */ - char output_db[256]; /**< Name of the output database file */ - char flagdb[256]; /**