Quellcode durchsuchen

Move pkg-array to libdpkg

Guillem Jover vor 17 Jahren
Ursprung
Commit
8b73de5515
6 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen
  1. 1 0
      lib/dpkg/Makefile.am
  2. 1 2
      src/pkg-array.c
  3. 4 0
      src/pkg-array.h
  4. 0 2
      src/Makefile.am
  5. 1 1
      src/query.c
  6. 1 1
      src/select.c

+ 1 - 0
lib/dpkg/Makefile.am

@@ -40,6 +40,7 @@ libdpkg_a_SOURCES = \
 	parsehelp.c \
 	parsedump.h \
 	path.c path.h \
+	pkg-array.c pkg-array.h \
 	progress.c progress.h \
 	showpkg.c \
 	string.c string.h \

+ 1 - 2
src/pkg-array.c

@@ -29,8 +29,7 @@
 
 #include <dpkg/dpkg.h>
 #include <dpkg/dpkg-db.h>
-
-#include "pkg-array.h"
+#include <dpkg/pkg-array.h>
 
 int
 pkglistqsortcmp(const void *a, const void *b)

+ 4 - 0
src/pkg-array.h

@@ -19,6 +19,9 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#ifndef DPKG_PKG_ARRAY_H
+#define DPKG_PKG_ARRAY_H
+
 #include <config.h>
 #include <compat.h>
 
@@ -39,3 +42,4 @@ void pkg_array_free(struct pkg_array *a);
 
 DPKG_END_DECLS
 
+#endif /* DPKG_PKG_ARRAY_H */

+ 0 - 2
src/Makefile.am

@@ -26,7 +26,6 @@ dpkg_SOURCES = \
 	help.c \
 	main.c main.h \
 	packages.c \
-	pkg-array.c pkg-array.h \
 	pkg-show.c \
 	processarc.c \
 	remove.c \
@@ -45,7 +44,6 @@ dpkg_LDADD = \
 dpkg_query_SOURCES = \
 	filesdb.c filesdb.h \
 	divertdb.c \
-	pkg-array.c pkg-array.h \
 	pkg-show.c \
 	query.c
 

+ 1 - 1
src/query.c

@@ -43,10 +43,10 @@
 
 #include <dpkg/dpkg.h>
 #include <dpkg/dpkg-db.h>
+#include <dpkg/pkg-array.h>
 #include <dpkg/path.h>
 #include <dpkg/myopt.h>
 
-#include "pkg-array.h"
 #include "filesdb.h"
 #include "main.h"
 

+ 1 - 1
src/select.c

@@ -31,9 +31,9 @@
 
 #include <dpkg/dpkg.h>
 #include <dpkg/dpkg-db.h>
+#include <dpkg/pkg-array.h>
 #include <dpkg/myopt.h>
 
-#include "pkg-array.h"
 #include "filesdb.h"
 #include "main.h"