mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 05:01: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);
|
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.
|
/* parse_long is like strtol or atoi, but it allows digits only.
|
||||||
No whitespace, sign, or radix prefix. */
|
No whitespace, sign, or radix prefix. */
|
||||||
long parse_long(const char *s, char **tail);
|
long parse_long(const char *s, char **tail);
|
||||||
|
|||||||
@@ -317,18 +317,6 @@ char *escape_windows_command_arg(const char *arg)
|
|||||||
return ret;
|
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 */
|
/* Convert non-printable characters to replchar in the string */
|
||||||
void replacenonprintable(char *str, int strlength, char replchar) {
|
void replacenonprintable(char *str, int strlength, char replchar) {
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
Reference in New Issue
Block a user