diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-10-25 15:38:37 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-10-25 15:38:37 +0000 |
| commit | 36b7319742ddd913fef91b3fd8b52ed3db79baed (patch) | |
| tree | 38f96dd54eeecc8a263b88c6c73dd075dcbadb38 /usr.sbin/pkg_install/lib/str.c | |
| parent | 59f0c0d522401b5af351f214e49cd7a2f309a832 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/pkg_install/lib/str.c')
| -rw-r--r-- | usr.sbin/pkg_install/lib/str.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/usr.sbin/pkg_install/lib/str.c b/usr.sbin/pkg_install/lib/str.c index 3e397807a3bb..a9f130009612 100644 --- a/usr.sbin/pkg_install/lib/str.c +++ b/usr.sbin/pkg_install/lib/str.c @@ -35,6 +35,18 @@ basename_of(char *str) return basename; } +char * +strconcat(char *s1, char *s2) +{ + static char tmp[FILENAME_MAX]; + + tmp[0] = '\0'; + strncpy(tmp, s1 ? s1 : s2, FILENAME_MAX); + if (s1 && s2) + strncat(tmp, s2, FILENAME_MAX - strlen(tmp)); + return tmp; +} + /* Get a string parameter as a file spec or as a "contents follow -" spec */ char * get_dash_string(char **str) |
