Table of Contents


rsf - read a structured file


rsf infile outfile


rsf reads the ascii representation of a structured binary file (ASF) as generated, for example, by tsf(1NEMO) , and writes a binary version.

In this fashion tsf/rsf can be used to port data between machines of a totally different binary data type (e.g. Cray’s, Sun’s, Convex, DECs, IBMs)


The following parameters are recognized.
Input data is read from file, which must be an ascii file.
Output data is written to file in binary form.

See Also

tsf(1NEMO) , csf(1NEMO) , filestruct(3NEMO) .


debug=2 reports values of MaxTagLen and MaxVecDim as defined in "filestruct.h". For MaxSetLen see tsf(1NEMO) .


rsf does not recognize items which have been truncated by tsf (using the maxlines= keyword). If tsf and rsf are used together, set maxlines to a value large enough to print all the data, or use alllines=t.

Although rsf can now read multiline strings, it can complain on long strings that go accross a line if the line break occured just before a white space in the string. This can be solved by running tsf with a different or long enough linelength (using the margin= keyword).


rsf does not recognize decimal numbers, it assumes they are always octal, and does not pay attention to a leading 0 to distinguish. Thereforce, since tsf(1NEMO) now defaults decimal integers by default, it has to be forced to output octal if rsf is part of the pipe to transfer information, e.g.:
    % mkplummer - 3 | tsf - | grep Coord
    int CoordSystem 66306 (good)
    % mkplummer - 3 | tsf - octal=t | grep Coord
    int CoordSystem 0201402 (good)
    % mkplummer - 3 | tsf - | rsf - - | tsf - | grep Coord
    int CoordSystem 27846 (bad)
    % mkplummer - 3 | tsf - octal=t | rsf - - | tsf - | grep Coord
    int CoordSystem 66306 (good)


Joshua E. Barnes, Panayotis Skordos.


xx-jun-87    V1.0 first implementation    PS
xx-apr-88    V2.0 new filestruct package    JB
12-sep-90    V2.1 helpvec    PJT
9-dec-90    V2.2 multiline string bug removed    PJT
14-jun-2002    added comment on new tsf behavior for integer output    PJT

Table of Contents