mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Get rid of stringisprintable() function - this wasn't used anywhere in the code, yet it was linked into the executable.
This commit is contained in:
@@ -478,10 +478,6 @@ int alloc_vsprintf(char **strp, const char *fmt, va_list va)
|
||||
|
||||
char *escape_windows_command_arg(const char *arg);
|
||||
|
||||
/* Trivial function that returns nonzero if all characters in str of
|
||||
length strlength are printable (as defined by isprint()) */
|
||||
int stringisprintable(const char *str, int strlength);
|
||||
|
||||
/* parse_long is like strtol or atoi, but it allows digits only.
|
||||
No whitespace, sign, or radix prefix. */
|
||||
long parse_long(const char *s, char **tail);
|
||||
|
||||
@@ -317,18 +317,6 @@ char *escape_windows_command_arg(const char *arg)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Trivial function that returns nonzero if all characters in str of length strlength are
|
||||
printable (as defined by isprint()) */
|
||||
int stringisprintable(const char *str, int strlength) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < strlength; i++)
|
||||
if (!isprint((int)(unsigned char)str[i]))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Convert non-printable characters to replchar in the string */
|
||||
void replacenonprintable(char *str, int strlength, char replchar) {
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user