The
dss default method provides types, global variables, and a schema available for all other methods.
- dss
- meta-method that specifies a method, value maps and constraints
- ----- data types -----
- buffer
A separately allocated sized buffer. The external representation is a newline separated
base64 mime encoding.
- number
An integral or floating point number.
- pointer
A generic pointer.
- reference
A referenced type.
- string
A string. The format details string specifies quoting and C style character escape
processing: quote[=char] quotes string with char (") as the begin and end quote; endquote=char
changes the quote end to char; shell[=beg] quotes using shell conventions and beg ($')
as the quote begin; opt performs quote and shell quoting only when necessary; escape assumes that
escape processing has already been performed; wide does not escape characters with the bit 8 set; expand=mask
expands escaped characters according to mask which may be a , or | separated list of all: expand all
escaped chars, char expands 7 bit character escapes, line expands \r and \n escapes, wide
expands wide character escapes, nocr eliminates \r, and nonl eliminates \n. Matches on this type treat
the pattern as a regex(3) pattern string.
- type_t
A type.
- void
- No value. May be used for padding.
- ----- functions -----
- string edit(string,string)
Returns the result of applying the
ed(1) style substitute expression in the first argument to the second argument.
- number sizeof(*)
Returns the size of the variable argument; the size of an
array variable is the number of elements, otherwise the size is in bytes.
- type_t typeof(*)
Returns the type of the variable argument for comparison with
other types.
- ----- data fields -----
- .file (string)
Current record file name.
- .format (string)
Current record format.
- .length (number)
Current record length (always 0 for some formats.)
- .offset (number)
Current record offset (always 0 for some formats.).
- .queried (number)
Current queried record count.
- .record (number)
Current record number.
- .selected (number)
Current selected record count.
The schema is a pure XML (tags only) file that specifies the
dss method and optional field value maps and constraints.
Public schemas are usually placed in a
../lib/dss sibling directory on
$PATH. The supported tags are:
- DSS
- Method and field map associations.
- NAME
- Field and map association name.
- DESCRIPTION
Field and map association description.
- IDENT
Field and map association ident string.
- METHOD
Method name; the same value as for the command line --method.
- FIELD
Field name with optional maps and constraints.
- NAME
- Field name.
- MAP
- Field map name.
- CONSTRAINT
Field constraint name.
- MAP
- Field value map definition.
- NAME
- Map name.
- DESCRIPTION
Map description.
- IDENT
Map ident string.
- SHIFT
Value right shift for all contained maps.
- MASK
- Value mask for all contained maps.
- IGNORECASE
Ignore case in string match.
- MAP
- Map reference name to be applied here.
- PART
- Map part list.
- TYPE
- Value type for this part. The base type must be number. The default is number.
- SHIFT
Value right shift for this part.
- MASK
- Value mask for this part.
- ITEM
- Map item list.
- NAME
- Map item name.
- MASK
- A mask applied to this item value.
- VALUE
Map matching item value after masking.
- BIT
- The map item is a bit flag at this bit position; an alternative to an explicit mask and value.
- MAP
- A map applied to the unshifted, unmasked value; either a map reference name or a map definition.
Defined above.
- NUM2STR
A number to string ed(1) style
substitute expression that converts a numeric value to a string.
- STR2NUM
A number to string ed(1) style
substitute expression that converts a string value to a number.
- EDIT
- A string to string ed(1) style substitute
expression that edits string values.
- CONSTRAINT
Field value constraint definition.
- NAME
- Constraint name.
- EXPRESSION
Field value ``.'' constraint expression.
- MATCH
String field value constraint regular expression.
- MAX
- Numeric field constraint maximum value.
- MIN
- Numeric field constraint minimum value.
- DEFAULT
Numeric field constraint default value.
- COMPRESS
Preferred compression method; compression is applied by the {compress} query.
- PRINT
Default {print} query format.
- MAP
- Field value map; either a map reference name or a map definition. Defined above.
- METHOD
Method name; if different from the current method then the current file is reprocessed by
the new method.
- CONSTRAINT
Field value constraints. Constraints, when enabled, are applied to each record as
it is read. Defined above.