home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / d / dvips549.zip / DVIPS / DOSPECIA.C < prev    next >
C/C++ Source or Header  |  1992-10-14  |  18KB  |  637 lines

  1. /*
  2.  *   This routine handles special commands;
  3.  *   predospecial() is for the prescan, dospecial() for the real thing.
  4.  */
  5. #include "structures.h" /* The copyright notice in that file is included too! */
  6.  
  7. #include <ctype.h>
  8. extern int atoi();
  9. extern void fil2ps();
  10. extern FILE *search();
  11. extern int system();
  12. /*
  13.  *   These are the external routines called:
  14.  */
  15. /**/
  16. #ifdef TPIC
  17. /*
  18.  * Fri Mar  9 1990  jourdan@minos.inria.fr (MJ)
  19.  * Upgraded to accommodate tpic release 2.0 extended output language.
  20.  * Should prove upward compatible!
  21.  */
  22. extern void setPenSize();
  23. extern void flushPath();
  24. extern void flushDashed();
  25. extern void flushDashed();
  26. extern void addPath();
  27. extern void arc();
  28. extern void flushSpline();
  29. extern void shadeLast();
  30. extern void whitenLast();
  31. extern void blackenLast();
  32. extern void SetShade() ;
  33. #endif
  34. extern shalfword dvibyte() ;
  35. extern int add_header() ;
  36. extern void hvpos() ;
  37. extern void figcopyfile() ;
  38. extern void nlcmdout() ;
  39. extern void cmdout() ;
  40. extern void numout() ;
  41. extern void scout() ;
  42. extern void stringend() ;
  43. extern void error() ;
  44. extern void psflush() ;
  45. extern void emspecial() ;
  46. /* IBM: color - begin */
  47. extern void pushcolor() ;
  48. extern void popcolor() ;
  49. extern void resetcolorstack() ;
  50. extern void background() ;
  51. /* IBM: color - end */
  52. extern char errbuf[] ;
  53. extern shalfword linepos;
  54. extern Boolean usesspecial ;
  55. extern Boolean usescolor ;   /* IBM: color */
  56. extern int landscape ;
  57. extern char *paperfmt ;
  58. extern char *nextstring;
  59. extern char *maxstring;
  60. extern char *oname;
  61. extern FILE *bitfile;
  62. extern int quiet;
  63. extern fontdesctype *curfnt ;
  64. extern int actualdpi ;
  65. extern int vactualdpi ;
  66. extern integer hh, vv;
  67. extern int lastfont ;
  68. extern real conv ;
  69. extern real vconv ;
  70. extern integer hpapersize, vpapersize ;
  71. extern Boolean pprescan ;
  72. extern char *figpath ;
  73. extern int prettycolumn ;
  74. extern Boolean disablecomments ;
  75.  
  76. #ifdef DEBUG
  77. extern integer debug_flag;
  78. #endif
  79. extern void scanfontcomments() ;
  80. extern void handlepapersize() ;
  81.  
  82. static int specialerrors = 20 ;
  83.  
  84. struct bangspecial {
  85.    struct bangspecial *next ;
  86.    char actualstuff[1] ; /* more space will actually be allocated */
  87. } *bangspecials = NULL ;
  88.  
  89. void specerror(s)
  90. char *s ;
  91. {
  92.    if (specialerrors > 0) {
  93.       error(s) ;
  94.       specialerrors-- ;
  95.    } else if (specialerrors == 0) {
  96.       error("more errors in special, being ignored . . .") ;
  97.       specialerrors-- ;
  98.    }
  99. }
  100.  
  101. static void trytobreakout(p)
  102. register char *p ;
  103. {
  104.    register int i ;
  105.    register int instring = 0 ;
  106.    int lastc = 0 ;
  107.  
  108.    i = 0 ;
  109.    (void)putc('\n', bitfile) ;
  110.    while (*p) {
  111.       if (i > 65 && *p == ' ' && instring == 0) {
  112.          (void)putc('\n', bitfile) ;
  113.          i = 0 ;
  114.       } else {
  115.          (void)putc(*p, bitfile) ;
  116.          i++ ;
  117.       }
  118.       if (*p == '(' && lastc != '\\')
  119.          instring = 1 ;
  120.       else if (*p == ')' && lastc != '\\')
  121.          instring = 0 ;
  122.       lastc = *p ;
  123.       p++ ;
  124.    }
  125.    (void)putc('\n', bitfile) ;
  126. }
  127.  
  128. static void dobs(q)
  129. register struct bangspecial *q ;
  130. {
  131.    if (q) {
  132.       dobs(q->next) ;
  133.       trytobreakout(q->actualstuff) ;
  134.    }
  135. }
  136.  
  137. void
  138. outbangspecials() {
  139.    if (bangspecials) {
  140.       cmdout("TeXDict") ;
  141.       cmdout("begin") ;
  142.       cmdout("@defspecial\n") ;
  143.       dobs(bangspecials) ;
  144.       cmdout("\n@fedspecial") ;
  145.       cmdout("end") ;
  146.    }
  147. }
  148.  
  149. /* We recommend that new specials be handled by the following general
  150.  * (and extensible) scheme, in which the user specifies one or more
  151.  * `key=value' pairs separated by spaces.
  152.  * The known keys are given in KeyTab; they take values
  153.  * of one of the following types:
  154.  *
  155.  * None: no value, just a keyword (in which case the = sign is omitted)
  156.  * String: the value should be "<string without double-quotes"
  157.  *                          or '<string without single-quotes'
  158.  * Integer: the value should be a decimal integer (%d format)
  159.  * Number: the value should be a decimal integer or real (%f format)
  160.  * Dimension: like Number, but will be multiplied by the scaledsize
  161.  *       of the current font and converted to default PostScript units
  162.  * (Actually, strings are allowed in all cases; the delimiting quotes
  163.  *  are simply stripped off if present.)
  164.  *
  165.  */
  166.  
  167. typedef enum {None, String, Integer, Number, Dimension} ValTyp;
  168. typedef struct {
  169.    char    *Entry;
  170.    ValTyp  Type;
  171. } KeyDesc;
  172.  
  173. #define NKEYS    (sizeof(KeyTab)/sizeof(KeyTab[0]))
  174.  
  175. KeyDesc KeyTab[] = {{"psfile",  String}, /* j==0 in the routine below */
  176.                     {"ifffile", String}, /* j==1 */
  177.                     {"tekfile", String}, /* j==2 */
  178.                     {"hsize",   Number},
  179.                     {"vsize",   Number},
  180.                     {"hoffset", Number},
  181.                     {"voffset", Number},
  182.                     {"hscale",  Number},
  183.                     {"vscale",  Number},
  184.                     {"angle",   Number},
  185.                     {"llx", Number},
  186.                     {"lly", Number},
  187.                     {"urx", Number},
  188.                     {"ury", Number},
  189.                     {"rwi", Number},
  190.                     {"rhi", Number},
  191.                     {"clip", None}};
  192.  
  193. #ifdef VMS
  194. #define Tolower tolower
  195. #else
  196. #ifdef VMCMS    /* IBM: VM/CMS */
  197. #define Tolower __tolower
  198. #else
  199. /*
  200.  * compare strings, ignore case
  201.  */
  202. char Tolower(c)
  203. register char c ;
  204. {
  205.    if ('A' <= c && c <= 'Z')
  206.       return(c+32) ;
  207.    else
  208.       return(c) ;
  209. }
  210. #endif  /* IBM: VM/CMS */
  211. #endif
  212. int IsSame(a, b)
  213. char *a, *b;
  214. {
  215.    for( ; *a != '\0'; ) {
  216.       if( Tolower(*a) != Tolower(*b) ) 
  217.          return( 0 );
  218.       a++ ;
  219.       b++ ;
  220.    }
  221.    return( *b == '\0' );
  222. }
  223.  
  224. char *KeyStr, *ValStr ; /* Key and String values found */
  225. long ValInt ; /* Integer value found */
  226. float ValNum ; /* Number or Dimension value found */
  227.  
  228. char  *GetKeyVal(str,tno) /* returns NULL if none found, else next scan point */
  229.    char *str ; /* starting point for scan */
  230.    int  *tno ; /* table entry number of keyword, or -1 if keyword not found */
  231. {
  232.    register char *s ;
  233.    register int i ;
  234.    register char t ;
  235.  
  236.    for (s=str; *s <= ' ' && *s; s++) ; /* skip over blanks */
  237.    if (*s == '\0')
  238.       return (NULL) ;
  239.    KeyStr = s ;
  240.    while (*s>' ' && *s!='=') s++ ;
  241.    if (t = *s)
  242.       *s++ = 0 ;
  243.  
  244.    for(i=0; i<NKEYS; i++)
  245.       if( IsSame(KeyStr, KeyTab[i].Entry) )
  246.          goto found ;
  247.    *tno = -1;
  248.    return (s) ;
  249.  
  250. found: *tno = i ;
  251.    if (KeyTab[i].Type == None)
  252.       return (s) ;
  253.  
  254.    if (t && t <= ' ') {
  255.       for (; *s <= ' ' && *s; s++) ; /* now look for the value part */
  256.       if ((t = *s)=='=')
  257.          s++ ;
  258.    }
  259.    ValStr = "" ;
  260.    if ( t == '=' ) {
  261.       while (*s <= ' ' && *s)
  262.          s++ ;
  263.       if (*s=='\'' || *s=='\"')
  264.          t = *s++ ;               /* get string delimiter */
  265.       else t = ' ' ;
  266.       ValStr = s ;
  267.       while (*s!=t && *s)
  268.          s++ ;
  269.       if (*s)
  270.          *s++ = 0 ;
  271.    }
  272.    switch (KeyTab[i].Type) {
  273.  case Integer:
  274.       if(sscanf(ValStr,"%ld",&ValInt)!=1) {
  275.           sprintf(errbuf,"Non-integer value (%s) given for keyword %s",
  276.               ValStr, KeyStr) ;
  277.           specerror(errbuf) ;
  278.           ValInt = 0 ;
  279.       }
  280.       break ;
  281.  case Number:
  282.  case Dimension:
  283.       if(sscanf(ValStr,"%f",&ValNum)!=1) {  
  284.           sprintf(errbuf,"Non-numeric value (%s) given for keyword %s",
  285.               ValStr, KeyStr) ;
  286.           specerror(errbuf) ;
  287.           ValNum = 0.0 ;
  288.       }
  289.       if (KeyTab[i].Type==Dimension) {
  290.          if (curfnt==NULL)
  291.             error("! No font selected") ;
  292.          ValNum = ValNum * ((double)curfnt->scaledsize) * conv * 72 / DPI ;
  293.       }
  294.       break ;
  295.  default: break ;
  296.    }
  297.    return (s) ;
  298. }
  299.  
  300. /*
  301.  *   Now our routines.  We get the number of bytes specified and place them
  302.  *   into the string buffer, and then parse it. Numerous conventions are
  303.  *   supported here for historical reasons.
  304.  */
  305.  
  306. void predospecial(numbytes, scanning)
  307. integer numbytes ;
  308. Boolean scanning ;
  309. {
  310.    register char *p = nextstring ;
  311.    register int i = 0 ;
  312.    int j ;
  313.  
  314.    if (nextstring + numbytes > maxstring)
  315.       error("! out of string space in predospecial") ;
  316.    for (i=numbytes; i>0; i--)
  317. #ifdef VMCMS /* IBM: VM/CMS */
  318.       *p++ = ascii2ebcdic[(char)dvibyte()] ;
  319. #else
  320.       *p++ = (char)dvibyte() ;
  321. #endif /* IBM: VM/CMS */
  322.    if (pprescan)
  323.       return ;
  324.    while (p[-1] <= ' ' && p > nextstring)
  325.       p-- ; /* trim trailing blanks */
  326.    if (p==nextstring) return ; /* all blank is no-op */
  327.    *p = 0 ;
  328.    p = nextstring ;
  329.    while (*p <= ' ')
  330.       p++ ;
  331. #ifdef DEBUG
  332.    if (dd(D_SPECIAL))
  333.       (void)fprintf(stderr, "Preprocessing special: %s\n", p) ;
  334. #endif
  335.  
  336. /*
  337.  *   We use strncmp() here to also pass things like landscape()
  338.  *   or landscape: or such.
  339.  */
  340.  
  341.    if (strncmp(p, "landscape", 9)==0) {
  342.       if (hpapersize || vpapersize)
  343.          error(
  344.              "both landscape and papersize specified:  ignoring landscape") ;
  345.       else
  346.          landscape = 1 ;
  347.       return ;
  348.    } else if (strncmp(p, "papersize", 9)==0) {
  349.       p += 9 ;
  350.       while (*p == '=' || *p == ' ')
  351.          p++ ;
  352.       if (hpapersize == 0 || vpapersize == 0) {
  353.          if (landscape) {
  354.             error(
  355.              "both landscape and papersize specified:  ignoring landscape") ;
  356.             landscape = 0 ;
  357.          }
  358.          handlepapersize(p, &hpapersize, &vpapersize) ;
  359.       }
  360.       return ;
  361.    }
  362.    if (strncmp(p, "xtex:", 5)==0) return ;
  363.    usesspecial = 1 ;  /* now the special prolog will be sent */
  364.    if (strncmp(p, "header", 6)==0) {
  365.       char *q ;
  366.       p += 6 ;
  367.       while ((*p <= ' ' || *p == '=' || *p == '(') && *p != 0)
  368.          p++ ;
  369.       q = p ;  /* we will remove enclosing parentheses */
  370.       p = p + strlen(p) - 1 ;
  371.       while ((*p <= ' ' || *p == ')') && p >= q)
  372.          p-- ;
  373.       p[1] = 0 ;
  374.       if (p >= q)
  375.          (void)add_header(q) ;
  376.    }
  377. /* IBM: color - added section here for color header and color history */
  378.    if (strncmp(p, "background", 10) == 0) {
  379.       usescolor = 1 ;
  380.       p +=11 ;
  381.       while ( *p <= ' ' ) p++ ;
  382.       background(p) ;
  383.    }
  384.    if (strncmp(p, "color", 5) == 0) {
  385.       usescolor = 1 ;
  386.       p += 6 ;
  387.       while ( *p <= ' ' ) p++ ;
  388.       if (strncmp(p, "push", 4) == 0 ) {
  389.          p += 5 ;
  390.          while ( *p <= ' ' ) p++ ;
  391.          pushcolor(p, 0) ;
  392.       } else if (strncmp(p, "pop", 3) == 0 ) {
  393.          popcolor(0) ;
  394.       } else {
  395.          resetcolorstack(p,0) ;
  396.       }
  397.    }   /* IBM: color - end changes */
  398.    else if (*p == '!') {
  399.       register struct bangspecial *q ;
  400.       p++ ;
  401.       q = (struct bangspecial *)mymalloc((integer)
  402.                          (sizeof(struct bangspecial) + strlen(p))) ;
  403.       (void)strcpy(q->actualstuff, p) ;
  404.       q->next = bangspecials ;
  405.       bangspecials = q ;
  406.    } else if (scanning && *p != '"' &&
  407.           (p=GetKeyVal(p, &j)) != NULL && j==0)
  408.       scanfontcomments(ValStr) ;
  409. }
  410.  
  411. int maccess(s)
  412. char *s ;
  413. {
  414.    FILE *f = search(figpath, s, "r") ;
  415.    if (f)
  416.       fclose(f) ;
  417.    return (f != 0) ;
  418. }
  419.  
  420. char *tasks[] = { 0, "iff2ps", "tek2ps" } ;
  421.  
  422. void dospecial(numbytes)
  423. integer numbytes ;
  424. {
  425.    register char *p = nextstring ;
  426.    register int i = 0 ;
  427.    int j, systemtype = 0 ;
  428.    char psfile[100] ; 
  429.    char cmdbuf[100] ; 
  430.    register char *q ;
  431.    Boolean psfilewanted = 1 ;
  432.    char *task = 0 ;
  433.  
  434.    if (nextstring + i > maxstring)
  435.       error("! out of string space in dospecial") ;
  436.    for (i=numbytes; i>0; i--)
  437. #ifdef VMCMS /* IBM: VM/CMS */
  438.       *p++ = ascii2ebcdic[(char)dvibyte()] ;
  439. #else
  440.       *p++ = (char)dvibyte() ;
  441. #endif  /* IBM: VM/CMS */
  442.    while (p[-1] <= ' ' && p > nextstring)
  443.       p-- ; /* trim trailing blanks */
  444.    if (p==nextstring) return ; /* all blank is no-op */
  445.    *p = 0 ;
  446.    p = nextstring ;
  447.    while (*p <= ' ')
  448.       p++ ;
  449. #ifdef DEBUG
  450.    if (dd(D_SPECIAL))
  451.       (void)fprintf(stderr, "Processing special: %s\n", p) ;
  452. #endif
  453.  
  454.    if (strncmp(p, "em:", 3)==0) {    /* emTeX specials in emspecial.c */
  455.     emspecial(p);
  456.     return;
  457.    }
  458.  
  459.    if (strncmp(p, "ps:", 3)==0) {
  460.         psflush() ; /* now anything can happen. */
  461.         if (p[3]==':') {
  462.            if (strncmp(p+4, "[begin]", 7) == 0) {
  463.               hvpos() ;
  464.               trytobreakout(&p[11]);
  465.            } else if (strncmp(p+4, "[end]", 5) == 0)
  466.               trytobreakout(&p[9]);
  467.            else trytobreakout(&p[4]);
  468.         } else if (strncmp(p+3, " plotfile ", 10) == 0) {
  469.              char *sfp ;
  470.              hvpos() ;
  471.              p += 13;
  472.            /*
  473.             *  Fixed to allow popen input for plotfile
  474.             *  TJD 10/20/91
  475.             */
  476.            while (*p == ' ') p++;
  477.            if (*p == '"') {
  478.              p++;
  479.              for (sfp = p; *sfp && *sfp != '"'; sfp++) ;
  480.            } else {
  481.              for (sfp = p; *sfp && *sfp != ' '; sfp++) ;
  482.            }
  483.            *sfp = '\0';
  484.            if (*p == '`') 
  485.              figcopyfile(p+1, 1);
  486.            else
  487.              figcopyfile (p, 0);
  488.            /* End TJD changes */
  489.         } else {
  490.            hvpos() ;
  491.            trytobreakout(&p[3]);
  492.         }
  493.         return;
  494.    }
  495.    if (strncmp(p, "landscape", 9)==0 || strncmp(p, "header", 6)==0 ||
  496.        strncmp(p, "papersize", 9)==0 || *p=='!')
  497.       return ; /* already handled in prescan */
  498. /* IBM: color - begin changes */
  499.    if ( strncmp(p, "background", 10) == 0 )
  500.       return ; /* already handled in prescan */
  501.    if (strncmp(p, "color", 5) == 0) {
  502.       p += 6 ;
  503.       while ( *p <= ' ' ) p++ ;
  504.       if (strncmp(p, "push", 4) == 0 ) {
  505.          p += 4 ;
  506.          while ( *p <= ' ' ) p++ ;
  507.          pushcolor(p,1);
  508.       } else if (strncmp(p, "pop", 3) == 0 ) {
  509.          popcolor(1) ;
  510.       } else {
  511.          resetcolorstack(p,1) ;
  512.       }
  513.       return ;
  514.    } /* IBM: color - end changes*/
  515. #ifdef TPIC
  516. /* ordered as in tpic 2.0 documentation for ease of cross-referencing */
  517.    if (strncmp(p, "pn ", 3) == 0) {setPenSize(p+2); return;}
  518.    if (strncmp(p, "pa ", 3) == 0) {addPath(p+2); return;}
  519.    if (strcmp(p, "fp") == 0) {flushPath(0); return;}
  520.    if (strcmp(p, "ip") == 0) {flushPath(1); return;} /* tpic 2.0 */
  521.    if (strncmp(p, "da ", 3) == 0) {flushDashed(p+2, 0); return;}
  522.    if (strncmp(p, "dt ", 3) == 0) {flushDashed(p+2, 1); return;}
  523.    if (strcmp(p, "sp") == 0) {flushSpline(p+2); return;} /* tpic 2.0 */
  524.    if (strncmp(p, "sp ", 3) == 0) {flushSpline(p+3); return;} /* tpic 2.0 */
  525.    if (strncmp(p, "ar ", 3) == 0) {arc(p+2, 0); return;} /* tpic 2.0 */
  526.    if (strncmp(p, "ia ", 3) == 0) {arc(p+2, 1); return;} /* tpic 2.0 */
  527.    if (strcmp(p, "sh") == 0) {shadeLast(p+2); return;} /* tpic 2.0 */
  528.    if (strncmp(p, "sh ", 3) == 0) {shadeLast(p+3); return;} /* tpic 2.0 */
  529.    if (strcmp(p, "wh") == 0) {whitenLast(); return;}
  530.    if (strcmp(p, "bk") == 0) {blackenLast(); return;}
  531.    if (strncmp(p, "tx ", 3) == 0) {SetShade(p+3); return;}
  532. #endif
  533.    if (*p == '"') {
  534.       hvpos();
  535.       cmdout("@beginspecial") ;
  536.       cmdout("@setspecial") ;
  537.       trytobreakout(p+1) ;
  538.       cmdout("\n@endspecial") ;
  539.       return ;
  540.    }
  541.  
  542. /* At last we get to the key/value conventions */
  543.    psfile[0] = '\0';
  544.    hvpos();
  545.    cmdout("@beginspecial");
  546.  
  547.    while( (p=GetKeyVal(p,&j)) != NULL )
  548.       switch (j) {
  549.  case -1: /* for compatability with old conventions, we allow a file name
  550.            * to be given without the 'psfile=' keyword */
  551.          if (!psfile[0] && maccess(KeyStr)==0) /* yes we can read it */
  552.              (void)strcpy(psfile,KeyStr) ;
  553.          else {
  554.            sprintf(errbuf, "Unknown keyword (%s) in \\special will be ignored",
  555.                               KeyStr) ;
  556.            specerror(errbuf) ;
  557.          }
  558.          break ;
  559.  case 0: case 1: case 2: /* psfile */
  560.          if (psfile[0]) {
  561.            sprintf(errbuf, "More than one \\special %s given; %s ignored", 
  562.                     "psfile",  ValStr) ;
  563.            specerror(errbuf) ;
  564.          }
  565.          else (void)strcpy(psfile,ValStr) ;
  566.          task = tasks[j] ;
  567.          break ;
  568.  default: /* most keywords are output as PostScript procedure calls */
  569.          if (KeyTab[j].Type == Integer)
  570.             numout((integer)ValInt);
  571.          else if (KeyTab[j].Type == String)
  572.             for (q=ValStr; *q; q++)
  573.                scout(*q) ;
  574.          else if (KeyTab[j].Type == None) ;
  575.          else { /* Number or Dimension */
  576.             ValInt = (integer)(ValNum<0? ValNum-0.5 : ValNum+0.5) ;
  577.             if (ValInt-ValNum < 0.001 && ValInt-ValNum > -0.001)
  578.                 numout((integer)ValInt) ;
  579.             else {
  580.                (void)sprintf(cmdbuf, "%f", ValNum) ;
  581.                cmdout(cmdbuf) ;
  582.             }
  583.          }
  584.       (void)sprintf(cmdbuf, "@%s", KeyStr);
  585.       cmdout(cmdbuf) ;
  586.       }
  587.  
  588.    cmdout("@setspecial");
  589.  
  590.    if(psfile[0]) {
  591.       if (task == 0) {
  592.          systemtype = (psfile[0]=='`') ;
  593.          figcopyfile(psfile+systemtype, systemtype);
  594.       } else {
  595.          fil2ps(task, psfile) ;
  596.       }
  597.    } else if (psfilewanted)
  598.       specerror("No \\special psfile was given; figure will be blank") ;
  599.  
  600.    cmdout("@endspecial");
  601. }
  602.  
  603. extern char realnameoffile[] ;
  604. extern char *pictpath ;
  605.  
  606. void fil2ps(task, iname)
  607. char *task, *iname ;
  608. {
  609.    char cmd[400] ;
  610.    FILE *f ;
  611.    if (f=search(pictpath, iname, "r")) {
  612.       fclose(f) ;
  613.    } else {
  614.       fprintf(stderr, " couldn't open %s\n", iname) ;
  615.       return ;
  616.    }
  617.    if (!quiet) {
  618.       fprintf(stderr, " [%s", realnameoffile) ;
  619.       fflush(stderr) ;
  620.    }
  621.    if (oname && oname[0] && oname[0] != '-') {
  622.       putc(10, bitfile) ;
  623.       fclose(bitfile) ;
  624.       sprintf(cmd, "%s -f %s %s", task, realnameoffile, oname) ;
  625.       system(cmd) ;
  626.       if ((bitfile=fopen(oname, "a"))==NULL)
  627.          error("! couldn't reopen PostScript file") ;
  628.       linepos = 0 ;
  629.    } else {
  630.       sprintf(cmd, "%s -f %s", task, realnameoffile) ;
  631.       system(cmd) ;
  632.    }
  633.    if (!quiet)
  634.       fprintf(stderr, "]") ;
  635. }
  636.  
  637.