[comp.lang.c] Input stream variable substitution

NIBMSCM@NDSUVM1.BITNET (12/06/90)

So, I have a solution to this coding problem, but am looking for something
a little more eloquent.  As I'm reading from stdin, I wish to scan the
input stream for variables (denoted by special tags - something like
&input_var&) and replace these variables with the value of that variable
within my program (i.e. input_var is actually a variable declared within
my program or database).

The intent of the program is to provide control for a database publishing
environment.  The markup language that I'm using takes a mix of tags and
data and performs the required formatting.  However, it is NOT an interactive
package, and therefore I am required to insert all variable text before
passing on to the markup program.  Also, would prefer not to perform data
substitution based on sequential ordering of variable fields, as the control
program will be expected to compose a number of different publications
based on operator input, and keeping everything sequential for each
publication appears too error prone.

Thanks for your help...