Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Structures cleanup.
jlaffaye committed 15 years ago
commit 183af187aaefd8007ad8a75a1695e3fb1be17804
parent 573fad5
5 files changed +10 -19
modified libpkg/pkg.h
@@ -1,8 +1,6 @@
#ifndef _PKG_H
#define _PKG_H

-
#include <stdint.h>
-

struct pkg;
struct pkgdb;

modified libpkg/pkg_compat.h
@@ -27,8 +27,6 @@ struct oldpackage {
	struct plist *head, *tail;
	const char *name;
	const char *origin;
-

-

};

struct pkg_manifest *pkg_compat_converter(char *);
modified libpkg/pkg_private.h
@@ -6,16 +6,16 @@
#include "pkg_manifest.h"

struct pkg {
-
        const char *name;
-
        const char *version;
-
        const char *origin;
-
        const char *comment;
-
        const char *desc;
-
        struct pkgdb *pdb;
+
	const char *name;
+
	const char *version;
+
	const char *origin;
+
	const char *comment;
+
	const char *desc;
+
	struct pkgdb *pdb;
	sqlite3_stmt *deps_stmt;
	sqlite3_stmt *rdeps_stmt;
	sqlite3_stmt *which_stmt;
-
        struct pkg_manifest *m;
+
	struct pkg_manifest *m;
};

void pkg_from_manifest(struct pkg*, struct pkg_manifest *);
modified libpkg/pkgdb.c
@@ -178,7 +178,6 @@ pkgdb_open(struct pkgdb **db)
		pkgdb_init((*db)->sqlite);

	(*db)->stmt = NULL;
-
	(*db)->lock_fd = -1;
	(*db)->errnum = 0;
	(*db)->errstring[0] = '\0';

modified libpkg/pkgdb.h
@@ -1,17 +1,13 @@
#ifndef _PKGDB_H
#define _PKGDB_H

-
#include <regex.h>
-
#include <stdbool.h>
-

#include <sqlite3.h>

struct pkgdb {
-
        sqlite3 *sqlite;
+
	sqlite3 *sqlite;
	sqlite3_stmt *stmt;
-
        int lock_fd;
-
        int errnum;
-
        char errstring[1024];
+
	int errnum;
+
	char errstring[1024];
};

int pkgdb_query_dep(struct pkg *, struct pkg *);