annotate lib-src/i.c @ 558:ed498ef2108b

[xemacs-hg @ 2001-05-23 09:59:33 by ben] xemacs.mak: call `ver' to get the exact os version and put it in the installation; suggestion from adrian. behavior-defs.el: Add scroll-in-place, jka-compr, efs, fix up some things. pop.c: Remove BROKEN_CYGWIN. etc\sample.init.el: Rewrite to be much more careful about loading features -- now it decays gracefully even in the complete absence of packages. Also avoid doing obnoxious things when loading efs. configure.in: add some support for eventually turning on file coding by default. Fix numerous places where AC_MSG_WARN had quotes around its arg, which is bad. Replace with []. Same for AC_MSG_ERROR. s\cygwin32.h, s\mingw32.h: remove support for way old beta versions of cygwin. don't put -Wno-sign-compare in the system switches; this isn't a system issue. define BROKEN_SIGIO for cygwin to get C-g support. device-msw.c: signal an error rather than crash with an unavailable network printer (from Mike Alexander). event-msw.c: cleanup headers. fix (hopefully) an error with data corruption when sending to a network connection. fileio.c: Fix evil code that attempts to handle the ~user prefix by (a) always assuming we're referencing ourselves and not even verifying the user -- hence any file with a tilde as its first char is invalid! (b) if there wasn't a slash following the filename, the pointer was set *past* the end of file and we started reading from uninitialized memory. Now we simply treat these as files, always. optionally for 21.4 (doc fix): lread.c: cambia de pas_de_lache_ici -- al minimo usa la palabra certa. frame.c: fix warnings. emacs.c, nt.c, ntproc.c, process-nt.c, realpath.c, unexnt.c: rename MAX_PATH to standard PATH_MAX. process-nt.c, realpath.c: cleanup headers. process-unix.c, sysdep.c, systime.h, syswindows.h: kill BROKEN_CYGWIN and support for way old beta versions of cygwin. sysfile.h: use _MAX_PATH (Windows) preferentially for PATH_MAX if defined. include io.h on Cygwin (we need get_osfhandle()). include sys/fcntl.h always, since we were including it in various header files anyway. unexcw.c: fix up style to conform to standard. remove duplicate definition of PERROR. buffer.c: comment change. database.c, debug.h, device-tty.c, dired-msw.c, glyphs-msw.c: header cleanups (remove places that directly include a system header file, because we have our own layer to do this more cleanly and portably); indentation fixes.
author ben
date Wed, 23 May 2001 09:59:48 +0000
parents abe6d1db359e
children 6728e641994e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1 /* I-connector utility
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
2 Copyright (C) 2000 Kirill M. Katsnelson
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
3
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
4 This file is part of XEmacs.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
5
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
9 later version.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
10
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
14 for more details.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
15
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
20
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
21 /* When run with an argument, i treats it as a command line, and pipes
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
22 command stdin, stdout and stderr to its own respective streams. How
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
23 silly it should sound, but windowed program in Win32 cannot do output
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
24 to the console from which it has been started, and should be run using
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
25 this utility.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
26
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
27 This utility is for running [tx]emacs as part of make process so that
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
28 its output goes to the same console as the rest of the make output
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
29 does. It can be used also when xemacs should be run as a batch
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
30 command ina script, especially when its standart output should be
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
31 obtained programmatically. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
32
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
33 #include <windows.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
34 #include <stdio.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
35 #include <string.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
36 #include <tchar.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
37
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
38 typedef struct
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
39 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
40 HANDLE source;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
41 HANDLE drain;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
42 } I_connector;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
43
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
44 /*
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
45 * Make new handle as that pointed to by PH but
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
46 * inheritable, substitute PH with it, and close the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
47 * original one
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
48 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
49 static void
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
50 make_inheritable (HANDLE* ph)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
51 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
52 HANDLE htmp;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
53 DuplicateHandle (GetCurrentProcess(), *ph, GetCurrentProcess(), &htmp,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
54 0, TRUE, DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
55 *ph = htmp;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
56 }
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
57
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
58 /*
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
59 * Worker thread proc. Reads source, pumps into drain,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
60 * till either clogs.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
61 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
62 static DWORD CALLBACK
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
63 pump (LPVOID pv_i)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
64 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
65 I_connector* pi = (I_connector*) pv_i;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
66 BYTE buffer [256];
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
67 DWORD really_read, unused;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
68
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
69 while (ReadFile (pi->source, buffer, sizeof (buffer), &really_read, NULL) &&
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
70 WriteFile (pi->drain, buffer, really_read, &unused, NULL))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
71 ;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
72
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
73 return 0;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
74 }
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
75
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
76 /*
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
77 * Launch a pump for the given I-connector
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
78 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
79 static void
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
80 start_pump (I_connector* pi)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
81 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
82 DWORD unused;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
83 HANDLE h_thread = CreateThread (NULL, 0, pump, (void*)pi, 0, &unused);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
84 CloseHandle (h_thread);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
85 }
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
86
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
87 /*
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
88 * Get command line, skip over the executable name, return the rest.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
89 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
90 static LPTSTR
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
91 get_command (void)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
92 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
93 LPTSTR cl = GetCommandLine ();
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
94 int ix;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
95
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
96 while (1)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
97 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
98 ix = _tcscspn (cl, _T(" \t\""));
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
99 if (cl[ix] == '\"')
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
100 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
101 cl = _tcschr (cl + ix + 1, '\"');
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
102 if (cl == NULL)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
103 return NULL; /* Unmatched quote */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
104 cl++;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
105 }
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
106 else
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
107 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
108 cl += ix;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
109 cl += _tcsspn (cl, _T(" \t"));
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
110 return *cl ? cl : NULL;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
111 }
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
112 }
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
113 }
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
114
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
115 /*
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
116 * Brew coffee and bring snickers
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
117 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
118 void
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
119 usage (void)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
120 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
121 fprintf (stderr,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
122 "\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
123 "usage: i command\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
124 "i executes the command and reroutes its standard handles to the calling\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
125 "console. Good for seeing output of GUI programs that use standard output."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
126 "\n");
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
127 }
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
128
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
129 int
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
130 main (void)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
131 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
132 STARTUPINFO si;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
133 PROCESS_INFORMATION pi;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
134 I_connector I_in, I_out, I_err;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
135 DWORD exit_code;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
136
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
137 LPTSTR command = get_command ();
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
138 if (command == NULL)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
139 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
140 usage ();
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
141 return 1;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
142 }
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
143
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
144 ZeroMemory (&si, sizeof (si));
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
145 si.dwFlags = STARTF_USESTDHANDLES;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
146
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
147 I_in.source = GetStdHandle (STD_INPUT_HANDLE);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
148 CreatePipe (&si.hStdInput, &I_in.drain, NULL, 0);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
149 make_inheritable (&si.hStdInput);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
150
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
151 I_out.drain = GetStdHandle (STD_OUTPUT_HANDLE);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
152 CreatePipe (&I_out.source, &si.hStdOutput, NULL, 0);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
153 make_inheritable (&si.hStdOutput);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
154
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
155 I_err.drain = GetStdHandle (STD_ERROR_HANDLE);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
156 CreatePipe (&I_err.source, &si.hStdError, NULL, 0);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
157 make_inheritable (&si.hStdError);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
158
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
159 if (CreateProcess (NULL, command, NULL, NULL, TRUE, 0,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
160 NULL, NULL, &si, &pi) == 0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
161 {
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
162 _ftprintf (stderr, _T("Error %d launching `%s'\n"),
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
163 GetLastError (), command);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
164 return 2;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
165 }
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
166
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
167 CloseHandle (pi.hThread);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
168
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
169 /* Start pump in each I-connector */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
170 start_pump (&I_in);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
171 start_pump (&I_out);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
172 start_pump (&I_err);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
173
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
174 /* Wait for the process to complete */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
175 WaitForSingleObject (pi.hProcess, INFINITE);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
176 GetExitCodeProcess (pi.hProcess, &exit_code);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
177 CloseHandle (pi.hProcess);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
178
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
179 /* Make pump threads eventually die out. Looks rude, I agree */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
180 CloseHandle (GetStdHandle (STD_INPUT_HANDLE));
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
181 CloseHandle (GetStdHandle (STD_OUTPUT_HANDLE));
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
182 CloseHandle (GetStdHandle (STD_ERROR_HANDLE));
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
183
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
184 return exit_code;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
185 }