/* Filter for extracting names of temporary varibles from files produced by the C operator of Maple. Input lines: t = \n Output lines: double t; Each name is printed only once. Input for this program is generated by sort | grep "t[0-9]* =" See setup.c Used in Windows version only. */ #include void main(void) { int tno=-1,sno=-1,n; char buf[1000]; while (gets(buf)) { if (sscanf(buf," t%i",&n)==1) { if (n!=tno) { printf("double t%i;\n",n); tno=n; } continue; } if (sscanf(buf," s%i",&n)==1) { if (n!=sno) { printf("double s%i;\n",n); sno=n; } continue; } } }