mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-21 02:51:45 +01:00
Cleaned up numerous warnings found by adding -Wextra -Wcast-qual -Wshadow -Wno-unused flags. --Rumble
This commit is contained in:
12
src/genolc.c
12
src/genolc.c
@@ -281,24 +281,24 @@ int sprintascii(char *out, bitvector_t bits)
|
||||
char *fix_filename(char *str)
|
||||
{
|
||||
static char good_file_name[MAX_STRING_LENGTH];
|
||||
char *index = good_file_name;
|
||||
char *cindex = good_file_name;
|
||||
|
||||
while(*str) {
|
||||
switch(*str) {
|
||||
case ' ': *index = '_'; index++; break;
|
||||
case '(': *index = '{'; index++; break;
|
||||
case ')': *index = '}'; index++; break;
|
||||
case ' ': *cindex = '_'; cindex++; break;
|
||||
case '(': *cindex = '{'; cindex++; break;
|
||||
case ')': *cindex = '}'; cindex++; break;
|
||||
|
||||
/* skip the following */
|
||||
case '\'': break;
|
||||
case '"': break;
|
||||
|
||||
/* Legal character */
|
||||
default: *index = *str; index++;break;
|
||||
default: *cindex = *str; cindex++;break;
|
||||
}
|
||||
str++;
|
||||
}
|
||||
*index = '\0';
|
||||
*cindex = '\0';
|
||||
|
||||
return good_file_name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user