From @Score.Stanford.EDU:ccep001@iv1.cc.utexas.edu Thu Jul 16 14:28:07 1987 Received: from iv1.cc.utexas.edu by SCORE.STANFORD.EDU with TCP; Thu 16 Jul 87 14:22:00-PDT Date: 16 Jul 87 16:10:00 CST From: "Michael P. Kaczmarczik" Subject: VMS version of tr2tex To: "kamal%hanauma" Reply-To: "Michael P. Kaczmarczik" Status: RO Hi, I've gotten TR2TEX to run under VMS using VAX C, so I wanted to send you the changes and thank you for posting the program to the world. We definitely have use for programs that help users convert documents from one text processing system to another. The main change I made was to make sure that the VAX C RTL writes text files as "real" text files, since by default it doesn't. I also added a -o switch, because I/O redirection under VMS is really a pain in the #*$&@!&#. :-(. I apologize for the VMS DIFF output; it's the most expedient differences program I've got right now... Cheers, Mic Kaczmarczik User Services Digital Support Group U.T. Austin Computation Center ccep001@utadnx.cc.utexas.edu # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. #----cut here-----cut here-----cut here-----cut here----# #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # disk$1:[tex.ut.src.tr2tex]setups.diff # disk$1:[tex.ut.src.tr2tex]tr2tex.9_diff # disk$1:[tex.ut.src.tr2tex]tr2tex.diff # This archive created: Thu Jul 16 15:17:34 1987 sed 's/^xx//' << \SHAR_EOF > setups.diff xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]SETUPS.H-DIST;1 xx 7 #include xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]SETUPS.H;8 xx 7 #ifdef VMS xx 8 #define GOOD 1 xx 9 #else xx 10 #define GOOD 0 xx 11 #endif xx 12 xx 13 #include xx************ xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]SETUPS.H-DIST;1 xx 17 #if HAVE_SGTTY xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]SETUPS.H;8 xx 23 #ifdef VAXC xx 24 #define index strchr xx 25 #define unlink delete xx 26 #endif xx 27 xx 28 #if HAVE_SGTTY xx************ xx xxNumber of difference sections found: 2 xxNumber of difference records found: 11 xx xxDIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DISK$1:[TEX.UT.SRC.TR2TEX]SETUPS.DIFF;1- xx DISK$1:[TEX.UT.SRC.TR2TEX]SETUPS.H-DIST;1- xx DISK$1:[TEX.UT.SRC.TR2TEX]SETUPS.H;8 SHAR_EOF sed 's/^xx//' << \SHAR_EOF > tr2tex.9_diff xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.9-DIST;1 xx 1 .TH TR2TEX 9 "1 January 1987" xx 2 .UC 4 xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.9;3 xx 1 .TH TR2TEX 9 "16 July 1987" xx 2 .UC 4 xx************ xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.9-DIST;1 xx 9 ] xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.9;3 xx 9 ] [ xx 10 .B -o file xx 11 ] xx************ xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.9-DIST;1 xx 67 .SH BUGS xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.9;3 xx 69 .PP xx 70 To direct the output of xx 71 .B tr2tex xx 72 to a file other than the standard output, use the xx 73 .B -o xx 74 flag. xx 75 .SH BUGS xx************ xx xxNumber of difference sections found: 3 xxNumber of difference records found: 9 xx xxDIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.9_DIFF;1- xx DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.9-DIST;1- xx DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.9;3 SHAR_EOF sed 's/^xx//' << \SHAR_EOF > tr2tex.diff xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C-DIST;1 xx 5 /* Last modified: 1/1/87 */ xx 6 /* Keyword: convert translate tex troff */ xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C;8 xx 5 /* Last modified: 7/16/87 */ xx 6 /* Modifications: xx 7 /* 16-Jul-1987 M. Kaczmarczik add -o option, port to VAX C under VMS */ xx 8 xx 9 /* Keyword: convert translate tex troff */ xx************ xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C-DIST;1 xx 10 " tr2tex [-m] file1 file2 ...", xx 11 "or", xx 12 " tr2tex [-m] < file1 file2 ...", xx 13 "", xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C;8 xx 13 " tr2tex [-m] [-o file] file1 file2 ...", xx 14 "or", xx 15 " tr2tex [-m] [-o file] < file1 file2 ...", xx 16 "", xx************ xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C-DIST;1 xx 25 #define TEMPFILE "/tmp/texXXXXXX" xx 26 #endif xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C;8 xx 28 #ifdef VMS xx 29 #define TEMPFILE "sys$scratch:texXXXXXX" xx 30 #else xx 31 #define TEMPFILE "/tmp/texXXXXXX" xx 32 #endif xx 33 #endif xx************ xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C-DIST;1 xx 119 default: xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C;8 xx 126 case 'o': xx 127 xargc--; xx 128 if ((out_file = fopen(*++xargv,"w" xx 129 #ifdef VAXC xx 130 ,"rat=cr","rfm=var" xx 131 #endif xx 132 )) == NULL) { xx 133 fprintf(stderr, xx 134 "tr2tex: can't open %s\n", xx 135 *xargv); xx 136 exit(1); xx 137 } xx 138 **xargv = '-'; /* make into option */ xx 139 break; xx 140 default: xx************ xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C-DIST;1 xx 129 timeval = time(0); xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C;8 xx 150 #ifdef VAXC xx 151 if ((out_file == stdout) && xx 152 ((out_file = freopen("SYS$OUTPUT:","w",stdout, xx 153 "rat=cr","rfm=var")) == NULL)) { xx 154 fprintf(stderr,"tr2tex: can't reopen stdout\n"); xx 155 exit(1); xx 156 } xx 157 #endif xx 158 xx 159 timeval = time(0); xx************ xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C-DIST;1 xx 133 %% (Kamal%%Hanauma@SU-SCORE.ARPA)\n\n\n"); xx 134 xx 135 /* document style and options */ xx 136 fprintf(out_file,"\\documentstyle%s{%s}\n\\begin{document}\n",options,document); xx 137 xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C;8 xx 163 %% (Kamal%%Hanauma@SU-SCORE.ARPA)\n"); xx 164 xx 165 /* document style and options */ xx 166 fprintf(out_file,"\n\n\\documentstyle%s{%s}\n\\begin{document}\n",options,document); xx 167 xx************ xx************ xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C-DIST;1 xx 184 exit(0); xx 185 } xx****** xxFile DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C;8 xx 214 exit(GOOD); xx 215 } xx************ xx xxNumber of difference sections found: 7 xxNumber of difference records found: 40 xx xxDIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.DIFF;1- xx DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C-DIST;1- xx DISK$1:[TEX.UT.SRC.TR2TEX]TR2TEX.C;8 SHAR_EOF # End of shell archive exit 0