Implemented the SHOW command and massaged the SET command to fit
[pspp-builds.git] / src / settings.h
index 30256ae3ed4965cfb27153f9f7ffe51a66658df8..5ca015263531f8685b48ab93be4fc0a6fb4201ac 100644 (file)
 #include <stddef.h>
 #include <float.h>
 
-/* 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,35 +114,8 @@ 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;
-
-/* The character used for a decimal point: ',' or '.'.  Only respected
-   for data input and output. */
-extern int set_decimal;
 
-/* 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;
-
-/* Whether we echo commands to the listing file/printer; 0=no, 1=yes. */
-extern int set_echo;
-
-/* The character used to terminate commands. */
-extern int set_endcmd;
 
 /* Types of routing. */
 enum
@@ -156,103 +126,112 @@ enum
     SET_ROUTE_DISABLE = 010    /* Disable output--overrides all other bits. */
   };
 
-/* 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;
+/* Set view width to a very long value, and prevent it from 
+   ever changing */
+void force_long_view(void);
 
-/* Default format for variables created by transformations and by DATA
-   LIST {FREE,LIST}. */
-extern struct fmt_spec set_format;
 
-/* I don't know what this setting means; 0=no, 1=yes, 2=blank. */
-extern int set_headers;
+/* Requested "view length" in lines. */
+int get_viewlength(void);
 
-/* If set_echo is on, whether commands from include files are echoed;
- * 0=no, 1=yes. */
-extern int set_include;
+/* Screen width. */
+int get_viewwidth(void);
 
-/* Journal file's name. */
-extern char *set_journal;
+void init_settings(void) ;
 
-/* Whether we're journaling. */
-extern int set_journaling;
+/* Whether pspp can erase and overwrite files */
+int safer_mode(void);
 
-/* Lines per inch (vertical). */
-extern int set_lpi;
+/* Put into safer mode */
+void make_safe(void);
 
-/* 0=macro expansion is disabled, 1=macro expansion is enabled. */
-extern int set_mexpand;
+/* The character used for a decimal point: ',' or '.'.  Only respected
+   for data input and output. */
+char get_decimal(void);
 
-/* Maximum number of iterations in a macro loop. */
-extern int set_miterate;
+/* The character used for grouping in numbers: '.' or ','; the
+   opposite of set_decimal.  Only used in COMMA data input and
+   output. */
 
-/* Maximum nesting level for macros. */
-extern int set_mnest;
+char get_grouping(void);
 
-/* Whether we pause after each screen of output; 0=no, 1=yes. */
-extern int set_more;
+char *get_prompt(void);
 
-/* Independent of set_printback, controls whether the commands
-   generated by macro invocations are displayed. */
-extern int set_mprint;
+/* Prompt used for lines between BEGIN DATA and END DATA. */
+char *get_dprompt(void);
 
-/* Maximum number of errors. */
-extern int set_mxerrs;
+/* Continuation prompt. */
+char *get_cprompt(void);
 
-/* Implied limit of unbounded loop. */
-extern int set_mxloops;
 
-/* Maximum number of warnings + errors. */
-extern int set_mxwarns;
+/* Whether we echo commands to the listing file/printer;*/
+int get_echo(void);
 
-/* Whether a blank line is a command terminator; 0=no, 1=yes. */
-extern int set_nullline;
+/* If echo is on, whether commands from include files are echoed */
+int get_include(void);
 
-/* Whether commands are written to the display; 0=off, 1=on. */
-extern int set_printback;
+/* Whether an error stops execution; */
+int  get_errorbreak(void);
 
-#if !USE_INTERNAL_PAGER
-/* Name of the pager program. */
-extern char *set_pager;
-#endif /* !USE_INTERNAL_PAGER */
-
-/* The command prompt. */
-extern char *set_prompt;
+/* Whether save files should be compressed by default. */
+int get_scompression(void);
 
-/* Name of the results file. */
-extern char *set_results_file;
+/* Whether to warn on undefined values in numeric data. */
+int get_undefined(void);
 
-/* Whether to allow certain unsafe operations.  Cannot be unset after
-   it is set. */
-extern int set_safer;
+/* Maximum number of warnings + errors. */
+int get_mxwarns(void);
 
-/* Whether save files should be compressed by default. */
-extern int set_scompression;
+/* Maximum number of errors. */
+int get_mxerrs(void);
 
-/* The random number seed; NOT_LONG if we want a "random" random
-   number seed.  */
-extern long set_seed;
+/* 0=macro expansion is disabled, 1=macro expansion is enabled. */
+int get_mexpand(void);
 
-/* 1=The user has modified or made use of the random number seed. */
-extern int set_seed_used;
+/* Whether commands are written to the display */
+int get_printback(void);
 
-/* 1=Turn on some heuristics that make testing PSPP for correct
-   workings a little easier. */
-extern int set_testing_mode;
+/* Independent of get_printback, controls whether the commands
+   generated by macro invocations are displayed. */
+int get_mprint(void);
 
-/* Whether to warn on undefined values in numeric data. */
-extern int set_undefined;
+/* Implied limit of unbounded loop. */
+int get_mxloops(void);
 
-/* Requested "view length" in lines. */
-extern int set_viewlength;
+/* Whether a blank line is a command terminator */
+int get_nullline(void);
 
-/* Screen width. */
-extern int set_viewwidth;
+/* The character used to terminate commands. */
+unsigned char get_endcmd(void);
 
 /* Approximate maximum amount of memory to use for cases, in
    bytes. */
-extern size_t set_max_workspace;
+size_t get_max_workspace(void);
+
+/* The value that blank numeric fields are set to when read in;
+   normally SYSMIS. */
+double get_blanks(void);
+
+
+/* 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. */
+const char *get_pager(void);
+#endif /* !USE_INTERNAL_PAGER */
+
+
+/* Return 1 if the seed has been set since the last time this function
+   was called.
+   Fill the value pointed to by seed with the seed .
+*/
+int seed_is_set(unsigned long *seed);
+
 
 #endif /* !settings_h */