Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / bsd / pkg_install / dist / info / info.h
blobf8b6b4d1cd535868a01a5385052326855315e80e
1 /* $NetBSD: info.h,v 1.21 2009/09/11 18:00:13 joerg Exp $ */
3 /* from FreeBSD Id: info.h,v 1.10 1997/02/22 16:09:40 peter Exp */
5 /*-
6 * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
7 * All rights reserved.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
18 * distribution.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
30 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
35 * FreeBSD install - a package for the installation and maintainance
36 * of non-core utilities.
38 * Redistribution and use in source and binary forms, with or without
39 * modification, are permitted provided that the following conditions
40 * are met:
41 * 1. Redistributions of source code must retain the above copyright
42 * notice, this list of conditions and the following disclaimer.
43 * 2. Redistributions in binary form must reproduce the above copyright
44 * notice, this list of conditions and the following disclaimer in the
45 * documentation and/or other materials provided with the distribution.
47 * Jordan K. Hubbard
48 * 23 August 1993
50 * Include and define various things wanted by the info command.
54 #ifndef _INST_INFO_H_INCLUDE
55 #define _INST_INFO_H_INCLUDE
57 struct pkg_meta {
58 char *meta_contents;
59 char *meta_comment;
60 char *meta_desc;
61 char *meta_mtree;
62 char *meta_build_version;
63 char *meta_build_info;
64 char *meta_size_pkg;
65 char *meta_size_all;
66 char *meta_required_by;
67 char *meta_display;
68 char *meta_install;
69 char *meta_deinstall;
70 char *meta_preserve;
71 char *meta_views;
72 char *meta_installed_info;
73 int is_installed;
76 #ifndef MAXINDEXSIZE
77 #define MAXINDEXSIZE 60
78 #endif
80 #ifndef MAXNAMESIZE
81 #define MAXNAMESIZE 20
82 #endif
84 #define SHOW_COMMENT 0x00001
85 #define SHOW_DESC 0x00002
86 #define SHOW_PLIST 0x00004
87 #define SHOW_INSTALL 0x00008
88 #define SHOW_DEINSTALL 0x00010
89 #define SHOW_PREFIX 0x00040
90 #define SHOW_INDEX 0x00080
91 #define SHOW_FILES 0x00100
92 #define SHOW_DISPLAY 0x00200
93 #define SHOW_REQBY 0x00400
94 #define SHOW_MTREE 0x00800
95 #define SHOW_BUILD_VERSION 0x01000
96 #define SHOW_BUILD_INFO 0x02000
97 #define SHOW_DEPENDS 0x04000
98 #define SHOW_PKG_SIZE 0x08000
99 #define SHOW_ALL_SIZE 0x10000
100 #define SHOW_BLD_DEPENDS 0x20000
101 #define SHOW_BI_VAR 0x40000
102 #define SHOW_SUMMARY 0x80000
103 #define SHOW_FULL_REQBY 0x100000
105 enum which {
106 WHICH_ALL,
107 WHICH_USER,
108 WHICH_LIST
111 extern int Flags;
112 extern enum which Which;
113 extern Boolean File2Pkg;
114 extern Boolean Quiet;
115 extern const char *InfoPrefix;
116 extern const char *BuildInfoVariable;
117 extern lpkg_head_t pkgs;
119 int CheckForPkg(const char *);
120 int CheckForBestPkg(const char *);
122 void show_file(const char *, const char *, Boolean);
123 void show_var(const char *, const char *);
124 void show_plist(const char *, package_t *, pl_ent_t);
125 void show_files(const char *, package_t *);
126 void show_depends(const char *, package_t *);
127 void show_bld_depends(const char *, package_t *);
128 void show_index(const char *, const char *);
129 void show_summary(struct pkg_meta *, package_t *, const char *);
130 void show_list(lpkg_head_t *, const char *);
132 int pkg_perform(lpkg_head_t *);
134 #endif /* _INST_INFO_H_INCLUDE */