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 Make _pkgdb_getPKGDB_DIR re...
details: https://anonhg.NetBSD.org/pkgsrc/rev/088f1fd5f1ea
branches: trunk
changeset: 532250:088f1fd5f1ea
user: joerg <joerg%pkgsrc.org@localhost>
date: Wed Aug 15 01:49:02 2007 +0000
description:
Make _pkgdb_getPKGDB_DIR return const char * and fix fallout.
diffstat:
pkgtools/pkg_install/files/admin/main.c | 9 +++++----
pkgtools/pkg_install/files/audit-packages/audit-packages.c | 10 +++++-----
pkgtools/pkg_install/files/delete/main.c | 6 +++---
pkgtools/pkg_install/files/info/main.c | 6 +++---
pkgtools/pkg_install/files/lib/lib.h | 4 ++--
pkgtools/pkg_install/files/lib/pkgdb.c | 6 +++---
6 files changed, 21 insertions(+), 20 deletions(-)
diffs (176 lines):
diff -r 95494e947545 -r 088f1fd5f1ea pkgtools/pkg_install/files/admin/main.c
--- a/pkgtools/pkg_install/files/admin/main.c Wed Aug 15 01:21:46 2007 +0000
+++ b/pkgtools/pkg_install/files/admin/main.c Wed Aug 15 01:49:02 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.29 2007/08/12 22:09:02 joerg Exp $ */
+/* $NetBSD: main.c,v 1.30 2007/08/15 01:49:02 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -8,7 +8,7 @@
#include <sys/cdefs.h>
#endif
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.29 2007/08/12 22:09:02 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.30 2007/08/15 01:49:02 joerg Exp $");
#endif
/*
@@ -230,7 +230,8 @@
plist_t *p;
package_t Plist;
char contents[MaxPathSize];
- char *PkgDBDir, *PkgName, *dirp;
+ const char *PkgDBDir;
+ char *PkgName, *dirp;
char file[MaxPathSize];
char dir[MaxPathSize];
int cnt = 0;
@@ -323,7 +324,7 @@
{
DIR *dp;
struct dirent *de;
- char *PkgDBDir;
+ const char *PkgDBDir;
char cachename[MaxPathSize];
pkgcnt = 0;
diff -r 95494e947545 -r 088f1fd5f1ea pkgtools/pkg_install/files/audit-packages/audit-packages.c
--- a/pkgtools/pkg_install/files/audit-packages/audit-packages.c Wed Aug 15 01:21:46 2007 +0000
+++ b/pkgtools/pkg_install/files/audit-packages/audit-packages.c Wed Aug 15 01:49:02 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audit-packages.c,v 1.9 2007/08/10 22:50:46 adrianp Exp $ */
+/* $NetBSD: audit-packages.c,v 1.10 2007/08/15 01:49:02 joerg Exp $ */
/*
* Copyright (c) 2007 Adrian Portelli <adrianp%NetBSD.org@localhost>.
@@ -126,10 +126,10 @@
int pv_message(char *[]);
int ap_ignore(char *[]);
void show_info(char *);
-void set_pvfile(char *);
+void set_pvfile(const char *);
char *clean_conf(char *);
int get_confvalues(void);
-char *safe_strdup(char *);
+char *safe_strdup(const char *);
/*
* TODO:
@@ -1035,7 +1035,7 @@
/* set the location for the pkg-vulnerabilities file */
void
-set_pvfile(char *vuln_dir)
+set_pvfile(const char *vuln_dir)
{
char *pvloc = NULL;
size_t retval;
@@ -1053,7 +1053,7 @@
/* duplicate a string and check the return value */
char *
-safe_strdup(char *dupe)
+safe_strdup(const char *dupe)
{
char *retval;
diff -r 95494e947545 -r 088f1fd5f1ea pkgtools/pkg_install/files/delete/main.c
--- a/pkgtools/pkg_install/files/delete/main.c Wed Aug 15 01:21:46 2007 +0000
+++ b/pkgtools/pkg_install/files/delete/main.c Wed Aug 15 01:49:02 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.18 2007/08/08 22:33:39 joerg Exp $ */
+/* $NetBSD: main.c,v 1.19 2007/08/15 01:49:02 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static char *rcsid = "from FreeBSD Id: main.c,v 1.11 1997/10/08 07:46:48 charnier Exp";
#else
-__RCSID("$NetBSD: main.c,v 1.18 2007/08/08 22:33:39 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.19 2007/08/15 01:49:02 joerg Exp $");
#endif
#endif
@@ -167,7 +167,7 @@
errx(EXIT_FAILURE, "error expanding '%s' ('%s' nonexistent?)", *argv, _pkgdb_getPKGDB_DIR());
}
} else {
- char *dbdir;
+ const char *dbdir;
dbdir = _pkgdb_getPKGDB_DIR();
if (**argv == '/' && strncmp(*argv, dbdir, strlen(dbdir)) == 0) {
diff -r 95494e947545 -r 088f1fd5f1ea pkgtools/pkg_install/files/info/main.c
--- a/pkgtools/pkg_install/files/info/main.c Wed Aug 15 01:21:46 2007 +0000
+++ b/pkgtools/pkg_install/files/info/main.c Wed Aug 15 01:49:02 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.19 2007/08/12 22:09:02 joerg Exp $ */
+/* $NetBSD: main.c,v 1.20 2007/08/15 01:49:02 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static char *rcsid = "from FreeBSD Id: main.c,v 1.14 1997/10/08 07:47:26 charnier Exp";
#else
-__RCSID("$NetBSD: main.c,v 1.19 2007/08/12 22:09:02 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.20 2007/08/15 01:49:02 joerg Exp $");
#endif
#endif
@@ -315,7 +315,7 @@
errx(EXIT_FAILURE, "Error during search in pkgdb for %s", *argv);
}
} else {
- char *dbdir;
+ const char *dbdir;
dbdir = _pkgdb_getPKGDB_DIR();
if (**argv == '/' && strncmp(*argv, dbdir, strlen(dbdir)) == 0) {
diff -r 95494e947545 -r 088f1fd5f1ea pkgtools/pkg_install/files/lib/lib.h
--- a/pkgtools/pkg_install/files/lib/lib.h Wed Aug 15 01:21:46 2007 +0000
+++ b/pkgtools/pkg_install/files/lib/lib.h Wed Aug 15 01:49:02 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.34 2007/08/12 18:54:09 joerg Exp $ */
+/* $NetBSD: lib.h,v 1.35 2007/08/15 01:49:02 joerg Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@@ -400,7 +400,7 @@
int pkgdb_remove_pkg(const char *);
char *pkgdb_refcount_dir(void);
char *_pkgdb_getPKGDB_FILE(char *, unsigned);
-char *_pkgdb_getPKGDB_DIR(void);
+const char *_pkgdb_getPKGDB_DIR(void);
void _pkgdb_setPKGDB_DIR(const char *);
/* List of packages functions */
diff -r 95494e947545 -r 088f1fd5f1ea pkgtools/pkg_install/files/lib/pkgdb.c
--- a/pkgtools/pkg_install/files/lib/pkgdb.c Wed Aug 15 01:21:46 2007 +0000
+++ b/pkgtools/pkg_install/files/lib/pkgdb.c Wed Aug 15 01:49:02 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pkgdb.c,v 1.26 2007/08/09 23:18:31 joerg Exp $ */
+/* $NetBSD: pkgdb.c,v 1.27 2007/08/15 01:49:02 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -8,7 +8,7 @@
#include <sys/cdefs.h>
#endif
#ifndef lint
-__RCSID("$NetBSD: pkgdb.c,v 1.26 2007/08/09 23:18:31 joerg Exp $");
+__RCSID("$NetBSD: pkgdb.c,v 1.27 2007/08/15 01:49:02 joerg Exp $");
#endif
/*
@@ -314,7 +314,7 @@
/*
* Return directory where pkgdb is stored
*/
-char *
+const char *
_pkgdb_getPKGDB_DIR(void)
{
char *tmp;
Home |
Main Index |
Thread Index |
Old Index