mirror of https://github.com/BOINC/boinc.git
parent
f8b5f68bc1
commit
87cbf8fe47
12
lib/util.C
12
lib/util.C
|
@ -248,6 +248,18 @@ void c2x(char *what) {
|
|||
strcpy(what, buf);
|
||||
}
|
||||
|
||||
void strip_whitespace(char *str) {
|
||||
int read_pos, write_pos;
|
||||
read_pos = write_pos = 0;
|
||||
while(str[read_pos] != 0) {
|
||||
if (!isspace(str[read_pos])) {
|
||||
str[write_pos] = str[read_pos];
|
||||
write_pos++;
|
||||
}
|
||||
read_pos++;
|
||||
}
|
||||
}
|
||||
|
||||
void unescape_url(char *url) {
|
||||
register int x,y;
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ extern int parse_command_line( char *, char ** );
|
|||
extern int lock_file(char*);
|
||||
extern double drand();
|
||||
extern void c2x(char *what);
|
||||
extern void strip_whitespace(char *str);
|
||||
extern void unescape_url(char *url);
|
||||
extern void escape_url(char *in, char*out);
|
||||
extern void safe_strncpy(char*, char*, int);
|
||||
|
|
Loading…
Reference in New Issue