diff options
author | joerg <joerg> | 2008-04-18 17:16:44 +0000 |
---|---|---|
committer | joerg <joerg> | 2008-04-18 17:16:44 +0000 |
commit | 8a5666d9dd7343411797fc057c9d581ad83db3bd (patch) | |
tree | 00788f22ebeab85a9ef52712ae27eac20063f630 /pkgtools | |
parent | ff9dc6d6a24eceb0fcd8d9ec43628bf8cc8bfde5 (diff) | |
download | pkgsrc-8a5666d9dd7343411797fc057c9d581ad83db3bd.tar.gz |
Move get_dash_string to pkg_create as only user.
Remove str_lowercase.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/files/create/perform.c | 16 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/lib.h | 4 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/str.c | 24 |
3 files changed, 17 insertions, 27 deletions
diff --git a/pkgtools/pkg_install/files/create/perform.c b/pkgtools/pkg_install/files/create/perform.c index b07d925c90e..51c84c04f27 100644 --- a/pkgtools/pkg_install/files/create/perform.c +++ b/pkgtools/pkg_install/files/create/perform.c @@ -1,4 +1,4 @@ -/* $NetBSD: perform.c,v 1.18 2007/08/09 14:14:45 joerg Exp $ */ +/* $NetBSD: perform.c,v 1.19 2008/04/18 17:16:44 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -11,7 +11,7 @@ #if 0 static const char *rcsid = "from FreeBSD Id: perform.c,v 1.38 1997/10/13 15:03:51 jkh Exp"; #else -__RCSID("$NetBSD: perform.c,v 1.18 2007/08/09 14:14:45 joerg Exp $"); +__RCSID("$NetBSD: perform.c,v 1.19 2008/04/18 17:16:44 joerg Exp $"); #endif #endif @@ -90,6 +90,18 @@ register_depends(package_t *plist, char *deps, int build_only) printf(".\n"); } +/* + * Get a string parameter as a file spec or as a "contents follow -" spec + */ +static void +get_dash_string(char **s) +{ + if (**s == '-') + *s = strdup(*s + 1); + else + *s = fileGetContents(*s); +} + int pkg_perform(const char *pkg) { diff --git a/pkgtools/pkg_install/files/lib/lib.h b/pkgtools/pkg_install/files/lib/lib.h index 03dfc0e68df..bb52d0c2d59 100644 --- a/pkgtools/pkg_install/files/lib/lib.h +++ b/pkgtools/pkg_install/files/lib/lib.h @@ -1,4 +1,4 @@ -/* $NetBSD: lib.h,v 1.41 2008/04/04 15:21:32 joerg Exp $ */ +/* $NetBSD: lib.h,v 1.42 2008/04/18 17:16:44 joerg Exp $ */ /* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */ @@ -329,8 +329,6 @@ Boolean is_automatic_installed(const char *); int mark_as_automatic_installed(const char *, int); /* String */ -char *get_dash_string(char **); -void str_lowercase(unsigned char *); const char *basename_of(const char *); const char *dirname_of(const char *); const char *suffix_of(const char *); diff --git a/pkgtools/pkg_install/files/lib/str.c b/pkgtools/pkg_install/files/lib/str.c index 9dff89aef59..d8229cea050 100644 --- a/pkgtools/pkg_install/files/lib/str.c +++ b/pkgtools/pkg_install/files/lib/str.c @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.21 2007/08/12 16:47:18 joerg Exp $ */ +/* $NetBSD: str.c,v 1.22 2008/04/18 17:16:44 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -11,7 +11,7 @@ #if 0 static const char *rcsid = "Id: str.c,v 1.5 1997/10/08 07:48:21 charnier Exp"; #else -__RCSID("$NetBSD: str.c,v 1.21 2007/08/12 16:47:18 joerg Exp $"); +__RCSID("$NetBSD: str.c,v 1.22 2008/04/18 17:16:44 joerg Exp $"); #endif #endif @@ -98,26 +98,6 @@ dirname_of(const char *path) } /* - * Get a string parameter as a file spec or as a "contents follow -" spec - */ -char * -get_dash_string(char **s) -{ - return *s = (**s == '-') ? strdup(*s + 1) : fileGetContents(*s); -} - -/* - * Lowercase a whole string - */ -void -str_lowercase(unsigned char *s) -{ - for (; *s; s++) { - *s = tolower(*s); - } -} - -/* * Does the pkgname contain any of the special chars ("{[]?*<>")? * If so, return 1, else 0 */ |