replaced kill_ems() with strip_cr(), for consistency.

This commit is contained in:
Rumble 2006-12-28 22:40:41 +00:00
parent 391fe3b776
commit 1be1fc39d7
2 changed files with 4 additions and 106 deletions

View file

@ -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,7 +531,7 @@ 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

View file

@ -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