Преглед на файлове

libdpkg: Move skip_slash_dotslash from parsehelp.c to path.c

And from dpkg-db.h dpkg-priv.h.
Guillem Jover преди 18 години
родител
ревизия
36777a354f
променени са 7 файла, в които са добавени 22 реда и са изтрити 6 реда
  1. 9 0
      ChangeLog
  2. 0 2
      lib/dpkg-db.h
  3. 1 0
      lib/dpkg-priv.h
  4. 1 0
      lib/fields.c
  5. 0 4
      lib/parsehelp.c
  6. 10 0
      lib/path.c
  7. 1 0
      src/filesdb.c

+ 9 - 0
ChangeLog

@@ -1,3 +1,12 @@
+2008-06-28  Guillem Jover  <guillem@debian.org>
+
+	* lib/dpkg-db.h (skip_slash_dotslash): Move declaration ...
+	* lib/dpkg-priv.h: ... here.
+	* lib/parsehelp.c (skip_slash_dotslash): Move definition ...
+	* lib/path.c: ... here.
+	* lib/fields.c: Include <dpkg-priv.h>.
+	* src/filesdb.c: Likewise.
+
 2008-06-28  Guillem Jover  <guillem@debian.org>
 
 	* lib/dpkg.h (onerr_abort): Move declaration to the ehandle.c section.

+ 0 - 2
lib/dpkg-db.h

@@ -351,8 +351,6 @@ extern const struct namevalue statusinfos[];
 extern const struct namevalue eflaginfos[];
 extern const struct namevalue wantinfos[];
 
-const char *skip_slash_dotslash(const char *p);
-
 int informativeversion(const struct versionrevision *version);
 
 enum versiondisplayepochwhen { vdew_never, vdew_nonambig, vdew_always };

+ 1 - 0
lib/dpkg-priv.h

@@ -35,6 +35,7 @@ extern "C" {
 /* Path handling. */
 
 size_t rtrim_slash_slashdot(char *path);
+const char *skip_slash_dotslash(const char *path);
 
 /* Subprocess handling. */
 

+ 1 - 0
lib/fields.c

@@ -27,6 +27,7 @@
 
 #include <dpkg.h>
 #include <dpkg-db.h>
+#include <dpkg-priv.h>
 #include "parsedump.h"
 
 static int convert_string

+ 0 - 4
lib/parsehelp.c

@@ -245,7 +245,3 @@ void parsemustfield
   }
 }
 
-const char *skip_slash_dotslash(const char *p) {
-  while (p[0] == '/' || (p[0] == '.' && p[1] == '/')) p++;
-  return p;
-}

+ 10 - 0
lib/path.c

@@ -2,6 +2,7 @@
  * libdpkg - Debian packaging suite library routines
  * path.c - path handling functions
  *
+ * Copyright (C) 1995 Ian Jackson <ian@chiark.greenend.org.uk>
  * Copyright (C) 2008 Guillem Jover <guillem@debian.org>
  *
  * This is free software; you can redistribute it and/or modify
@@ -41,3 +42,12 @@ rtrim_slash_slashdot(char *path)
 	return end - path + 1;
 }
 
+const char *
+skip_slash_dotslash(const char *path)
+{
+	while (path[0] == '/' || (path[0] == '.' && path[1] == '/'))
+		path++;
+
+	return path;
+}
+

+ 1 - 0
src/filesdb.c

@@ -34,6 +34,7 @@
 
 #include <dpkg.h>
 #include <dpkg-db.h>
+#include <dpkg-priv.h>
 
 #include "filesdb.h"
 #include "main.h"