httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/support/win32 wintty.c
Date Mon, 14 May 2001 04:27:20 GMT
wrowe       01/05/13 21:27:19

  Modified:    support/win32 wintty.c
  Log:
    Clarify the wintty purpose and syntax.
  
    Still some todos: an option to just abort user feedback and close the
    window instantly upon loosing the stdin pipe, allow the stdin pipe to
    be tee'ed on win32, and still add some graceful error handling for a
    real-world deployment.
  
  Revision  Changes    Path
  1.2       +12 -7     httpd-2.0/support/win32/wintty.c
  
  Index: wintty.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/win32/wintty.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wintty.c	2001/05/14 04:09:08	1.1
  +++ wintty.c	2001/05/14 04:27:18	1.2
  @@ -71,14 +71,18 @@
   #include <windows.h>
   
   const char *options = 
  -"Syntax: wintty [opts] [-?]\n\n"
  +"\nwintty: a utility for echoing the stdin stream to a new console window,\n"
  +"\teven when invoked from within a service (such as the Apache server.)\n"
  +"\tAlso reflects the console input back to the stdout stream, allowing\n"
  +"\tthe operator to respond to prompts from the context of a service.\n\n"
  +"Syntax: %s [opts]\n\n"
   "  opts: -c{haracter}   or -l{ine} input\n"
   "\t-q{uiet}       or -e{cho} input\n"
  -"\topts: -u{nprocessed} or -p{rocessed} input\n"
  -"\topts: -n{owrap}      or -w{rap} output lines\n"
  -"\topts: -f{ormatted}   or -r{aw} output lines\n"
  -"\topts: -v{erbose} error checking\n"
  -"\topts: -? for this message\n\n";
  +"\t-u{nprocessed} or -p{rocessed} input\n"
  +"\t-n{owrap}      or -w{rap} output lines\n"
  +"\t-f{ormatted}   or -r{aw} output lines\n"
  +"\t-v{erbose} error checking\n"
  +"\t-? for this message\n\n";
   
   HANDLE herrout;
   BOOL verbose = FALSE;
  @@ -112,6 +116,7 @@
       DWORD tid;
       DWORD len;
       BOOL isservice = FALSE;
  +    char *arg0 = argv[0];
   
       while (--argc) {
           ++argv;
  @@ -145,7 +150,7 @@
                       --argc;
                       break;
                   case '?':
  -                    printf(options);
  +                    printf(options, arg0);
                       exit(1);
   		default:
                       printf("wintty option %s not recognized, use -? for help.\n\n", *argv);
  
  
  

Mime
View raw message