/usr/include/ladr/options.h is in libladr-dev 0.0.200911a-2.1+b2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | /* Copyright (C) 2006, 2007 William McCune
This file is part of the LADR Deduction Library.
The LADR Deduction Library is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License,
version 2.
The LADR Deduction Library is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the LADR Deduction Library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef TP_OPTIONS_H
#define TP_OPTIONS_H
#include "string.h"
/* INTRODUCTION
There are 3 types of option:
<UL>
<LI>Flags: Boolean
<LI>Parms: Integer
<LI>Stringparm: String
</UL>
<P>
To introduce a new option, choose an integer ID that is
unique for the type of option, and call the appropriate
initialization routine. Then you can change the value
of the option and check its value as you like.
<P>
The routine read_commands() (in the "commands" package)
will parse the user's set, clear, and assign commands,
making the appropriate changes to the values of the options.
<P>
In most cases, the applications programmer will be using
the following routines.
<UL>
<LI>Flags: init_flag(), flag().
<LI>Parms: init_parm(), parm().
<LI>Stringparm: init_stringparm(), stringparm().
</UL>
*/
/* Public definitions */
#define MAX_FLAGS 100
#define MAX_PARMS 100
#define MAX_STRINGPARMS 100
#define MAX_FLOATPARMS 100
/* End of public definitions */
/* Public function prototypes from options.c */
void fprint_options_mem(FILE *fp, BOOL heading);
void p_options_mem();
void enable_option_dependencies(void);
void disable_option_dependencies(void);
BOOL option_dependencies_state(void);
int init_flag(char *name,
BOOL default_value);
int init_parm(char *name,
int default_value,
int min_value,
int max_value);
int init_floatparm(char *name,
double default_value,
double min_value,
double max_value);
int init_stringparm(char *name,
int n,
...);
void fprint_options(FILE *fp);
void p_options(void);
int flag(int flag_id);
int parm(int parm_id);
BOOL at_parm_limit(int value, int parm_id);
BOOL over_parm_limit(int value, int parm_id);
double floatparm(int floatparm_id);
BOOL stringparm(int id, char *s);
char *stringparm1(int id);
void update_flag(FILE *fout, int id, BOOL val, BOOL echo);
void set_flag(int id, BOOL echo);
void clear_flag(int id, BOOL echo);
void assign_parm(int id, int val, BOOL echo);
void assign_floatparm(int id, double val, BOOL echo);
void assign_stringparm(int id, char *val, BOOL echo);
int str_to_flag_id(char *name);
int str_to_parm_id(char *name);
int str_to_floatparm_id(char *name);
int str_to_stringparm_id(char *name);
char *flag_id_to_str(int id);
char *parm_id_to_str(int id);
char *floatparm_id_to_str(int id);
char *stringparm_id_to_str(int id);
void flag_flag_dependency(int id, BOOL val, int dep_id, BOOL dep_val);
void flag_flag_dep_default(int id, BOOL val, int dep_id);
void flag_parm_dependency(int id, BOOL val, int dep_id, int dep_val);
void flag_floatparm_dependency(int id, BOOL val, int dep_id, double dep_val);
void flag_parm_dep_default(int id, BOOL val, int dep_id);
void flag_floatparm_dep_default(int id, BOOL val, int dep_id);
void parm_flag_dependency(int id, int dep_id, int dep_val);
void parm_parm_dependency(int id, int dep_id, int dep_val, BOOL multiply);
void flag_stringparm_dependency(int id, BOOL val, int dep_id, char *dep_val);
void flag_stringparm_dep_default(int id, BOOL val, int dep_id);
int option_updates(void);
int flag_default(int flag_id);
int parm_default(int parm_id);
int floatparm_default(int floatparm_id);
char *stringparm1_default(int id);
#endif /* conditional compilation of whole file */
|