August 1999
Intermediate to advanced
1000 pages
83h 9m
English
/usr/bin/xstr -c filename [-v][-l array] /usr/bin/xstr [-l array] /usr/bin/xstr filename [-v][-l array]
xstr maintains a file called strings into which a large program hashes strings in component parts. These strings are replaced with references to this common area. This approach implements shared constant strings, which are most useful if they are also read-only.
The following command extracts the strings from the C source in filename , replacing string references by expressions of the form &xstr[number ] for some number.
castle% xstr -c filename
An appropriate declaration of xstr is prepended to the file. The resulting C text is placed in the file x.c to then be compiled. The ...
Read now
Unlock full access