Added 2003-06-10 CVS patches

This commit is contained in:
Polonkai Gergely 2012-03-03 21:42:37 +01:00
parent 9e36096953
commit 14eb6d6656
28 changed files with 4555 additions and 4257 deletions

4262
ChangeLog

File diff suppressed because it is too large Load Diff

48
bin/vms_circlemud.com Normal file
View File

@ -0,0 +1,48 @@
$!
$! VMS_CIRCLEMUD.COM
$! Written By: Robert Alan Byer
$! byer@mail.ourservers.net
$!
$! This command procedure is called from [-]VMS_AUTORUN.COM to run CIRCLE.EXE
$! as a standalone detached process.
$!
$! The CIRCLE.EXE accepts the following parameters.
$!
$! -m Mini-Mud Mode. Mini-mud will be one of your most powerful
$! debugging tools; it causes Circle to boot with an abridged
$! world, cutting the boot time down to several seconds. It
$! is useful for testing features with are not world-related.
$! (i.e. new commands or spells)
$!
$! -q Quick boot. Prevents checking of times out object files.
$! Every time Circle boots, it checks every object file to
$! see if it has timed out; if so, it is deleted. This is
$! done primarily to save disk space. If time is more important
$! to you than disk space, use the -q option. "-q" is
$! automatically activated when you use "-m"
$!
$! -d Data directory. Useful as a debugging and development tool,
$! if you want to keep one or more sets of game data in addition
$! to the standard set, and choose which set is to be used at
$! run-time. Example, you can copy the entire world into a
$! seperate directory so you can test additions without
$! messing up the existing world files. The default directory
$! is "lib". Any core dumps (may they never happen to you!)
$! will take place in the selected data directory.
$!
$! port Port selection. Allows you to choose on which port the
$! game is to listen for connections. The default is 4000,
$! which is historically the port used by most DikuMUDs.
$!
$!
$! Define The Symbol For CIRCLE.EXE
$!
$ CIRCLE :== $CIRCLEMUD_ROOT:[BIN]CIRCLE.EXE
$!
$! Run CircleMUD.
$!
$ CIRCLE
$!
$! Time To Exit This Procedure.
$!
$ EXIT

View File

@ -0,0 +1,16 @@
$!
$! VMS_CIRCLEMUD_UTILS.COM
$! Written By: Robert Alan Byer
$! byer@mail.ourservers.net
$!
$! Define The CircleMUD Symbols.
$!
$ DELOBJS :== $CIRCLEMUD_BIN:DELOBJS.EXE
$ LISTRENT :== $CIRCLEMUD_BIN:LISTRENT.EXE
$ MUDPASSWD :== $CIRCLEMUD_BIN:MUDPASSWD.EXE
$ PLAY2TO3 :== $CIRCLEMUD_BIN:PLAY2TO3.EXE
$ PURGEPLAY :== $CIRCLEMUD_BIN:PURGEPLAY.EXE
$ SHOPCONV :== $CIRCLEMUD_BIN:SHOPCONV.EXE
$ SHOWPLAY :== $CIRCLEMUD_BIN:SHOWPLAY.EXE
$ SPLIT :== $CIRCLEMUD_BIN:SPLIT.EXE
$ WLD2HTML :== $CIRCLEMUD_BIN:WLD2HTML.EXE

4253
doc/Changelog-3.0 Normal file

File diff suppressed because it is too large Load Diff

View File

@ -350,7 +350,7 @@ You gently massage $N's shoulders.
$n massages $N's shoulders.
$n gently massages your shoulders...ahhhhhhhhhh...
You can only massage someone in the same room as you.
You practise yoga as you try to massage yourself.
You practice yoga as you try to massage yourself.
$n gives a show on yoga-positions, trying to massage $mself.
moan 0 0

View File

@ -2,7 +2,7 @@
Welcome to
C I R C L E M U D 3 . 0
C I R C L E M U D 3 . 1
"We addict players for their own enjoyment."
Created by Jeremy Elson (jelson@circlemud.org)

View File

@ -139,7 +139,7 @@ robe froboz~
Froboz' robe~
Froboz' robe has been dropped here.~
~
11 0 1024
11 0 1025
0 0 0 0
5 15000 2500
A

View File

@ -249,7 +249,7 @@ A black rod has been left here.~
20 3 3 22
4 1200 200
#2528
wand wooden~
stick wooden wand~
a wooden stick~
a wooden stick is here~
~

View File

@ -1205,7 +1205,7 @@ door.
~
73 adj 1
D2
You can see a picture with some peeple crawling around a huge moon.
You can see a picture with some people crawling around a huge moon.
~
moon door~
1 -1 7315

View File

@ -1,3 +0,0 @@
all:
# You must run "configure" in Circle's top-level directory. See the
# README file in that directory for more information.

View File

@ -100,6 +100,12 @@ void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode)
{
if (!obj || !ch) {
log("SYSERR: NULL pointer in show_obj_to_char(): obj=%p ch=%p", obj, ch);
/* SYSERR_DESC:
* Somehow a NULL pointer was sent to show_obj_to_char() in either the
* 'obj' or the 'ch' variable. The error will indicate which was NULL
* be listing both of the pointers passed to it. This is often a
* difficult one to trace, and may require stepping through a debugger.
*/
return;
}
@ -136,6 +142,13 @@ void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode)
default:
log("SYSERR: Bad display mode (%d) in show_obj_to_char().", mode);
/* SYSERR_DESC:
* show_obj_to_char() has some predefined 'mode's (argument #3) to tell
* it what to display to the character when it is called. If the mode
* is not one of these, it will output this error, and indicate what
* mode was passed to it. To correct it, you will need to find the
* call with the incorrect mode and change it to an acceptable mode.
*/
return;
}
@ -1289,6 +1302,14 @@ ACMD(do_gen_ps)
break;
default:
log("SYSERR: Unhandled case in do_gen_ps. (%d)", subcmd);
/* SYSERR_DESC:
* General page string function for such things as 'credits', 'news',
* 'wizlist', 'clear', 'version'. This occurs when a call is made to
* this routine that is not one of the predefined calls. To correct
* it, either a case needs to be added into the function to account for
* the subcmd that is being passed to it, or the call to the function
* needs to have the correct subcmd put into place.
*/
return;
}
}

View File

@ -481,6 +481,10 @@ int perform_drop(struct char_data *ch, struct obj_data *obj,
return (value);
default:
log("SYSERR: Incorrect argument %d passed to perform_drop.", mode);
/* SYSERR_DESC:
* This error comes from perform_drop() and is output when perform_drop()
* is called with an illegal 'mode' argument.
*/
break;
}
@ -748,11 +752,14 @@ void weight_change_object(struct obj_data *obj, int weight)
obj_to_obj(obj, tmp_obj);
} else {
log("SYSERR: Unknown attempt to subtract weight from an object.");
/* SYSERR_DESC:
* weight_change_object() outputs this error when weight is attempted to
* be removed from an object that is not carried or in another object.
*/
}
}
void name_from_drinkcon(struct obj_data *obj)
{
char *new_name, *cur_name, *next;
@ -765,6 +772,11 @@ void name_from_drinkcon(struct obj_data *obj)
liqname = drinknames[GET_OBJ_VAL(obj, 2)];
if (!isname(liqname, obj->name)) {
log("SYSERR: Can't remove liquid '%s' from '%s' (%d) item.", liqname, obj->name, obj->item_number);
/* SYSERR_DESC:
* From name_from_drinkcon(), this error comes about if the object
* noted (by keywords and item vnum) does not contain the liquid string
* being searched for.
*/
return;
}
@ -1409,6 +1421,10 @@ void perform_remove(struct char_data *ch, int pos)
if (!(obj = GET_EQ(ch, pos)))
log("SYSERR: perform_remove: bad pos %d passed.", pos);
/* SYSERR_DESC:
* This error occurs when perform_remove() is passed a bad 'pos'
* (location) to remove an object from.
*/
else if (OBJ_FLAGGED(obj, ITEM_NODROP))
act("You can't remove $p, it must be CURSED!", FALSE, ch, obj, 0, TO_CHAR);
else if (IS_CARRYING_N(ch) >= CAN_CARRY_N(ch))

View File

@ -620,7 +620,7 @@ ACMD(do_rest)
default:
send_to_char(ch, "You stop floating around, and stop to rest your tired bones.\r\n");
act("$n stops floating around, and rests.", FALSE, ch, 0, 0, TO_ROOM);
GET_POS(ch) = POS_SITTING;
GET_POS(ch) = POS_RESTING;
break;
}
}

View File

@ -657,6 +657,10 @@ ACMD(do_use)
return;
default:
log("SYSERR: Unknown subcmd %d passed to do_use.", subcmd);
/* SYSERR_DESC:
* This is the same as the unhandled case in do_gen_ps(), but in the
* function which handles 'quaff', 'recite', and 'use'.
*/
return;
}
}
@ -820,6 +824,11 @@ ACMD(do_gen_write)
if (stat(filename, &fbuf) < 0) {
perror("SYSERR: Can't stat() file");
/* SYSERR_DESC:
* This is from do_gen_write() and indicates that it cannot call the
* stat() system call on the file required. The error string at the
* end of the line should explain what the problem is.
*/
return;
}
if (fbuf.st_size >= max_filesize) {
@ -828,6 +837,12 @@ ACMD(do_gen_write)
}
if (!(fl = fopen(filename, "a"))) {
perror("SYSERR: do_gen_write");
/* SYSERR_DESC:
* This is from do_gen_write(), and will be output if the file in
* question cannot be opened for appending to. The error string
* at the end of the line should explain what the problem is.
*/
send_to_char(ch, "Could not open the file. Sorry.\r\n");
return;
}
@ -943,6 +958,10 @@ ACMD(do_gen_tog)
break;
default:
log("SYSERR: Unknown subcmd %d in do_gen_toggle.", subcmd);
/* SYSERR_DESC:
* This is the same as the unhandled case in do_gen_ps(), but in the
* function which handles 'compact', 'brief', and so forth.
*/
return;
}

View File

@ -179,6 +179,11 @@ char *fread_action(FILE *fl, int nr)
fgets(buf, MAX_STRING_LENGTH, fl);
if (feof(fl)) {
log("SYSERR: fread_action: unexpected EOF near action #%d", nr);
/* SYSERR_DESC:
* fread_action() will fail if it discovers an end of file marker
* before it is able to read in the expected string. This can be
* caused by a truncated socials file.
*/
exit(1);
}
if (*buf == '#')
@ -220,6 +225,11 @@ void boot_social_messages(void)
/* open social file */
if (!(fl = fopen(SOCMESS_FILE, "r"))) {
log("SYSERR: can't open socials file '%s': %s", SOCMESS_FILE, strerror(errno));
/* SYSERR_DESC:
* This error, from boot_social_messages(), occurs when the server
* fails to open the file containing the social messages. The error
* at the end will indicate the reason why.
*/
exit(1);
}
/* count socials & allocate space */
@ -236,10 +246,25 @@ void boot_social_messages(void)
break;
if (fscanf(fl, " %d %d \n", &hide, &min_pos) != 2) {
log("SYSERR: format error in social file near social '%s'", next_soc);
/* SYSERR_DESC:
* From boot_social_messages(), this error is output when the
* server is expecting to find the remainder of the first line of the
* social ('hide' and 'minimum position'). These must follow the
* name of the social with a single space such as: 'accuse 0 5\n'.
* This error often occurs when one of the numbers is missing or the
* social name has a space in it (i.e., 'bend over').
*/
exit(1);
}
if (++curr_soc > list_top) {
log("SYSERR: Ran out of slots in social array. (%d > %d)", curr_soc, list_top);
/* SYSERR_DESC:
* The server creates enough space for all of the socials that it finds
* in the command structure (cmd_info[] in interpreter.c). These are
* designated with the 'do_action' command call. If there are more
* socials in the file than in the cmd_info structure, the
* boot_social_messages() function will fail with this error.
*/
break;
}
@ -251,6 +276,13 @@ void boot_social_messages(void)
#ifdef CIRCLE_ACORN
if (fgetc(fl) != '\n')
log("SYSERR: Acorn bug workaround failed.");
/* SYSERR_DESC:
* The only time that this error should ever arise is if you are running
* your CircleMUD on the Acorn platform. The error arises when the
* server cannot properly read a '\n' out of the file at the end of the
* first line of the social (that with 'hide' and 'min position'). This
* is in boot_social_messages().
*/
#endif
soc_mess_list[curr_soc].char_no_arg = fread_action(fl, nr);
@ -270,6 +302,14 @@ void boot_social_messages(void)
/* If social not found, re-use this slot. 'curr_soc' will be reincremented. */
if (nr < 0) {
log("SYSERR: Unknown social '%s' in social file.", next_soc);
/* SYSERR_DESC:
* This occurs when the find_command() function in interpreter.c cannot
* find the social of the name in the file in the cmd_info[] structure.
* This is returned to boot_social_messages(), and the function
* reassigns that slot to another social to avoid running out of memory.
* The solution is to add this social to the cmd_info[] array in
* interpreter.c or to remove the social from the file.
*/
memset(&soc_mess_list[curr_soc--], 0, sizeof(struct social_messg));
continue;
}
@ -277,6 +317,11 @@ void boot_social_messages(void)
/* If the command we found isn't do_action, we didn't count it for the CREATE(). */
if (cmd_info[nr].command_pointer != do_action) {
log("SYSERR: Social '%s' already assigned to a command.", next_soc);
/* SYSERR_DESC:
* This error occurs when boot_social_messages() reads in a social and
* then discovers that it is not assigned 'do_action' as a command in
* the cmd_info[] array in interpreter.c
*/
memset(&soc_mess_list[curr_soc--], 0, sizeof(struct social_messg));
}
}

View File

@ -1846,6 +1846,10 @@ ACMD(do_wizutil)
break;
default:
log("SYSERR: Unknown subcmd %d passed to do_wizutil (%s)", subcmd, __FILE__);
/* SYSERR_DESC:
* This is the same as the unhandled case in do_gen_ps(), but this
* function handles 'reroll', 'pardon', 'freeze', etc.
*/
break;
}
save_char(vict);

View File

@ -33,8 +33,12 @@ void write_aliases(struct char_data *ch)
return;
if ((file = fopen(fn, "w")) == NULL) {
log("SYSERR: Couldn't save aliases for %s in '%s'.", GET_NAME(ch), fn);
perror("SYSERR: write_aliases");
log("SYSERR: Couldn't save aliases for %s in '%s': %s", GET_NAME(ch), fn, strerror(errno));
/* SYSERR_DESC:
* This error occurs when the server fails to open the relevant alias
* file for writing. The text at the end of the error should give a
* valid reason why.
*/
return;
}
@ -64,8 +68,12 @@ void read_aliases(struct char_data *ch)
if ((file = fopen(xbuf, "r")) == NULL) {
if (errno != ENOENT) {
log("SYSERR: Couldn't open alias file '%s' for %s.", xbuf, GET_NAME(ch));
perror("SYSERR: read_aliases");
log("SYSERR: Couldn't open alias file '%s' for %s: %s", xbuf, GET_NAME(ch), strerror(errno));
/* SYSERR_DESC:
* This error occurs when the server fails to open the relevant alias
* file for reading. The text at the end version should give a valid
* reason why.
*/
}
return;
}
@ -124,5 +132,9 @@ void delete_aliases(const char *charname)
if (remove(filename) < 0 && errno != ENOENT)
log("SYSERR: deleting alias file %s: %s", filename, strerror(errno));
/* SYSERR_DESC:
* When an alias file cannot be removed, this error will occur,
* and the reason why will be the tail end of the error.
*/
}

View File

@ -531,6 +531,8 @@ void Board_clear_board(int board_type)
int i;
for (i = 0; i < MAX_BOARD_MESSAGES; i++) {
if (MSG_SLOTNUM(board_type, i) == -1)
continue; /* don't try to free non-existant slots */
if (MSG_HEADING(board_type, i))
free(MSG_HEADING(board_type, i));
if (msg_storage[MSG_SLOTNUM(board_type, i)])

View File

@ -90,6 +90,11 @@ void castle_mob_spec(mob_vnum mobnum, SPECIAL(*specproc))
if (rmr == NOBODY) {
if (!mini_mud)
log("SYSERR: assign_kings_castle(): can't find mob #%d.", vmv);
/* SYSERR_DESC:
* When the castle_mob_spec() function is given a mobnum that
* does not correspond to a mod loaded (when not in minimud mode),
* this error will result.
*/
} else
mob_index[rmr].func = specproc;
}

View File

@ -147,6 +147,7 @@ int open_logfile(const char *filename, FILE *stderr_fp);
#if defined(POSIX)
sigfunc *my_signal(int signo, sigfunc *func);
#endif
void free_bufpool(void);
/* extern fcnts */
void reboot_wizlists(void);
@ -163,6 +164,7 @@ void free_messages(void);
void Board_clear_all(void);
void free_social_messages(void);
void Free_Invalid_List(void);
void free_mail_index(void);
#ifdef __CXREF__
#undef FD_ZERO
@ -327,9 +329,11 @@ int main(int argc, char **argv)
if (!scheck) {
log("Clearing other memory.");
free_bufpool(); /* comm.c */
free_player_index(); /* db.c */
free_messages(); /* fight.c */
clear_free_list(); /* mail.c */
free_mail_index(); /* mail.c */
free_text_files(); /* db.c */
Board_clear_all(); /* boards.c */
free(cmd_sort_info); /* act.informative.c */
@ -2518,3 +2522,17 @@ void circle_sleep(struct timeval *timeout)
}
#endif /* CIRCLE_WINDOWS */
void free_bufpool(void)
{
struct txt_block *tmpblock;
while (bufpool) {
tmpblock = bufpool;
bufpool = bufpool->next;
if (tmpblock->text)
free(tmpblock->text);
free(tmpblock);
}
}

View File

@ -298,6 +298,8 @@ void destroy_db(void)
while (character_list) {
chtmp = character_list;
character_list = character_list->next;
if (chtmp->master)
stop_follower(chtmp);
free_char(chtmp);
}

View File

@ -324,7 +324,7 @@ void hcontrol_list_houses(struct char_data *ch)
if (house_control[i].last_payment) {
timestr = asctime(localtime(&(house_control[i].last_payment)));
*(timestr + 10) = '\0';
strlcpy(last_pay, timestr, sizeof(built_on));
strlcpy(last_pay, timestr, sizeof(last_pay));
} else
strcpy(last_pay, "None"); /* strcpy: OK (for 'strlen("None") < 128') */

View File

@ -966,18 +966,15 @@ char *one_argument(char *argument, char *first_arg)
/*
* one_word is like one_argument, except that words in quotes ("") are
* one_word is like any_one_arg, except that words in quotes ("") are
* considered one word.
*
* No longer ignores fill words. -dak, 6 Jan 2003
*/
char *one_word(char *argument, char *first_arg)
{
char *begin = first_arg;
do {
skip_spaces(&argument);
first_arg = begin;
if (*argument == '\"') {
argument++;
while (*argument && *argument != '\"') {
@ -993,8 +990,6 @@ char *one_word(char *argument, char *first_arg)
}
*first_arg = '\0';
} while (fill_word(begin));
return (argument);
}

View File

@ -614,3 +614,21 @@ void postmaster_receive_mail(struct char_data *ch, struct char_data *mailman,
act("$N gives $n a piece of mail.", FALSE, ch, 0, mailman, TO_ROOM);
}
}
void free_mail_index(void)
{
while (mail_index) {
mail_index_type *tmp_index = mail_index;
mail_index = mail_index->next;
while (tmp_index->list_start) {
position_list_type *tmp_list;
tmp_list = tmp_index->list_start;
tmp_index->list_start = tmp_index->list_start->next;
free(tmp_list);
}
free(tmp_index);
}
}

View File

@ -171,7 +171,7 @@ ASPELL(spell_locate_object)
if (!isname(name, i->name))
continue;
send_to_char(ch, "%c%s", UPPER(*i->short_description), i->short_description);
send_to_char(ch, "%c%s", UPPER(*i->short_description), i->short_description+1);
if (i->carried_by)
send_to_char(ch, " is being carried by %s.\r\n", PERS(i->carried_by, ch));

View File

@ -317,7 +317,7 @@
/* Take/Wear flags: used by obj_data.obj_flags.wear_flags */
#define ITEM_WEAR_TAKE (1 << 0) /* Item can be takes */
#define ITEM_WEAR_TAKE (1 << 0) /* Item can be taken */
#define ITEM_WEAR_FINGER (1 << 1) /* Can be worn on finger */
#define ITEM_WEAR_NECK (1 << 2) /* Can be worn around neck */
#define ITEM_WEAR_BODY (1 << 3) /* Can be worn on body */

View File

@ -33,7 +33,7 @@ int get_filename(char *filename, size_t fbufsize, int mode, const char *orig_nam
time_t mud_time_to_secs(struct time_info_data *now);
struct time_info_data *age(struct char_data *ch);
int num_pc_in_room(struct room_data *room);
void core_dump_real(const char *, int);
void core_dump_real(const char *who, int line);
int room_is_dark(room_rnum room);
#define core_dump() core_dump_real(__FILE__, __LINE__)

1
syslog
View File

@ -0,0 +1 @@
System messages will end up written here.