treewide: Replace <name>_cnt by n_<name>s and <name>_cap by allocated_<name>.
[pspp] / doc / dev / concepts.texi
index 24c1654150fdb84f473b1acd09bb789fc0662ab1..d1cf5f2012600420395ccf74aa166fdea72dd61e 100644 (file)
@@ -1,3 +1,13 @@
+@c PSPP - a program for statistical analysis.
+@c Copyright (C) 2019 Free Software Foundation, Inc.
+@c Permission is granted to copy, distribute and/or modify this document
+@c under the terms of the GNU Free Documentation License, Version 1.3
+@c or any later version published by the Free Software Foundation;
+@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+@c A copy of the license is included in the section entitled "GNU
+@c Free Documentation License".
+@c
+
 @node Basic Concepts
 @chapter Basic Concepts
 
@@ -156,27 +166,6 @@ This function returns false if @func{value_init} and
 @func{value_destroy} are actually required for the given @var{width}.
 @end deftypefun
 
-@deftypefun double value_num (const union value *@var{value})
-Returns the numeric value in @var{value}, which must have been
-initialized as a numeric value.  Equivalent to @code{@var{value}->f}.
-@end deftypefun
-
-@deftypefun {const char *} value_str (const union value *@var{value}, int @var{width})
-@deftypefunx {char *} value_str_rw (union value *@var{value}, int @var{width})
-Returns the string value in @var{value}, which must have been
-initialized with positive width @var{width}.  The string returned is
-not null-terminated.  Only @var{width} bytes of returned data may be
-accessed.
-
-The two different functions exist only for @code{const}-correctness.
-Otherwise they are identical.
-
-It is important that @var{width} be the correct value that was passed
-to @func{value_init}.  Passing a smaller or larger value (e.g.@:
-because that number of bytes will be accessed) will not always work
-and should be avoided.
-@end deftypefun
-
 @deftypefun void value_copy (union value *@var{dst}, @
                              const union value *@var{src}, @
                              int @var{width})
@@ -609,7 +598,7 @@ Destroys @var{style}, freeing its storage.
 @end deftypefun
 
 @deftypefun {struct fmt_number_style}    *fmt_create (void)
-A function which creates an array of all the styles used by pspp, and 
+A function which creates an array of all the styles used by pspp, and
 calls fmt_number_style_init on each of them.
 @end deftypefun
 
@@ -698,7 +687,7 @@ This function is declared in @file{data/data-in.h}.
 @deftypefunx char * data_out_legacy (const union value *@var{input}, const char *@var{encoding}, const struct fmt_spec *@var{format})
 Converts the data pointed to by @var{input} into a string value, which
 will be encoded in UTF-8,  according to output format specifier @var{format}.
-Format 
+Format
 must be a valid output format.   The width of @var{input} is
 inferred from @var{format} using an algorithm equivalent to
 @func{fmt_var_width}.
@@ -1220,12 +1209,12 @@ The following sections describe variable-related functions and macros.
 @node Variable Name
 @subsection Variable Name
 
-A variable name is a string between 1 and @code{VAR_NAME_LEN} bytes
+A variable name is a string between 1 and @code{ID_MAX_LEN} bytes
 long that satisfies the rules for PSPP identifiers
 (@pxref{Tokens,,,pspp, PSPP Users Guide}).  Variable names are
 mixed-case and treated case-insensitively.
 
-@deftypefn Macro int VAR_NAME_LEN
+@deftypefn Macro int ID_MAX_LEN
 Maximum length of a variable name, in bytes, currently 64.
 @end deftypefn
 
@@ -1248,23 +1237,6 @@ dictionary.  Use @func{dict_rename_var} instead (@pxref{Dictionary
 Renaming Variables}).
 @end deftypefun
 
-@anchor{var_is_plausible_name}
-@deftypefun {bool} var_is_valid_name (const char *@var{name}, bool @var{issue_error})
-@deftypefunx {bool} var_is_plausible_name (const char *@var{name}, bool @var{issue_error})
-Tests @var{name} for validity or ``plausibility.''  Returns true if
-the name is acceptable, false otherwise.  If the name is not
-acceptable and @var{issue_error} is true, also issues an error message
-explaining the violation.
-
-A valid name is one that fully satisfies all of the requirements for
-variable names (@pxref{Tokens,,,pspp, PSPP Users Guide}).  A
-``plausible'' name is simply a string whose length is in the valid
-range and that is not a reserved word.  PSPP accepts plausible but
-invalid names as variable names in some contexts where the character
-encoding scheme is ambiguous, as when reading variable names from
-system files.
-@end deftypefun
-
 @deftypefun {enum dict_class} var_get_dict_class (const struct variable *@var{var})
 Returns the dictionary class of @var{var}'s name (@pxref{Dictionary
 Class}).
@@ -1373,7 +1345,7 @@ Looks for a label for @var{value} in @var{var}'s set of value labels.
 @var{value} must have the same width as @var{var}.
 If a label exists, it will be appended to the string pointed to by @var{str}.
 Otherwise, it formats @var{value}
-using @var{var}'s print format (@pxref{Input and Output Formats}) 
+using @var{var}'s print format (@pxref{Input and Output Formats})
 and appends the formatted string.
 @end deftypefun
 
@@ -1764,7 +1736,7 @@ To delete a variable from a dictionary and destroy it, use
 @node Variable Short Names
 @subsection Variable Short Names
 
-PSPP variable names may be up to 64 (@code{VAR_NAME_LEN}) bytes long.
+PSPP variable names may be up to 64 (@code{ID_MAX_LEN}) bytes long.
 The system and portable file formats, however, were designed when
 variable names were limited to 8 bytes in length.  Since then, the
 system file format has been augmented with an extension record that
@@ -1829,7 +1801,7 @@ been assigned a short name.
 Sets @var{var}'s short name to @var{short_name}, or removes
 @var{var}'s short name if @var{short_name} is a null pointer.  If it
 is non-null, then @var{short_name} must be a plausible name for a
-variable (@pxref{var_is_plausible_name}).  The name will be truncated
+variable.  The name will be truncated
 to 8 bytes in length and converted to all-uppercase.
 @end deftypefun
 
@@ -1883,16 +1855,16 @@ associate data with a variable.
 
 To prevent multiple clients from attempting to use a variable's single
 auxiliary data field at the same time, we adopt the convention that
-use of auxiliary data in the active file dictionary is restricted to
+use of auxiliary data in the active dataset dictionary is restricted to
 the currently executing command.  In particular, transformations must
-not attach auxiliary data to a variable in the active file in the
-expectation that it can be used later when the active file is read and
+not attach auxiliary data to a variable in the active dataset in the
+expectation that it can be used later when the active dataset is read and
 the transformation is executed.  To help enforce this restriction,
-auxiliary data is deleted from all variables in the active file
+auxiliary data is deleted from all variables in the active dataset
 dictionary after the execution of each PSPP command.
 
 This convention for safe use of auxiliary data applies only to the
-active file dictionary.  Rules for other dictionaries may be
+active dataset dictionary.  Rules for other dictionaries may be
 established separately.
 
 Auxiliary data should be replaced by a more flexible mechanism at some
@@ -2043,7 +2015,7 @@ Returns the variable at the given @var{position} in @var{dict}.
 (see below).
 @end deftypefun
 
-@deftypefun size_t dict_get_var_cnt (const struct dictionary *@var{dict})
+@deftypefun size_t dict_get_n_vars (const struct dictionary *@var{dict})
 Returns the number of variables in @var{dict}.
 @end deftypefun
 
@@ -2126,10 +2098,10 @@ variables.  They also destroy the removed variables and free their
 associated storage.
 
 Deleting a variable to which there might be external pointers is a bad
-idea.  In particular, deleting variables from the active file
+idea.  In particular, deleting variables from the active dataset
 dictionary is a risky proposition, because transformations can retain
 references to arbitrary variables.  Therefore, no variable should be
-deleted from the active file dictionary when any transformations are
+deleted from the active dataset dictionary when any transformations are
 active, because those transformations might reference the variable to
 be deleted.  The safest time to delete a variable is just after a
 procedure has been executed, as done by @cmd{DELETE VARIABLES}.
@@ -2261,7 +2233,7 @@ is null, then @var{dict}'s weighting variable, if any, is cleared.
 @node Dictionary Filter Variable
 @subsection Filter Variable
 
-When the active file is read by a procedure, cases can be excluded
+When the active dataset is read by a procedure, cases can be excluded
 from analysis based on the values of a @dfn{filter variable}.
 @xref{FILTER,,,pspp, PSPP Users Guide}, for a user view of filtering.
 
@@ -2307,7 +2279,7 @@ Sets @var{dict}'s case limit to @var{limit}.
 
 The user may use the @cmd{SPLIT FILE} command (@pxref{SPLIT
 FILE,,,pspp, PSPP Users Guide}) to select a set of variables on which
-to split the active file into groups of cases to be analyzed
+to split the active dataset into groups of cases to be analyzed
 independently in each statistical procedure.  The set of split
 variables is stored as part of the dictionary, although the effect on
 data analysis is implemented by each individual statistical procedure.
@@ -2326,7 +2298,7 @@ only if there are no split variables, returns a null pointer.  The
 caller must not modify or free the returned array.
 @end deftypefun
 
-@deftypefun size_t dict_get_split_cnt (const struct dictionary *@var{dict})
+@deftypefun size_t dict_get_n_splits (const struct dictionary *@var{dict})
 Returns the number of split variables.
 @end deftypefun
 
@@ -2421,7 +2393,7 @@ call to one of this function in a @func{msg_disable}/@func{msg_enable}
 pair.
 @end deftypefun
 
-@deftypefun size_t dict_get_document_line_cnt (const struct dictionary *@var{dict})
+@deftypefun size_t dict_get_document_n_lines (const struct dictionary *@var{dict})
 Returns the number of line of documents in @var{dict}.  If the
 dictionary contains no documents, returns 0.
 @end deftypefun