]> cygwin.com Git - cygwin-apps/setup.git/commitdiff
2001-11-10 Robert Collins <rbtcollins@hotmail.com>
authorRobert Collins <rbtcollins@hotmail.com>
Fri, 9 Nov 2001 14:12:00 +0000 (14:12 +0000)
committerRobert Collins <rbtcollins@hotmail.com>
Fri, 9 Nov 2001 14:12:00 +0000 (14:12 +0000)
        * ini.h (actions): Remove - transferred to choose.h.
        (views): Ditto.
        * choose.h: Protect class's from "C" compilers.
         (actions): New enum, from ini.h. This may not be the 'right' place
        but that place doesn't exist yet.
        (_views): New enum, from ini.h.
        * choose.cc (set_action): Handle installed packages with a version not in
        setup.ini.
        (choose_caption): Ditto.
        * iniparse.y: Rearrange header order to handle new ini.h.

ChangeLog
choose.cc
choose.h
ini.h
iniparse.y

index fb818781da57b7962c8c86e45b07fb47eee9faf4..8e1daddaa884a663dfdb9d467159c2935da70616 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+2001-11-10  Robert Collins  <rbtcollins@hotmail.com>
+
+       * ini.h (actions): Remove - transferred to choose.h.
+       (views): Ditto.
+       * choose.h: Protect class's from "C" compilers.
+        (actions): New enum, from ini.h. This may not be the 'right' place
+       but that place doesn't exist yet.
+       (_views): New enum, from ini.h.
+       * choose.cc (set_action): Handle installed packages with a version not in 
+       setup.ini.
+       (choose_caption): Ditto.
+       * iniparse.y: Rearrange header order to handle new ini.h.
+
+2001-11-10  Robert Collins  <rbtcollins@hotmail.com>
+
+       * ini.h (_Info): Fix compiler warnings (signed vs unsigned comparison).
+       (registry_category): Fix compiler warning (deprecated conversion).
+       * iniparse.y (registry_category): Ditto.
+       * choose.cc (cvsid): Fix compiler warnings (unused, deprecated conversion).
+       (add_requried): Remove unused variable.
+       (choose_caption): Handle all enumeration values via a default.
+       (paint): Fix compiler warnings (unused, deprecated conversion).
+       (scroll_common): Fix compiler warnings (unused, signed vs unsigned comparison).
+       (list_clicK): Fix compiler warnings (signed vs unsigned comparison).
+       (note_width): Fix compiler warnings (deprecated conversion).
+       (keep_or_skip): Fix compiler warnings (unused).
+       (_view::mode_caption): Fix compiler warnings (deprecated conversion).
+       (set_view_mode): Fix compiler warnings (unused).
+       (create_listview): Fix compiler warnings (unused, incorrect format, reaches
+       end of function).
+       (dialog_proc): Fix compiler warnings (unused).
+       (read_installed_db): Fix compiler warnings (unused, deprecated conversion).
+       * choose.h (_header): Fix compiler warnings (deprecated conversion).
+       (_view): Ditto.
+
 2001-11-08  Pavel Tsekov  <ptsekov@syntrex.com>
  
        * simpsock.h (SimpleSocket::invalidate): Declare new method.
index d6ebf7d62a69cb0dc2e8f08df89399e622c48fa0..9d67d39700ff3ac913c4f848240e257dc7cfb54d 100644 (file)
--- a/choose.cc
+++ b/choose.cc
@@ -147,6 +147,11 @@ set_action (Package * pkg, bool preinc)
        break;
        /* ACTION_SAME_* are used when the installed version is the same
           as the given action. */
+      case ACTION_SAME:
+       if (pkg->installed && !pkg->installed_ix)
+         /* the package is installed, but we don't have 
+          * that version it in our version list */
+         return;
       case ACTION_SAME_CURR:
       case ACTION_SAME_TEST:
        if (!preinc)            /* Previously set to this value */
@@ -269,6 +274,7 @@ choose_caption (Package * pkg)
     case ACTION_TEST:
       pkg->trust = (trusts) pkg->action;
       return pkg->info[pkg->trust].version;
+    case ACTION_SAME:
     case ACTION_SAME_PREV:
     case ACTION_SAME_CURR:
     case ACTION_SAME_TEST:
index 06f1f1ae23be056e4290cf148218e7d84b47ee0e..9fb8217635fccbf0efb485a4300e381c92a50d6a 100644 (file)
--- a/choose.h
+++ b/choose.h
 #define CATEGORY_EXPANDED  0
 #define CATEGORY_COLLAPSED 1
 
+typedef enum
+{
+  /* Note that the next four items must be in the same order as the
+     TRUST items in ini.h. */
+  ACTION_UNKNOWN,
+  ACTION_PREV,
+  ACTION_CURR,
+  ACTION_TEST,
+  ACTION_SKIP,
+  ACTION_UNINSTALL,
+  ACTION_REDO,
+  ACTION_SRC_ONLY,
+  ACTION_LAST,
+  ACTION_ERROR,
+  /* Use ACTION_SAME when you want to leve the current version unaltered
+   * even if it that version is not in setup.ini
+   */
+  ACTION_SAME = 100,
+  /* Actions taken when installed version matches the selected version. */
+  ACTION_SAME_PREV = ACTION_PREV + ACTION_SAME,
+  ACTION_SAME_CURR = ACTION_CURR + ACTION_SAME,
+  ACTION_SAME_TEST = ACTION_TEST + ACTION_SAME,
+  /* Last action. */
+  ACTION_SAME_LAST
+} actions;
+
+typedef enum
+{
+  VIEW_UNKNOWN,
+  VIEW_PACKAGE_FULL,
+  VIEW_PACKAGE,
+  VIEW_CATEGORY,
+  NVIEW
+} views;
 
 struct _header
 {
@@ -30,6 +64,8 @@ struct _header
   int x;
 };
 
+#ifdef __cplusplus
+
 typedef class _view view;
 
 class pick_line
@@ -76,5 +112,5 @@ class _view
     void insert_under (int linen, pick_line line); 
 
 };
-
+#endif /* __cplusplus */
 #endif /* _CHOOSE_H_ */
diff --git a/ini.h b/ini.h
index 794940183d5d72ddf1befe15de3bf70bc0149170..74d04f3366303e4ae48144022627310aebf6a238 100644 (file)
--- a/ini.h
+++ b/ini.h
    packages (the chosen "install" field).  install.cc installs
    selected packages. */
 
+/* the classes here store installation info *shrug* */
+/* forward typedefs */
+
+typedef struct _Category Category;
+typedef struct _Package Package;
+
+#include "choose.h"
+
 #define YYSTYPE char *
 
 /* lowest number must be most trusted, highest least trusted */
@@ -35,29 +43,6 @@ typedef enum
   NTRUST
 } trusts;
 
-typedef enum
-{
-  /* Note that the next four items must be in the same order as the
-     TRUST items above. */
-  ACTION_UNKNOWN,
-  ACTION_PREV,
-  ACTION_CURR,
-  ACTION_TEST,
-  ACTION_SKIP,
-  ACTION_UNINSTALL,
-  ACTION_REDO,
-  ACTION_SRC_ONLY,
-  ACTION_LAST,
-  ACTION_ERROR,
-  ACTION_SAME = 100,
-  /* Actions taken when installed version matches the selected version. */
-  ACTION_SAME_PREV = ACTION_PREV + ACTION_SAME,
-  ACTION_SAME_CURR = ACTION_CURR + ACTION_SAME,
-  ACTION_SAME_TEST = ACTION_TEST + ACTION_SAME,
-  /* Last action. */
-  ACTION_SAME_LAST
-} actions;
-
 typedef enum
 {
   EXCLUDE_NONE = 0,
@@ -65,15 +50,6 @@ typedef enum
   EXCLUDE_NOT_FOUND
 } excludes;
 
-typedef enum 
-{
-  VIEW_UNKNOWN,
-  VIEW_PACKAGE_FULL,
-  VIEW_PACKAGE,
-  VIEW_CATEGORY,
-  NVIEW
-} views;
-
 #define is_download_action(pkg) \
   ((pkg)->action == ACTION_PREV || \
    (pkg)->action == ACTION_CURR || \
@@ -121,12 +97,12 @@ typedef struct _CategoryPackage
   char *pkgname;                 /* This should be Package *, but the packages can move*/
 } CategoryPackage;
 
-typedef struct _Category
+struct _Category
 {
   struct _Category *next; /* the next category in the list */
   char *name;            /* the category */
   CategoryPackage *packages; /* the packages in this category */
-} Category;
+};
 
 typedef struct _Dependency
 {
@@ -134,7 +110,7 @@ typedef struct _Dependency
   char *package;       /* the name of the package that is depended on */
 } Dependency;          /* Dependencies can be used for
                           recommended/required/related... */
-typedef struct
+struct _Package
 {
   char *name;          /* package name, like "cygwin" */
   char *sdesc;         /* short description (replaces "name" if provided) */
@@ -156,7 +132,7 @@ typedef struct
                                   to infoscan */
   Info infoscan[NTRUST - 1];   /* +1 for TRUST_UNKNOWN */
   Info infoend[0];             /* end marker */
-} Package;
+};
 
 extern Package *package;
 extern int npackages;
index b6499b1374e0af6f9493cc96f316eeb8410158fe..2a4e9baeba6b1d74f6dd88e7777acb4fe3afbe93 100644 (file)
@@ -20,9 +20,9 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "win32.h"
 #include "ini.h"
 #include "iniparse.h"
-#include "win32.h"
 #include "filemanip.h"
 
 extern "C" int yyerror (char *s, ...);
This page took 0.042647 seconds and 5 git commands to generate.