Mercurial > emacs
annotate lib-src/ntlib.h @ 103656:563d704f3c48
(decode_keyboard_code): New function.
(tty_read_avail_input): Decode the input bytes if necessary.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 01 Jul 2009 11:37:19 +0000 |
parents | 06ca3efb355b |
children | 1d1d5d9bd884 |
rev | line source |
---|---|
15139 | 1 /* Utility and Unix shadow routines for GNU Emacs support programs on NT. |
94828
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
2 Copyright (C) 1994, 2002, 2003, 2004, 2005, 2006, 2007, |
100958 | 3 2008, 2009 Free Software Foundation, Inc. |
15139 | 4 |
94828
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
5 This file is part of GNU Emacs. |
15139 | 6 |
94828
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
7 GNU Emacs is free software: you can redistribute it and/or modify |
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
8 it under the terms of the GNU General Public License as published by |
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
10 (at your option) any later version. |
15139 | 11 |
94828
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
12 GNU Emacs is distributed in the hope that it will be useful, |
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
13 but WITHOUT ANY WARRANTY; without even the implied warranty of |
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
15 GNU General Public License for more details. |
15139 | 16 |
94828
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
17 You should have received a copy of the GNU General Public License |
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
3a4bc081639c
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79748
diff
changeset
|
19 |
15139 | 20 |
21 #include <pwd.h> | |
22 #include <malloc.h> | |
23 | |
19232 | 24 /* Include these headers now so we don't have to worry about include |
25 order dependencies in common source files. */ | |
26 #include <direct.h> | |
27 #include <io.h> | |
28 #include <stdio.h> | |
29 | |
30 #ifdef sleep | |
31 #undef sleep | |
32 #endif | |
31082
9865d23be9e7
(WIN32): Remove unnecessary definition.
Andrew Innes <andrewi@gnu.org>
parents:
22315
diff
changeset
|
33 void sleep(unsigned long seconds); |
15674 | 34 char *getwd (char *dir); |
15139 | 35 int getppid(void); |
36 char * getlogin (); | |
37 char * cuserid (char * s); | |
102670
06ca3efb355b
inc/sys/stat.h (struct stat): Change the types of st_uid and st_gid to unsigned.
Eli Zaretskii <eliz@gnu.org>
parents:
100958
diff
changeset
|
38 unsigned getuid (); |
06ca3efb355b
inc/sys/stat.h (struct stat): Change the types of st_uid and st_gid to unsigned.
Eli Zaretskii <eliz@gnu.org>
parents:
100958
diff
changeset
|
39 int setuid (unsigned uid); |
15139 | 40 char * getpass (const char * prompt); |
102670
06ca3efb355b
inc/sys/stat.h (struct stat): Change the types of st_uid and st_gid to unsigned.
Eli Zaretskii <eliz@gnu.org>
parents:
100958
diff
changeset
|
41 int fchown (int fd, unsigned uid, unsigned gid); |
15139 | 42 |
43 #ifndef BSTRING | |
44 #define bzero(b, l) memset(b, 0, l) | |
45 #define bcopy(s, d, l) memcpy(d, s, l) | |
46 #define bcmp(a, b, l) memcmp(a, b, l) | |
47 #endif | |
48 | |
22315 | 49 /* redirect or undo interceptions created by config.h */ |
19232 | 50 #undef access |
51 #define access _access | |
52 #undef chdir | |
53 #define chdir _chdir | |
54 #undef chmod | |
55 #define chmod _chmod | |
56 #undef close | |
57 #define close _close | |
58 #undef creat | |
59 #define creat _creat | |
60 #undef ctime | |
61 #undef dup | |
62 #define dup _dup | |
63 #undef dup2 | |
64 #define dup2 _dup2 | |
65 #undef fopen | |
66 #undef mkdir | |
67 #define mkdir _mkdir | |
68 #undef mktemp | |
69 #define mktemp _mktemp | |
70 #undef open | |
71 #define open _open | |
72 #undef pipe | |
73 #define pipe _pipe | |
74 #undef read | |
75 #define read _read | |
76 #undef rename | |
77 #undef rmdir | |
78 #define rmdir _rmdir | |
79 #undef unlink | |
80 #define unlink _unlink | |
81 #undef write | |
82 #define write _write | |
83 | |
84 /* map to MSVC names */ | |
85 #define execlp _execlp | |
86 #define execvp _execvp | |
87 #define fdopen _fdopen | |
63018
e50e8a19d938
(fileno): Don't define if already defined.
Eli Zaretskii <eliz@gnu.org>
parents:
52401
diff
changeset
|
88 #ifndef fileno |
19232 | 89 #define fileno _fileno |
63018
e50e8a19d938
(fileno): Don't define if already defined.
Eli Zaretskii <eliz@gnu.org>
parents:
52401
diff
changeset
|
90 #endif |
19232 | 91 #define getcwd _getcwd |
92 #define getw _getw | |
93 #define getpid _getpid | |
94 #define isatty _isatty | |
95 #define locking _locking | |
96 #define logb _logb | |
97 #define _longjmp longjmp | |
98 #define lseek _lseek | |
99 #define popen _popen | |
100 #define pclose _pclose | |
101 #define umask _umask | |
102 #define utime _utime | |
103 #define index strchr | |
104 #define rindex strrchr | |
105 | |
22315 | 106 /* Make standard winsock definitions available if needed. */ |
107 #undef _WINSOCKAPI_ | |
31082
9865d23be9e7
(WIN32): Remove unnecessary definition.
Andrew Innes <andrewi@gnu.org>
parents:
22315
diff
changeset
|
108 #undef _WINSOCK_H |
22315 | 109 |
15139 | 110 /* end of ntlib.h */ |
52401 | 111 |
112 /* arch-tag: 93444f66-7b98-4aa5-a5cd-01444094af28 | |
113 (do not change this comment) */ |