Mercurial > emacs
annotate lib-src/ntlib.c @ 16627:530b3f7373db
(Vtemp_file_name_pattern): New variable.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 07 Dec 1996 21:10:03 +0000 |
parents | e5b420bac4e9 |
children | 4a0cf10c12f2 |
rev | line source |
---|---|
9803 | 1 /* Utility and Unix shadow routines for GNU Emacs support programs on NT. |
2 Copyright (C) 1994 Free Software Foundation, Inc. | |
3 | |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
4 This file is part of GNU Emacs. |
9803 | 5 |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
6 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
|
7 it under the terms of the GNU General Public License as published by |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
8 the Free Software Foundation; either version 2, or (at your option) |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
9 any later version. |
9803 | 10 |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
11 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
|
12 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
|
13 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
|
14 GNU General Public License for more details. |
9803 | 15 |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
16 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
|
17 along with GNU Emacs; see the file COPYING. If not, write to |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
9803
diff
changeset
|
19 Boston, MA 02111-1307, USA. |
9803 | 20 |
21 Geoff Voelker (voelker@cs.washington.edu) 10-8-94 | |
22 */ | |
23 | |
24 #include <windows.h> | |
25 #include <stdlib.h> | |
26 #include <stdio.h> | |
15138
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
27 #include <time.h> |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
28 #include <direct.h> |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
29 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
30 #include "ntlib.h" |
9803 | 31 |
32 #define MAXPATHLEN _MAX_PATH | |
33 | |
34 /* Emulate sleep...we could have done this with a define, but that | |
35 would necessitate including windows.h in the files that used it. | |
36 This is much easier. */ | |
37 void | |
15138
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
38 sleep(int seconds) |
9803 | 39 { |
40 Sleep (seconds * 1000); | |
41 } | |
42 | |
43 /* Get the current working directory. */ | |
15675 | 44 char * |
9803 | 45 getwd (char *dir) |
46 { | |
15138
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
47 if (GetCurrentDirectory (MAXPATHLEN, dir) > 0) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
48 return dir; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
49 return NULL; |
9803 | 50 } |
51 | |
14837
730a5bd19776
(getpid): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14186
diff
changeset
|
52 int |
730a5bd19776
(getpid): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14186
diff
changeset
|
53 getpid () |
730a5bd19776
(getpid): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14186
diff
changeset
|
54 { |
730a5bd19776
(getpid): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14186
diff
changeset
|
55 return _getpid (); |
730a5bd19776
(getpid): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14186
diff
changeset
|
56 } |
730a5bd19776
(getpid): New function.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14186
diff
changeset
|
57 |
9803 | 58 static HANDLE getppid_parent; |
59 static int getppid_ppid; | |
60 | |
61 int | |
62 getppid(void) | |
63 { | |
64 char *ppid; | |
65 DWORD result; | |
66 | |
67 ppid = getenv ("__PARENT_PROCESS_ID"); | |
68 if (!ppid) | |
69 { | |
70 printf("no pid.\n"); | |
71 return 0; | |
72 } | |
73 else | |
74 { | |
75 getppid_ppid = atoi (ppid); | |
76 } | |
77 | |
78 if (!getppid_parent) | |
79 { | |
80 getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi(ppid)); | |
81 if (!getppid_parent) | |
82 { | |
83 printf ("Failed to open handle to parent process: %d\n", | |
84 GetLastError()); | |
85 exit (1); | |
86 } | |
87 } | |
88 | |
89 result = WaitForSingleObject (getppid_parent, 0); | |
90 switch (result) | |
91 { | |
92 case WAIT_TIMEOUT: | |
93 /* The parent is still alive. */ | |
94 return getppid_ppid; | |
95 case WAIT_OBJECT_0: | |
96 /* The parent is gone. Return the pid of Unix init (1). */ | |
97 return 1; | |
98 case WAIT_FAILED: | |
99 default: | |
100 printf ("Checking parent status failed: %d\n", GetLastError()); | |
101 exit (1); | |
102 } | |
103 } | |
15138
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
104 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
105 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
106 getlogin () |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
107 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
108 static char user_name[256]; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
109 DWORD length = sizeof (user_name); |
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 if (GetUserName (user_name, &length)) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
112 return user_name; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
113 return NULL; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
114 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
115 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
116 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
117 cuserid (char * s) |
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 char * name = getlogin (); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
120 if (s) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
121 return strcpy (s, name ? name : ""); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
122 return name; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
123 } |
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 int |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
126 getuid () |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
127 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
128 return 0; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
129 } |
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 int |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
132 setuid (int uid) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
133 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
134 return 0; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
135 } |
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 struct passwd * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
138 getpwuid (int uid) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
139 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
140 return NULL; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
141 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
142 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
143 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
144 getpass (const char * prompt) |
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 static char input[256]; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
147 HANDLE in; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
148 HANDLE err; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
149 DWORD count; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
150 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
151 in = GetStdHandle (STD_INPUT_HANDLE); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
152 err = GetStdHandle (STD_ERROR_HANDLE); |
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 if (in == INVALID_HANDLE_VALUE || err == INVALID_HANDLE_VALUE) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
155 return NULL; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
156 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
157 if (WriteFile (err, prompt, strlen (prompt), &count, NULL)) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
158 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
159 int istty = (GetFileType (in) == FILE_TYPE_CHAR); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
160 DWORD old_flags; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
161 int rc; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
162 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
163 if (istty) |
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 if (GetConsoleMode (in, &old_flags)) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
166 SetConsoleMode (in, ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
167 else |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
168 istty = 0; |
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 rc = ReadFile (in, input, sizeof (input), &count, NULL); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
171 if (count >= 2 && input[count - 2] == '\r') |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
172 input[count - 2] = '\0'; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
173 else |
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 char buf[256]; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
176 while (ReadFile (in, buf, sizeof (buf), &count, NULL) > 0) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
177 if (count >= 2 && buf[count - 2] == '\r') |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
178 break; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
179 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
180 WriteFile (err, "\r\n", 2, &count, NULL); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
181 if (istty) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
182 SetConsoleMode (in, old_flags); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
183 if (rc) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
184 return input; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
185 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
186 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
187 return NULL; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
188 } |
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 int |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
191 fchown (int fd, int uid, int gid) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
192 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
193 return 0; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
194 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
195 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
196 /* Place a wrapper around the MSVC version of ctime. It returns NULL |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
197 on network directories, so we handle that case here. |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
198 (Ulrich Leodolter, 1/11/95). */ |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
199 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
200 sys_ctime (const time_t *t) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
201 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
202 char *str = (char *) ctime (t); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
203 return (str ? str : "Sun Jan 01 00:00:00 1970"); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
204 } |
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 FILE * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
207 sys_fopen(const char * path, const char * mode) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
208 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
209 return fopen (path, mode); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
210 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
211 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
212 int |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
213 sys_chdir (const char * path) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
214 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
215 return _chdir (path); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
216 } |