pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files Move get_dash_string to pkg...
details: https://anonhg.NetBSD.org/pkgsrc/rev/131cb5dfa280
branches: trunk
changeset: 541294:131cb5dfa280
user: joerg <joerg%pkgsrc.org@localhost>
date: Fri Apr 18 17:16:44 2008 +0000
description:
Move get_dash_string to pkg_create as only user.
Remove str_lowercase.
diffstat:
pkgtools/pkg_install/files/create/perform.c | 16 ++++++++++++++--
pkgtools/pkg_install/files/lib/lib.h | 4 +---
pkgtools/pkg_install/files/lib/str.c | 24 ++----------------------
3 files changed, 17 insertions(+), 27 deletions(-)
diffs (100 lines):
diff -r 8f008dab548f -r 131cb5dfa280 pkgtools/pkg_install/files/create/perform.c
--- a/pkgtools/pkg_install/files/create/perform.c Fri Apr 18 14:58:52 2008 +0000
+++ b/pkgtools/pkg_install/files/create/perform.c Fri Apr 18 17:16:44 2008 +0000
@@ -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 @@
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 -r 8f008dab548f -r 131cb5dfa280 pkgtools/pkg_install/files/lib/lib.h
--- a/pkgtools/pkg_install/files/lib/lib.h Fri Apr 18 14:58:52 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/lib.h Fri Apr 18 17:16:44 2008 +0000
@@ -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 @@
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 -r 8f008dab548f -r 131cb5dfa280 pkgtools/pkg_install/files/lib/str.c
--- a/pkgtools/pkg_install/files/lib/str.c Fri Apr 18 14:58:52 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/str.c Fri Apr 18 17:16:44 2008 +0000
@@ -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 @@
}
/*
- * 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
*/
Home |
Main Index |
Thread Index |
Old Index