]> cygwin.com Git - cygwin-apps/setup.git/blob - ini.h
2001-12-02 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / ini.h
1 /*
2 * Copyright (c) 2000, Red Hat, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by DJ Delorie <dj@cygnus.com>
13 *
14 */
15
16 #ifndef _INI_H_
17 #define _INI_H_
18
19 class io_stream;
20 void ini_init (io_stream *, char const *);
21 #define YYSTYPE char *
22
23 #ifdef __cplusplus
24 /* For enums */
25 #include "choose.h"
26
27 /* When setup.ini is parsed, the information is stored according to
28 the declarations here. ini.cc (via inilex and iniparse)
29 initializes these structures. choose.cc sets the action and trust
30 fields. download.cc downloads any needed files for selected
31 packages (the chosen "install" field). install.cc installs
32 selected packages. */
33
34 /* the classes here store installation info *shrug* */
35
36 /* lowest number must be most trusted, highest least trusted */
37 typedef enum
38 {
39 TRUST_UNKNOWN,
40 TRUST_PREV,
41 TRUST_CURR,
42 TRUST_TEST,
43 NTRUST
44 }
45 trusts;
46
47 typedef enum
48 {
49 EXCLUDE_NONE = 0,
50 EXCLUDE_BY_SETUP,
51 EXCLUDE_NOT_FOUND
52 }
53 excludes;
54
55 #define is_download_action(pkg) \
56 ((pkg)->action == ACTION_PREV || \
57 (pkg)->action == ACTION_CURR || \
58 (pkg)->action == ACTION_TEST || \
59 (pkg)->action == ACTION_REDO || \
60 (pkg)->action == ACTION_SRC_ONLY)
61
62 #define is_upgrade_action(pkg) \
63 (((pkg)->action >= ACTION_CURR && \
64 (pkg)->action <= ACTION_TEST) || \
65 (pkg)->action == ACTION_REDO)
66
67 #define is_uninstall_action(pkg) \
68 (is_upgrade_action (pkg) || \
69 (pkg)->action == ACTION_PREV || \
70 (pkg)->action == ACTION_UNINSTALL)
71
72 #define is_full_action(pkg) \
73 (((pkg)->action >= ACTION_SAME_PREV && (pkg)->action <= ACTION_SAME_TEST) \
74 || (pkg)->action == ACTION_SKIP)
75
76 #define SRCACTION_NO 0
77 #define SRCACTION_YES 1
78 #endif
79
80 #endif /* _INI_H_ */
This page took 0.037383 seconds and 6 git commands to generate.