]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge features and bug fixes.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 25 Jan 2006 07:04:33 +0000 (07:04 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 25 Jan 2006 07:04:33 +0000 (07:04 +0000)
backend/lpd.c:
    - Add contimeout option and also look in OSX system preferences for
      the maximum time we wait to finally connect to the printer.
    - Add OSX proxy error handling support.
    - Fix to properly support + and & as separators.

backend/socket.c:
    - Add waiteof option - when set to false/no/off, the backend will
      no longer shutdown the transmit side of the socket and wait for
      the printer to close its side.

berkeley/lpr.c:
    - Use ssize_t and off_t variables for read/write and lseek so
      that things work properly with large file support.

systemv/lp.c:
    - Use ssize_t and off_t variables for read/write and lseek so
      that things work properly with large file support.
    - "-m" makes lp silent, per OpenGroup specs.
    - "--" stops option processing, per OpenGroup specs.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4974 7a7537e8-13f0-0310-91df-b6672ffda945

backend/lpd.c
backend/socket.c
berkeley/lpr.c
systemv/lp.c

index b1536795e9c92d2e5d3ef0e6bcf983f18485000b..a65f5a5d149184efe24a0341e058f529b33b0799 100644 (file)
 #  include <arpa/inet.h>
 #  include <netdb.h>
 #endif /* WIN32 */
+#ifdef __APPLE__
+#  include <CoreFoundation/CFNumber.h>
+#  include <CoreFoundation/CFPreferences.h>
+#endif /* __APPLE__ */
 
 
 /*
@@ -95,7 +99,7 @@ static int    lpd_queue(const char *hostname, int port, const char *printer,
                          const char *filename,
                          const char *user, const char *title, int copies,
                          int banner, int format, int order, int reserve,
-                         int manual_copies, int timeout);
+                         int manual_copies, int timeout, int contimeout);
 static void    lpd_timeout(int sig);
 static int     lpd_write(int lpd_fd, char *buffer, int length);
 #ifndef HAVE_RRESVPORT_AF
@@ -135,6 +139,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
   int                  sanitize_title; /* Sanitize title string? */
   int                  manual_copies,  /* Do manual copies? */
                        timeout,        /* Timeout */
+                       contimeout,     /* Connection timeout */
                        copies;         /* Number of copies */
 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
   struct sigaction     action;         /* Actions for POSIX signals */
@@ -243,18 +248,41 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
   * See if there are any options...
   */
 
-  banner         = 0;
-  format         = 'l';
-  order          = ORDER_CONTROL_DATA;
-  reserve        = RESERVE_ANY;
-  manual_copies  = 1;
-  timeout        = 300;
-  sanitize_title = 1;
+  banner        = 0;
+  format        = 'l';
+  order         = ORDER_CONTROL_DATA;
+  reserve       = RESERVE_ANY;
+  manual_copies = 1;
+  timeout       = 300;
+  contimeout    = 7 * 24 * 60 * 60;
 
-#if defined(__APPLE__)
+#ifdef __APPLE__
   /* We want to pass utf-8 characters, not re-map them (3071945) */
-  sanitize_title= 0;
-#endif
+  sanitize_title = 0;
+
+  {
+    CFPropertyListRef  pvalue;         /* Preference value */
+    SInt32             toval;          /* Timeout value */
+
+
+    pvalue = CFPreferencesCopyValue(CFSTR("timeout"),
+                                    CFSTR("com.apple.print.backends"),
+                                   kCFPreferencesAnyUser,
+                                   kCFPreferencesCurrentHost);
+    if (pvalue)
+    {
+      if (CFGetTypeID(pvalue) == CFNumberGetTypeID())
+      {
+       CFNumberGetValue(pvalue, kCFNumberSInt32Type, &toval);
+       contimeout = (int)toval;
+      }
+
+      CFRelease(pvalue);
+    }
+  }
+#else
+  sanitize_title = 1;
+#endif /* __APPLE__ */
 
   if ((options = strchr(resource, '?')) != NULL)
   {
@@ -293,7 +321,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
             *ptr++ = *options++;
        *ptr = '\0';
 
-       if (*options == '+')
+       if (*options == '+' || *options == '&')
          options ++;
       }
       else
@@ -303,51 +331,47 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
       * Process the option...
       */
 
-      if (strcasecmp(name, "banner") == 0)
+      if (!strcasecmp(name, "banner"))
       {
        /*
         * Set the banner...
        */
 
-        banner = !value[0] ||
-                strcasecmp(value, "on") == 0 ||
-                strcasecmp(value, "yes") == 0 ||
-                strcasecmp(value, "true") == 0;
+        banner = !value[0] || !strcasecmp(value, "on") ||
+                !strcasecmp(value, "yes") || !strcasecmp(value, "true");
       }
-      else if (strcasecmp(name, "format") == 0 && value[0])
+      else if (!strcasecmp(name, "format") && value[0])
       {
        /*
         * Set output format...
        */
 
-        if (strchr("cdfglnoprtv", value[0]) != NULL)
+        if (strchr("cdfglnoprtv", value[0]))
          format = value[0];
        else
          fprintf(stderr, "ERROR: Unknown format character \"%c\"\n", value[0]);
       }
-      else if (strcasecmp(name, "order") == 0 && value[0])
+      else if (!strcasecmp(name, "order") && value[0])
       {
        /*
         * Set control/data order...
        */
 
-        if (strcasecmp(value, "control,data") == 0)
+        if (!strcasecmp(value, "control,data"))
          order = ORDER_CONTROL_DATA;
-       else if (strcasecmp(value, "data,control") == 0)
+       else if (!strcasecmp(value, "data,control"))
          order = ORDER_DATA_CONTROL;
        else
          fprintf(stderr, "ERROR: Unknown file order \"%s\"\n", value);
       }
-      else if (strcasecmp(name, "reserve") == 0)
+      else if (!strcasecmp(name, "reserve"))
       {
        /*
         * Set port reservation mode...
        */
 
-        if (!value[0] ||
-           !strcasecmp(value, "on") ||
-           !strcasecmp(value, "yes") ||
-           !strcasecmp(value, "true") ||
+        if (!value[0] || !strcasecmp(value, "on") ||
+           !strcasecmp(value, "yes") || !strcasecmp(value, "true") ||
            !strcasecmp(value, "rfc1179"))
          reserve = RESERVE_RFC1179;
        else if (!strcasecmp(value, "any"))
@@ -355,29 +379,25 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
        else
          reserve = RESERVE_NONE;
       }
-      else if (strcasecmp(name, "manual_copies") == 0)
+      else if (!strcasecmp(name, "manual_copies"))
       {
        /*
         * Set manual copies...
        */
 
-        manual_copies = !value[0] ||
-                       strcasecmp(value, "on") == 0 ||
-                       strcasecmp(value, "yes") == 0 ||
-                       strcasecmp(value, "true") == 0;
+        manual_copies = !value[0] || !strcasecmp(value, "on") ||
+                       !strcasecmp(value, "yes") || !strcasecmp(value, "true");
       }
-      else if (strcasecmp(name, "sanitize_title") == 0)
+      else if (!strcasecmp(name, "sanitize_title"))
       {
        /*
         * Set sanitize title...
        */
 
-        sanitize_title = !value[0] ||
-                       strcasecmp(value, "on") == 0 ||
-                       strcasecmp(value, "yes") == 0 ||
-                       strcasecmp(value, "true") == 0;
+        sanitize_title = !value[0] || !strcasecmp(value, "on") ||
+                       !strcasecmp(value, "yes") || !strcasecmp(value, "true");
       }
-      else if (strcasecmp(name, "timeout") == 0)
+      else if (!strcasecmp(name, "timeout"))
       {
        /*
         * Set the timeout...
@@ -386,6 +406,15 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
        if (atoi(value) > 0)
          timeout = atoi(value);
       }
+      else if (!strcasecmp(name, "contimeout"))
+      {
+       /*
+        * Set the timeout...
+       */
+
+       if (atoi(value) > 0)
+         contimeout = atoi(value);
+      }
     }
   }
 
@@ -426,7 +455,8 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
 
     status = lpd_queue(hostname, port, resource + 1, filename,
                        username, title, copies,
-                      banner, format, order, reserve, manual_copies, timeout);
+                      banner, format, order, reserve, manual_copies,
+                      timeout, contimeout);
 
     if (!status)
       fprintf(stderr, "PAGE: 1 %d\n", atoi(argv[4]));
@@ -434,7 +464,8 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
   else
     status = lpd_queue(hostname, port, resource + 1, filename,
                        username, title, 1,
-                      banner, format, order, reserve, 1, timeout);
+                      banner, format, order, reserve, 1,
+                      timeout, contimeout);
 
  /*
   * Remove the temporary file if necessary...
@@ -536,7 +567,8 @@ lpd_queue(const char *hostname,             /* I - Host to connect to */
           int        order,            /* I - Order of data/control files */
          int        reserve,           /* I - Reserve ports? */
          int        manual_copies,     /* I - Do copies by hand... */
-         int        timeout)           /* I - Timeout... */
+         int        timeout,           /* I - Timeout... */
+         int        contimeout)        /* I - Connection timeout */
 {
   FILE                 *fp;            /* Job file */
   char                 localhost[255]; /* Local host name */
@@ -551,6 +583,10 @@ lpd_queue(const char *hostname,            /* I - Host to connect to */
   http_addrlist_t      *addrlist,      /* Address list */
                        *addr;          /* Socket address */
   int                  copy;           /* Copies written */
+  time_t               start_time;     /* Time of first connect */
+#ifdef __APPLE__
+  int                  recoverable;    /* Recoverable error shown? */
+#endif /* __APPLE__ */
   size_t               nbytes;         /* Number of bytes written */
   off_t                        tbytes;         /* Total bytes written */
   char                 buffer[65536];  /* Output buffer */
@@ -588,6 +624,15 @@ lpd_queue(const char *hostname,            /* I - Host to connect to */
     return (CUPS_BACKEND_STOP);
   }
 
+ /*
+  * Remember when we starting trying to connect to the printer...
+  */
+
+#ifdef __APPLE__
+  recoverable = 0;
+#endif /* __APPLE__ */
+  start_time  = time(NULL);
+
  /*
   * Loop forever trying to print the file...
   */
@@ -714,7 +759,20 @@ lpd_queue(const char *hostname,            /* I - Host to connect to */
       if (error == ECONNREFUSED || error == EHOSTDOWN ||
           error == EHOSTUNREACH)
       {
-       fprintf(stderr, "WARNING: Network host \'%s\' is busy, down, or unreachable; will retry in 30 seconds...\n",
+        if (contimeout && (time(NULL) - start_time) > contimeout)
+       {
+         fputs("ERROR: Printer not responding!\n", stderr);
+         return (CUPS_BACKEND_FAILED);
+       }
+
+#ifdef __APPLE__
+        recoverable = 1;
+       fprintf(stderr, "WARNING: recoverable: "
+#else
+       fprintf(stderr, "WARNING: "
+#endif /* __APPLE__ */
+                       "Network host \'%s\' is busy, down, or "
+                       "unreachable; will retry in 30 seconds...\n",
                 hostname);
        sleep(30);
       }
@@ -728,11 +786,29 @@ lpd_queue(const char *hostname,           /* I - Host to connect to */
       }
       else
       {
-       perror("ERROR: Unable to connect to printer; will retry in 30 seconds...");
+#ifdef __APPLE__
+        recoverable = 1;
+       perror("ERROR: recoverable: "
+#else
+       perror("ERROR: "
+#endif /* __APPLE__ */
+              "Unable to connect to printer; will retry in 30 seconds...");
         sleep(30);
       }
     }
 
+    if (recoverable)
+    {
+     /*
+      * If we've shown a recoverable error make sure the printer proxies
+      * have a chance to see the recovered message. Not pretty but
+      * necessary for now...
+      */
+
+      fputs("INFO: recovered: \n", stderr);
+      sleep(5);
+    }
+
     fprintf(stderr, "INFO: Connected to %s...\n", hostname);
     fprintf(stderr, "DEBUG: Connected on ports %d (local %d)...\n", port,
             lport);
index b1f9f8893be253a13a7f836af4bf531a383217b6..a46db817cf78b908f98baa7e423b7047af8ab771 100644 (file)
@@ -71,9 +71,14 @@ main(int  argc,                              /* I - Number of command-line arguments (6 or 7) */
   char         method[255],            /* Method in URI */
                hostname[1024],         /* Hostname */
                username[255],          /* Username info (not used) */
-               resource[1024];         /* Resource info (not used) */
+               resource[1024],         /* Resource info (not used) */
+               *options,               /* Pointer to options */
+               name[255],              /* Name of option */
+               value[255],             /* Value of option */
+               *ptr;                   /* Pointer into name or value */
   int          fp;                     /* Print file */
   int          copies;                 /* Number of copies to print */
+  int          waiteof;                /* Wait for end-of-file? */
   int          port;                   /* Port number */
   char         portname[255];          /* Port name */
   int          delay;                  /* Delay for retries... */
@@ -166,6 +171,71 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
   if (port == 0)
     port = 9100;       /* Default to HP JetDirect/Tektronix PhaserShare */
 
+ /*
+  * Get options, if any...
+  */
+
+  waiteof = 1;
+
+  if ((options = strchr(resource, '?')) != NULL)
+  {
+   /*
+    * Yup, terminate the device name string and move to the first
+    * character of the options...
+    */
+
+    *options++ = '\0';
+
+   /*
+    * Parse options...
+    */
+
+    while (*options)
+    {
+     /*
+      * Get the name...
+      */
+
+      for (ptr = name; *options && *options != '=';)
+        if (ptr < (name + sizeof(name) - 1))
+          *ptr++ = *options++;
+      *ptr = '\0';
+
+      if (*options == '=')
+      {
+       /*
+        * Get the value...
+       */
+
+        options ++;
+
+       for (ptr = value; *options && *options != '+' && *options != '&';)
+          if (ptr < (value + sizeof(value) - 1))
+            *ptr++ = *options++;
+       *ptr = '\0';
+
+       if (*options == '+' || *options == '&')
+         options ++;
+      }
+      else
+        value[0] = '\0';
+
+     /*
+      * Process the option...
+      */
+
+      if (!strcasecmp(name, "waiteof"))
+      {
+       /*
+        * Set the wait-for-eof value...
+       */
+
+        waiteof = !value[0] || !strcasecmp(value, "on") ||
+                 !strcasecmp(value, "yes") || !strcasecmp(value, "true");
+      }
+    }
+  }
+
  /*
   * Then try to connect to the remote host...
   */
@@ -346,48 +416,51 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
                (unsigned long)tbytes);
     }
 
-   /*
-    * Shutdown the socket and wait for the other end to finish...
-    */
-
-    fputs("INFO: Print file sent, waiting for printer to finish...\n", stderr);
-
-    shutdown(fd, 1);
-
-    for (;;)
+    if (waiteof)
     {
      /*
-      * Wait a maximum of 90 seconds for backchannel data or a closed
-      * connection...
+      * Shutdown the socket and wait for the other end to finish...
       */
 
-      timeout.tv_sec  = 90;
-      timeout.tv_usec = 0;
+      fputs("INFO: Print file sent, waiting for printer to finish...\n", stderr);
 
-      FD_ZERO(&input);
-      FD_SET(fd, &input);
+      shutdown(fd, 1);
 
-#ifdef __hpux
-      if (select(fd + 1, (int *)&input, NULL, NULL, &timeout) > 0)
-#else
-      if (select(fd + 1, &input, NULL, NULL, &timeout) > 0)
-#endif /* __hpux */
+      for (;;)
       {
        /*
-       * Grab the data coming back and spit it out to stderr...
+       * Wait a maximum of 90 seconds for backchannel data or a closed
+       * connection...
        */
 
-       if ((rbytes = recv(fd, resource, sizeof(resource), 0)) > 0)
+       timeout.tv_sec  = 90;
+       timeout.tv_usec = 0;
+
+       FD_ZERO(&input);
+       FD_SET(fd, &input);
+
+  #ifdef __hpux
+       if (select(fd + 1, (int *)&input, NULL, NULL, &timeout) > 0)
+  #else
+       if (select(fd + 1, &input, NULL, NULL, &timeout) > 0)
+  #endif /* __hpux */
        {
-         fprintf(stderr, "DEBUG: Received %d bytes of back-channel data!\n",
-                 rbytes);
-          cupsBackchannelWrite(resource, rbytes, 1.0);
-        }
+        /*
+         * Grab the data coming back and spit it out to stderr...
+         */
+
+         if ((rbytes = recv(fd, resource, sizeof(resource), 0)) > 0)
+         {
+           fprintf(stderr, "DEBUG: Received %d bytes of back-channel data!\n",
+                   rbytes);
+           cupsBackchannelWrite(resource, rbytes, 1.0);
+         }
+         else
+           break;
+       }
        else
          break;
       }
-      else
-        break;
     }
 
    /*
index 782714c1f22b69b18a6c60904f1f82d848286849..be4f3073025ae5d9a059dc6c1e69dc1d811a5162 100644 (file)
@@ -64,31 +64,33 @@ char        tempfile[1024];         /* Temporary file for printing from stdin */
  */
 
 int
-main(int  argc,                /* I - Number of command-line arguments */
-     char *argv[])     /* I - Command-line arguments */
+main(int  argc,                                /* I - Number of command-line arguments */
+     char *argv[])                     /* I - Command-line arguments */
 {
-  int          i, j;           /* Looping var */
-  int          job_id;         /* Job ID */
-  char         ch;             /* Option character */
-  char         *printer,       /* Destination printer or class */
-               *instance;      /* Instance */
-  const char   *title,         /* Job title */
-               *val;           /* Environment variable name */
-  int          num_copies;     /* Number of copies per file */
-  int          num_files;      /* Number of files to print */
-  const char   *files[1000];   /* Files to print */
-  int          num_dests;      /* Number of destinations */
-  cups_dest_t  *dests,         /* Destinations */
-               *dest;          /* Selected destination */
-  int          num_options;    /* Number of options */
-  cups_option_t        *options;       /* Options */
-  int          deletefile;     /* Delete file after print? */
-  char         buffer[8192];   /* Copy buffer */
-  int          temp;           /* Temporary file descriptor */
-  cups_lang_t  *language;      /* Language information */
+  int          i, j;                   /* Looping var */
+  int          job_id;                 /* Job ID */
+  char         ch;                     /* Option character */
+  char         *printer,               /* Destination printer or class */
+               *instance;              /* Instance */
+  const char   *title,                 /* Job title */
+               *val;                   /* Environment variable name */
+  int          num_copies;             /* Number of copies per file */
+  int          num_files;              /* Number of files to print */
+  const char   *files[1000];           /* Files to print */
+  int          num_dests;              /* Number of destinations */
+  cups_dest_t  *dests,                 /* Destinations */
+               *dest;                  /* Selected destination */
+  int          num_options;            /* Number of options */
+  cups_option_t        *options;               /* Options */
+  int          deletefile;             /* Delete file after print? */
+  char         buffer[8192];           /* Copy buffer */
+  ssize_t      bytes;                  /* Bytes copied */
+  off_t                filesize;               /* Size of temp file */
+  int          temp;                   /* Temporary file descriptor */
+  cups_lang_t  *language;              /* Language information */
 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
-  struct sigaction action;     /* Signal action */
-  struct sigaction oldaction;  /* Old signal action */
+  struct sigaction action;             /* Signal action */
+  struct sigaction oldaction;          /* Old signal action */
 #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
 
 
@@ -461,8 +463,8 @@ main(int  argc,             /* I - Number of command-line arguments */
       return (1);
     }
 
-    while ((i = read(0, buffer, sizeof(buffer))) > 0)
-      if (write(temp, buffer, i) < 0)
+    while ((bytes = read(0, buffer, sizeof(buffer))) > 0)
+      if (write(temp, buffer, bytes) < 0)
       {
        _cupsLangPrintf(stderr,
                        _("%s: Error - unable to write to temporary file "
@@ -473,10 +475,10 @@ main(int  argc,           /* I - Number of command-line arguments */
        return (1);
       }
 
-    i = lseek(temp, 0, SEEK_CUR);
+    filesize = lseek(temp, 0, SEEK_CUR);
     close(temp);
 
-    if (i == 0)
+    if (filesize <= 0)
     {
       _cupsLangPrintf(stderr,
                       _("%s: Error - stdin is empty, so no job has been sent.\n"),
@@ -509,7 +511,7 @@ main(int  argc,             /* I - Number of command-line arguments */
  */
 
 void
-sighandler(int s)      /* I - Signal number */
+sighandler(int s)                      /* I - Signal number */
 {
  /*
   * Remove the temporary file we're using to print from stdin...
index accc019a1ddc1a9aaa3593690425f3f97e043920..6c1869a3b203e2fe9b64541cb0949459cda22bfe 100644 (file)
@@ -87,8 +87,11 @@ main(int  argc,                              /* I - Number of command-line arguments */
                *dest;                  /* Selected destination */
   int          num_options;            /* Number of options */
   cups_option_t        *options;               /* Options */
+  int          end_options;            /* No more options? */
   int          silent;                 /* Silent or verbose output? */
   char         buffer[8192];           /* Copy buffer */
+  ssize_t      bytes;                  /* Bytes copied */
+  off_t                filesize;               /* Size of temp file */
   int          temp;                   /* Temporary file descriptor */
 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
   struct sigaction action;             /* Signal action */
@@ -123,9 +126,10 @@ main(int  argc,                            /* I - Number of command-line arguments */
   num_files   = 0;
   title       = NULL;
   job_id      = 0;
+  end_options = 0;
 
   for (i = 1; i < argc; i ++)
-    if (argv[i][0] == '-' && argv[i][1])
+    if (argv[i][0] == '-' && argv[i][1] && !end_options)
       switch (argv[i][1])
       {
         case 'E' : /* Encrypt */
@@ -287,6 +291,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
              num_options = cupsAddOption("notify-recipient", email,
                                          num_options, &options);
            }
+
+           silent = 1;
            break;
 
        case 'n' : /* Number of copies */
@@ -531,6 +537,10 @@ main(int  argc,                            /* I - Number of command-line arguments */
                            argv[0]);
            break;
 
+        case '-' : /* Stop processing options */
+           end_options = 1;
+           break;
+
        default :
            _cupsLangPrintf(stderr, _("%s: Error - unknown option \'%c\'!\n"),
                            argv[0], argv[i][1]);
@@ -678,8 +688,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
       return (1);
     }
 
-    while ((i = read(0, buffer, sizeof(buffer))) > 0)
-      if (write(temp, buffer, i) < 0)
+    while ((bytes = read(0, buffer, sizeof(buffer))) > 0)
+      if (write(temp, buffer, bytes) < 0)
       {
        _cupsLangPrintf(stderr,
                        _("%s: Error - unable to write to temporary file "
@@ -690,10 +700,10 @@ main(int  argc,                           /* I - Number of command-line arguments */
        return (1);
       }
 
-    i = lseek(temp, 0, SEEK_CUR);
+    filesize = lseek(temp, 0, SEEK_CUR);
     close(temp);
 
-    if (i == 0)
+    if (filesize <= 0)
     {
       _cupsLangPrintf(stderr,
                      _("%s: Error - stdin is empty, so no job has been sent.\n"),
@@ -810,7 +820,7 @@ set_job_attrs(const char    *command,       /* I - Command name */
  */
 
 void
-sighandler(int s)      /* I - Signal number */
+sighandler(int s)                      /* I - Signal number */
 {
  /*
   * Remove the temporary file we're using to print from stdin...