quotize


Usage

To run:  quotize name < input > output

Turns a text file into a C array of strings
initialized into an array 'char *name[]'.

For example, his program is used to (re)generate readme_env.h
in the main AFNI codebase, which is displayed to users so
they know about environment variables.

Updating AFNI environment variable descriptions

NB: You should NOT edit readme_env.h directly, but instead
edit the file afni/doc/README.environment with the env var
info, and then use THIS program to regenerate readme_env.h.
That new readme_env.h should then be committed+pushed to the
main afni repository.

So, if you update the afni/doc/README.environment text file
with fun, useful information, then you can cd into the main
AFNI source code folder (e.g., 'afni/src/'), and then run the
above command, noting:
+ the '<' and '>' are literally included on the cmd line call
+ 'name' should be 'readme_env' (without quotes is fine)
+ 'input' should be the path to: afni/doc/README.environment'
+ 'output' should be the new text file, eventually readme_env.h

Therefore, an enterprising youth might run:
  quotize readme_env < ~/AFNI/afni/doc/README/README.environment > NEW.txt
... and then check the NEW.txt, perhaps comparing it to
the existing readme_env.h for good luck.
If happy with the updates, then replace the earlier form
with this new creation:
  mv NEW.txt readme_env.h