* 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 (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.
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 */
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:
#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
{
int x;
};
+#ifdef __cplusplus
+
typedef class _view view;
class pick_line
void insert_under (int linen, pick_line line);
};
-
+#endif /* __cplusplus */
#endif /* _CHOOSE_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 */
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,
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 || \
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
{
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) */
to infoscan */
Info infoscan[NTRUST - 1]; /* +1 for TRUST_UNKNOWN */
Info infoend[0]; /* end marker */
-} Package;
+};
extern Package *package;
extern int npackages;
#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, ...);