/*
Sample C program that calls DEC XTPU. This program uses XTPU$XTPU and
specifies a command string
*/
#include descrip
int return_status;
static $DESCRIPTOR (command_prefix, "XTPU/NOJOURNAL/NOCOMMAND/OUTPUT=");
static $DESCRIPTOR (input_file, "infile.dat");
static $DESCRIPTOR (output_file, "outfile.dat");
static $DESCRIPTOR (space_desc, " ");
char command_line [100];
static $DESCRIPTOR (command_desc, command_line);
main (argc, argv)
int argc;
char *argv[];
{
/*
Build the command line for DEC XTPU. Note that the command verb
is "XTPU". The string we construct in the buffer command_line
will be
"XTPU/NOJOURNAL/NOCOMMAND/OUTPUT=outfile.dat infile.dat"
*/
return_status = STR$CONCAT (&command_desc,
&command_prefix,
&output_file,
&space_desc,
&input_file);
if (! return_status)
exit (return_status);
/*
Now call DEC XTPU to edit the file
*/
return_status = XTPU$XTPU (&command_desc);
exit (return_status);
}
|