Merge from vendor branch NTPD:
[dragonfly.git] / usr.sbin / pkg_install / info / info.h
1 /*
2  * FreeBSD install - a package for the installation and maintainance
3  * of non-core utilities.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * Jordan K. Hubbard
15  * 23 August 1993
16  *
17  * Include and define various things wanted by the info command.
18  *
19  * $FreeBSD: src/usr.sbin/pkg_install/info/info.h,v 1.28 2004/10/18 05:34:54 obrien Exp $
20  * $DragonFly: src/usr.sbin/pkg_install/info/Attic/info.h,v 1.4 2005/03/08 19:11:30 joerg Exp $
21  */
22
23 #ifndef _INST_INFO_H_INCLUDE
24 #define _INST_INFO_H_INCLUDE
25
26 #include <sys/queue.h>
27
28 #ifndef MAXINDEXSIZE
29 #define MAXINDEXSIZE 59
30 #endif
31
32 #ifndef MAXNAMESIZE
33 #define MAXNAMESIZE  20
34 #endif
35
36 #define SHOW_COMMENT    0x00001
37 #define SHOW_DESC       0x00002
38 #define SHOW_PLIST      0x00004
39 #define SHOW_INSTALL    0x00008
40 #define SHOW_DEINSTALL  0x00010
41 #define SHOW_REQUIRE    0x00020
42 #define SHOW_PREFIX     0x00040
43 #define SHOW_INDEX      0x00080
44 #define SHOW_FILES      0x00100
45 #define SHOW_DISPLAY    0x00200
46 #define SHOW_REQBY      0x00400
47 #define SHOW_MTREE      0x00800
48 #define SHOW_SIZE       0x01000
49 #define SHOW_ORIGIN     0x02000
50 #define SHOW_CKSUM      0x04000
51 #define SHOW_FMTREV     0x08000
52 #define SHOW_PTREV      0x10000
53 #define SHOW_DEPEND     0x20000
54 #define SHOW_PKGNAME    0x40000
55
56 struct which_entry {
57     TAILQ_ENTRY(which_entry) next;
58     char file[PATH_MAX];
59     char package[PATH_MAX];
60     Boolean skip;
61 };
62 TAILQ_HEAD(which_head, which_entry);
63
64 extern int Flags;
65 extern Boolean QUIET;
66 extern Boolean UseBlkSz;
67 extern char *InfoPrefix;
68 extern char PlayPen[];
69 extern char *CheckPkg;
70 extern char *LookUpOrigin;
71 extern match_t MatchType;
72 extern struct which_head *whead;
73
74 extern void     show_file(const char *, const char *);
75 extern void     show_plist(const char *, Package *, plist_t, Boolean);
76 extern void     show_files(const char *, Package *);
77 extern void     show_index(const char *, const char *);
78 extern void     show_size(const char *, Package *);
79 extern void     show_cksum(const char *, Package *);
80 extern void     show_origin(const char *, Package *);
81 extern void     show_fmtrev(const char *, Package *);
82
83 #endif  /* _INST_INFO_H_INCLUDE */