Mercurial > emacs
annotate lib-src/ntlib.c @ 82222:c17afaa92484
(cvs-vc-command-advice): Handle the new fileset case.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 31 Jul 2007 15:23:27 +0000 |
parents | 1f2482de3237 |
children | 5714ff101fd9 f55f9811f5d7 |
rev | line source |
---|---|
9803 | 1 /* Utility and Unix shadow routines for GNU Emacs support programs on NT. |
75250
6d19c76d81c5
Update copyright for years from Emacs 21 to present (mainly adding
Glenn Morris <rgm@gnu.org>
parents:
68647
diff
changeset
|
2 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, |
6d19c76d81c5
Update copyright for years from Emacs 21 to present (mainly adding
Glenn Morris <rgm@gnu.org>
parents:
68647
diff
changeset
|
3 2006, 2007 Free Software Foundation, Inc. |
9803 | 4 |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
5 This file is part of GNU Emacs. |
9803 | 6 |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
7 GNU Emacs is free software; you can redistribute it and/or modify |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
8 it under the terms of the GNU General Public License as published by |
78257
1f2482de3237
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
75250
diff
changeset
|
9 the Free Software Foundation; either version 3, or (at your option) |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
10 any later version. |
9803 | 11 |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
12 GNU Emacs is distributed in the hope that it will be useful, |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
13 but WITHOUT ANY WARRANTY; without even the implied warranty of |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
15 GNU General Public License for more details. |
9803 | 16 |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
17 You should have received a copy of the GNU General Public License |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
18 along with GNU Emacs; see the file COPYING. If not, write to |
64083 | 19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 Boston, MA 02110-1301, USA. | |
9803 | 21 |
22 Geoff Voelker (voelker@cs.washington.edu) 10-8-94 | |
23 */ | |
24 | |
25 #include <windows.h> | |
26 #include <stdlib.h> | |
27 #include <stdio.h> | |
15138
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
28 #include <time.h> |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
29 #include <direct.h> |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
30 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
31 #include "ntlib.h" |
9803 | 32 |
33 #define MAXPATHLEN _MAX_PATH | |
34 | |
35 /* Emulate sleep...we could have done this with a define, but that | |
36 would necessitate including windows.h in the files that used it. | |
37 This is much easier. */ | |
38 void | |
31081
1fd32e8a2fad
(sleep): Make argument unsigned long.
Andrew Innes <andrewi@gnu.org>
parents:
22296
diff
changeset
|
39 sleep(unsigned long seconds) |
9803 | 40 { |
41 Sleep (seconds * 1000); | |
42 } | |
43 | |
44 /* Get the current working directory. */ | |
15675 | 45 char * |
9803 | 46 getwd (char *dir) |
47 { | |
15138
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
48 if (GetCurrentDirectory (MAXPATHLEN, dir) > 0) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
49 return dir; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
50 return NULL; |
9803 | 51 } |
52 | |
53 static HANDLE getppid_parent; | |
54 static int getppid_ppid; | |
55 | |
56 int | |
57 getppid(void) | |
58 { | |
59 char *ppid; | |
60 DWORD result; | |
61 | |
22296
b58a79fe0af2
(getppid): Look for EM_PARENT_PROCESS_ID.
Geoff Voelker <voelker@cs.washington.edu>
parents:
19694
diff
changeset
|
62 ppid = getenv ("EM_PARENT_PROCESS_ID"); |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
63 if (!ppid) |
9803 | 64 { |
65 printf("no pid.\n"); | |
66 return 0; | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
67 } |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
68 else |
9803 | 69 { |
70 getppid_ppid = atoi (ppid); | |
71 } | |
72 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
73 if (!getppid_parent) |
9803 | 74 { |
75 getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi(ppid)); | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
76 if (!getppid_parent) |
9803 | 77 { |
78 printf ("Failed to open handle to parent process: %d\n", | |
79 GetLastError()); | |
80 exit (1); | |
81 } | |
82 } | |
83 | |
84 result = WaitForSingleObject (getppid_parent, 0); | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
85 switch (result) |
9803 | 86 { |
87 case WAIT_TIMEOUT: | |
88 /* The parent is still alive. */ | |
89 return getppid_ppid; | |
90 case WAIT_OBJECT_0: | |
91 /* The parent is gone. Return the pid of Unix init (1). */ | |
92 return 1; | |
93 case WAIT_FAILED: | |
94 default: | |
95 printf ("Checking parent status failed: %d\n", GetLastError()); | |
96 exit (1); | |
97 } | |
98 } | |
15138
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
99 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
100 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
101 getlogin () |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
102 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
103 static char user_name[256]; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
104 DWORD length = sizeof (user_name); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
105 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
106 if (GetUserName (user_name, &length)) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
107 return user_name; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
108 return NULL; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
109 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
110 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
111 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
112 cuserid (char * s) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
113 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
114 char * name = getlogin (); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
115 if (s) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
116 return strcpy (s, name ? name : ""); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
117 return name; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
118 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
119 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
120 int |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
121 getuid () |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
122 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
123 return 0; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
124 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
125 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
126 int |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
127 setuid (int uid) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
128 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
129 return 0; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
130 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
131 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
132 struct passwd * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
133 getpwuid (int uid) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
134 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
135 return NULL; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
136 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
137 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
138 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
139 getpass (const char * prompt) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
140 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
141 static char input[256]; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
142 HANDLE in; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
143 HANDLE err; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
144 DWORD count; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
145 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
146 in = GetStdHandle (STD_INPUT_HANDLE); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
147 err = GetStdHandle (STD_ERROR_HANDLE); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
148 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
149 if (in == INVALID_HANDLE_VALUE || err == INVALID_HANDLE_VALUE) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
150 return NULL; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
151 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
152 if (WriteFile (err, prompt, strlen (prompt), &count, NULL)) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
153 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
154 int istty = (GetFileType (in) == FILE_TYPE_CHAR); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
155 DWORD old_flags; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
156 int rc; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
157 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
158 if (istty) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
159 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
160 if (GetConsoleMode (in, &old_flags)) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
161 SetConsoleMode (in, ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
162 else |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
163 istty = 0; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
164 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
165 rc = ReadFile (in, input, sizeof (input), &count, NULL); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
166 if (count >= 2 && input[count - 2] == '\r') |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
167 input[count - 2] = '\0'; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
168 else |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
169 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
170 char buf[256]; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
171 while (ReadFile (in, buf, sizeof (buf), &count, NULL) > 0) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
172 if (count >= 2 && buf[count - 2] == '\r') |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
173 break; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
174 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
175 WriteFile (err, "\r\n", 2, &count, NULL); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
176 if (istty) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
177 SetConsoleMode (in, old_flags); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
178 if (rc) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
179 return input; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
180 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
181 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
182 return NULL; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
183 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
184 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
185 int |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
186 fchown (int fd, int uid, int gid) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
187 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
188 return 0; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
189 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
190 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
191 /* Place a wrapper around the MSVC version of ctime. It returns NULL |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
192 on network directories, so we handle that case here. |
15138
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
193 (Ulrich Leodolter, 1/11/95). */ |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
194 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
195 sys_ctime (const time_t *t) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
196 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
197 char *str = (char *) ctime (t); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
198 return (str ? str : "Sun Jan 01 00:00:00 1970"); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
199 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
200 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
201 FILE * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
202 sys_fopen(const char * path, const char * mode) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
203 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
204 return fopen (path, mode); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
205 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
206 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
207 int |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
208 sys_chdir (const char * path) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
209 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
210 return _chdir (path); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
211 } |
52401 | 212 |
213 /* arch-tag: 7b63fb83-70ee-4124-8822-54e53e5d0773 | |
214 (do not change this comment) */ |