|
Revision 7, 2.4 kB
(checked in by cvs2svn, 5 years ago)
|
453 copies to tags/branches
|
- Property svn:executable set to
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
#define YYSTYPE char * |
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
#define TRUST_PREV 0 |
|---|
| 27 |
#define TRUST_CURR 1 |
|---|
| 28 |
#define TRUST_TEST 2 |
|---|
| 29 |
#define NTRUST 3 |
|---|
| 30 |
#define TRUST_UNKNOWN 3 |
|---|
| 31 |
|
|---|
| 32 |
#define TY_GENERIC 0 |
|---|
| 33 |
#define TY_CYGWIN 1 |
|---|
| 34 |
#define TY_NATIVE 2 |
|---|
| 35 |
|
|---|
| 36 |
#define ACTION_UNKNOWN 0 |
|---|
| 37 |
#define ACTION_SAME 1 |
|---|
| 38 |
#define ACTION_NEW 2 |
|---|
| 39 |
#define ACTION_UPGRADE 3 |
|---|
| 40 |
#define ACTION_UNINSTALL 4 |
|---|
| 41 |
#define ACTION_ERROR 5 |
|---|
| 42 |
|
|---|
| 43 |
#define SRCACTION_NO 0 |
|---|
| 44 |
#define SRCACTION_YES 1 |
|---|
| 45 |
|
|---|
| 46 |
typedef struct { |
|---|
| 47 |
char *name; |
|---|
| 48 |
char *sdesc; |
|---|
| 49 |
char *ldesc; |
|---|
| 50 |
int action; |
|---|
| 51 |
int srcaction; |
|---|
| 52 |
int trust; |
|---|
| 53 |
int type; |
|---|
| 54 |
|
|---|
| 55 |
struct { |
|---|
| 56 |
char *version; |
|---|
| 57 |
char *install; |
|---|
| 58 |
int install_size; |
|---|
| 59 |
char *source; |
|---|
| 60 |
int source_size; |
|---|
| 61 |
} info[NTRUST+1]; |
|---|
| 62 |
} Package; |
|---|
| 63 |
|
|---|
| 64 |
#ifdef __cplusplus |
|---|
| 65 |
extern "C" { |
|---|
| 66 |
#endif |
|---|
| 67 |
|
|---|
| 68 |
extern Package *package; |
|---|
| 69 |
extern Package *xemacs_package; |
|---|
| 70 |
|
|---|
| 71 |
extern int npackages; |
|---|
| 72 |
|
|---|
| 73 |
Package *new_package (char *name); |
|---|
| 74 |
void ini_init (char *string); |
|---|
| 75 |
|
|---|
| 76 |
#define pinfo(p) ((p).info[(p).trust]) |
|---|
| 77 |
#define pi pinfo(package[i]) |
|---|
| 78 |
|
|---|
| 79 |
#define LOOP_PACKAGES \ |
|---|
| 80 |
for (i=0; i<npackages; i++) \ |
|---|
| 81 |
if ((package[i].action == ACTION_NEW \ |
|---|
| 82 |
|| package[i].action == ACTION_UPGRADE) \ |
|---|
| 83 |
&& pi.install) |
|---|
| 84 |
|
|---|
| 85 |
#ifdef __cplusplus |
|---|
| 86 |
} |
|---|
| 87 |
#endif |
|---|