Просмотр исходного кода

Move extern declarations to header files and stop defining them as extern

Guillem Jover лет назад: 18
Родитель
Сommit
4e8106c9a0
7 измененных файлов с 11 добавлено и 7 удалено
  1. 8 0
      ChangeLog
  2. 1 0
      debian/changelog
  3. 1 0
      lib/dpkg-db.h
  4. 1 1
      lib/tarfn.c
  5. 0 2
      src/configure.c
  6. 0 2
      src/errors.c
  7. 0 2
      src/main.c

+ 8 - 0
ChangeLog

@@ -1,3 +1,11 @@
+2007-11-29  Guillem Jover  <guillem@debian.org>
+
+	* src/main.c (log_file): Move definition to ...
+	* lib/dpkg-db.h: ... here.
+	* src/configure.c (status_pipes): Remove extern definition.
+	* src/errors.c (status_pipes): Likewise.
+	* lib/tarfn.c (TarExtractor): Do not declare as extern.
+
 2007-11-29  Guillem Jover  <guillem@debian.org>
 
 	* dpkg-deb/build.c (arbitrary_fields): Define as static.

+ 1 - 0
debian/changelog

@@ -16,6 +16,7 @@ dpkg (1.14.12) UNRELEASED; urgency=low
 
   [ Guillem Jover ]
   * Define several private functions and variables as static.
+  * Move extern declarations to header files and stop defining them as extern.
 
  -- Guillem Jover <guillem@debian.org>  Sat, 24 Nov 2007 07:38:13 +0200
 

+ 1 - 0
lib/dpkg-db.h

@@ -174,6 +174,7 @@ void modstatdb_shutdown(void);
 
 extern char *statusfile, *availablefile; /* initialised by modstatdb_init */
 
+extern const char *log_file;
 void log_message(const char *fmt, ...);
 
 /*** from database.c ***/

+ 1 - 1
lib/tarfn.c

@@ -119,7 +119,7 @@ typedef struct symlinkList {
 	struct symlinkList *next;
 } symlinkList;
 
-extern int
+int
 TarExtractor(
  void *			userData
 ,const TarFunctions *	functions)

+ 0 - 2
src/configure.c

@@ -55,8 +55,6 @@ static enum conffopt promptconfaction(const char* cfgfile, const char* realold,
 		const char* realnew, int useredited, int distedited,
 		enum conffopt what);
 
-extern struct pipef *status_pipes;
-
 
 void deferred_configure(struct pkginfo *pkg) {
 	/* The algorithm for deciding what to configure first is as follows:

+ 0 - 2
src/errors.c

@@ -50,8 +50,6 @@ static struct error_report *reports=0;
 static struct error_report **lastreport= &reports;
 static struct error_report emergency;
 
-extern struct pipef *status_pipes;
-
 void print_error_perpackage(const char *emsg, const char *arg) {
   struct error_report *nr;
   

+ 0 - 2
src/main.c

@@ -374,8 +374,6 @@ static void setforce(const struct cmdinfo *cip, const char *value) {
   }
 }
 
-extern const char *log_file;
-
 static const char okpassshortopts[]= "D";
 
 void execbackend(const char *const *argv) NONRETURNING;