Convert stripansi() from unsigned char to char
This silences a few compiler warnings. This also cleans the function up by removing some always-true checks. I'm not convinced that this function makes a whole lot of sense, though. Will look into it further...
This commit is contained in:
@@ -75,7 +75,7 @@ extern LastMsg last_sent_ctcp[2];
|
|||||||
void BX_userage (char *, char *);
|
void BX_userage (char *, char *);
|
||||||
void stats_k_grep_end (void);
|
void stats_k_grep_end (void);
|
||||||
char *stripansicodes (const char *);
|
char *stripansicodes (const char *);
|
||||||
char *stripansi (unsigned char *);
|
char *stripansi (const char *);
|
||||||
NickTab *BX_gettabkey (int, int, char *);
|
NickTab *BX_gettabkey (int, int, char *);
|
||||||
void BX_addtabkey (char *, char *, int);
|
void BX_addtabkey (char *, char *, int);
|
||||||
void clear_array (NickTab **, char *);
|
void clear_array (NickTab **, char *);
|
||||||
|
|||||||
@@ -1065,18 +1065,17 @@ char *mircansi(unsigned char *line)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *stripansi(unsigned char *line)
|
char *stripansi(const char *line)
|
||||||
{
|
{
|
||||||
register unsigned char *cp;
|
char *cp;
|
||||||
unsigned char *newline;
|
char *newline = m_strdup(line);
|
||||||
newline = m_strdup(line);
|
|
||||||
for (cp = newline; *cp; cp++)
|
|
||||||
if ((*cp < 31 && *cp > 13))
|
|
||||||
if (*cp != 1 && *cp != 15 && *cp !=22 && *cp != 0x9b)
|
|
||||||
*cp = (*cp & 127) | 64;
|
|
||||||
return (char *)newline;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
for (cp = newline; *cp; cp++)
|
||||||
|
if (*cp < 31 && *cp > 13 && *cp != 15 && *cp != 22)
|
||||||
|
*cp = (*cp & 127) | 64;
|
||||||
|
|
||||||
|
return newline;
|
||||||
|
}
|
||||||
|
|
||||||
int check_split(char *nick, char *reason)
|
int check_split(char *nick, char *reason)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user