diff options
Diffstat (limited to 'plugins/utils.c')
-rw-r--r-- | plugins/utils.c | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/plugins/utils.c b/plugins/utils.c index 959541bf..aed03c4e 100644 --- a/plugins/utils.c +++ b/plugins/utils.c | |||
@@ -67,7 +67,7 @@ void usage2(char *msg, char *arg) | |||
67 | } | 67 | } |
68 | 68 | ||
69 | void | 69 | void |
70 | usage3 (char *msg, char arg) | 70 | usage3 (char *msg, int arg) |
71 | { | 71 | { |
72 | printf ("%s: %s - %c\n", progname, msg, arg); | 72 | printf ("%s: %s - %c\n", progname, msg, arg); |
73 | print_usage(); | 73 | print_usage(); |
@@ -111,7 +111,7 @@ For more information about these matters, see the file named COPYING.\n")); | |||
111 | 111 | ||
112 | } | 112 | } |
113 | 113 | ||
114 | char * | 114 | const char * |
115 | state_text (int result) | 115 | state_text (int result) |
116 | { | 116 | { |
117 | switch (result) { | 117 | switch (result) { |
@@ -338,40 +338,6 @@ strscpy (char *dest, const char *src) | |||
338 | 338 | ||
339 | /****************************************************************************** | 339 | /****************************************************************************** |
340 | * | 340 | * |
341 | * Concatenates one string to the end of another | ||
342 | * | ||
343 | * Given a pointer destination string, which may or may not already | ||
344 | * hold some text, and a source string with additional text (possibly | ||
345 | * NULL or empty), returns a pointer to a string that is the first | ||
346 | * string with the second concatenated to it. Uses realloc to free | ||
347 | * memory held by the dest argument if new storage space is required. | ||
348 | * | ||
349 | * Example: | ||
350 | * | ||
351 | * char *str=NULL; | ||
352 | * str = strscpy("This is a line of text with no trailing newline"); | ||
353 | * str = strscat(str,"\n"); | ||
354 | * | ||
355 | *****************************************************************************/ | ||
356 | |||
357 | char * | ||
358 | strscat (char *dest, const char *src) | ||
359 | { | ||
360 | |||
361 | if (dest == NULL) | ||
362 | return src; | ||
363 | if (src != NULL) | ||
364 | asprintf (&dest, "%s%s", dest, src); | ||
365 | |||
366 | return dest; | ||
367 | } | ||
368 | |||
369 | |||
370 | |||
371 | |||
372 | |||
373 | /****************************************************************************** | ||
374 | * | ||
375 | * Returns a pointer to the next line of a multiline string buffer | 341 | * Returns a pointer to the next line of a multiline string buffer |
376 | * | 342 | * |
377 | * Given a pointer string, find the text following the next sequence | 343 | * Given a pointer string, find the text following the next sequence |