소스 검색

Reduce header includes by removing unused ones

Guillem Jover 18 년 전
부모
커밋
3182adcd39
12개의 변경된 파일17개의 추가작업 그리고 26개의 파일을 삭제
  1. 16 0
      ChangeLog
  2. 0 6
      dselect/basetop.cc
  3. 0 1
      dselect/curkeys.cc
  4. 0 2
      dselect/helpmsgs.h
  5. 0 5
      dselect/methkeys.cc
  6. 0 1
      dselect/pkgcmds.cc
  7. 0 1
      dselect/pkgdisplay.cc
  8. 0 1
      dselect/pkginfo.cc
  9. 0 5
      dselect/pkgkeys.cc
  10. 0 2
      lib/compression.c
  11. 1 1
      lib/dpkg-db.h
  12. 0 1
      lib/md5.c

+ 16 - 0
ChangeLog

@@ -1,3 +1,19 @@
+2008-09-14  Guillem Jover  <guillem@debian.org>
+
+	* dselect/methkeys.cc: Remove unused headers <stdio.h>, <string.h>,
+	<assert.h> and <dpkg.h>.
+	* dselect/pkgkeys.cc: Likewise.
+	* dselect/basetop.cc: Likewise. Remove unused header <ctype.h>.
+	* dselect/curkeys.cc: Remove unused header <dpkg.h>.
+	* dselect/helpmsgs.h: Likewise.
+	* dselect/pkgcmds.cc: Likewise.
+	* dselect/pkgdisplay.cc: Likewise.
+	* dselect/pkginfo.cc: Likewise.
+	* lib/compression.c: Likewise.
+	* lib/dpkg-db.h: Remove unused header <string.h>. Include
+	<sys/types.h>.
+	* lib/md5.c: Remove unused header <netinet/in.h>.
+
 2008-09-14  Guillem Jover  <guillem@debian.org>
 
 	* src/main.c (commandfd): Remove left over debug printf.

+ 0 - 6
dselect/basetop.cc

@@ -22,12 +22,6 @@
 #include <config.h>
 #include <compat.h>
 
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <ctype.h>
-
-#include <dpkg.h>
 #include <dpkg-db.h>
 
 #include "dselect.h"

+ 0 - 1
dselect/curkeys.cc

@@ -22,7 +22,6 @@
 #include <config.h>
 #include <compat.h>
 
-#include <dpkg.h>
 #include <dpkg-db.h>
 
 #include "dselect.h"

+ 0 - 2
dselect/helpmsgs.h

@@ -22,8 +22,6 @@
 #ifndef HELPMSGS_H
 #define HELPMSGS_H
 
-#include <dpkg.h>
-
 struct helpmessage {
   const char *title;
   const char *text;

+ 0 - 5
dselect/methkeys.cc

@@ -22,11 +22,6 @@
 #include <config.h>
 #include <compat.h>
 
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-#include <dpkg.h>
 #include <dpkg-db.h>
 
 #include "dselect.h"

+ 0 - 1
dselect/pkgcmds.cc

@@ -24,7 +24,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <assert.h>
 
 #include <dpkg.h>
 #include <dpkg-db.h>

+ 0 - 1
dselect/pkgdisplay.cc

@@ -26,7 +26,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <assert.h>
 
 #include <dpkg.h>
 #include <dpkg-db.h>

+ 0 - 1
dselect/pkginfo.cc

@@ -26,7 +26,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <assert.h>
 #include <ctype.h>
 
 #include <dpkg.h>

+ 0 - 5
dselect/pkgkeys.cc

@@ -22,11 +22,6 @@
 #include <config.h>
 #include <compat.h>
 
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-
-#include <dpkg.h>
 #include <dpkg-db.h>
 
 #include "dselect.h"

+ 0 - 2
lib/compression.c

@@ -16,8 +16,6 @@
 #endif
 
 #include <dpkg.h>
-
-#include "dpkg.h"
 #include "dpkg-db.h"
 
 static void

+ 1 - 1
lib/dpkg-db.h

@@ -27,8 +27,8 @@
 
 DPKG_BEGIN_DECLS
 
+#include <sys/types.h>
 #include <stdio.h>
-#include <string.h>
 
 struct versionrevision {
   unsigned long epoch;

+ 0 - 1
lib/md5.c

@@ -25,7 +25,6 @@
 
 #include <string.h>		/* for memcpy() */
 #include <sys/types.h>		/* for stupid systems */
-#include <netinet/in.h>		/* for ntohl() */
 
 #include "md5.h"