Sfoglia il codice sorgente

Change some variables from struct packageinlist to pkginqueue

Those are not using the xinfo member, which is the only difference
between the types.
Guillem Jover 18 anni fa
parent
commit
a2a0c53849
4 ha cambiato i file con 12 aggiunte e 5 eliminazioni
  1. 7 0
      ChangeLog
  2. 1 1
      src/help.c
  3. 3 3
      src/main.c
  4. 1 1
      src/main.h

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2008-07-22  Guillem Jover  <guillem@debian.org>
+
+	* src/main.h (ignoredependss): Change type to 'struct pkginqueue'.
+	* src/main.c (ignoredependss): Likewise.
+	(ignoredepends): Change type for variable 'ni' to 'struct pkginqueue'.
+	* src/help.c (ignore_depends): Likewise.
+
 2008-07-22  Guillem Jover  <guillem@debian.org>
 2008-07-22  Guillem Jover  <guillem@debian.org>
 
 
 	* src/query.c (ignoredependss): Remove unused variable.
 	* src/query.c (ignoredependss): Remove unused variable.

+ 1 - 1
src/help.c

@@ -120,7 +120,7 @@ void checkpath(void) {
 }
 }
 
 
 int ignore_depends(struct pkginfo *pkg) {
 int ignore_depends(struct pkginfo *pkg) {
-  struct packageinlist *id;
+  struct pkginqueue *id;
   for (id= ignoredependss; id; id= id->next)
   for (id= ignoredependss; id; id= id->next)
     if (id->pkg == pkg) return 1;
     if (id->pkg == pkg) return 1;
   return 0;
   return 0;

+ 3 - 3
src/main.c

@@ -170,7 +170,7 @@ int fc_badverify = 0;
 int errabort = 50;
 int errabort = 50;
 const char *admindir= ADMINDIR;
 const char *admindir= ADMINDIR;
 const char *instdir= "";
 const char *instdir= "";
-struct packageinlist *ignoredependss = NULL;
+struct pkginqueue *ignoredependss = NULL;
 
 
 static const struct forceinfo {
 static const struct forceinfo {
   const char *name;
   const char *name;
@@ -256,7 +256,7 @@ static void setroot(const struct cmdinfo *cip, const char *value) {
 static void ignoredepends(const struct cmdinfo *cip, const char *value) {
 static void ignoredepends(const struct cmdinfo *cip, const char *value) {
   char *copy, *p;
   char *copy, *p;
   const char *pnerr;
   const char *pnerr;
-  struct packageinlist *ni;
+  struct pkginqueue *ni;
 
 
   copy= m_malloc(strlen(value)+2);
   copy= m_malloc(strlen(value)+2);
   strcpy(copy,value);
   strcpy(copy,value);
@@ -273,7 +273,7 @@ static void ignoredepends(const struct cmdinfo *cip, const char *value) {
     pnerr = illegal_packagename(p, NULL);
     pnerr = illegal_packagename(p, NULL);
     if (pnerr) ohshite(_("--ignore-depends requires a legal package name. "
     if (pnerr) ohshite(_("--ignore-depends requires a legal package name. "
                        "`%.250s' is not; %s"), p, pnerr);
                        "`%.250s' is not; %s"), p, pnerr);
-    ni= m_malloc(sizeof(struct packageinlist));
+    ni = m_malloc(sizeof(struct pkginqueue));
     ni->pkg= findpackage(p);
     ni->pkg= findpackage(p);
     ni->next= ignoredependss;
     ni->next= ignoredependss;
     ignoredependss= ni;
     ignoredependss= ni;

+ 1 - 1
src/main.h

@@ -105,7 +105,7 @@ extern int fc_badverify;
 extern int errabort;
 extern int errabort;
 extern const char *admindir;
 extern const char *admindir;
 extern const char *instdir;
 extern const char *instdir;
-extern struct packageinlist *ignoredependss;
+extern struct pkginqueue *ignoredependss;
 extern const char architecture[];
 extern const char architecture[];
 
 
 /* from filesdb.c */
 /* from filesdb.c */