diff options
author | joerg <joerg@pkgsrc.org> | 2008-04-18 17:16:44 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-04-18 17:16:44 +0000 |
commit | 269a98b13494758445e89a41c3adf15db4200d31 (patch) | |
tree | 00788f22ebeab85a9ef52712ae27eac20063f630 /pkgtools | |
parent | ef2bce0b5213080d65a6c79d1106796d4f2d3c48 (diff) | |
download | pkgsrc-269a98b13494758445e89a41c3adf15db4200d31.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 */ |