Table of Contents
tsf - type a structured file
tsf in=file [parameter=value] ...
tsf types the contents of a structured binary file (see filestruct(3NEMO)
on the standard output. The type, tag, dimensions (if any) and contents
of all items are listed. The contents of CharType items are printed directly;
FloatType and DoubleType items are printed in floating-point notation;
all other types are printed in octal for portability reasons. XML format
can optionally be selected.
The following parameters are recognized.
debug=2 reports values of MaxSetLen
as defined in "filestruct.h". For MaxTagLen and MaxVecDim see rsf(1NEMO)
An example of converting all double precision numbers to single
precision in a NEMO file:
- Input data is read from file, which must be a structured binary
file. No default.
- If true, print float and double item data with
maximum precision. [Default: f].
- Limits the number of lines
of data typed for each item to lines. [Default: 4].
- Print all
lines, it overrides any value of maxline. If xml format selected, allline
will always be set to t. [Default: f].
- Amount to indent
contents of item-sets. [Default: 2].
- Righthand margin for
output. Set this to a high value to prevent possible string problems if
file needs to be read by rsf. [Default: 72].
- select only this
item for output. Default: all items selected.
- Output in xml mode?
If not, old-style human readable tsf mode is selected. [Default: f].
- Output of (short/long) integers in octal? Old versions used to exchange
integer information in octal, we have now switched by default to decimal
(more human readable). By using octal=t you can force this program back
in the old mode. If take output of tsf to be read into rsf, you now need
to force octal=t. [Default: f].
% tsf in=double.dat out=float.dat convert=d2f
The algorithm for implementing maxline is crude.
If indent= and margin=
are choosen too large, resp. too small, they can bump into each other and
cause illegable output, which cannot be read by rsf either.
xx-xxx-86 V1.0 original version JEB
xx-apr-88 V2.0 new filestruct package JEB
9-dec-90 V2.3 helpvec and other minor things PJT
21-mar-01 V2.7 experimental xml output option PJT
14-jun-02 V3.0 added octal=, but default output of integers is now decimal PJT
Table of Contents