Updated for 2019 release

This commit is contained in:
Rumble 2019-01-19 23:25:38 +00:00
parent 7c5e92d4c7
commit 674fbfddf1
17 changed files with 485 additions and 431 deletions

View file

@ -24,7 +24,7 @@
* @todo cpp_extern isn't needed here (or anywhere) as the extern reserved word
* works correctly with C compilers (at least in my Experience)
* Jeremy Osborne 1/28/2008 */
cpp_extern const char *tbamud_version = "tbaMUD 2018.1";
cpp_extern const char *tbamud_version = "tbaMUD 2019";
/* strings corresponding to ordinals/bitvectors in structs.h */
/* (Note: strings for class definitions in class.c instead of here) */

View file

@ -189,7 +189,7 @@ char *fread_action(FILE *fl, int nr)
static void boot_social_messages(void)
{
FILE *fl;
int nr = 0, hide, min_char_pos, min_pos, min_lvl, curr_soc = -1;
int line_number, nr = 0, hide, min_char_pos, min_pos, min_lvl, curr_soc = -1;
char next_soc[MAX_STRING_LENGTH], sorted[MAX_INPUT_LENGTH];
if (CONFIG_NEW_SOCIALS == TRUE) {
@ -236,7 +236,7 @@ static void boot_social_messages(void)
CREATE(soc_mess_list, struct social_messg, top_of_socialt + 1);
/* now read 'em */
for (int line_number = 0;; ++line_number) {
for (line_number = 0;; ++line_number) {
if (fscanf(fl, " %s ", next_soc) != 1) {
if(feof(fl))
log("SYSERR: unexpected end of file encountered in socials file %s", SOCMESS_FILE_NEW);
@ -935,7 +935,7 @@ void index_boot(int mode)
{
const char *index_filename, *prefix = NULL; /* NULL or egcs 1.1 complains */
FILE *db_index, *db_file;
int rec_count = 0, size[2];
int line_number, rec_count = 0, size[2];
char buf2[PATH_MAX], buf1[MAX_STRING_LENGTH];
switch (mode) {
@ -979,7 +979,7 @@ void index_boot(int mode)
exit(1);
}
for (int line_number = 0;; ++line_number) {
for (line_number = 0;; ++line_number) {
/* first, count the number of records in the file so we can malloc */
if (fscanf(db_index, "%s\n", buf1) != 1) {
if (feof(db_index))
@ -1065,7 +1065,7 @@ void index_boot(int mode)
rewind(db_index);
for (int line_number = 1;; ++line_number) {
for (line_number = 1;; ++line_number) {
if (fscanf(db_index, "%s\n", buf1) != 1) {
if (feof(db_index))
log("SYSERR: boot error -- unexpected end of file encountered in index file ./%s%s",

View file

@ -100,7 +100,7 @@ void parse_edit_action(int command, char *string, struct descriptor_data *d)
{
int indent = 0, rep_all = 0, flags = 0, replaced, i, line_low, line_high, j = 0;
unsigned int total_len;
char *s, *t, temp;
char *s, *t, temp, *c;
char buf[MAX_STRING_LENGTH];
char buf2[MAX_STRING_LENGTH - 1];
@ -130,7 +130,7 @@ void parse_edit_action(int command, char *string, struct descriptor_data *d)
break;
}
bool has_at = FALSE;
for (char* c = *d->str; *c; ++c) {
for (c = *d->str; *c; ++c) {
if (*c == '@') {
if (*(++c) != '@') {
has_at = TRUE;