Syntax : text2c [option] [InputFile] [OutputFile]
text2c
formats any InputFile
into an OutputFile
composed of C-like statements. The OutputFile may be included in your C,
C++ or perl code.
Options are
-h print short help -p output perl-like print statements -x output C++ output. -f use file handler style -m Do not format % -w Format as-is (no line wrap) -l x output 'x' characters per line.
Defaults are
InputFile = stdin OutputFile = stdout Length = 60 characters Format = C code "printf()" statements
C++ code print statements are generated using ``cout'', perl formatting uses ``print''.
-x
and -p
uses ``cout'' and ``print'' but also all the C escape sequence. Perl print
statements takes into account the ``@'' and ``$'' characters but for C++
it's really just a question of cosmetics.
File handler mode works only in C and Perl mode. The chosen file handler is FO. You will need to take care of adding this to your code.
TEXT2C will ignore EOL CR and CR-LF combination and interpret them as new lines. This feature is making possible support for binary transfer of ASCII files (usually leaving ending CR-LFs).
jlauret@mail.chem.sunysb.edu