annotate lib-src/ntlib.h @ 107249:c7093188c806

Document :otf font-spec property. * display.texi (Low-Level Font): Document :otf font-spec property.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 27 Feb 2010 10:18:07 -0500
parents 1d1d5d9bd884
children 65405dd90a72
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15139
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
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,
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 102670
diff changeset
3 2008, 2009, 2010 Free Software Foundation, Inc.
15139
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
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
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
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
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
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
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
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
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
20
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
21 #include <pwd.h>
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
22 #include <malloc.h>
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
23
19232
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
24 /* Include these headers now so we don't have to worry about include
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
25 order dependencies in common source files. */
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
26 #include <direct.h>
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
27 #include <io.h>
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
28 #include <stdio.h>
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
29
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
30 #ifdef sleep
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
31 #undef sleep
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
32 #endif
31082
9865d23be9e7 (WIN32): Remove unnecessary definition.
Andrew Innes <andrewi@gnu.org>
parents: 22315
diff changeset
33 void sleep(unsigned long seconds);
15674
772d00a51db0 Correct return type of getwd.
Karl Heuer <kwzh@gnu.org>
parents: 15139
diff changeset
34 char *getwd (char *dir);
15139
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
35 int getppid(void);
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
36 char * getlogin ();
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
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
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
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
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
42
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
43 #ifndef BSTRING
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
44 #define bzero(b, l) memset(b, 0, l)
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
45 #define bcopy(s, d, l) memcpy(d, s, l)
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
46 #define bcmp(a, b, l) memcmp(a, b, l)
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
47 #endif
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
48
22315
80daf55e329a Undefine _WINSOCKAPI_.
Andrew Innes <andrewi@gnu.org>
parents: 19232
diff changeset
49 /* redirect or undo interceptions created by config.h */
19232
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
50 #undef access
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
51 #define access _access
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
52 #undef chdir
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
53 #define chdir _chdir
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
54 #undef chmod
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
55 #define chmod _chmod
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
56 #undef close
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
57 #define close _close
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
58 #undef creat
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
59 #define creat _creat
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
60 #undef ctime
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
61 #undef dup
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
62 #define dup _dup
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
63 #undef dup2
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
64 #define dup2 _dup2
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
65 #undef fopen
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
66 #undef mkdir
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
67 #define mkdir _mkdir
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
68 #undef mktemp
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
69 #define mktemp _mktemp
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
70 #undef open
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
71 #define open _open
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
72 #undef pipe
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
73 #define pipe _pipe
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
74 #undef read
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
75 #define read _read
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
76 #undef rename
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
77 #undef rmdir
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
78 #define rmdir _rmdir
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
79 #undef unlink
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
80 #define unlink _unlink
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
81 #undef write
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
82 #define write _write
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
83
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
84 /* map to MSVC names */
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
85 #define execlp _execlp
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
86 #define execvp _execvp
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
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
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
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
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
91 #define getcwd _getcwd
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
92 #define getw _getw
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
93 #define getpid _getpid
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
94 #define isatty _isatty
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
95 #define locking _locking
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
96 #define logb _logb
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
97 #define _longjmp longjmp
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
98 #define lseek _lseek
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
99 #define popen _popen
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
100 #define pclose _pclose
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
101 #define umask _umask
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
102 #define utime _utime
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
103 #define index strchr
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
104 #define rindex strrchr
9b2a1f0c73dc Add includes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 15742
diff changeset
105
22315
80daf55e329a Undefine _WINSOCKAPI_.
Andrew Innes <andrewi@gnu.org>
parents: 19232
diff changeset
106 /* Make standard winsock definitions available if needed. */
80daf55e329a Undefine _WINSOCKAPI_.
Andrew Innes <andrewi@gnu.org>
parents: 19232
diff changeset
107 #undef _WINSOCKAPI_
31082
9865d23be9e7 (WIN32): Remove unnecessary definition.
Andrew Innes <andrewi@gnu.org>
parents: 22315
diff changeset
108 #undef _WINSOCK_H
22315
80daf55e329a Undefine _WINSOCKAPI_.
Andrew Innes <andrewi@gnu.org>
parents: 19232
diff changeset
109
15139
4d638e5a9e7d Initial revision
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff changeset
110 /* end of ntlib.h */
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 31082
diff changeset
111
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 31082
diff changeset
112 /* arch-tag: 93444f66-7b98-4aa5-a5cd-01444094af28
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 31082
diff changeset
113 (do not change this comment) */