home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / flistfrontend / src / flnoid.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-06  |  1.3 KB  |  54 lines

  1. #ifndef NO_IDENT
  2. static char *Id = "$Id: flnoid.c,v 1.5 1995/06/06 10:10:06 tom Exp $";
  3. #endif
  4.  
  5. /*
  6.  * Title:    flnoid.c
  7.  * Author:    Thomas E. Dickey
  8.  * Created:    22 May 1984
  9.  * Last update:
  10.  *        18 Mar 1995, prototypes
  11.  *        11 Jun 1985, added cli-argument to dds_spawn
  12.  *        26 Jul 1984, modified 'dirseek()'
  13.  *        16 Jul 1984
  14.  *        10 Jul 1984, re-coded to DCLARG-list.
  15.  *        03 Jul 1984, changed name 'faccess' to 'dirent_acc'
  16.  *        22 May 1984
  17.  *
  18.  * Function:    Spawn an external process (PRINT or SUBMIT).  To avoid messing
  19.  *        up the screen, append the NOIDENTIFY option.  These use the
  20.  *        NOWAIT version of spawning, since their intent is only to
  21.  *        queue a request.
  22.  *
  23.  *        The arguments need not be members of 'filelist[]', since they
  24.  *        are not modified.
  25.  *
  26.  * Patch:    I would rather capture and display the enqueued-message.
  27.  */
  28.  
  29. #include    <stdlib.h>
  30. #include    <stdio.h>
  31. #include    <string.h>
  32.  
  33. #include    "flist.h"
  34. #include    "dirent.h"
  35. #include    "dircmd.h"
  36. #include    "dirseek.h"
  37. #include    "dds.h"
  38.  
  39. static    char    format[] = "%s/noidentify";
  40.  
  41. tDIRCMD(flnoid)
  42. {
  43.     int    pr_cmd    = (strcmp ("PRINT", xdcl_->dcl_text) == 0);
  44.     char    *full_;
  45.  
  46.     if (! dirseek (xcmd_, xdcl_, 1, TRUE))    return;
  47.  
  48.     full_ = calloc (1, strlen(xcmd_)+sizeof(format));
  49.     sprintf (full_, format, xcmd_);
  50.  
  51.     dds_spawn (0, *curfile_, full_, (pr_cmd ? "Printing..." : 0), TRUE, 1);
  52.     cfree (full_);
  53. }
  54.