PERFORCE change 163393 for review
David Forsythe
dforsyth at FreeBSD.org
Wed Jun 3 03:57:12 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=163393
Change 163393 by dforsyth at squirrel on 2009/06/03 03:57:00
Moved things around, made a mess.
Affected files ...
.. //depot/projects/soc2009/dforsyth_libpkg/Makefile#2 edit
.. //depot/projects/soc2009/dforsyth_libpkg/info/Makefile#2 delete
.. //depot/projects/soc2009/dforsyth_libpkg/info/main.c#4 delete
.. //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg.c#5 edit
.. //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg.h#5 edit
.. //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg_info.c#5 delete
.. //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg_info.h#3 delete
.. //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkgdb.c#6 edit
.. //depot/projects/soc2009/dforsyth_libpkg/pkg_info/Makefile#1 add
.. //depot/projects/soc2009/dforsyth_libpkg/pkg_info/main.c#1 add
Differences ...
==== //depot/projects/soc2009/dforsyth_libpkg/Makefile#2 (text+ko) ====
@@ -1,2 +1,2 @@
-SUBDIR= libpkg info
+SUBDIR= libpkg pkg_info
.include <bsd.subdir.mk>
==== //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg.c#5 (text+ko) ====
@@ -4,6 +4,7 @@
#include "pkg_util.h"
#include "pkgdb.h"
+#include "pkg_private.h"
#include "pkg.h"
@@ -64,7 +65,7 @@
}
struct pkg *
-pkg_set_pkg_info(struct pkg *p, struct pkg_info *pi)
+pkg_set_pkg_contents(struct pkg *p, struct pkg_contents *pc)
{
return (p);
}
==== //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkg.h#5 (text+ko) ====
@@ -6,11 +6,15 @@
struct pkg;
struct pkg *pkg_new(const char *ident);
+
struct pkg *pkg_set_path(struct pkg *p, const char *path);
+
struct pkg *pkg_set_comment(struct pkg *p, const char *comment);
char *pkg_ident(struct pkg *p);
+
char *pkg_name(struct pkg *p);
+
char *pkg_comment(struct pkg *p);
void pkg_free(struct pkg *p);
@@ -19,30 +23,24 @@
struct pkgdb;
-struct pkgdb *pkgdb_new_hierdb(const char *db_root);
+struct pkgdb *pkgdb_read_db_hierdb(const char *db_root);
+
+int pkgdb_refresh_db_hierdb(struct pkgdb *db);
-int pkgdb_init_hierdb(struct pkgdb *db);
struct pkg *pkgdb_read_pkg_hierdb(struct pkgdb *db, const char *ident);
+
struct pkg *pkgdb_next_pkg(struct pkgdb *db);
struct pkg *pkgdb_query_pkg(struct pkgdb *db, const char *ident);
char *pkgdb_pkg_path(struct pkgdb *db, struct pkg *p);
-void pkgdb_pkg_list_init(struct pkgdb *db);
-struct pkg *pkgdb_pkg_list_first(struct pkgdb *db);
-void pkgdb_pkg_list_append(struct pkgdb *db, struct pkg *p);
-
-char *pkgdb_read_file_to_text(struct pkgdb *db, struct pkg *p,
- const char *filename);
-
void pkgdb_free_hierdb(struct pkgdb *db);
-void pkgdb_free_pkg_list(struct pkgdb *db);
-/* pkg_info */
+/* pkg_contents */
-struct pkg_info;
+struct pkg_contents;
-struct pkg_info *pkg_info_parse_info_from_text(const char *text);
+struct pkg_contents *pkg_contents_read_info_from_text(const char *text);
#endif
==== //depot/projects/soc2009/dforsyth_libpkg/libpkg/pkgdb.c#6 (text+ko) ====
@@ -10,8 +10,9 @@
#include <fcntl.h>
#include "pkg_util.h"
-#include "pkg_info.h"
+#include "pkg_contents.h"
#include "pkgdb.h"
+#include "pkg_private.h"
#include "pkg.h"
/* Everything in here is written with the current database setup in mind.
@@ -23,7 +24,7 @@
/* Allocate and create a new hierdb. */
struct pkgdb *
-pkgdb_new_hierdb(const char *db_root)
+pkgdb_read_db_hierdb(const char *db_root)
{
int s;
struct stat sb;
@@ -60,7 +61,7 @@
* number of subdirectories in the database. */
int
-pkgdb_init_hierdb(struct pkgdb *db)
+pkgdb_refresh_db_hierdb(struct pkgdb *db)
{
int i;
int p_count;
@@ -146,12 +147,13 @@
Need to add callbacks before I do this.
}
*/
-
+/*
struct pkg *
pkgdb_query_pkg_hierdb(struct pkgdb *db, const char *ident)
{
return (NULL);
}
+*/
char *
pkgdb_pkg_path(struct pkgdb *db, struct pkg *p)
More information about the p4-projects
mailing list