Mercurial > emacs
annotate lib-src/ntlib.c @ 53531:5bd5de5e98c2
(Saving Buffers): Clarify descriptions of `write-contents-functions'
and `before-save-hook'. Make the defvar's for `before-save-hook' and
`after-save-hook' into defopt's.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Wed, 07 Jan 2004 20:38:22 +0000 |
parents | 695cf19ef79e |
children | 23a17af379b1 375f2633d815 |
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 | |
31081
1fd32e8a2fad
(sleep): Make argument unsigned long.
Andrew Innes <andrewi@gnu.org>
parents:
22296
diff
changeset
|
38 sleep(unsigned long 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 | |
52 static HANDLE getppid_parent; | |
53 static int getppid_ppid; | |
54 | |
55 int | |
56 getppid(void) | |
57 { | |
58 char *ppid; | |
59 DWORD result; | |
60 | |
22296
b58a79fe0af2
(getppid): Look for EM_PARENT_PROCESS_ID.
Geoff Voelker <voelker@cs.washington.edu>
parents:
19694
diff
changeset
|
61 ppid = getenv ("EM_PARENT_PROCESS_ID"); |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
62 if (!ppid) |
9803 | 63 { |
64 printf("no pid.\n"); | |
65 return 0; | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
66 } |
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
67 else |
9803 | 68 { |
69 getppid_ppid = atoi (ppid); | |
70 } | |
71 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
72 if (!getppid_parent) |
9803 | 73 { |
74 getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi(ppid)); | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
75 if (!getppid_parent) |
9803 | 76 { |
77 printf ("Failed to open handle to parent process: %d\n", | |
78 GetLastError()); | |
79 exit (1); | |
80 } | |
81 } | |
82 | |
83 result = WaitForSingleObject (getppid_parent, 0); | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31081
diff
changeset
|
84 switch (result) |
9803 | 85 { |
86 case WAIT_TIMEOUT: | |
87 /* The parent is still alive. */ | |
88 return getppid_ppid; | |
89 case WAIT_OBJECT_0: | |
90 /* The parent is gone. Return the pid of Unix init (1). */ | |
91 return 1; | |
92 case WAIT_FAILED: | |
93 default: | |
94 printf ("Checking parent status failed: %d\n", GetLastError()); | |
95 exit (1); | |
96 } | |
97 } | |
15138
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
98 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
99 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
100 getlogin () |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
101 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
102 static char user_name[256]; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
103 DWORD length = sizeof (user_name); |
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 if (GetUserName (user_name, &length)) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
106 return user_name; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
107 return NULL; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
108 } |
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 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
111 cuserid (char * s) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
112 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
113 char * name = getlogin (); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
114 if (s) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
115 return strcpy (s, name ? name : ""); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
116 return name; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
117 } |
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 int |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
120 getuid () |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
121 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
122 return 0; |
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 setuid (int uid) |
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 struct passwd * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
132 getpwuid (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 NULL; |
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 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
138 getpass (const char * prompt) |
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 static char input[256]; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
141 HANDLE in; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
142 HANDLE err; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
143 DWORD count; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
144 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
145 in = GetStdHandle (STD_INPUT_HANDLE); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
146 err = GetStdHandle (STD_ERROR_HANDLE); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
147 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
148 if (in == INVALID_HANDLE_VALUE || err == INVALID_HANDLE_VALUE) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
149 return NULL; |
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 if (WriteFile (err, prompt, strlen (prompt), &count, NULL)) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
152 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
153 int istty = (GetFileType (in) == FILE_TYPE_CHAR); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
154 DWORD old_flags; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
155 int rc; |
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 (istty) |
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 if (GetConsoleMode (in, &old_flags)) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
160 SetConsoleMode (in, ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
161 else |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
162 istty = 0; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
163 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
164 rc = ReadFile (in, input, sizeof (input), &count, NULL); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
165 if (count >= 2 && input[count - 2] == '\r') |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
166 input[count - 2] = '\0'; |
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 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
169 char buf[256]; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
170 while (ReadFile (in, buf, sizeof (buf), &count, NULL) > 0) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
171 if (count >= 2 && buf[count - 2] == '\r') |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
172 break; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
173 } |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
174 WriteFile (err, "\r\n", 2, &count, NULL); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
175 if (istty) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
176 SetConsoleMode (in, old_flags); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
177 if (rc) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
178 return input; |
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 |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
181 return NULL; |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
182 } |
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 int |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
185 fchown (int fd, int uid, int gid) |
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 0; |
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 /* 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
|
191 on network directories, so we handle that case here. |
15138
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
192 (Ulrich Leodolter, 1/11/95). */ |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
193 char * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
194 sys_ctime (const time_t *t) |
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 char *str = (char *) ctime (t); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
197 return (str ? str : "Sun Jan 01 00:00:00 1970"); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
198 } |
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 FILE * |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
201 sys_fopen(const char * path, const char * mode) |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
202 { |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
203 return fopen (path, mode); |
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 int |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
207 sys_chdir (const char * path) |
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 _chdir (path); |
92326afec2a6
Include ntlib.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
14837
diff
changeset
|
210 } |
52401 | 211 |
212 /* arch-tag: 7b63fb83-70ee-4124-8822-54e53e5d0773 | |
213 (do not change this comment) */ |