X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fsettings.h;h=74e81b5e7018f48657a5697577c07fb7d14ad91e;hb=ef05645131b8163a4bb9839e609bb76d553b80e9;hp=30256ae3ed4965cfb27153f9f7ffe51a66658df8;hpb=f9d47b5bba8416419cf3bcd3aa23c2d40a05fcac;p=pspp-builds.git diff --git a/src/settings.h b/src/settings.h index 30256ae3..74e81b5e 100644 --- a/src/settings.h +++ b/src/settings.h @@ -101,9 +101,6 @@ #include #include -/* The value that blank numeric fields are set to when read in; - normally SYSMIS. */ -extern double set_blanks; /* Describes one custom currency specification. */ struct set_cust_currency @@ -117,142 +114,144 @@ struct set_cust_currency int grouping; /* Grouping character. */ }; -/* CCA through CCE. */ -extern struct set_cust_currency set_cc[5]; -/* Whether the active file should be compressed. */ -extern int set_compression; -/* Characters per inch (horizontal). */ -extern int set_cpi; -/* Continuation prompt. */ -extern char *set_cprompt; +/* Types of routing. */ +enum + { + SET_ROUTE_SCREEN = 001, /* Output to screen devices? */ + SET_ROUTE_LISTING = 002, /* Output to listing devices? */ + SET_ROUTE_OTHER = 004, /* Output to other devices? */ + SET_ROUTE_DISABLE = 010 /* Disable output--overrides all other bits. */ + }; + + +/* Set view width to a very long value, and prevent it from + ever changing */ +void force_long_view(void); + + +/* Requested "view length" in lines. */ +int get_viewlength(void); + +/* Screen width. */ +int get_viewwidth(void); + +void init_settings(void) ; +void done_settings(void) ; + +/* Whether pspp can erase and overwrite files */ +int safer_mode(void); + +/* Put into safer mode */ +void make_safe(void); /* The character used for a decimal point: ',' or '.'. Only respected for data input and output. */ -extern int set_decimal; +char get_decimal(void); /* The character used for grouping in numbers: '.' or ','; the opposite of set_decimal. Only used in COMMA data input and output. */ -extern int set_grouping; -/* Prompt used for lines between BEGIN DATA and END DATA. */ -extern char *set_dprompt; +char get_grouping(void); -/* Whether we echo commands to the listing file/printer; 0=no, 1=yes. */ -extern int set_echo; +char *get_prompt(void); -/* The character used to terminate commands. */ -extern int set_endcmd; +/* Prompt used for lines between BEGIN DATA and END DATA. */ +char *get_dprompt(void); -/* Types of routing. */ -enum - { - SET_ROUTE_SCREEN = 001, /* Output to screen devices? */ - SET_ROUTE_LISTING = 002, /* Output to listing devices? */ - SET_ROUTE_OTHER = 004, /* Output to other devices? */ - SET_ROUTE_DISABLE = 010 /* Disable output--overrides all other bits. */ - }; +/* Continuation prompt. */ +char *get_cprompt(void); -/* Routing for errors, messages, and procedure results. */ -extern int set_errors, set_messages, set_results; -/* Whether an error stops execution; 0=no, 1=yes. */ -extern int set_errorbreak; +/* Whether we echo commands to the listing file/printer;*/ +int get_echo(void); -/* Default format for variables created by transformations and by DATA - LIST {FREE,LIST}. */ -extern struct fmt_spec set_format; +/* If echo is on, whether commands from include files are echoed */ +int get_include(void); -/* I don't know what this setting means; 0=no, 1=yes, 2=blank. */ -extern int set_headers; +/* Whether an error stops execution; */ +int get_errorbreak(void); -/* If set_echo is on, whether commands from include files are echoed; - * 0=no, 1=yes. */ -extern int set_include; +/* Whether save files should be compressed by default. */ +int get_scompression(void); -/* Journal file's name. */ -extern char *set_journal; +/* Whether to warn on undefined values in numeric data. */ +int get_undefined(void); -/* Whether we're journaling. */ -extern int set_journaling; +/* Maximum number of warnings + errors. */ +int get_mxwarns(void); -/* Lines per inch (vertical). */ -extern int set_lpi; +/* Maximum number of errors. */ +int get_mxerrs(void); /* 0=macro expansion is disabled, 1=macro expansion is enabled. */ -extern int set_mexpand; +int get_mexpand(void); -/* Maximum number of iterations in a macro loop. */ -extern int set_miterate; +/* Whether commands are written to the display */ +int get_printback(void); -/* Maximum nesting level for macros. */ -extern int set_mnest; +/* Independent of get_printback, controls whether the commands + generated by macro invocations are displayed. */ +int get_mprint(void); -/* Whether we pause after each screen of output; 0=no, 1=yes. */ -extern int set_more; +/* Implied limit of unbounded loop. */ +int get_mxloops(void); -/* Independent of set_printback, controls whether the commands - generated by macro invocations are displayed. */ -extern int set_mprint; +/* Whether a blank line is a command terminator */ +int get_nullline(void); -/* Maximum number of errors. */ -extern int set_mxerrs; +/* The character used to terminate commands. */ +unsigned char get_endcmd(void); -/* Implied limit of unbounded loop. */ -extern int set_mxloops; +/* Approximate maximum amount of memory to use for cases, in + bytes. */ +size_t get_max_workspace(void); -/* Maximum number of warnings + errors. */ -extern int set_mxwarns; +/* The value that blank numeric fields are set to when read in; + normally SYSMIS. */ +double get_blanks(void); -/* Whether a blank line is a command terminator; 0=no, 1=yes. */ -extern int set_nullline; -/* Whether commands are written to the display; 0=off, 1=on. */ -extern int set_printback; +/* Default format for variables created by transformations and by DATA + LIST {FREE,LIST}. */ +struct fmt_spec get_format(void); + +/* CCA through CCE. */ +const struct set_cust_currency *get_cc(int i); #if !USE_INTERNAL_PAGER /* Name of the pager program. */ -extern char *set_pager; +const char *get_pager(void); #endif /* !USE_INTERNAL_PAGER */ -/* The command prompt. */ -extern char *set_prompt; -/* Name of the results file. */ -extern char *set_results_file; +#include +gsl_rng *get_rng (void); -/* Whether to allow certain unsafe operations. Cannot be unset after - it is set. */ -extern int set_safer; -/* Whether save files should be compressed by default. */ -extern int set_scompression; +enum {ENHANCED,COMPATIBLE}; -/* The random number seed; NOT_LONG if we want a "random" random - number seed. */ -extern long set_seed; -/* 1=The user has modified or made use of the random number seed. */ -extern int set_seed_used; +/* Set the algorithm option globally */ +void set_algorithm(int x); -/* 1=Turn on some heuristics that make testing PSPP for correct - workings a little easier. */ -extern int set_testing_mode; +/* Set the algorithm option for this command only */ +void set_cmd_algorithm(int x); -/* Whether to warn on undefined values in numeric data. */ -extern int set_undefined; +/* Unset the algorithm option for this command */ +void unset_cmd_algorithm(void); -/* Requested "view length" in lines. */ -extern int set_viewlength; +/* Return the current algorithm setting */ +int get_algorithm(void); -/* Screen width. */ -extern int set_viewwidth; +/* Set the syntax option */ +void set_syntax(int x); + +/* Get the current syntax setting */ +int get_syntax(void); -/* Approximate maximum amount of memory to use for cases, in - bytes. */ -extern size_t set_max_workspace; #endif /* !settings_h */