This is pspp.info, produced by makeinfo version 4.7 from ../../doc/pspp.texinfo. INFO-DIR-SECTION Math START-INFO-DIR-ENTRY * PSPP: (pspp). Statistical analysis package. END-INFO-DIR-ENTRY This manual is for GNU PSPP version 0.4.0, software for statistical analysis. Copyright (C) 1997, 1998, 2004, 2005 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled "GNU Free Documentation License." (a) The FSF's Back-Cover Text is: "You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development."  File: pspp.info, Node: Concept Index, Next: Installation, Prev: Command Index, Up: Top 18 Concept Index **************** [index] * Menu: * ": Tokens. (line 64) * "is defined as": BNF. (line 44) * $CASENUM: System Variables. (line 11) * $DATE: System Variables. (line 15) * $JDATE: System Variables. (line 19) * $LENGTH: System Variables. (line 23) * $SYSMIS: System Variables. (line 26) * $TIME: System Variables. (line 29) * $WIDTH: System Variables. (line 33) * &: Logical Operators. (line 11) * ': Tokens. (line 64) * (: Functions. (line 6) * ( ): Grouping Operators. (line 6) * ): Functions. (line 6) * *: Arithmetic Operators. (line 15) * **: Arithmetic Operators. (line 24) * +: Arithmetic Operators. (line 9) * -: Arithmetic Operators. (line 12) * . <1>: BNF. (line 29) * .: Attributes. (line 15) * /: Arithmetic Operators. (line 19) * /usr/local/bin/: UNIX installation. (line 39) * /usr/local/info/: UNIX installation. (line 39) * /usr/local/share/pspp/: UNIX installation. (line 39) * 0: Tokens. (line 86) * <: Relational Operators. (line 25) * <=: Relational Operators. (line 21) * <>: Relational Operators. (line 37) * =: Relational Operators. (line 17) * >: Relational Operators. (line 33) * >=: Relational Operators. (line 29) * _: Attributes. (line 20) * absolute value: Miscellaneous Mathematics. (line 9) * active file: Files. (line 29) * addition: Arithmetic Operators. (line 9) * analysis of variance: ONEWAY. (line 6) * AND: Logical Operators. (line 11) * ANOVA: ONEWAY. (line 6) * arccosine: Trigonometry. (line 9) * arcsine: Trigonometry. (line 15) * arctangent: Trigonometry. (line 20) * arguments, invalid: Date Construction. (line 35) * arguments, minimum valid: Statistical Functions. (line 15) * arguments, of date construction functions: Date Construction. (line 6) * arguments, of date extraction functions: Date Extraction. (line 6) * arithmetic operators: Arithmetic Operators. (line 6) * attributes of variables: Attributes. (line 6) * Backus-Naur Form: BNF. (line 6) * BNF: BNF. (line 6) * Boolean <1>: Logical Operators. (line 6) * Boolean: Boolean Values. (line 6) * case conversion: String Functions. (line 124) * case-sensitivity: Tokens. (line 20) * cases: Data Input and Output. (line 6) * changing file permissions: PERMISSIONS. (line 6) * characters, reserved: Tokens. (line 86) * coefficient of variation: Statistical Functions. (line 24) * command file: Files. (line 10) * command line, options: Invocation. (line 6) * command syntax, description of: BNF. (line 6) * commands, ordering: Order of Commands. (line 6) * commands, structure: Commands. (line 6) * compiler, gcc: Installation. (line 6) * compiler, recommended: Installation. (line 6) * compiling: UNIX installation. (line 32) * concatenation: String Functions. (line 8) * conditionals: Conditionals and Looping. (line 6) * config.h: UNIX installation. (line 25) * configuration: Configuration. (line 6) * configure, GNU: UNIX installation. (line 12) * constructing dates: Date Construction. (line 6) * constructing times: Time Construction. (line 6) * control flow: Conditionals and Looping. (line 6) * convention, TO: Sets of Variables. (line 6) * cosine: Trigonometry. (line 24) * cross-case function: Miscellaneous Functions. (line 9) * data: Data Input and Output. (line 6) * data file: Files. (line 17) * data, embedding in syntax files: DATA LIST. (line 6) * Data, embedding in syntax files: BEGIN DATA. (line 6) * data, fixed-format, reading: DATA LIST FIXED. (line 6) * data, reading from a file: DATA LIST. (line 6) * date examination: Date Extraction. (line 6) * date, Julian: Miscellaneous Functions. (line 21) * dates: Time & Date. (line 6) * dates, concepts: Time & Date Concepts. (line 15) * dates, constructing: Date Construction. (line 6) * dates, day of the month: Date Extraction. (line 34) * dates, day of the week: Date Extraction. (line 66) * dates, day of the year: Date Extraction. (line 30) * dates, day-month-year: Date Construction. (line 39) * dates, in days: Date Extraction. (line 18) * dates, in hours: Date Extraction. (line 24) * dates, in minutes: Date Extraction. (line 38) * dates, in months: Date Extraction. (line 42) * dates, in quarters: Date Extraction. (line 46) * dates, in seconds: Date Extraction. (line 50) * dates, in weekdays: Date Extraction. (line 66) * dates, in weeks: Date Extraction. (line 62) * dates, in years: Date Extraction. (line 70) * dates, mathematical properties of: Time & Date Concepts. (line 26) * dates, month-year: Date Construction. (line 44) * dates, quarter-year: Date Construction. (line 48) * dates, time of day: Date Extraction. (line 57) * dates, valid: Time & Date. (line 6) * dates, week-year: Date Construction. (line 52) * dates, year-day: Date Construction. (line 56) * day of the month: Date Extraction. (line 34) * day of the week: Date Extraction. (line 66) * day of the year: Date Extraction. (line 30) * day-month-year: Date Construction. (line 39) * days <1>: Date Extraction. (line 18) * days <2>: Time Extraction. (line 9) * days: Time Construction. (line 9) * description of command syntax: BNF. (line 6) * deviation, standard: Statistical Functions. (line 40) * dictionary: Variables. (line 6) * division: Arithmetic Operators. (line 19) * documentation, installing: UNIX installation. (line 39) * embedding data in syntax files: DATA LIST. (line 6) * Embedding data in syntax files: BEGIN DATA. (line 6) * embedding fixed-format data: DATA LIST FIXED. (line 6) * EQ: Relational Operators. (line 17) * equality, testing: Relational Operators. (line 17) * examination, of times: Time Extraction. (line 6) * exponentiation: Arithmetic Operators. (line 24) * expression: BNF. (line 41) * expressions, mathematical: Expressions. (line 6) * extraction, of dates: Date Extraction. (line 6) * extraction, of time: Time Extraction. (line 6) * false: Logical Operators. (line 6) * FDL, GNU Free Documentation License: GNU Free Documentation License. (line 6) * file definition commands: Types of Commands. (line 14) * file mode: PERMISSIONS. (line 6) * file, active: Files. (line 29) * file, command: Files. (line 10) * file, data: Files. (line 17) * file, output: Files. (line 23) * file, syntax file: Files. (line 10) * files, PSPP: Introduction. (line 14) * fixed-format data, reading: DATA LIST FIXED. (line 6) * flow of control: Conditionals and Looping. (line 6) * Free Software Foundation: Introduction. (line 14) * function, cross-case: Miscellaneous Functions. (line 9) * functions: Functions. (line 6) * functions, miscellaneous: Miscellaneous Functions. (line 6) * functions, missing-value: Missing Value Functions. (line 6) * functions, statistical: Statistical Functions. (line 6) * functions, string: String Functions. (line 6) * functions, time & date: Time & Date. (line 6) * gcc: Installation. (line 6) * GE: Relational Operators. (line 29) * Ghostscript: Introduction. (line 14) * GNU C compiler: Installation. (line 6) * GNU configure: UNIX installation. (line 12) * graphics: Introduction. (line 14) * greater than: Relational Operators. (line 33) * greater than or equal to: Relational Operators. (line 29) * grouping operators: Grouping Operators. (line 6) * GT: Relational Operators. (line 33) * headers: SET. (line 269) * hours <1>: Date Extraction. (line 24) * hours: Time Extraction. (line 12) * hours-minutes-seconds: Time Construction. (line 12) * identifiers: Tokens. (line 11) * identifiers, reserved: Tokens. (line 25) * inequality, testing: Relational Operators. (line 37) * input: Data Input and Output. (line 6) * input program commands: Types of Commands. (line 21) * installation <1>: UNIX installation. (line 39) * installation: Installation. (line 6) * installation, under UNIX: UNIX installation. (line 6) * integer: BNF. (line 17) * integers: Tokens. (line 44) * intersection, logical: Logical Operators. (line 11) * introduction: Introduction. (line 6) * inverse cosine: Trigonometry. (line 9) * inverse sine: Trigonometry. (line 15) * inverse tangent: Trigonometry. (line 20) * inversion, logical: Logical Operators. (line 23) * invocation: Invocation. (line 6) * Julian date: Miscellaneous Functions. (line 21) * keywords: BNF. (line 10) * labels, value: Attributes. (line 63) * labels, variable: Attributes. (line 60) * language, command structure: Commands. (line 6) * language, lexical analysis: Tokens. (line 6) * language, PSPP <1>: Language. (line 6) * language, PSPP: Introduction. (line 6) * language, tokens: Tokens. (line 6) * LE: Relational Operators. (line 21) * length: SET. (line 269) * less than: Relational Operators. (line 25) * less than or equal to: Relational Operators. (line 21) * lexical analysis: Tokens. (line 6) * license: License. (line 6) * listing: SET. (line 269) * logarithms: Mathematics. (line 12) * logical intersection: Logical Operators. (line 11) * logical inversion: Logical Operators. (line 23) * logical operators: Logical Operators. (line 6) * logical union: Logical Operators. (line 17) * loops: Conditionals and Looping. (line 6) * LT: Relational Operators. (line 25) * makefile: UNIX installation. (line 25) * Makefile: UNIX installation. (line 25) * mathematical expressions: Expressions. (line 6) * mathematics: Functions. (line 6) * mathematics, advanced: Mathematics. (line 6) * mathematics, applied to times & dates: Time & Date Concepts. (line 26) * mathematics, miscellaneous: Miscellaneous Mathematics. (line 6) * maximum: Statistical Functions. (line 29) * mean: Statistical Functions. (line 33) * membership, of set: Set Membership. (line 6) * minimum: Statistical Functions. (line 36) * minimum valid number of arguments: Statistical Functions. (line 15) * minutes <1>: Date Extraction. (line 38) * minutes: Time Extraction. (line 15) * missing values <1>: Missing Value Functions. (line 6) * missing values <2>: Attributes. (line 50) * missing values: Missing Observations. (line 6) * mode: PERMISSIONS. (line 6) * modulus: Miscellaneous Mathematics. (line 12) * modulus, by 10: Miscellaneous Mathematics. (line 18) * month-year: Date Construction. (line 44) * months: Date Extraction. (line 42) * more: SET. (line 269) * multiplication: Arithmetic Operators. (line 15) * names, of functions: Functions. (line 6) * NE: Relational Operators. (line 37) * negation: Arithmetic Operators. (line 29) * nonterminals: BNF. (line 33) * Normality, testing for: EXAMINE. (line 6) * NOT: Logical Operators. (line 23) * number: BNF. (line 14) * numbers: Tokens. (line 44) * numbers, converting from strings: String Functions. (line 58) * numbers, converting to strings: String Functions. (line 104) * obligations, your: License. (line 6) * observations: Data Input and Output. (line 6) * operations, order of: Order of Operations. (line 6) * operator precedence: Order of Operations. (line 6) * operators <1>: Functions. (line 6) * operators <2>: BNF. (line 26) * operators: Tokens. (line 91) * operators, arithmetic: Arithmetic Operators. (line 6) * operators, grouping: Grouping Operators. (line 6) * operators, logical: Logical Operators. (line 6) * options, command-line: Invocation. (line 6) * OR: Logical Operators. (line 17) * order of commands: Order of Commands. (line 6) * order of operations: Order of Operations. (line 6) * output: Data Input and Output. (line 6) * output file: Files. (line 23) * output, PSPP: Introduction. (line 14) * padding strings: String Functions. (line 82) * pager <1>: Miscellaneous configuring. (line 41) * pager: SET. (line 269) * parentheses <1>: Functions. (line 6) * parentheses: Grouping Operators. (line 6) * period: Attributes. (line 15) * PostScript: Introduction. (line 14) * precedence, operator: Order of Operations. (line 6) * pref.h: UNIX installation. (line 25) * print format: Attributes. (line 67) * procedures: Types of Commands. (line 33) * productions: BNF. (line 33) * PSPP language: Introduction. (line 6) * PSPP, command structure: Commands. (line 6) * PSPP, configuring: Configuration. (line 6) * PSPP, installing <1>: UNIX installation. (line 39) * PSPP, installing: Installation. (line 6) * PSPP, invoking: Invocation. (line 6) * PSPP, language: Language. (line 6) * punctuators <1>: BNF. (line 26) * punctuators: Tokens. (line 91) * quarter-year: Date Construction. (line 48) * quarters: Date Extraction. (line 46) * reading data from a file: DATA LIST. (line 6) * reading fixed-format data: DATA LIST FIXED. (line 6) * reals: Tokens. (line 44) * reserved identifiers: Tokens. (line 25) * restricted transformations: Types of Commands. (line 29) * rights, your: License. (line 6) * rounding: Miscellaneous Mathematics. (line 22) * searching strings: String Functions. (line 13) * seconds <1>: Date Extraction. (line 50) * seconds: Time Extraction. (line 18) * self-tests, running: UNIX installation. (line 37) * set membership: Set Membership. (line 6) * sine: Trigonometry. (line 27) * square roots: Mathematics. (line 24) * standard deviation: Statistical Functions. (line 40) * start symbol: BNF. (line 58) * statistics: Statistical Functions. (line 6) * string: BNF. (line 20) * string functions: String Functions. (line 6) * strings: Tokens. (line 64) * strings, case of: String Functions. (line 30) * strings, concatenation of: String Functions. (line 8) * strings, converting from numbers: String Functions. (line 104) * strings, converting to numbers: String Functions. (line 58) * strings, finding length of: String Functions. (line 27) * strings, padding: String Functions. (line 35) * strings, searching backwards: String Functions. (line 68) * strings, taking substrings of: String Functions. (line 109) * strings, trimming: String Functions. (line 48) * substrings: String Functions. (line 109) * subtraction: Arithmetic Operators. (line 12) * sum: Statistical Functions. (line 43) * symbol, start: BNF. (line 58) * syntax file: Files. (line 10) * system variables: System Variables. (line 6) * system-missing: Logical Operators. (line 6) * tangent: Trigonometry. (line 30) * terminals: BNF. (line 10) * terminals and nonterminals, differences: BNF. (line 50) * testing for equality: Relational Operators. (line 17) * testing for inequality: Relational Operators. (line 37) * time: Date Extraction. (line 57) * time examination: Time Extraction. (line 6) * time, concepts: Time & Date Concepts. (line 6) * time, in days <1>: Date Extraction. (line 18) * time, in days <2>: Time Extraction. (line 9) * time, in days: Time Construction. (line 9) * time, in hours <1>: Date Extraction. (line 24) * time, in hours: Time Extraction. (line 12) * time, in hours-minutes-seconds: Time Construction. (line 12) * time, in minutes <1>: Date Extraction. (line 38) * time, in minutes: Time Extraction. (line 15) * time, in seconds <1>: Date Extraction. (line 50) * time, in seconds: Time Extraction. (line 18) * time, instants of: Time & Date Concepts. (line 15) * time, intervals: Time & Date Concepts. (line 6) * time, lengths of: Time Extraction. (line 6) * time, mathematical properties of: Time & Date Concepts. (line 26) * times: Time & Date. (line 6) * times, constructing: Time Construction. (line 6) * times, in days: Date Extraction. (line 54) * TO convention: Sets of Variables. (line 6) * tokens: Tokens. (line 6) * transformations <1>: Data Manipulation. (line 6) * transformations: Types of Commands. (line 25) * trigonometry: Trigonometry. (line 6) * true: Logical Operators. (line 6) * truncation: Miscellaneous Mathematics. (line 26) * type of variables: Attributes. (line 29) * union, logical: Logical Operators. (line 17) * UNIX, installing PSPP under: UNIX installation. (line 6) * utility commands: Types of Commands. (line 9) * value labels: Attributes. (line 63) * values, Boolean: Boolean Values. (line 6) * values, missing <1>: Missing Value Functions. (line 6) * values, missing <2>: Attributes. (line 50) * values, missing: Missing Observations. (line 6) * values, system-missing: Logical Operators. (line 6) * var-list: BNF. (line 38) * var-name: BNF. (line 23) * variable labels: Attributes. (line 60) * variable names, ending with period: Attributes. (line 15) * variables: Variables. (line 6) * variables, attributes of: Attributes. (line 6) * variables, system: System Variables. (line 6) * variables, type: Attributes. (line 29) * variables, width: Attributes. (line 32) * variance: Statistical Functions. (line 46) * variation, coefficient of: Statistical Functions. (line 24) * week: Date Extraction. (line 62) * week-year: Date Construction. (line 52) * weekday: Date Extraction. (line 66) * white space: Tokens. (line 86) * white space, trimming: String Functions. (line 48) * width: SET. (line 269) * width of variables: Attributes. (line 32) * write format: Attributes. (line 73) * year-day: Date Construction. (line 56) * years: Date Extraction. (line 70) * your rights and obligations: License. (line 6) * |: Logical Operators. (line 17) * ~: Logical Operators. (line 23) * ~=: Relational Operators. (line 37)  File: pspp.info, Node: Installation, Next: Configuration, Prev: Concept Index, Up: Top Appendix A Installing PSPP ************************** PSPP conforms to the GNU Coding Standards. PSPP is written in, and requires for proper operation, ANSI/ISO C. You might want to additionally note the following points: * The compiler and linker must allow for significance of several characters in external identifiers. The exact number is unknown but at least 31 is recommended. * The `int' type must be 32 bits or wider. * The recommended compiler is gcc 2.7.2.1 or later, but any ANSI compiler will do if it fits the above criteria. Many UNIX variants should work out-of-the-box, as PSPP uses GNU autoconf to detect differences between environments. Please report any problems with compilation of PSPP under UNIX and UNIX-like operating systems--portability is a major concern of the author. The pages below give specific instructions for installing PSPP on each type of system mentioned above. * Menu: * UNIX installation:: Installing on UNIX-like environments.  File: pspp.info, Node: UNIX installation, Prev: Installation, Up: Installation A.1 UNIX installation ===================== To install PSPP under a UNIX-like operating system, follow the steps below in order. Some of the text below was taken directly from various Free Software Foundation sources. 1. `cd' to the directory containing the PSPP source. 2. Type `./configure' to configure for your particular operating system and compiler. Running `configure' takes a while. While running, it displays some messages telling which features it is checking for. You can optionally supply some options to `configure' to give it hints about how to do its job. Type `./configure --help' to see a list of options. One of the most useful options is `--with-checker', which enables the use of the Checker memory debugger under supported operating systems. Checker must already be installed to use this option. Do not use `--with-checker' if you are not debugging PSPP itself. 3. (optional) Edit `Makefile', `config.h', and `pref.h'. These files are produced by `configure'. Note that most PSPP settings can be changed at runtime. `pref.h' is only generated by `configure' if it does not already exist. (It's copied from `prefh.orig'.) 4. Type `make' to compile the package. If there are any errors during compilation, try to fix them. If modifications are necessary to compile correctly under your configuration, contact the author. *Note Submitting Bug Reports: Bugs, for details. 5. Type `make check' to run self-tests on the compiled PSPP package. 6. Become the superuser and type `make install' to install the PSPP binaries, by default in `/usr/local/bin/'. The directory `/usr/local/share/pspp/' is created and populated with files needed by PSPP at runtime. This step will also cause the PSPP documentation to be installed in `/usr/local/info/', but only if that directory already exists. 7. (optional) Type `make clean' to delete the PSPP binaries from the source tree.  File: pspp.info, Node: Configuration, Next: Portable File Format, Prev: Installation, Up: Top Appendix B Configuring PSPP *************************** PSPP has dozens of configuration possibilities and hundreds of settings. This is both a bane and a blessing. On one hand, it's possible to easily accommodate diverse ranges of setups. But, on the other, the multitude of possibilities can overwhelm the casual user. Fortunately, the configuration mechanisms are profusely described in the sections below.... * Menu: * File locations:: How PSPP finds config files. * Configuration techniques:: Many different methods of configuration.... * Configuration files:: How configuration files are read. * Environment variables:: All about environment variables. * Output devices:: Describing your terminal(s) and printer(s). * PostScript driver class:: Configuration of PostScript devices. * ASCII driver class:: Configuration of character-code devices. * HTML driver class:: Configuration for HTML output. * Miscellaneous configuring:: Even more configuration variables. * Improving output quality:: Hints for producing ever-more-lovely output.  File: pspp.info, Node: File locations, Next: Configuration techniques, Prev: Configuration, Up: Configuration B.1 Locating configuration files ================================ PSPP uses the same method to find most of its configuration files: 1. The "base name" of the file being sought is determined. 2. The path to search is determined. 3. Each directory in the search path, from left to right, is searched for a file with the name of the base name. The first occurrence is read as the configuration file. The first two steps are elaborated below for the sake of our pedantic friends. 1. A "base name" is a file name lacking an absolute directory reference. Some examples of base names are: `ps-encodings', `devices', `devps/DESC' (under UNIX), `devps\DESC' (under M$ environments). Determining the base name is a two-step process: a. If the appropriate environment variable is defined, the value of that variable is used (*note Environment variables::). For instance, when searching for the output driver initialization file, the variable examined is `STAT_OUTPUT_INIT_FILE'. b. Otherwise, the compiled-in default is used. For example, when searching for the output driver initialization file, the default base name is `devices'. *Please note:* If a user-specified base name does contain an absolute directory reference, as in a file name like `/home/pfaff/fonts/TR', no path is searched--the file name is used exactly as given--and the algorithm terminates. 2. The path is the first of the following that is defined: * A variable definition for the path given in the user environment. This is a PSPP-specific environment variable name; for instance, `STAT_OUTPUT_INIT_PATH'. * In some cases, another, less-specific environment variable is checked. For instance, when searching for font files, the PostScript driver first checks for a variable with name `STAT_GROFF_FONT_PATH', then for one with name `GROFF_FONT_PATH'. (However, font searching has its own list of esoteric search rules.) * The configuration file path, which is itself determined by the following rules: a. If the command line contains an option of the form `-B PATH' or `--config-dir=PATH', then the value given on the rightmost occurrence of such an option is used. b. Otherwise, if the environment variable `STAT_CONFIG_PATH' is defined, the value of that variable is used. c. Otherwise, the compiled-in fallback default is used. On UNIX machines, the default fallback path is 1. `~/.pspp' 2. `/usr/local/lib/pspp' 3. `/usr/lib/pspp' On DOS machines, the default fallback path is: 1. All the paths from the DOS search path in the `PATH' environment variable, in left-to-right order. 2. `C:\PSPP', as a last resort. Note that the installer of PSPP can easily change this default fallback path; thus the above should not be taken as gospel. As a final note: Under DOS, directories given in paths are delimited by semicolons (`;'); under UNIX, directories are delimited by colons (`:'). This corresponds with the standard path delimiter under these OSes.  File: pspp.info, Node: Configuration techniques, Next: Configuration files, Prev: File locations, Up: Configuration B.2 Configuration techniques ============================ There are many ways that PSPP can be configured. These are described in the list below. Values given by earlier items take precedence over those given by later items. 1. Syntax commands that modify settings, such as SET. *Note SET::. 2. Command-line options. *Note Invocation::. 3. PSPP-specific environment variable contents. *Note Environment variables::. 4. General environment variable contents. *Note Environment variables::. 5. Configuration file contents. *Note Configuration files::. 6. Fallback defaults. Some of the above may not apply to a particular setting. For instance, the current pager (such as `more', `most', or `less') cannot be determined by configuration file contents because there is no appropriate configuration file.  File: pspp.info, Node: Configuration files, Next: Environment variables, Prev: Configuration techniques, Up: Configuration B.3 Configuration files ======================= Most configuration files have a common form: * Each line forms a separate command or directive. This means that lines cannot be broken up, unless they are spliced together with a trailing backslash, as described below. * Before anything else is done, trailing white space is removed. * When a line ends in a backslash (`\'), the backslash is removed, and the next line is read and appended to the current line. - White space preceding the backslash is retained. - This rule continues to be applied until the line read does not end in a backslash. - It is an error if the last line in the file ends in a backslash. * Comments are introduced by an octothorpe (`#'), and continue until the end of the line. - An octothorpe inside balanced pairs of double quotation marks (`"') or single quotation marks (`'') does not introduce a comment. - The backslash character can be used inside balanced quotes of either type to escape the following character as a literal character. (This is distinct from the use of a backslash as a line-splicing character.) - Line splicing takes place before comment removal. * Blank lines, and lines that contain only white space, are ignored.  File: pspp.info, Node: Environment variables, Next: Output devices, Prev: Configuration files, Up: Configuration B.4 Environment variables ========================= You may think the concept of environment variables is a fairly simple one. However, the author of PSPP has found a way to complicate even something so simple. Environment variables are further described in the sections below: * Menu: * Variable values:: Values of variables are determined this way. * Environment substitutions:: How environment substitutions are made. * Predefined variables:: A few variables are automatically defined.  File: pspp.info, Node: Variable values, Next: Environment substitutions, Prev: Environment variables, Up: Environment variables B.4.1 Values of environment variables ------------------------------------- Values for environment variables are obtained by the following means, which are arranged in order of decreasing precedence: 1. Command-line options. *Note Invocation::. 2. The `environment' configuration file--more on this below. 3. Actual environment variables (defined in the shell or other parent process). The `environment' configuration file is located through application of the usual algorithm for configuration files (*note File locations::), except that its contents do not affect the search path used to find `environment' itself. Use of `environment' is discouraged on systems that allow an arbitrarily large environment; it is supported for use on systems like MS-DOS that limit environment size. `environment' is composed of lines having the form `KEY=VALUE', where KEY and the equals sign (`=') are required, and VALUE is optional. If VALUE is given, variable KEY is given that value; if VALUE is absent, variable KEY is undefined (deleted). Variables may not be defined with a null value. Environment substitutions are performed on each line in the file (*note Environment substitutions::). See *Note Configuration files::, for more details on formatting of the environment configuration file. *Please note:* Support for `environment' is not yet implemented.  File: pspp.info, Node: Environment substitutions, Next: Predefined variables, Prev: Variable values, Up: Environment variables B.4.2 Environment substitutions ------------------------------- Much of the power of environment variables lies in the way that they may be substituted into configuration files. Variable substitutions are described below. The line is scanned from left to right. In this scan, all characters other than dollar signs (`$') are retained unmolested. Dollar signs, however, introduce an environment variable reference. References take three forms: `$VAR' Replaced by the value of environment variable VAR, determined as specified in *Note Variable values::. VAR must be one of the following: * One or more letters. * Exactly one nonalphabetic character. This may not be a left brace (`{'). `${VAR}' Same as above, but VAR may contain any character (except `}'). `$$' Replaced by a single dollar sign. Undefined variables expand to a empty value.  File: pspp.info, Node: Predefined variables, Prev: Environment substitutions, Up: Environment variables B.4.3 Predefined environment variables -------------------------------------- There are two environment variables predefined for use in environment substitutions: `VER' Defined as the version number of PSPP, as a string, in a format something like `0.9.4'. `ARCH' Defined as the host architecture of PSPP, as a string, in standard cpu-manufacturer-OS format. For instance, Debian GNU/Linux 1.1 on an Intel machine defines this as `i586-unknown-linux'. This is somewhat dependent on the system used to compile PSPP. Nothing prevents these values from being overridden, although it's a good idea not to do so.  File: pspp.info, Node: Output devices, Next: PostScript driver class, Prev: Environment variables, Up: Configuration B.5 Output devices ================== Configuring output devices is the most complicated aspect of configuring PSPP. The output device configuration file is named `devices'. It is searched for using the usual algorithm for finding configuration files (*note File locations::). Each line in the file is read in the usual manner for configuration files (*note Configuration files::). Lines in `devices' are divided into three categories, described briefly in the table below: driver category definitions Define a driver in terms of other drivers. macro definitions Define environment variables local to the the output driver configuration file. device definitions Describe the configuration of an output device. The following sections further elaborate the contents of the `devices' file. * Menu: * Driver categories:: How to organize the driver namespace. * Macro definitions:: Environment variables local to `devices'. * Device definitions:: Output device descriptions. * Dimensions:: Lengths, widths, sizes, .... * papersize:: Letter, legal, A4, envelope, .... * Distinguishing line types:: Details on `devices' parsing. * Tokenizing lines:: Dividing `devices' lines into tokens.  File: pspp.info, Node: Driver categories, Next: Macro definitions, Prev: Output devices, Up: Output devices B.5.1 Driver categories ----------------------- Drivers can be divided into categories. Drivers are specified by their names, or by the names of the categories that they are contained in. Only certain drivers are enabled each time PSPP is run; by default, these are the drivers in the category `default'. To enable a different set of drivers, use the `-o DEVICE' command-line option (*note Invocation::). Categories are specified with a line of the form `CATEGORY=DRIVER1 DRIVER2 DRIVER3 ... DRIVERN'. This line specifies that the category CATEGORY is composed of drivers named DRIVER1, DRIVER2, and so on. There may be any number of drivers in the category, from zero on up. Categories may also be specified on the command line (*note Invocation::). This is all you need to know about categories. If you're still curious, read on. First of all, the term `categories' is a bit of a misnomer. In fact, the internal representation is nothing like the hierarchy that the term seems to imply: a linear list is used to keep track of the enabled drivers. When PSPP first begins reading `devices', this list contains the name of any drivers or categories specified on the command line, or the single item `default' if none were specified. Each time a category definition is specified, the list is searched for an item with the value of CATEGORY. If a matching item is found, it is deleted. If there was a match, the list of drivers (DRIVER1 through DRIVERN) is then appended to the list. Each time a driver definition line is encountered, the list is searched. If the list contains an item with that driver's name, the driver is enabled and the item is deleted from the list. Otherwise, the driver is not enabled. It is an error if the list is not empty when the end of `devices' is reached.  File: pspp.info, Node: Macro definitions, Next: Device definitions, Prev: Driver categories, Up: Output devices B.5.2 Macro definitions ----------------------- Macro definitions take the form `define MACRONAME DEFINITION'. In such a macro definition, the environment variable MACRONAME is defined to expand to the value DEFINITION. Before the definition is made, however, any macros used in DEFINITION are expanded. Please note the following nuances of macro usage: * For the purposes of this section, "macro" and "environment variable" are synonyms. * Macros may not take arguments. * Macros may not recurse. * Macros are just environment variable definitions like other environment variable definitions, with the exception that they are limited in scope to the `devices' configuration file. * Macros override other all environment variables of the same name (within the scope of `devices'). * Earlier macro definitions for a particular KEY override later ones. In particular, macro definitions on the command line override those in the device definition file. *Note Non-option Arguments::. * There are two predefined macros, whose values are determined at runtime: `viewwidth' Defined as the width of the console screen, in columns of text. `viewlength' Defined as the length of the console screen, in lines of text.  File: pspp.info, Node: Device definitions, Next: Dimensions, Prev: Macro definitions, Up: Output devices B.5.3 Driver definitions ------------------------ Driver definitions are the ultimate purpose of the `devices' configuration file. These are where the real action is. Driver definitions tell PSPP where it should send its output. Each driver definition line is divided into four fields. These fields are delimited by colons (`:'). Each line is subjected to environment variable interpolation before it is processed further (*note Environment substitutions::). From left to right, the four fields are, in brief: driver name A unique identifier, used to determine whether to enable the driver. class name One of the predefined driver classes supported by PSPP. The currently supported driver classes include `postscript' and `ascii'. device type(s) Zero or more of the following keywords, delimited by spaces: `screen' Indicates that the device is a screen display. This may reduce the amount of buffering done by the driver, to make interactive use more convenient. `printer' Indicates that the device is a printer. `listing' Indicates that the device is a listing file. These options are just hints to PSPP and do not cause the output to be directed to the screen, or to the printer, or to a listing file--those must be set elsewhere in the options. They are used primarily to decide which devices should be enabled at any given time. *Note SET::, for more information. options An optional set of options to pass to the driver itself. The exact format for the options varies among drivers. The driver is enabled if: 1. Its driver name is specified on the command line, or 2. It's in a category specified on the command line, or 3. If no categories or driver names are specified on the command line, it is in category `default'. For more information on driver names, see *Note Driver categories::. The class name must be one of those supported by PSPP. The classes supported depend on the options with which PSPP was compiled. See later sections in this chapter for descriptions of the available driver classes. Options are dependent on the driver. See the driver descriptions for details.  File: pspp.info, Node: Dimensions, Next: papersize, Prev: Device definitions, Up: Output devices B.5.4 Dimensions ---------------- Quite often in configuration it is necessary to specify a length or a size. PSPP uses a common syntax for all such, calling them collectively by the name "dimensions". * You can specify dimensions in decimal form (`12.5') or as fractions, either as mixed numbers (`12-1/2') or raw fractions (`25/2'). * A number of different units are available. These are suffixed to the numeric part of the dimension. There must be no spaces between the number and the unit. The available units are identical to those offered by the popular typesetting system TeX: `in' inch (1 `in' = 2.54 `cm') `"' inch (1 `in' = 2.54 `cm') `pt' printer's point (1 `in' = 72.27 `pt') `pc' pica (12 `pt' = 1 `pc') `bp' PostScript point (1 `in' = 72 `bp') `cm' centimeter `mm' millimeter (10 `mm' = 1 `cm') `dd' didot point (1157 `dd' = 1238 `pt') `cc' cicero (1 `cc' = 12 `dd') `sp' scaled point (65536 `sp' = 1 `pt') * If no explicit unit is given, PSPP attempts to guess the best unit: - Numbers less than 50 are assumed to be in inches. - Numbers 50 or greater are assumed to be in millimeters.  File: pspp.info, Node: papersize, Next: Distinguishing line types, Prev: Dimensions, Up: Output devices B.5.5 Paper sizes ----------------- Output drivers usually deal with some sort of hardcopy media. This media is called "paper" by the drivers, though in reality it could be a transparency or film or thinly veiled sarcasm. To make it easier for you to deal with paper, PSPP allows you to have (of course!) a configuration file that gives symbolic names, like "letter" or "legal" or "a4", to paper sizes, rather than forcing you to use cryptic numbers like "8-1/2 x 11" or "210 by 297". Surprisingly enough, this configuration file is named `papersize'. *Note Configuration files::. When PSPP tries to connect a symbolic paper name to a paper size, it reads and parses each non-comment line in the file, in order. The first field on each line must be a symbolic paper name in double quotes. Paper names may not contain double quotes. Paper names are not case-sensitive: `legal' and `Legal' are equivalent. If a match is found for the paper name, the rest of the line is parsed. If it is found to be a pair of dimensions (*note Dimensions::) separated by either `x' or `by', then those are taken to be the paper size, in order of width followed by length. There _must_ be at least one space on each side of `x' or `by'. Otherwise the line must be of the form `"PAPER-1"="PAPER-2"'. In this case the target of the search becomes paper name PAPER-2 and the search through the file continues.  File: pspp.info, Node: Distinguishing line types, Next: Tokenizing lines, Prev: papersize, Up: Output devices B.5.6 How lines are divided into types -------------------------------------- The lines in `devices' are distinguished in the following manner: 1. Leading white space is removed. 2. If the resulting line begins with the exact string `define', followed by one or more white space characters, the line is processed as a macro definition. 3. Otherwise, the line is scanned for the first instance of a colon (`:') or an equals sign (`='). 4. If a colon is encountered first, the line is processed as a driver definition. 5. Otherwise, if an equals sign is encountered, the line is processed as a macro definition. 6. Otherwise, the line is ill-formed.  File: pspp.info, Node: Tokenizing lines, Prev: Distinguishing line types, Up: Output devices B.5.7 How lines are divided into tokens --------------------------------------- Each driver definition line is run through a simple tokenizer. This tokenizer recognizes two basic types of tokens. The first type is an equals sign (`='). Equals signs are both delimiters between tokens and tokens in themselves. The second type is an identifier or string token. Identifiers and strings are equivalent after tokenization, though they are written differently. An identifier is any string of characters other than white space or equals sign. A string is introduced by a single- or double-quote character (`'' or `"') and, in general, continues until the next occurrence of that same character. The following standard C escapes can also be embedded within strings: `\'' A single-quote (`''). `\"' A double-quote (`"'). `\?' A question mark (`?'). Included for hysterical raisins. `\\' A backslash (`\'). `\a' Audio bell (ASCII 7). `\b' Backspace (ASCII 8). `\f' Formfeed (ASCII 12). `\n' New-line (ASCII 10) `\r' Carriage return (ASCII 13). `\t' Tab (ASCII 9). `\v' Vertical tab (ASCII 11). `\OOO' Each `o' must be an octal digit. The character is the one having the octal value specified. Any number of octal digits is read and interpreted; only the lower 8 bits are used. `\xHH' Each `h' must be a hex digit. The character is the one having the hexadecimal value specified. Any number of hex digits is read and interpreted; only the lower 8 bits are used. Tokens, outside of quoted strings, are delimited by white space or equals signs.  File: pspp.info, Node: PostScript driver class, Next: ASCII driver class, Prev: Output devices, Up: Configuration B.6 The PostScript driver class =============================== The `postscript' driver class is used to produce output that is acceptable to PostScript printers and to PC-based PostScript interpreters such as Ghostscript. Continuing a long tradition, PSPP's PostScript driver is configurable to the point of absurdity. There are actually two PostScript drivers. The first one, `postscript', produces ordinary DSC-compliant PostScript output. The second one `epsf', produces an Encapsulated PostScript file. The two drivers are otherwise identical in configuration and in operation. The PostScript driver is described in further detail below. * Menu: * PS output options:: Output file options. * PS page options:: Paper, margins, scaling & rotation, more! * PS file options:: Configuration files. * PS font options:: Default fonts, font options. * PS line options:: Line widths, options. * Prologue:: Details on the PostScript prologue. * Encodings:: Details on PostScript font encodings.  File: pspp.info, Node: PS output options, Next: PS page options, Prev: PostScript driver class, Up: PostScript driver class B.6.1 PostScript output options ------------------------------- These options deal with the form of the output and the output file itself: `output-file=FILENAME' File to which output should be sent. This can be an ordinary filename (i.e., `"pspp.ps"'), a pipe filename (i.e., `"|lpr"'), or stdout (`"-"'). Default: `"pspp.ps"'. `color=BOOLEAN' Most of the time black-and-white PostScript devices are smart enough to map colors to shades themselves. However, you can cause the PSPP output driver to do an ugly simulation of this in its own driver by turning `color' off. Default: `on'. This is a boolean setting, as are many settings in the PostScript driver. Valid positive boolean values are `on', `true', `yes', and nonzero integers. Negative boolean values are `off', `false', `no', and zero. `data=DATA-TYPE' One of `clean7bit', `clean8bit', or `binary'. This controls what characters will be written to the output file. PostScript produced with `clean7bit' can be transmitted over 7-bit transmission channels that use ASCII control characters for line control. `clean8bit' is similar but allows characters above 127 to be written to the output file. `binary' allows any character in the output file. Default: `clean7bit'. `line-ends=LINE-END-TYPE' One of `cr', `lf', or `crlf'. This controls what is used for new-line in the output file. Default: `cr'. `optimize-line-size=LEVEL' Either `0' or `1'. If LEVEL is `1', then short line segments will be collected and merged into longer ones. This reduces output file size but requires more time and memory. A LEVEL of `0' has the advantage of being better for interactive environments. `1' is the default unless the `screen' flag is set; in that case, the default is `0'. `optimize-text-size=LEVEL' One of `0', `1', or `2', each higher level representing correspondingly more aggressive space savings for text in the output file and requiring correspondingly more time and memory. Unfortunately the levels presently are all the same. `1' is the default unless the `screen' flag is set; in that case, the default is `0'.  File: pspp.info, Node: PS page options, Next: PS file options, Prev: PS output options, Up: PostScript driver class B.6.2 PostScript page options ----------------------------- These options affect page setup: `headers=BOOLEAN' Controls whether the standard headers showing the time and date and title and subtitle are printed at the top of each page. Default: `on'. `paper-size=PAPER-SIZE' Paper size, either as a symbolic name (i.e., `letter' or `a4') or specific measurements (i.e., `8-1/2x11' or `"210 x 297"'. *Note Paper sizes: papersize. Default: `letter'. `orientation=ORIENTATION' Either `portrait' or `landscape'. Default: `portrait'. `left-margin=DIMENSION' `right-margin=DIMENSION' `top-margin=DIMENSION' `bottom-margin=DIMENSION' Sets the margins around the page. The headers, if enabled, are not included in the margins; they are in addition to the margins. For a description of dimensions, see *Note Dimensions::. Default: `0.5in'.  File: pspp.info, Node: PS file options, Next: PS font options, Prev: PS page options, Up: PostScript driver class B.6.3 PostScript file options ----------------------------- Oh, my. You don't really want to know about the way that the PostScript driver deals with files, do you? Well I suppose you're entitled, but I warn you right now: it's not pretty. Here goes.... First let's look at the options that are available: `font-dir=FONT-DIRECTORY' Sets the font directory. Default: `devps'. `prologue-file=PROLOGUE-FILE-NAME' Sets the name of the PostScript prologue file. You can write your own prologue, though I have no idea why you'd want to: see *Note Prologue::. Default: `ps-prologue'. `device-file=DEVICE-FILE-NAME' Sets the name of the Groff-format device description file. The PostScript driver reads this to know about the scaling of fonts and so on. The format of such files is described in the groff_font man page, included with Groff. Default: `DESC'. `encoding-file=ENCODING-FILE-NAME' Sets the name of the encoding file. This file contains a list of all font encodings that will be needed so that the driver can put all of them at the top of the prologue. *Note Encodings::. Default: `ps-encodings'. If the specified encoding file cannot be found, this error will be silently ignored, since most people do not need any encodings besides the ones that can be found using `auto-encodings', described below. `auto-encode=BOOLEAN' When enabled, the font encodings needed by the default proportional- and fixed-pitch fonts will automatically be dumped to the PostScript output. Otherwise, it is assumed that the user has an encoding file and knows how to use it (*note Encodings::). There is probably no good reason to turn off this convenient feature. Default: `on'. Next I suppose it's time to describe the search algorithm. When the PostScript driver needs a file, whether that file be a font, a PostScript prologue, or what you will, it searches in this manner: 1. Constructs a path by taking the first of the following that is defined: a. Environment variable `STAT_GROFF_FONT_PATH'. *Note Environment variables::. b. Environment variable `GROFF_FONT_PATH'. c. The compiled-in fallback default. 2. Constructs a base name from concatenating, in order, the font directory, a path separator (`/' or `\'), and the file to be found. A typical base name would be something like `devps/ps-encodings'. 3. Searches for the base name in the path constructed above. If the file is found, the algorithm terminates. 4. Searches for the base name in the standard configuration path. See *Note File locations::, for more details. If the file is found, the algorithm terminates. 5. At this point we remove the font directory and path separator from the base name. Now the base name is simply the file to be found, i.e., `ps-encodings'. 6. Searches for the base name in the path constructed in the first step. If the file is found, the algorithm terminates. 7. Searches for the base name in the standard configuration path. If the file is found, the algorithm terminates. 8. The algorithm terminates unsuccessfully. So, as you see, there are several ways to configure the PostScript drivers. Careful selection of techniques can make the configuration very flexible indeed.  File: pspp.info, Node: PS font options, Next: PS line options, Prev: PS file options, Up: PostScript driver class B.6.4 PostScript font options ----------------------------- The list of available font options is short and sweet: `prop-font=FONT-NAME' Sets the default proportional font. The name should be that of a PostScript font. Default: `"Helvetica"'. `fixed-font=FONT-NAME' Sets the default fixed-pitch font. The name should be that of a PostScript font. Default: `"Courier"'. `font-size=FONT-SIZE' Sets the size of the default fonts, in thousandths of a point. Default: `10000'.  File: pspp.info, Node: PS line options, Next: Prologue, Prev: PS font options, Up: PostScript driver class B.6.5 PostScript line options ----------------------------- Most tables contain lines, or rules, between cells. Some features of the way that lines are drawn in PostScript tables are user-definable: `line-style=STYLE' Sets the style used for lines used to divide tables into sections. STYLE must be either `thick', in which case thick lines are used, or DOUBLE, in which case double lines are used. Default: `thick'. `line-gutter=DIMENSION' Sets the line gutter, which is the amount of white space on either side of lines that border text or graphics objects. *Note Dimensions::. Default: `0.5pt'. `line-spacing=DIMENSION' Sets the line spacing, which is the amount of white space that separates lines that are side by side, as in a double line. Default: `0.5pt'. `line-width=DIMENSION' Sets the width of a typical line used in tables. Default: `0.5pt'. `line-width-thick=DIMENSION' Sets the width of a thick line used in tables. Not used if `line-style' is set to `thick'. Default: `1.5pt'.  File: pspp.info, Node: Prologue, Next: Encodings, Prev: PS line options, Up: PostScript driver class B.6.6 The PostScript prologue ----------------------------- Most PostScript files that are generated mechanically by programs consist of two parts: a prologue and a body. The prologue is generally a collection of boilerplate. Only the body differs greatly between two outputs from the same program. This is also the strategy used in the PSPP PostScript driver. In general, the prologue supplied with PSPP will be more than sufficient. In this case, you will not need to read the rest of this section. However, hackers might want to know more. Read on, if you fall into this category. The prologue is dumped into the output stream essentially unmodified. However, two actions are performed on its lines. First, certain lines may be omitted as specified in the prologue file itself. Second, variables are substituted. The following lines are omitted: 1. All lines that contain three bangs in a row (`!!!'). 2. Lines that contain `!eps', if the PostScript driver is producing ordinary PostScript output. Otherwise an EPS file is being produced, and the line is included in the output, although everything following `!eps' is deleted. 3. Lines that contain `!ps', if the PostScript driver is producing EPS output. Otherwise, ordinary PostScript is being produced, and the line is included in the output, although everything following `!ps' is deleted. The following are the variables that are substituted. Only the variables listed are substituted; environment variables are not. *Note Environment substitutions::. `bounding-box' The page bounding box, in points, as four space-separated numbers. For U.S. letter size paper, this is `0 0 612 792'. `creator' PSPP version as a string: `GNU PSPP 0.1b', for example. `date' Date the file was created. Example: `Tue May 21 13:46:22 1991'. `data' Value of the `data' PostScript driver option, as one of the strings `Clean7Bit', `Clean8Bit', or `Binary'. `orientation' Page orientation, as one of the strings `Portrait' or `Landscape'. `user' Under multiuser OSes, the user's login name, taken either from the environment variable `LOGNAME' or, if that fails, the result of the C library function `getlogin()'. Defaults to `nobody'. `host' System hostname as reported by `gethostname()'. Defaults to `nowhere'. `prop-font' Name of the default proportional font, prefixed by the word `font' and a space. Example: `font Times-Roman'. `fixed-font' Name of the default fixed-pitch font, prefixed by the word `font' and a space. `scale-factor' The page scaling factor as a floating-point number. Example: `1.0'. Note that this is also passed as an argument to the BP macro. `paper-length' `paper-width' The paper length and paper width, respectively, in thousandths of a point. Note that these are also passed as arguments to the BP macro. `left-margin' `top-margin' The left margin and top margin, respectively, in thousandths of a point. Note that these are also passed as arguments to the BP macro. `title' Document title as a string. This is not the title specified in the PSPP syntax file. A typical title is the word `PSPP' followed by the syntax file name in parentheses. Example: `PSPP ()'. `source-file' PSPP syntax file name. Example: `mary96/first.stat'. Any other questions about the PostScript prologue can best be answered by examining the default prologue or the PSPP source.  File: pspp.info, Node: Encodings, Prev: Prologue, Up: PostScript driver class B.6.7 PostScript encodings -------------------------- PostScript fonts often contain many more than 256 characters, in order to accommodate foreign language characters and special symbols. PostScript uses "encodings" to map these onto single-byte symbol sets. Each font can have many different encodings applied to it. PSPP's PostScript driver needs to know which encoding to apply to each font. It can determine this from the information encapsulated in the Groff font description that it reads. However, there is an additional problem--for efficiency, the PostScript driver needs to have a complete list of all encodings that will be used in the entire session _when it opens the output file_. For this reason, it can't use the information built into the fonts because it doesn't know which fonts will be used. As a stopgap solution, there are two mechanisms for specifying which encodings will be used. The first mechanism is automatic and it is the only one that most PSPP users will ever need. The second mechanism is manual, but it is more flexible. Either mechanism or both may be used at one time. The first mechanism is activated by the `auto-encode' driver option (*note PS file options::). When enabled, `auto-encode' causes the PostScript driver to include the encodings used by the default proportional and fixed-pitch fonts (*note PS font options::). Many PSPP output files will only need these encodings. The second mechanism is the file specified by the `encoding-file' option (*note PS file options::). If it exists, this file must consist of lines in PSPP configuration-file format (*note Configuration files::). Each line that is not a comment should name a PostScript encoding to include in the output. It is not an error if an encoding is included more than once, by either mechanism. It will appear only once in the output. It is also not an error if an encoding is included in the output but never used. It _is_ an error if an encoding is used but not included by one of these mechanisms. In this case, the built-in PostScript encoding `ISOLatin1Encoding' is substituted.  File: pspp.info, Node: ASCII driver class, Next: HTML driver class, Prev: PostScript driver class, Up: Configuration B.7 The ASCII driver class ========================== The ASCII driver class produces output that can be displayed on a terminal or output to printers. All of its options are highly configurable. The ASCII driver has class name `ascii'. The ASCII driver is described in further detail below. * Menu: * ASCII output options:: Output file options. * ASCII page options:: Page size, margins, more. * ASCII font options:: Box character, bold & italics.  File: pspp.info, Node: ASCII output options, Next: ASCII page options, Prev: ASCII driver class, Up: ASCII driver class B.7.1 ASCII output options -------------------------- `output-file=FILENAME' File to which output should be sent. This can be an ordinary filename (e.g., `"pspp.txt"'), a pipe filename (e.g., `"|lpr"'), or stdout (`"-"'). Default: `"pspp.list"'. `char-set=CHAR-SET-TYPE' One of `ascii' or `latin1'. This has no effect on output at the present time. Default: `ascii'. `form-feed-string=FORM-FEED-VALUE' The string written to the output to cause a formfeed. See also `paginate', described below, for a related setting. Default: `"\f"'. `newline-string=NEW-LINE-VALUE' The string written to the output to cause a new-line (carriage return plus linefeed). The default, which can be specified explicitly with `newline-string=default', is to use the system-dependent new-line sequence by opening the output file in text mode. This is usually the right choice. However, `newline-string' can be set to any string. When this is done, the output file is opened in binary mode. `paginate=BOOLEAN' If set, a formfeed (as set in `form-feed-string', described above) will be written to the device after every page. Default: `on'. `tab-width=TAB-WIDTH-VALUE' The distance between tab stops for this device. If set to 0, tabs will not be used in the output. Default: `8'. `init=INITIALIZATION-STRING.' String written to the device before anything else, at the beginning of the output. Default: `""' (the empty string). `done=FINALIZATION-STRING.' String written to the device after everything else, at the end of the output. Default: `""' (the empty string).  File: pspp.info, Node: ASCII page options, Next: ASCII font options, Prev: ASCII output options, Up: ASCII driver class B.7.2 ASCII page options ------------------------ These options affect page setup: `headers=BOOLEAN' If enabled, two lines of header information giving title and subtitle, page number, date and time, and PSPP version are printed at the top of every page. These two lines are in addition to any top margin requested. Default: `on'. `length=LINE-COUNT' Physical length of a page, in lines. Headers and margins are subtracted from this value. Default: `66'. `width=CHARACTER-COUNT' Physical width of a page, in characters. Margins are subtracted from this value. Default: `130'. `lpi=LINES-PER-INCH' Number of lines per vertical inch. Not currently used. Default: `6'. `cpi=CHARACTERS-PER-INCH' Number of characters per horizontal inch. Not currently used. Default: `10'. `left-margin=LEFT-MARGIN-WIDTH' Width of the left margin, in characters. PSPP subtracts this value from the page width. Default: `0'. `right-margin=RIGHT-MARGIN-WIDTH' Width of the right margin, in characters. PSPP subtracts this value from the page width. Default: `0'. `top-margin=TOP-MARGIN-LINES' Length of the top margin, in lines. PSPP subtracts this value from the page length. Default: `2'. `bottom-margin=BOTTOM-MARGIN-LINES' Length of the bottom margin, in lines. PSPP subtracts this value from the page length. Default: `2'.  File: pspp.info, Node: ASCII font options, Prev: ASCII page options, Up: ASCII driver class B.7.3 ASCII font options ------------------------ These are the ASCII font options: `box[LINE-TYPE]=BOX-CHARS' The characters used for lines in tables produced by the ASCII driver can be changed using this option. LINE-TYPE is used to indicate which type of line to change; BOX-CHARS is the character or string of characters to use for this type of line. LINE-TYPE must be a 4-digit number in base 4. The digits are in the order `right', `bottom', `left', `top'. The four possibilities for each digit are: 0 No line. 1 Single line. 2 Double line. 3 Special device-defined line, if one is available; otherwise, a double line. Examples: `box[0101]="|"' Sets `|' as the character to use for a single-width line with bottom and top components. `box[2222]="#"' Sets `#' as the character to use for the intersection of four double-width lines, one each from the top, bottom, left and right. `box[1100]="\xda"' Sets `"\xda"', which under MS-DOS is a box character suitable for the top-left corner of a box, as the character for the intersection of two single-width lines, one each from the right and bottom. Defaults: * `box[0000]=" "' * `box[1000]="-"' `box[0010]="-"' `box[1010]="-"' * `box[0100]="|"' `box[0001]="|"' `box[0101]="|"' * `box[2000]="="' `box[0020]="="' `box[2020]="="' * `box[0200]="#"' `box[0002]="#"' `box[0202]="#"' * `box[3000]="="' `box[0030]="="' `box[3030]="="' * `box[0300]="#"' `box[0003]="#"' `box[0303]="#"' * For all others, `+' is used unless there are double lines or special lines, in which case `#' is used. `italic-on=ITALIC-ON-STRING' Character sequence written to turn on italics or underline printing. If this is set to `overstrike', then the driver will simulate underlining by overstriking with underscore characters (`_') in the manner described by `overstrike-style' and `carriage-return-style'. Default: `overstrike'. `italic-off=ITALIC-OFF-STRING' Character sequence to turn off italics or underline printing. Default: `""' (the empty string). `bold-on=BOLD-ON-STRING' Character sequence written to turn on bold or emphasized printing. If set to `overstrike', then the driver will simulated bold printing by overstriking characters in the manner described by `overstrike-style' and `carriage-return-style'. Default: `overstrike'. `bold-off=BOLD-OFF-STRING' Character sequence to turn off bold or emphasized printing. Default: `""' (the empty string). `bold-italic-on=BOLD-ITALIC-ON-STRING' Character sequence written to turn on bold-italic printing. If set to `overstrike', then the driver will simulate bold-italics by overstriking twice, once with the character, a second time with an underscore (`_') character, in the manner described by `overstrike-style' and `carriage-return-style'. Default: `overstrike'. `bold-italic-off=BOLD-ITALIC-OFF-STRING' Character sequence to turn off bold-italic printing. Default: `""' (the empty string). `overstrike-style=OVERSTRIKE-OPTION' Either `single' or `line': * If `single' is selected, then, to overstrike a line of text, the output driver will output a character, backspace, overstrike, output a character, backspace, overstrike, and so on along a line. * If `line' is selected then the output driver will output an entire line, then backspace or emit a carriage return (as indicated by `carriage-return-style'), then overstrike the entire line at once. `single' is recommended for use with ttys and programs that understand overstriking in text files, such as the pager `less'. `single' will also work with printer devices but results in rapid back-and-forth motions of the printhead that can cause the printer to physically overheat! `line' is recommended for use with printer devices. Most programs that understand overstriking in text files will not properly deal with `line' mode. Default: `single'. `carriage-return-style=CARRIAGE-RETURN-TYPE' Either `bs' or `cr'. This option applies only when one or more of the font commands is set to `overstrike' and, at the same time, `overstrike-style' is set to `line'. * If `bs' is selected then the driver will return to the beginning of a line by emitting a sequence of backspace characters (ASCII 8). * If `cr' is selected then the driver will return to the beginning of a line by emitting a single carriage-return character (ASCII 13). Although `cr' is preferred as being more compact, `bs' is more general since some devices do not interpret carriage returns in the desired manner. Default: `bs'.  File: pspp.info, Node: HTML driver class, Next: Miscellaneous configuring, Prev: ASCII driver class, Up: Configuration B.8 The HTML driver class ========================= The `html' driver class is used to produce output for viewing in tables-capable web browsers such as Emacs' w3-mode. Its configuration is very simple. Currently, the output has a very plain format. In the future, further work may be done on improving the output appearance. There are few options for use with the `html' driver class: `output-file=FILENAME' File to which output should be sent. This can be an ordinary filename (i.e., `"pspp.ps"'), a pipe filename (i.e., `"|lpr"'), or stdout (`"-"'). Default: `"pspp.html"'. `prologue-file=PROLOGUE-FILE-NAME' Sets the name of the PostScript prologue file. You can write your own prologue if you want to customize colors or other settings: see *Note HTML Prologue::. Default: `html-prologue'. * Menu: * HTML Prologue:: Format of the HTML prologue file.  File: pspp.info, Node: HTML Prologue, Prev: HTML driver class, Up: HTML driver class B.8.1 The HTML prologue ----------------------- HTML files that are generated by PSPP consist of two parts: a prologue and a body. The prologue is a collection of boilerplate. Only the body differs greatly between two outputs. You can tune the colors and other attributes of the output by editing the prologue. The prologue is dumped into the output stream essentially unmodified. However, two actions are performed on its lines. First, certain lines may be omitted as specified in the prologue file itself. Second, variables are substituted. The following lines are omitted: 1. All lines that contain three bangs in a row (`!!!'). 2. Lines that contain `!title', if no title is set for the output. If a title is set, then the characters `!title' are removed before the line is output. 3. Lines that contain `!subtitle', if no subtitle is set for the output. If a subtitle is set, then the characters `!subtitle' are removed before the line is output. The following are the variables that are substituted. Only the variables listed are substituted; environment variables are not. *Note Environment substitutions::. `generator' PSPP version as a string: `GNU PSPP 0.1b', for example. `date' Date the file was created. Example: `Tue May 21 13:46:22 1991'. `user' Under multiuser OSes, the user's login name, taken either from the environment variable `LOGNAME' or, if that fails, the result of the C library function `getlogin()'. Defaults to `nobody'. `host' System hostname as reported by `gethostname()'. Defaults to `nowhere'. `title' Document title as a string. This is the title specified in the PSPP syntax file. `subtitle' Document subtitle as a string. `source-file' PSPP syntax file name. Example: `mary96/first.stat'.  File: pspp.info, Node: Miscellaneous configuring, Next: Improving output quality, Prev: HTML driver class, Up: Configuration B.9 Miscellaneous configuration =============================== The following environment variables can be used to further configure PSPP: `HOME' Used to determine the user's home directory. No default value. `STAT_INCLUDE_PATH' Path used to find include files in PSPP syntax files. Defaults vary across operating systems: UNIX * `.' * `~/.pspp/include' * `/usr/local/lib/pspp/include' * `/usr/lib/pspp/include' * `/usr/local/share/pspp/include' * `/usr/share/pspp/include' MS-DOS * `.' * `C:\PSPP\INCLUDE' * `$PATH' Other OSes No default path. `STAT_PAGER' `PAGER' When PSPP invokes an external pager, it uses the first of these that is defined. There is a default pager only if the person who compiled PSPP defined one. `TERM' The terminal type `termcap' or `ncurses' will use, if such support was compiled into PSPP. `STAT_OUTPUT_INIT_FILE' The basename used to search for the driver definition file. *Note Output devices::. *Note File locations::. Default: `devices'. `STAT_OUTPUT_PAPERSIZE_FILE' The basename used to search for the papersize file. *Note papersize::. *Note File locations::. Default: `papersize'. `STAT_OUTPUT_INIT_PATH' The path used to search for the driver definition file and the papersize file. *Note File locations::. Default: the standard configuration path. `TMPDIR' The directory in which PSPP stores its temporary files (used when sorting cases or concatenating large numbers of cases). Default: (UNIX) `/tmp', (MS-DOS) `\', (other OSes) empty string. `TEMP' `TMP' Under MS-DOS only, these variables are consulted after TMPDIR, in this order.  File: pspp.info, Node: Improving output quality, Prev: Miscellaneous configuring, Up: Configuration B.10 Improving output quality ============================= When its drivers are set up properly, PSPP can produce output that looks very good indeed. The PostScript driver, suitably configured, can produce presentation-quality output. Here are a few guidelines for producing better-looking output, regardless of output driver. Your mileage may vary, of course, and everyone has different esthetic preferences. * Width is important in PSPP output. Greater output width leads to more readable output, to a point. Try the following to increase the output width: - If you're using the ASCII driver with a dot-matrix printer, figure out what you need to do to put the printer into compressed mode. Put that string into the `init-string' setting. Try to get 132 columns; 160 might be better, but you might find that print that tiny is difficult to read. - With the PostScript driver, try these ideas: + Landscape mode. + Legal-size (8.5" x 14") paper in landscape mode. + Reducing font sizes. If you're using 12-point fonts, try 10 point; if you're using 10-point fonts, try 8 point. Some fonts are more readable than others at small sizes. Try to strike a balance between character size and page width. * Use high-quality fonts. Many public domain fonts are poor in quality. Recently, URW made some high-quality fonts available under the GPL. These are probably suitable. * Be sure you're using the proper font metrics. The font metrics provided with PSPP may not correspond to the fonts actually being printed. This can cause bizarre-looking output. * Make sure that you're using good ink/ribbon/toner. Darker print is easier to read. * Use plain fonts with serifs, such as Times-Roman or Palatino. Avoid choosing italic or bold fonts as document base fonts.  File: pspp.info, Node: Portable File Format, Next: Data File Format, Prev: Configuration, Up: Top Appendix C Portable File Format ******************************* These days, most computers use the same internal data formats for integer and floating-point data, if one ignores little differences like big- versus little-endian byte ordering. However, occasionally it is necessary to exchange data between systems with incompatible data formats. This is what portable files are designed to do. *Please note:* Although all of the following information is correct, as far as the author has been able to ascertain, it is gleaned from examination of ASCII-formatted portable files only, so some of it may be incorrect in the general case. * Menu: * Portable File Characters:: * Portable File Structure:: * Portable File Header:: * Version and Date Info Record:: * Identification Records:: * Variable Count Record:: * Case Weight Variable Record:: * Variable Records:: * Value Label Records:: * Portable File Data::  File: pspp.info, Node: Portable File Characters, Next: Portable File Structure, Prev: Portable File Format, Up: Portable File Format C.1 Portable File Characters ============================ Portable files are arranged as a series of lines of exactly 80 characters each. Each line is terminated by a carriage-return, line-feed sequence "new-lines"). New-lines are only used to avoid line length limits imposed by some OSes; they are not meaningful. The file must be terminated with a `Z' character. In addition, if the final line in the file does not have exactly 80 characters, then it is padded on the right with `Z' characters. (The file contents may be in any character set; the file contains a description of its own character set, as explained in the next section. Therefore, the `Z' character is not necessarily an ASCII `Z'.) For the rest of the description of the portable file format, new-lines and the trailing `Z's will be ignored, as if they did not exist, because they are not an important part of understanding the file contents.  File: pspp.info, Node: Portable File Structure, Next: Portable File Header, Prev: Portable File Characters, Up: Portable File Format C.2 Portable File Structure =========================== Every portable file consists of the following records, in sequence: * File header. * Version and date info. * Product identification. * Author identification (optional). * Subproduct identification (optional). * Variable count. * Case weight variable (optional). * Variables. Each variable record may optionally be followed by a missing value record and a variable label record. * Value labels (optional). * Data. Most records are identified by a single-character tag code. The file header and version info record do not have a tag. Other than these single-character codes, there are three types of fields in a portable file: floating-point, integer, and string. Floating-point fields have the following format: * Zero or more leading spaces. * Optional asterisk (`*'), which indicates a missing value. The asterisk must be followed by a single character, generally a period (`.'), but it appears that other characters may also be possible. This completes the specification of a missing value. * Optional minus sign (`-') to indicate a negative number. * A whole number, consisting of one or more base-30 digits: `0' through `9' plus capital letters `A' through `T'. * Optional fraction, consisting of a radix point (`.') followed by one or more base-30 digits. * Optional exponent, consisting of a plus or minus sign (`+' or `-') followed by one or more base-30 digits. * A forward slash (`/'). Integer fields take a form identical to floating-point fields, but they may not contain a fraction. String fields take the form of a integer field having value N, followed by exactly N characters, which are the string content.  File: pspp.info, Node: Portable File Header, Next: Version and Date Info Record, Prev: Portable File Structure, Up: Portable File Format C.3 Portable File Header ======================== Every portable file begins with a 464-byte header, consisting of a 200-byte collection of vanity splash strings, followed by a 256-byte character set translation table, followed by an 8-byte tag string. The 200-byte segment is divided into five 40-byte sections, each of which represents the string `CHARSET SPSS PORT FILE' in a different character set encoding, where CHARSET is the name of the character set used in the file, e.g. `ASCII' or `EBCDIC'. Each string is padded on the right with spaces in its respective character set. It appears that these strings exist only to inform those who might view the file on a screen, and that they are not parsed by SPSS products. Thus, they can be safely ignored. For those interested, the strings are supposed to be in the following character sets, in the specified order: EBCDIC, 7-bit ASCII, CDC 6-bit ASCII, 6-bit ASCII, Honeywell 6-bit ASCII. The 256-byte segment describes a mapping from the character set used in the portable file to an arbitrary character set having characters at the following positions: 0-60 Control characters. Not important enough to describe in full here. 61-63 Reserved. 64-73 Digits `0' through `9'. 74-99 Capital letters `A' through `Z'. 100-125 Lowercase letters `a' through `z'. 126 Space. 127-130 Symbols `.<(+' 131 Solid vertical pipe. 132-142 Symbols `&[]!$*);^-/' 143 Broken vertical pipe. 144-150 Symbols `,%_>'?``:' 151 British pound symbol. 152-155 Symbols `@'="'. 156 Less than or equal symbol. 157 Empty box. 158 Plus or minus. 159 Filled box. 160 Degree symbol. 161 Dagger. 162 Symbol `~'. 163 En dash. 164 Lower left corner box draw. 165 Upper left corner box draw. 166 Greater than or equal symbol. 167-176 Superscript `0' through `9'. 177 Lower right corner box draw. 178 Upper right corner box draw. 179 Not equal symbol. 180 Em dash. 181 Superscript `('. 182 Superscript `)'. 183 Horizontal dagger (?). 184-186 Symbols `{}\'. 187 Cents symbol. 188 Centered dot, or bullet. 189-255 Reserved. Symbols that are not defined in a particular character set are set to the same value as symbol 64; i.e., to `0'. The 8-byte tag string consists of the exact characters `SPSSPORT' in the portable file's character set, which can be used to verify that the file is indeed a portable file.  File: pspp.info, Node: Version and Date Info Record, Next: Identification Records, Prev: Portable File Header, Up: Portable File Format C.4 Version and Date Info Record ================================ This record does not have a tag code. It has the following structure: * A single character identifying the file format version. The letter A represents version 0, and so on. * An 8-character string field giving the file creation date in the format YYYYMMDD. * A 6-character string field giving the file creation time in the format HHMMSS.  File: pspp.info, Node: Identification Records, Next: Variable Count Record, Prev: Version and Date Info Record, Up: Portable File Format C.5 Identification Records ========================== The product identification record has tag code `1'. It consists of a single string field giving the name of the product that wrote the portable file. The author identification record has tag code `2'. It is optional. If present, it consists of a single string field giving the name of the person who caused the portable file to be written. The subproduct identification record has tag code `3'. It is optional. If present, it consists of a single string field giving additional information on the product that wrote the portable file.  File: pspp.info, Node: Variable Count Record, Next: Case Weight Variable Record, Prev: Identification Records, Up: Portable File Format C.6 Variable Count Record ========================= The variable count record has tag code `4'. It consists of two integer fields. The first contains the number of variables in the file dictionary. The purpose of the second is unknown; it contains the value 161 in all portable files examined so far.  File: pspp.info, Node: Case Weight Variable Record, Next: Variable Records, Prev: Variable Count Record, Up: Portable File Format C.7 Case Weight Variable Record =============================== The case weight variable record is optional. If it is present, it indicates the variable used for weighting cases; if it is absent, cases are unweighted. It has tag code `6'. It consists of a single string field that names the weighting variable.  File: pspp.info, Node: Variable Records, Next: Value Label Records, Prev: Case Weight Variable Record, Up: Portable File Format C.8 Variable Records ==================== Each variable record represents a single variable. Variable records have tag code `7'. They have the following structure: * Width (integer). This is 0 for a numeric variable, and a number between 1 and 255 for a string variable. * Name (string). 1-8 characters long. Must be in all capitals. * Print format. This is a set of three integer fields: - Format type (*note Variable Record::). - Format width. 1-40. - Number of decimal places. 1-40. * Write format. Same structure as the print format described above. Each variable record can optionally be followed by a missing value record, which has tag code `8'. A missing value record has one field, the missing value itself (a floating-point or string, as appropriate). Up to three of these missing value records can be used. There is also a record for missing value ranges, which has tag code `B'. It is followed by two fields representing the range, which are floating-point or string as appropriate. If a missing value range is present, it may be followed by a single missing value record. Tag codes `9' and `A' represent `LO THRU X' and `X THRU HI' ranges, respectively. Each is followed by a single field representing X. If one of the ranges is present, it may be followed by a single missing value record. In addition, each variable record can optionally be followed by a variable label record, which has tag code `C'. A variable label record has one field, the variable label itself (string).  File: pspp.info, Node: Value Label Records, Next: Portable File Data, Prev: Variable Records, Up: Portable File Format C.9 Value Label Records ======================= Value label records have tag code `D'. They have the following format: * Variable count (integer). * List of variables (strings). The variable count specifies the number in the list. Variables are specified by their names. All variables must be of the same type (numeric or string). * Label count (integer). * List of (value, label) tuples. The label count specifies the number of tuples. Each tuple consists of a value, which is numeric or string as appropriate to the variables, followed by a label (string).  File: pspp.info, Node: Portable File Data, Prev: Value Label Records, Up: Portable File Format C.10 Portable File Data ======================= The data record has tag code `F'. There is only one tag for all the data; thus, all the data must follow the dictionary. The data is terminated by the end-of-file marker `Z', which is not valid as the beginning of a data element. Data elements are output in the same order as the variable records describing them. String variables are output as string fields, and numeric variables are output as floating-point fields.  File: pspp.info, Node: Data File Format, Next: q2c Input Format, Prev: Portable File Format, Up: Top Appendix D Data File Format *************************** PSPP necessarily uses the same format for system files as do the products with which it is compatible. This chapter is a description of that format. There are three data types used in system files: 32-bit integers, 64-bit floating points, and 1-byte characters. In this document these will simply be referred to as `int32', `flt64', and `char', the names that are used in the PSPP source code. Every field of type `int32' or `flt64' is aligned on a 32-bit boundary. The endianness of data in PSPP system files is not specified. System files output on a computer of a particular endianness will have the endianness of that computer. However, PSPP can read files of either endianness, regardless of its host computer's endianness. PSPP translates endianness for both integer and floating point numbers. Floating point formats are also not specified. PSPP does not translate between floating point formats. This is unlikely to be a problem as all modern computer architectures use IEEE 754 format for floating point representation. The PSPP system-missing value is represented by the largest possible negative number in the floating point format; in C, this is most likely `-DBL_MAX'. There are two other important values used in missing values: `HIGHEST' and `LOWEST'. These are represented by the largest possible positive number (probably `DBL_MAX') and the second-largest negative number. The latter must be determined in a system-dependent manner; in IEEE 754 format it is represented by value `0xffeffffffffffffe'. System files are divided into records. Each record begins with an `int32' giving a numeric record type. Individual record types are described below: * Menu: * File Header Record:: * Variable Record:: * Value Label Record:: * Value Label Variable Record:: * Document Record:: * Machine int32 Info Record:: * Machine flt64 Info Record:: * Auxilliary Variable Parameter Record:: * Long Variable Names Record:: * Miscellaneous Informational Records:: * Dictionary Termination Record:: * Data Record::  File: pspp.info, Node: File Header Record, Next: Variable Record, Prev: Data File Format, Up: Data File Format D.1 File Header Record ====================== The file header is always the first record in the file. struct sysfile_header { char rec_type[4]; char prod_name[60]; int32 layout_code; int32 case_size; int32 compressed; int32 weight_index; int32 ncases; flt64 bias; char creation_date[9]; char creation_time[8]; char file_label[64]; char padding[3]; }; `char rec_type[4];' Record type code. Always set to `$FL2'. This is the only record for which the record type is not of type `int32'. `char prod_name[60];' Product identification string. This always begins with the characters `@(#) SPSS DATA FILE'. PSPP uses the remaining characters to give its version and the operating system name; for example, `GNU pspp 0.1.4 - sparc-sun-solaris2.5.2'. The string is truncated if it would be longer than 60 characters; otherwise it is padded on the right with spaces. `int32 layout_code;' Always set to 2. PSPP reads this value to determine the file's endianness. `int32 case_size;' Number of data elements per case. This is the number of variables, except that long string variables add extra data elements (one for every 8 characters after the first 8). When reading system files, PSPP will use this value unless it is set to -1, in which case it will determine the number of data elements by context. When writing system files PSPP always uses this value. `int32 compressed;' Set to 1 if the data in the file is compressed, 0 otherwise. `int32 weight_index;' If one of the variables in the data set is used as a weighting variable, set to the index of that variable. Otherwise, set to 0. `int32 ncases;' Set to the number of cases in the file if it is known, or -1 otherwise. In the general case it is not possible to determine the number of cases that will be output to a system file at the time that the header is written. The way that this is dealt with is by writing the entire system file, including the header, then seeking back to the beginning of the file and writing just the `ncases' field. For `files' in which this is not valid, the seek operation fails. In this case, `ncases' remains -1. `flt64 bias;' Compression bias. Always set to 100. The significance of this value is that only numbers between `(1 - bias)' and `(251 - bias)' can be compressed. `char creation_date[9];' Set to the date of creation of the system file, in `dd mmm yy' format, with the month as standard English abbreviations, using an initial capital letter and following with lowercase. If the date is not available then this field is arbitrarily set to `01 Jan 70'. `char creation_time[8];' Set to the time of creation of the system file, in `hh:mm:ss' format and using 24-hour time. If the time is not available then this field is arbitrarily set to `00:00:00'. `char file_label[64];' Set the the file label declared by the user, if any. Padded on the right with spaces. `char padding[3];' Ignored padding bytes to make the structure a multiple of 32 bits in length. Set to zeros.  File: pspp.info, Node: Variable Record, Next: Value Label Record, Prev: File Header Record, Up: Data File Format D.2 Variable Record =================== Immediately following the header must come the variable records. There must be one variable record for every variable and every 8 characters in a long string beyond the first 8; i.e., there must be exactly as many variable records as the value specified for `case_size' in the file header record. struct sysfile_variable { int32 rec_type; int32 type; int32 has_var_label; int32 n_missing_values; int32 print; int32 write; char name[8]; /* The following two fields are present only if has_var_label is 1. */ int32 label_len; char label[/* variable length */]; /* The following field is present only if n_missing_values is not 0. */ flt64 missing_values[/* variable length*/]; }; `int32 rec_type;' Record type code. Always set to 2. `int32 type;' Variable type code. Set to 0 for a numeric variable. For a short string variable or the first part of a long string variable, this is set to the width of the string. For the second and subsequent parts of a long string variable, set to -1, and the remaining fields in the structure are ignored. `int32 has_var_label;' If this variable has a variable label, set to 1; otherwise, set to 0. `int32 n_missing_values;' If the variable has no missing values, set to 0. If the variable has one, two, or three discrete missing values, set to 1, 2, or 3, respectively. If the variable has a range for missing variables, set to -2; if the variable has a range for missing variables plus a single discrete value, set to -3. `int32 print;' Print format for this variable. See below. `int32 write;' Write format for this variable. See below. `char name[8];' Variable name. The variable name must begin with a capital letter or the at-sign (`@'). Subsequent characters may also be octothorpes (`#'), dollar signs (`$'), underscores (`_'), or full stops (`.'). The variable name is padded on the right with spaces. `int32 label_len;' This field is present only if `has_var_label' is set to 1. It is set to the length, in characters, of the variable label, which must be a number between 0 and 120. `char label[/* variable length */];' This field is present only if `has_var_label' is set to 1. It has length `label_len', rounded up to the nearest multiple of 32 bits. The first `label_len' characters are the variable's variable label. `flt64 missing_values[/* variable length */];' This field is present only if `n_missing_values' is not 0. It has the same number of elements as the absolute value of `n_missing_values'. For discrete missing values, each element represents one missing value. When a range is present, the first element denotes the minimum value in the range, and the second element denotes the maximum value in the range. When a range plus a value are present, the third element denotes the additional discrete missing value. HIGHEST and LOWEST are indicated as described in the chapter introduction. The `print' and `write' members of sysfile_variable are output formats coded into `int32' types. The LSB (least-significant byte) of the `int32' represents the number of decimal places, and the next two bytes in order of increasing significance represent field width and format type, respectively. The MSB (most-significant byte) is not used and should be set to zero. Format types are defined as follows: 0 Not used. 1 `A' 2 `AHEX' 3 `COMMA' 4 `DOLLAR' 5 `F' 6 `IB' 7 `PIBHEX' 8 `P' 9 `PIB' 10 `PK' 11 `RB' 12 `RBHEX' 13 Not used. 14 Not used. 15 `Z' 16 `N' 17 `E' 18 Not used. 19 Not used. 20 `DATE' 21 `TIME' 22 `DATETIME' 23 `ADATE' 24 `JDATE' 25 `DTIME' 26 `WKDAY' 27 `MONTH' 28 `MOYR' 29 `QYR' 30 `WKYR' 31 `PCT' 32 `DOT' 33 `CCA' 34 `CCB' 35 `CCC' 36 `CCD' 37 `CCE' 38 `EDATE' 39 `SDATE'  File: pspp.info, Node: Value Label Record, Next: Value Label Variable Record, Prev: Variable Record, Up: Data File Format D.3 Value Label Record ====================== Value label records must follow the variable records and must precede the header termination record. Other than this, they may appear anywhere in the system file. Every value label record must be immediately followed by a label variable record, described below. Value label records begin with `rec_type', an `int32' value set to the record type of 3. This is followed by `count', an `int32' value set to the number of value labels present in this record. These two fields are followed by a series of `count' tuples. Each tuple is divided into two fields, the value and the label. The first of these, the value, is composed of a 64-bit value, which is either a `flt64' value or up to 8 characters (padded on the right to 8 bytes) denoting a short string value. Whether the value is a `flt64' or a character string is not defined inside the value label record. The second field in the tuple, the label, has variable length. The first `char' is a count of the number of characters in the value label. The remainder of the field is the label itself. The field is padded on the right to a multiple of 64 bits in length.  File: pspp.info, Node: Value Label Variable Record, Next: Document Record, Prev: Value Label Record, Up: Data File Format D.4 Value Label Variable Record =============================== Every value label variable record must be immediately preceded by a value label record, described above. struct sysfile_value_label_variable { int32 rec_type; int32 count; int32 vars[/* variable length */]; }; `int32 rec_type;' Record type. Always set to 4. `int32 count;' Number of variables that the associated value labels from the value label record are to be applied. `int32 vars[/* variable length];' A list of variables to which to apply the value labels. There are `count' elements.  File: pspp.info, Node: Document Record, Next: Machine int32 Info Record, Prev: Value Label Variable Record, Up: Data File Format D.5 Document Record =================== There must be no more than one document record per system file. Document records must follow the variable records and precede the dictionary termination record. struct sysfile_document { int32 rec_type; int32 n_lines; char lines[/* variable length */][80]; }; `int32 rec_type;' Record type. Always set to 6. `int32 n_lines;' Number of lines of documents present. `char lines[/* variable length */][80];' Document lines. The number of elements is defined by `n_lines'. Lines shorter than 80 characters are padded on the right with spaces.  File: pspp.info, Node: Machine int32 Info Record, Next: Machine flt64 Info Record, Prev: Document Record, Up: Data File Format D.6 Machine `int32' Info Record =============================== There must be no more than one machine `int32' info record per system file. Machine `int32' info records must follow the variable records and precede the dictionary termination record. struct sysfile_machine_int32_info { /* Header. */ int32 rec_type; int32 subtype; int32 size; int32 count; /* Data. */ int32 version_major; int32 version_minor; int32 version_revision; int32 machine_code; int32 floating_point_rep; int32 compression_code; int32 endianness; int32 character_code; }; `int32 rec_type;' Record type. Always set to 7. `int32 subtype;' Record subtype. Always set to 3. `int32 size;' Size of each piece of data in the data part, in bytes. Always set to 4. `int32 count;' Number of pieces of data in the data part. Always set to 8. `int32 version_major;' PSPP major version number. In version X.Y.Z, this is X. `int32 version_minor;' PSPP minor version number. In version X.Y.Z, this is Y. `int32 version_revision;' PSPP version revision number. In version X.Y.Z, this is Z. `int32 machine_code;' Machine code. PSPP always set this field to value to -1, but other values may appear. `int32 floating_point_rep;' Floating point representation code. For IEEE 754 systems this is 1. IBM 370 sets this to 2, and DEC VAX E to 3. `int32 compression_code;' Compression code. Always set to 1. `int32 endianness;' Machine endianness. 1 indicates big-endian, 2 indicates little-endian. `int32 character_code;' Character code. 1 indicates EBCDIC, 2 indicates 7-bit ASCII, 3 indicates 8-bit ASCII, 4 indicates DEC Kanji.  File: pspp.info, Node: Machine flt64 Info Record, Next: Auxilliary Variable Parameter Record, Prev: Machine int32 Info Record, Up: Data File Format D.7 Machine `flt64' Info Record =============================== There must be no more than one machine `flt64' info record per system file. Machine `flt64' info records must follow the variable records and precede the dictionary termination record. struct sysfile_machine_flt64_info { /* Header. */ int32 rec_type; int32 subtype; int32 size; int32 count; /* Data. */ flt64 sysmis; flt64 highest; flt64 lowest; }; `int32 rec_type;' Record type. Always set to 7. `int32 subtype;' Record subtype. Always set to 4. `int32 size;' Size of each piece of data in the data part, in bytes. Always set to 4. `int32 count;' Number of pieces of data in the data part. Always set to 3. `flt64 sysmis;' The system missing value. `flt64 highest;' The value used for HIGHEST in missing values. `flt64 lowest;' The value used for LOWEST in missing values.  File: pspp.info, Node: Auxilliary Variable Parameter Record, Next: Long Variable Names Record, Prev: Machine flt64 Info Record, Up: Data File Format D.8 Auxilliary Variable Parameter Record ======================================== There must be no more than one auxilliary variable parameter record per system file. This record must follow the variable records and precede the dictionary termination record. struct sysfile_aux_var_parameter { /* Header. */ int32 rec_type; int32 subtype; int32 size; int32 count; /* Data. */ struct aux_params aux_params[/* variable length */]; }; `int32 rec_type;' Record type. Always set to 7. `int32 subtype;' Record subtype. Always set to 11. `int32 size;' The size `int32'. Always set to 4. `int32 count;' The total number of bytes in `aux_params' divided by 3. `struct aux_params aux_params[];' An array of `struct aux_params'. The order of the elements corresponds to the order of the variables in the Variable Records. The `struct aux_params' type is defined as follows: struct aux_params { int32 measure; int32 width; int32 alignment; }; `int32 measure' The measurement type of the variable: 0 Nominal Scale 1 Ordinal Scale 2 Continuous Scale `int32 width' The width of the display column for the variable in characters. `int32 alignment' The alignment of the variable for display purposes: 0 Left aligned 1 Right aligned 2 Centre aligned  File: pspp.info, Node: Long Variable Names Record, Next: Miscellaneous Informational Records, Prev: Auxilliary Variable Parameter Record, Up: Data File Format D.9 Long Variable Names Record ============================== There must be no more than one long variable names record per system file. This record must follow the variable records and precede the dictionary termination record. struct sysfile_long_variable_names { /* Header. */ int32 rec_type; int32 subtype; int32 size; int32 count; /* Data. */ char var_name_pairs[/* variable length */]; }; `int32 rec_type;' Record type. Always set to 7. `int32 subtype;' Record subtype. Always set to 13. `int32 size;' The size of each element in the `var_name_pairs' member. Always set to 1. `int32 count;' The total number of bytes in `var_name_pairs'. `char var_name_pairs[/* variable length];' A list of KEY-VALUE tuples, where KEY is the name of a variable, and VALUE is its long variable name. The KEY field is at most 8 bytes long and must match the name of a variable which appears in the variable record *Note Variable Record::. The VALUE field is at most 64 bytes long. The KEY and VALUE fields are separated by a `=' byte. Each tuple is separated by a byte whose value is 09. There is no trailing separator following the last tuple. The total length is `count' bytes.  File: pspp.info, Node: Miscellaneous Informational Records, Next: Dictionary Termination Record, Prev: Long Variable Names Record, Up: Data File Format D.10 Miscellaneous Informational Records ======================================== Miscellaneous informational records must follow the variable records and precede the dictionary termination record. Miscellaneous informational records are ignored by PSPP when reading system files. They are not written by PSPP when writing system files. struct sysfile_misc_info { /* Header. */ int32 rec_type; int32 subtype; int32 size; int32 count; /* Data. */ char data[/* variable length */]; }; `int32 rec_type;' Record type. Always set to 7. `int32 subtype;' Record subtype. May take any value. According to Aapi Ha"ma"la"inen, value 5 indicates a set of grouped variables and 6 indicates date info (probably related to USE). `int32 size;' Size of each piece of data in the data part. Should have the value 4 or 8, for `int32' and `flt64', respectively. `int32 count;' Number of pieces of data in the data part. `char data[/* variable length */];' Arbitrary data. There must be `size' times `count' bytes of data.  File: pspp.info, Node: Dictionary Termination Record, Next: Data Record, Prev: Miscellaneous Informational Records, Up: Data File Format D.11 Dictionary Termination Record ================================== The dictionary termination record must follow all other records, except for the actual cases, which it must precede. There must be exactly one dictionary termination record in every system file. struct sysfile_dict_term { int32 rec_type; int32 filler; }; `int32 rec_type;' Record type. Always set to 999. `int32 filler;' Ignored padding. Should be set to 0.  File: pspp.info, Node: Data Record, Prev: Dictionary Termination Record, Up: Data File Format D.12 Data Record ================ Data records must follow all other records in the data file. There must be at least one data record in every system file. The format of data records varies depending on whether the data is compressed. Regardless, the data is arranged in a series of 8-byte elements. When data is not compressed, Every case is composed of `case_size' of these 8-byte elements, where `case_size' comes from the file header record (*note File Header Record::). Each element corresponds to the variable declared in the respective variable record (*note Variable Record::). Numeric values are given in `flt64' format; string values are literal characters string, padded on the right when necessary. Compressed data is arranged in the following manner: the first 8-byte element in the data section is divided into a series of 1-byte command codes. These codes have meanings as described below: 0 Ignored. If the program writing the system file accumulates compressed data in blocks of fixed length, 0 bytes can be used to pad out extra bytes remaining at the end of a fixed-size block. 1 through 251 These values indicate that the corresponding numeric variable has the value `(CODE - BIAS)' for the case being read, where CODE is the value of the compression code and BIAS is the variable `compression_bias' from the file header. For example, code 105 with bias 100.0 (the normal value) indicates a numeric variable of value 5. 252 End of file. This code may or may not appear at the end of the data stream. PSPP always outputs this code but its use is not required. 253 This value indicates that the numeric or string value is not compressible. The value is stored in the 8-byte element following the current block of command bytes. If this value appears twice in a block of command bytes, then it indicates the second element following the command bytes, and so on. 254 Used to indicate a string value that is all spaces. 255 Used to indicate the system-missing value. When the end of the first 8-byte element of command bytes is reached, any blocks of non-compressible values are skipped, and the next element of command bytes is read and interpreted, until the end of the file is reached.  File: pspp.info, Node: q2c Input Format, Next: GNU Free Documentation License, Prev: Data File Format, Up: Top Appendix E `q2c' Input Format ***************************** PSPP statistical procedures have a bizarre and somewhat irregular syntax. Despite this, a parser generator has been written that adequately addresses many of the possibilities and tries to provide hooks for the exceptional cases. This parser generator is named `q2c'. * Menu: * Invoking q2c:: q2c command-line syntax. * q2c Input Structure:: High-level layout of the input file. * Grammar Rules:: Syntax of the grammar rules.  File: pspp.info, Node: Invoking q2c, Next: q2c Input Structure, Prev: q2c Input Format, Up: q2c Input Format E.1 Invoking q2c ================ q2c INPUT.Q OUTPUT.C `q2c' translates a `.q' file into a `.c' file. It takes exactly two command-line arguments, which are the input file name and output file name, respectively. `q2c' does not accept any command-line options.  File: pspp.info, Node: q2c Input Structure, Next: Grammar Rules, Prev: Invoking q2c, Up: q2c Input Format E.2 `q2c' Input Structure ========================= `q2c' input files are divided into two sections: the grammar rules and the supporting code. The "grammar rules", which make up the first part of the input, are used to define the syntax of the statistical procedure to be parsed. The "supporting code", following the grammar rules, are copied largely unchanged to the output file, except for certain escapes. The most important lines in the grammar rules are used for defining procedure syntax. These lines can be prefixed with a dollar sign (`$'), which prevents Emacs' CC-mode from munging them. Besides this, a bang (`!') at the beginning of a line causes the line, minus the bang, to be written verbatim to the output file (useful for comments). As a third special case, any line that begins with the exact characters `/* *INDENT' is ignored and not written to the output. This allows `.q' files to be processed through `indent' without being munged. The syntax of the grammar rules themselves is given in the following sections. The supporting code is passed into the output file largely unchanged. However, the following escapes are supported. Each escape must appear on a line by itself. `/* (header) */' Expands to a series of C `#include' directives which include the headers that are required for the parser generated by `q2c'. `/* (decls SCOPE) */' Expands to C variable and data type declarations for the variables and `enum's input and output by the `q2c' parser. SCOPE must be either `local' or `global'. `local' causes the declarations to be output as function locals. `global' causes them to be declared as `static' module variables; thus, `global' is a bit of a misnomer. `/* (parser) */' Expands to the entire parser. Must be enclosed within a C function. `/* (free) */' Expands to a set of calls to the `free' function for variables declared by the parser. Only needs to be invoked if subcommands of type `string' are used in the grammar rules.  File: pspp.info, Node: Grammar Rules, Prev: q2c Input Structure, Up: q2c Input Format E.3 Grammar Rules ================= The grammar rules describe the format of the syntax that the parser generated by `q2c' will understand. The way that the grammar rules are included in `q2c' input file are described above. The grammar rules are divided into tokens of the following types: Identifier (`ID') An identifier token is a sequence of letters, digits, and underscores (`_'). Identifiers are _not_ case-sensitive. String (`STRING') String tokens are initiated by a double-quote character (`"') and consist of all the characters between that double quote and the next double quote, which must be on the same line as the first. Within a string, a backslash can be used as a "literal escape". The only reasons to use a literal escape are to include a double quote or a backslash within a string. Special character Other characters, other than white space, constitute tokens in themselves. The syntax of the grammar rules is as follows: grammar-rules ::= ID : subcommands . subcommands ::= subcommand ::= subcommands ; subcommand The syntax begins with an ID or STRING token that gives the name of the procedure to be parsed. The rest of the syntax consists of subcommands separated by semicolons (`;') and terminated with a full stop (`.'). subcommand ::= sbc-options ID sbc-defn sbc-options ::= ::= sbc-option ::= sbc-options sbc-options sbc-option ::= * ::= + ::= ^ sbc-defn ::= opt-prefix = specifiers ::= [ ID ] = array-sbc ::= opt-prefix = sbc-special-form opt-prefix ::= ::= ( ID ) Each subcommand can be prefixed with one or more option characters. An asterisk (`*') is used to indicate the default subcommand; the keyword used for the default subcommand can be omitted in the PSPP syntax file. A plus sign (`+') is used to indicate that a subcommand can appear more than once; if it is not present then that subcommand can appear no more than once. A carat sign (`^') is used to indicate that a subcommand must appear at least once. The subcommand name appears after the option characters. There are three forms of subcommands. The first and most common form simply gives an equals sign (`=') and a list of specifiers, which can each be set to a single setting. The second form declares an array, which is a set of flags that can be individually turned on by the user. There are also several special forms that do not take a list of specifiers. Arrays require an additional `ID' argument. This is used as a prefix, prepended to the variable names constructed from the specifiers. The other forms also allow an optional prefix to be specified. array-sbc ::= alternatives ::= array-sbc , alternatives alternatives ::= ID ::= alternatives | ID An array subcommand is a set of Boolean values that can independently be turned on by the user, listed separated by commas (`,'). If an value has more than one name then these names are separated by pipes (`|'). specifiers ::= specifier ::= specifiers , specifier specifier ::= opt-id : settings opt-id ::= ::= ID Ordinary subcommands (other than arrays and special forms) require a list of specifiers. Each specifier has an optional name and a list of settings. If the name is given then a correspondingly named variable will be used to store the user's choice of setting. If no name is given then there is no way to tell which setting the user picked; in this case the settings should probably have values attached. settings ::= setting ::= settings / setting setting ::= setting-options ID setting-value setting-options ::= ::= * ::= ! ::= * ! Individual settings are separated by forward slashes (`/'). Each setting can be as little as an `ID' token, but options and values can optionally be included. The `*' option means that, for this setting, the `ID' can be omitted. The `!' option means that this option is the default for its specifier. setting-value ::= ::= ( setting-value-2 ) ::= setting-value-2 setting-value-2 ::= setting-value-options setting-value-type : ID setting-value-restriction setting-value-options ::= ::= * setting-value-type ::= N ::= D setting-value-restriction ::= ::= , STRING Settings may have values. If the value must be enclosed in parentheses, then enclose the value declaration in parentheses. Declare the setting type as `n' or `d' for integer or floating point type, respectively. The given `ID' is used to construct a variable name. If option `*' is given, then the value is optional; otherwise it must be specified whenever the corresponding setting is specified. A "restriction" can also be specified which is a string giving a C expression limiting the valid range of the value. The special escape `%s' should be used within the restriction to refer to the setting's value variable. sbc-special-form ::= VAR ::= VARLIST varlist-options ::= INTEGER opt-list ::= DOUBLE opt-list ::= PINT ::= STRING (the literal word STRING) string-options ::= CUSTOM varlist-options ::= ::= ( STRING ) opt-list ::= ::= LIST string-options ::= ::= ( STRING STRING ) The special forms are of the following types: `VAR' A single variable name. `VARLIST' A list of variables. If given, the string can be used to provide `PV_*' options to the call to `parse_variables'. `INTEGER' A single integer value. `INTEGER LIST' A list of integers separated by spaces or commas. `DOUBLE' A single floating-point value. `DOUBLE LIST' A list of floating-point values. `PINT' A single positive integer value. `STRING' A string value. If the options are given then the first string is an expression giving a restriction on the value of the string; the second string is an error message to display when the restriction is violated. `CUSTOM' A custom function is used to parse this subcommand. The function must have prototype `int custom_NAME (void)'. It should return 0 on failure (when it has already issued an appropriate diagnostic), 1 on success, or 2 if it fails and the calling function should issue a syntax error on behalf of the custom handler.  File: pspp.info, Node: GNU Free Documentation License, Prev: q2c Input Format, Up: Top Appendix F GNU Free Documentation License ***************************************** Version 1.2, November 2002 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. F.1 ADDENDUM: How to use this License for your documents ======================================================== To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.