mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-21 21:40:49 +02:00
replaced kill_ems() with strip_cr(), for consistency.
This commit is contained in:
parent
391fe3b776
commit
1be1fc39d7
2 changed files with 4 additions and 106 deletions
|
@ -39,6 +39,7 @@ void write_aliases_ascii(FILE *file, struct char_data *ch);
|
|||
void read_aliases_ascii(FILE *file, struct char_data *ch, int count);
|
||||
void save_char_vars_ascii(FILE *file, struct char_data *ch);
|
||||
void read_saved_vars_ascii(FILE *file, struct char_data *ch, int count);
|
||||
void strip_cr(char *buffer);
|
||||
|
||||
/* 'global' vars */
|
||||
struct player_index_element *player_table = NULL; /* index to plr file */
|
||||
|
@ -433,30 +434,6 @@ int load_char(const char *name, struct char_data *ch)
|
|||
return(id);
|
||||
}
|
||||
|
||||
|
||||
/* remove ^M's from file output */
|
||||
/* There may be a similar function in Oasis (and I'm sure
|
||||
it's part of obuild). Remove this if you get a
|
||||
multiple definition error or if it you want to use a
|
||||
substitute
|
||||
*/
|
||||
void kill_ems(char *str)
|
||||
{
|
||||
char *ptr1, *ptr2, *tmp;
|
||||
|
||||
tmp = str;
|
||||
ptr1 = str;
|
||||
ptr2 = str;
|
||||
|
||||
while (*ptr1) {
|
||||
if ((*(ptr2++) = *(ptr1++)) == '\r')
|
||||
if (*ptr1 == '\r')
|
||||
ptr1++;
|
||||
}
|
||||
*ptr2 = '\0';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* write the vital data of a player to the player file
|
||||
*
|
||||
|
@ -554,14 +531,14 @@ void save_char(struct char_data * ch)
|
|||
if (GET_TITLE(ch)) fprintf(fl, "Titl: %s\n", GET_TITLE(ch));
|
||||
if (ch->player.description && *ch->player.description) {
|
||||
strcpy(buf, ch->player.description);
|
||||
kill_ems(buf);
|
||||
strip_cr(buf);
|
||||
fprintf(fl, "Desc:\n%s~\n", buf);
|
||||
}
|
||||
#if ASCII_SAVE_POOFS
|
||||
if (POOFIN(ch)) fprintf(fl, "PfIn: %s\n", POOFIN(ch));
|
||||
if (POOFOUT(ch)) fprintf(fl, "PfOt: %s\n", POOFOUT(ch));
|
||||
#endif
|
||||
if (GET_SEX(ch) != PFDEF_SEX) fprintf(fl, "Sex : %d\n", GET_SEX(ch));
|
||||
if (GET_SEX(ch) != PFDEF_SEX) fprintf(fl, "Sex : %d\n", GET_SEX(ch));
|
||||
if (GET_CLASS(ch) != PFDEF_CLASS) fprintf(fl, "Clas: %d\n", GET_CLASS(ch));
|
||||
if (GET_LEVEL(ch) != PFDEF_LEVEL) fprintf(fl, "Levl: %d\n", GET_LEVEL(ch));
|
||||
if (GET_HOME(ch) != PFDEF_HOMETOWN) fprintf(fl, "Home: %d\n", GET_HOME(ch));
|
||||
|
@ -574,7 +551,7 @@ void save_char(struct char_data * ch)
|
|||
if (GET_HOST(ch)) fprintf(fl, "Host: %s\n", GET_HOST(ch));
|
||||
if (GET_HEIGHT(ch) != PFDEF_HEIGHT) fprintf(fl, "Hite: %d\n", GET_HEIGHT(ch));
|
||||
if (GET_WEIGHT(ch) != PFDEF_HEIGHT) fprintf(fl, "Wate: %d\n", GET_WEIGHT(ch));
|
||||
if (GET_ALIGNMENT(ch) != PFDEF_ALIGNMENT) fprintf(fl, "Alin: %d\n", GET_ALIGNMENT(ch));
|
||||
if (GET_ALIGNMENT(ch) != PFDEF_ALIGNMENT) fprintf(fl, "Alin: %d\n", GET_ALIGNMENT(ch));
|
||||
|
||||
if (PLR_FLAGS(ch) != PFDEF_PLRFLAGS) {
|
||||
sprintascii(bits, PLR_FLAGS(ch)); fprintf(fl, "Act : %s\n", bits);
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
# Generated automatically from Makefile.in by configure.
|
||||
# CircleMUD Makefile.in - Makefile template used by 'configure'
|
||||
# for the 'util' directory
|
||||
|
||||
# C compiler to use
|
||||
CC = gcc
|
||||
|
||||
# Any special flags you want to pass to the compiler
|
||||
MYFLAGS = -Wall -DCIRCLE_UTIL
|
||||
|
||||
#flags for profiling (see hacker.doc for more information)
|
||||
PROFILE =
|
||||
|
||||
##############################################################################
|
||||
# Do Not Modify Anything Below This Line (unless you know what you're doing) #
|
||||
##############################################################################
|
||||
|
||||
# binary destination directory
|
||||
BINDIR = ../../bin
|
||||
# location of Circle include files
|
||||
INCDIR = ..
|
||||
|
||||
CFLAGS = -g -O2 $(MYFLAGS) $(PROFILE) -I$(INCDIR)
|
||||
|
||||
default: all
|
||||
|
||||
all: $(BINDIR)/asciipasswd $(BINDIR)/autowiz $(BINDIR)/listrent \
|
||||
$(BINDIR)/plrtoascii $(BINDIR)/shopconv $(BINDIR)/sign \
|
||||
$(BINDIR)/split $(BINDIR)/wld2html
|
||||
|
||||
asciipasswd: $(BINDIR)/asciipasswd
|
||||
|
||||
autowiz: $(BINDIR)/autowiz
|
||||
|
||||
listrent: $(BINDIR)/listrent
|
||||
|
||||
plrtoascii: $(BINDIR)/plrtoascii
|
||||
|
||||
shopconv: $(BINDIR)/shopconv
|
||||
|
||||
sign: $(BINDIR)/sign
|
||||
|
||||
split: $(BINDIR)/split
|
||||
|
||||
wld2html: $(BINDIR)/wld2html
|
||||
|
||||
webster: $(BINDIR)/webster
|
||||
|
||||
$(BINDIR)/asciipasswd: asciipasswd.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/structs.h $(INCDIR)/utils.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/asciipasswd asciipasswd.c -lcrypt
|
||||
|
||||
$(BINDIR)/autowiz: autowiz.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/structs.h $(INCDIR)/utils.h $(INCDIR)/db.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/autowiz autowiz.c
|
||||
|
||||
$(BINDIR)/listrent: listrent.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/structs.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/listrent listrent.c
|
||||
|
||||
$(BINDIR)/plrtoascii: plrtoascii.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/db.h $(INCDIR)/pfdefaults.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/plrtoascii plrtoascii.c
|
||||
|
||||
$(BINDIR)/shopconv: shopconv.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h \
|
||||
$(INCDIR)/structs.h $(INCDIR)/db.h $(INCDIR)/utils.h $(INCDIR)/shop.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/shopconv shopconv.c
|
||||
|
||||
$(BINDIR)/sign: sign.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/sign sign.c
|
||||
|
||||
$(BINDIR)/split: split.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/split split.c
|
||||
|
||||
$(BINDIR)/wld2html: wld2html.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/wld2html wld2html.c
|
||||
|
||||
$(BINDIR)/webster: webster.c $(INCDIR)/conf.h $(INCDIR)/sysdep.h
|
||||
$(CC) $(CFLAGS) -o $(BINDIR)/webster webster.c
|
Loading…
Add table
Add a link
Reference in a new issue