diff options
author | Ron Yorston <rmy@pobox.com> | 2023-04-23 09:00:04 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-04-23 09:04:01 +0100 |
commit | 0575aaaa0779812752427badbc0f80a09aac02a4 (patch) | |
tree | 350b636dad1766e43d1d0c7d132a895c3cc2a628 /miscutils/make.c | |
parent | 7b81a44c87cf71dfb4f647ba107624e208ffbefe (diff) | |
download | busybox-w32-0575aaaa0779812752427badbc0f80a09aac02a4.tar.gz busybox-w32-0575aaaa0779812752427badbc0f80a09aac02a4.tar.bz2 busybox-w32-0575aaaa0779812752427badbc0f80a09aac02a4.zip |
win32: export xappendword()
Export the function xappendword() from make. Use it in drop and
watch.
Saves 8-80 bytes, an unusually large disparity.
Diffstat (limited to 'miscutils/make.c')
-rw-r--r-- | miscutils/make.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/miscutils/make.c b/miscutils/make.c index eddc07126..07d824752 100644 --- a/miscutils/make.c +++ b/miscutils/make.c | |||
@@ -333,19 +333,6 @@ auto_concat(const char *s1, const char *s2) | |||
333 | return auto_string(xasprintf("%s%s", s1, s2)); | 333 | return auto_string(xasprintf("%s%s", s1, s2)); |
334 | } | 334 | } |
335 | 335 | ||
336 | /* | ||
337 | * Append a word to a space-separated string of words. The first | ||
338 | * call should use a NULL pointer for str, subsequent calls should | ||
339 | * pass an allocated string which will be freed. | ||
340 | */ | ||
341 | static char * | ||
342 | xappendword(const char *str, const char *word) | ||
343 | { | ||
344 | char *newstr = str ? xasprintf("%s %s", str, word) : xstrdup(word); | ||
345 | free((void *)str); | ||
346 | return newstr; | ||
347 | } | ||
348 | |||
349 | static unsigned int | 336 | static unsigned int |
350 | getbucket(const char *name) | 337 | getbucket(const char *name) |
351 | { | 338 | { |