Procházet zdrojové kódy

dpkg: Make enum conffopt declaration private by moving to configure.c

There's no other users, and no public function expecting such argument,
so just hide this implementation detail where it belongs.
Guillem Jover před 14 roky
rodič
revize
546aae0e3c
2 změnil soubory, kde provedl 19 přidání a 18 odebrání
  1. 19 0
      src/configure.c
  2. 0 18
      src/main.h

+ 19 - 0
src/configure.c

@@ -57,6 +57,25 @@
 #include "filesdb.h"
 #include "filesdb.h"
 #include "main.h"
 #include "main.h"
 
 
+enum conffopt {
+	cfof_prompt		= 00001,
+	cfof_keep		= 00002,
+	cfof_install		= 00004,
+	cfof_backup		= 00100,
+	cfof_newconff		= 00200,
+	cfof_isnew		= 00400,
+	cfof_isold		= 01000,
+	cfof_userrmd		= 02000,
+
+	cfo_keep		= cfof_keep,
+	cfo_identical		= cfof_keep,
+	cfo_install		= cfof_install,
+	cfo_newconff		= cfof_newconff | cfof_install,
+	cfo_prompt		= cfof_prompt,
+	cfo_prompt_keep		= cfof_prompt | cfof_keep,
+	cfo_prompt_install	= cfof_prompt | cfof_install,
+};
+
 static int conffoptcells[2][2] = {
 static int conffoptcells[2][2] = {
 	/* Distro !edited. */	/* Distro edited. */
 	/* Distro !edited. */	/* Distro edited. */
 	{ cfo_keep,		cfo_install },		/* User !edited. */
 	{ cfo_keep,		cfo_install },		/* User !edited. */

+ 0 - 18
src/main.h

@@ -106,24 +106,6 @@ enum action {
 	act_forgetold,
 	act_forgetold,
 };
 };
 
 
-enum conffopt {
-  cfof_prompt        =     001,
-  cfof_keep          =     002,
-  cfof_install       =     004,
-  cfof_backup        =   00100,
-  cfof_newconff      =   00200,
-  cfof_isnew         =   00400,
-  cfof_isold         =   01000,
-  cfof_userrmd       =   02000,
-  cfo_keep           =   cfof_keep,
-  cfo_prompt_keep    =   cfof_keep | cfof_prompt,
-  cfo_prompt         =               cfof_prompt,
-  cfo_prompt_install =               cfof_prompt | cfof_install,
-  cfo_install        =                             cfof_install,
-  cfo_newconff       =                             cfof_install | cfof_newconff,
-  cfo_identical      =   cfof_keep
-};
-
 extern const char *const statusstrings[];
 extern const char *const statusstrings[];
 
 
 extern int f_pending, f_recursive, f_alsoselect, f_skipsame, f_noact;
 extern int f_pending, f_recursive, f_alsoselect, f_skipsame, f_noact;