aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Love1999-10-01 11:44:30 +0000
committerDave Love1999-10-01 11:44:30 +0000
commit33682909de64d08b7cbb63230ed3c17e45c9afc1 (patch)
treec0ad49be7d2be240dba5c01e401be4df82de67a3 /src
parenta08cb76c5a7501b8da3926e752559801bccbc0d4 (diff)
downloademacs-33682909de64d08b7cbb63230ed3c17e45c9afc1.tar.gz
emacs-33682909de64d08b7cbb63230ed3c17e45c9afc1.zip
#ecrt0.c
Diffstat (limited to 'src')
-rw-r--r--src/.dbxinit15
-rw-r--r--src/README31
-rw-r--r--src/cxux-crt0.s38
-rw-r--r--src/filemode.c256
-rw-r--r--src/temacs.opt60
-rw-r--r--src/vms-pp.trans10
6 files changed, 410 insertions, 0 deletions
diff --git a/src/.dbxinit b/src/.dbxinit
new file mode 100644
index 00000000000..dcd57cfd36e
--- /dev/null
+++ b/src/.dbxinit
@@ -0,0 +1,15 @@
1ignore 14
2catch 18
3ignore 20
4ignore 23
5alias s step
6alias n next
7alias c cont
8alias st status
9alias r run
10alias l list
11alias f file
12alias q quit
13alias w where
14alias d delete
15alias p print
diff --git a/src/README b/src/README
new file mode 100644
index 00000000000..60705cef318
--- /dev/null
+++ b/src/README
@@ -0,0 +1,31 @@
1This directory contains the source files for the C component of GNU Emacs.
2Nothing in this directory is needed for using Emacs once it is built
3and installed, if the dumped Emacs (on Unix systems) or the Emacs
4executable and map files (on VMS systems) are copied elsewhere.
5
6See the files ../README and then ../INSTALL for installation instructions.
7
8Under GNU and Unix systems, the file `Makefile.in' is used as a
9template by the script `../configure' to produce `Makefile.c'. The
10same script then uses `cpp' to produce the machine-dependent
11`Makefile' from `Makefile.c'; `Makefile' is the file which actually
12controls the compilation of Emacs. Most of this should work
13transparently to the user; you should only need to run `../configure',
14and then type `make'.
15
16See the file VMSBUILD in this directory for instructions on compiling,
17linking and building Emacs on VMS.
18
19The files `*.com' and `temacs.opt' are used on VMS only.
20The files `vlimit.h', `ioclt.h' and `param.h' are stubs to
21allow compilation on VMS with the minimum amount of #ifdefs.
22
23`uaf.h' contains VMS uaf structure definitions. This is only needed if
24you define READ_SYSUAF. This should only be done for single-user
25systems where you are not overly concerned with security, since it
26either requires that you install Emacs with SYSPRV or make SYSUAF.DAT
27world readable. Otherwise, Emacs can determine information about the
28current user, but no one else.
29
30`pwd.h' contains definitions for VMS to be able to correctly simulate
31`getpwdnam' and `getpwduid'.
diff --git a/src/cxux-crt0.s b/src/cxux-crt0.s
new file mode 100644
index 00000000000..cf973b1708f
--- /dev/null
+++ b/src/cxux-crt0.s
@@ -0,0 +1,38 @@
1/*
2 * External symbol setup file for GNU Emacs on CX/UX
3 * Copyright (C) 1990 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Emacs.
6 *
7 * GNU Emacs is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY. No author or distributor
9 * accepts responsibility to anyone for the consequences of using it
10 * or for whether it serves any particular purpose or works at all,
11 * unless he says so in writing. Refer to the GNU Emacs General Public
12 * License for full details.
13 *
14 * Everyone is granted permission to copy, modify and redistribute
15 * GNU Emacs, but only under the conditions described in the
16 * GNU Emacs General Public License. A copy of this license is
17 * supposed to have been given to you along with GNU Emacs so you
18 * can know your rights and responsibilities. It should be in a
19 * file named COPYING. Among other things, the copyright notice
20 * and this notice must be preserved on all copies.
21 */
22
23/*
24 * This file makes the start of the text and data regions of the program
25 * clearly visible to the GNU Emacs C source code, without any dependencies
26 * on any changes made to the standard C runtime startup module, crt0.o.
27 * It depends, however, on this file being passed down to the linker (ld)
28 * before any others, and the linker's behavior of assigning increasing
29 * addresses as it finds symbols.
30 */
31 /* C symbol _start marks beginning of text region. */
32 .text
33 .globl __start
34__start:
35 /* C symbol data_start marks beginning of data region. */
36 .data
37 .globl _data_start
38_data_start: .space 4
diff --git a/src/filemode.c b/src/filemode.c
new file mode 100644
index 00000000000..d804e94d73c
--- /dev/null
+++ b/src/filemode.c
@@ -0,0 +1,256 @@
1/* filemode.c -- make a string describing file modes
2 Copyright (C) 1985, 1990, 1993 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 USA. */
18
19#ifdef HAVE_CONFIG_H
20#include <config.h>
21#endif
22
23#include <sys/types.h>
24#include <sys/stat.h>
25
26#if !S_IRUSR
27# if S_IREAD
28# define S_IRUSR S_IREAD
29# else
30# define S_IRUSR 00400
31# endif
32#endif
33
34#if !S_IWUSR
35# if S_IWRITE
36# define S_IWUSR S_IWRITE
37# else
38# define S_IWUSR 00200
39# endif
40#endif
41
42#if !S_IXUSR
43# if S_IEXEC
44# define S_IXUSR S_IEXEC
45# else
46# define S_IXUSR 00100
47# endif
48#endif
49
50#ifdef STAT_MACROS_BROKEN
51#undef S_ISBLK
52#undef S_ISCHR
53#undef S_ISDIR
54#undef S_ISFIFO
55#undef S_ISLNK
56#undef S_ISMPB
57#undef S_ISMPC
58#undef S_ISNWK
59#undef S_ISREG
60#undef S_ISSOCK
61#endif /* STAT_MACROS_BROKEN. */
62
63#if !defined(S_ISBLK) && defined(S_IFBLK)
64#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
65#endif
66#if !defined(S_ISCHR) && defined(S_IFCHR)
67#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
68#endif
69#if !defined(S_ISDIR) && defined(S_IFDIR)
70#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
71#endif
72#if !defined(S_ISREG) && defined(S_IFREG)
73#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
74#endif
75#if !defined(S_ISFIFO) && defined(S_IFIFO)
76#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
77#endif
78#if !defined(S_ISLNK) && defined(S_IFLNK)
79#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
80#endif
81#if !defined(S_ISSOCK) && defined(S_IFSOCK)
82#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
83#endif
84#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */
85#define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
86#define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
87#endif
88#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
89#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
90#endif
91
92void mode_string ();
93static char ftypelet ();
94static void rwx ();
95static void setst ();
96
97/* filemodestring - fill in string STR with an ls-style ASCII
98 representation of the st_mode field of file stats block STATP.
99 10 characters are stored in STR; no terminating null is added.
100 The characters stored in STR are:
101
102 0 File type. 'd' for directory, 'c' for character
103 special, 'b' for block special, 'm' for multiplex,
104 'l' for symbolic link, 's' for socket, 'p' for fifo,
105 '-' for regular, '?' for any other file type
106
107 1 'r' if the owner may read, '-' otherwise.
108
109 2 'w' if the owner may write, '-' otherwise.
110
111 3 'x' if the owner may execute, 's' if the file is
112 set-user-id, '-' otherwise.
113 'S' if the file is set-user-id, but the execute
114 bit isn't set.
115
116 4 'r' if group members may read, '-' otherwise.
117
118 5 'w' if group members may write, '-' otherwise.
119
120 6 'x' if group members may execute, 's' if the file is
121 set-group-id, '-' otherwise.
122 'S' if it is set-group-id but not executable.
123
124 7 'r' if any user may read, '-' otherwise.
125
126 8 'w' if any user may write, '-' otherwise.
127
128 9 'x' if any user may execute, 't' if the file is "sticky"
129 (will be retained in swap space after execution), '-'
130 otherwise.
131 'T' if the file is sticky but not executable. */
132
133void
134filemodestring (statp, str)
135 struct stat *statp;
136 char *str;
137{
138 mode_string (statp->st_mode, str);
139}
140
141/* Like filemodestring, but only the relevant part of the `struct stat'
142 is given as an argument. */
143
144void
145mode_string (mode, str)
146 unsigned short mode;
147 char *str;
148{
149 str[0] = ftypelet ((long) mode);
150 rwx ((mode & 0700) << 0, &str[1]);
151 rwx ((mode & 0070) << 3, &str[4]);
152 rwx ((mode & 0007) << 6, &str[7]);
153 setst (mode, str);
154}
155
156/* Return a character indicating the type of file described by
157 file mode BITS:
158 'd' for directories
159 'b' for block special files
160 'c' for character special files
161 'm' for multiplexor files
162 'l' for symbolic links
163 's' for sockets
164 'p' for fifos
165 '-' for regular files
166 '?' for any other file type. */
167
168static char
169ftypelet (bits)
170 long bits;
171{
172#ifdef S_ISBLK
173 if (S_ISBLK (bits))
174 return 'b';
175#endif
176 if (S_ISCHR (bits))
177 return 'c';
178 if (S_ISDIR (bits))
179 return 'd';
180 if (S_ISREG (bits))
181 return '-';
182#ifdef S_ISFIFO
183 if (S_ISFIFO (bits))
184 return 'p';
185#endif
186#ifdef S_ISLNK
187 if (S_ISLNK (bits))
188 return 'l';
189#endif
190#ifdef S_ISSOCK
191 if (S_ISSOCK (bits))
192 return 's';
193#endif
194#ifdef S_ISMPC
195 if (S_ISMPC (bits))
196 return 'm';
197#endif
198#ifdef S_ISNWK
199 if (S_ISNWK (bits))
200 return 'n';
201#endif
202 return '?';
203}
204
205/* Look at read, write, and execute bits in BITS and set
206 flags in CHARS accordingly. */
207
208static void
209rwx (bits, chars)
210 unsigned short bits;
211 char *chars;
212{
213 chars[0] = (bits & S_IRUSR) ? 'r' : '-';
214 chars[1] = (bits & S_IWUSR) ? 'w' : '-';
215 chars[2] = (bits & S_IXUSR) ? 'x' : '-';
216}
217
218/* Set the 's' and 't' flags in file attributes string CHARS,
219 according to the file mode BITS. */
220
221static void
222setst (bits, chars)
223 unsigned short bits;
224 char *chars;
225{
226#ifdef S_ISUID
227 if (bits & S_ISUID)
228 {
229 if (chars[3] != 'x')
230 /* Set-uid, but not executable by owner. */
231 chars[3] = 'S';
232 else
233 chars[3] = 's';
234 }
235#endif
236#ifdef S_ISGID
237 if (bits & S_ISGID)
238 {
239 if (chars[6] != 'x')
240 /* Set-gid, but not executable by group. */
241 chars[6] = 'S';
242 else
243 chars[6] = 's';
244 }
245#endif
246#ifdef S_ISVTX
247 if (bits & S_ISVTX)
248 {
249 if (chars[9] != 'x')
250 /* Sticky, but not executable by others. */
251 chars[9] = 'T';
252 else
253 chars[9] = 't';
254 }
255#endif
256}
diff --git a/src/temacs.opt b/src/temacs.opt
new file mode 100644
index 00000000000..a8aa50211b7
--- /dev/null
+++ b/src/temacs.opt
@@ -0,0 +1,60 @@
1cluster=emacs,,,-
2DISPNEW.OBJ,-
3SCROLL.OBJ,-
4XDISP.OBJ,-
5WINDOW.OBJ,-
6TERM.OBJ,-
7CM.OBJ,-
8EMACS.OBJ,-
9KEYBOARD.OBJ,-
10MACROS.OBJ,-
11KEYMAP.OBJ,-
12SYSDEP.OBJ,-
13BUFFER.OBJ,-
14FILELOCK.OBJ,-
15INSDEL.OBJ,-
16MARKER.OBJ,-
17MINIBUF.OBJ,-
18FILEIO.OBJ,-
19DIRED.OBJ,-
20FILEMODE.OBJ,-
21CMDS.OBJ,-
22CASEFIDDLE.OBJ,-
23INDENT.OBJ,-
24SEARCH.OBJ,-
25REGEX.OBJ,-
26UNDO.OBJ,-
27ALLOC.OBJ,-
28DATA.OBJ,-
29DOC.OBJ,-
30EDITFNS.OBJ,-
31CALLINT.OBJ,-
32EVAL.OBJ,-
33FNS.OBJ,-
34PRINT.OBJ,-
35LREAD.OBJ,-
36ABBREV.OBJ,-
37SYNTAX.OBJ,-
38MOCKLISP.OBJ,-
39BYTECODE.OBJ,-
40PROCESS.OBJ,-
41CALLPROC.OBJ,-
42VMSFNS.OBJ,-
43VMSPROC.OBJ,-
44DOPRNT.OBJ,-
45vmsmap.obj,-
46termcap.obj,-
47tparam.obj,-
48lastfile.obj,-
49alloca.obj,-
50malloc.obj
51collect=non_saved_data,-
52stdin,-
53stdout,-
54stderr,-
55errno,-
56vaxc$errno,-
57sys_errlist,-
58sys_nerr,-
59environ
60sys$library:vaxcrtl/library
diff --git a/src/vms-pp.trans b/src/vms-pp.trans
new file mode 100644
index 00000000000..cab69d7da07
--- /dev/null
+++ b/src/vms-pp.trans
@@ -0,0 +1,10 @@
1! translations for extra long variable names
2!234567890123456789012345678901 1234567890123456789012345678901
3Vminibuffer_local_completion_map Vminibuf_local_completion_map
4Vminibuffer_local_must_match_map Vminibuf_local_must_match
5Finsert_abbrev_table_description Finsert_abbrev_table_descrip
6Sinsert_abbrev_table_description Sinsert_abbrev_table_descrip
7internal_with_output_to_temp_buffer internal_with_out_to_temp_buf
8Vminibuffer_completion_predicate Vminibuf_completion_predicate
9Qminibuffer_completion_predicate Qminibuf_completion_predicate
10