diff options
| author | Dave Love | 1999-10-01 11:44:30 +0000 |
|---|---|---|
| committer | Dave Love | 1999-10-01 11:44:30 +0000 |
| commit | 33682909de64d08b7cbb63230ed3c17e45c9afc1 (patch) | |
| tree | c0ad49be7d2be240dba5c01e401be4df82de67a3 /src | |
| parent | a08cb76c5a7501b8da3926e752559801bccbc0d4 (diff) | |
| download | emacs-33682909de64d08b7cbb63230ed3c17e45c9afc1.tar.gz emacs-33682909de64d08b7cbb63230ed3c17e45c9afc1.zip | |
#ecrt0.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/.dbxinit | 15 | ||||
| -rw-r--r-- | src/README | 31 | ||||
| -rw-r--r-- | src/cxux-crt0.s | 38 | ||||
| -rw-r--r-- | src/filemode.c | 256 | ||||
| -rw-r--r-- | src/temacs.opt | 60 | ||||
| -rw-r--r-- | src/vms-pp.trans | 10 |
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 @@ | |||
| 1 | ignore 14 | ||
| 2 | catch 18 | ||
| 3 | ignore 20 | ||
| 4 | ignore 23 | ||
| 5 | alias s step | ||
| 6 | alias n next | ||
| 7 | alias c cont | ||
| 8 | alias st status | ||
| 9 | alias r run | ||
| 10 | alias l list | ||
| 11 | alias f file | ||
| 12 | alias q quit | ||
| 13 | alias w where | ||
| 14 | alias d delete | ||
| 15 | alias 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 @@ | |||
| 1 | This directory contains the source files for the C component of GNU Emacs. | ||
| 2 | Nothing in this directory is needed for using Emacs once it is built | ||
| 3 | and installed, if the dumped Emacs (on Unix systems) or the Emacs | ||
| 4 | executable and map files (on VMS systems) are copied elsewhere. | ||
| 5 | |||
| 6 | See the files ../README and then ../INSTALL for installation instructions. | ||
| 7 | |||
| 8 | Under GNU and Unix systems, the file `Makefile.in' is used as a | ||
| 9 | template by the script `../configure' to produce `Makefile.c'. The | ||
| 10 | same script then uses `cpp' to produce the machine-dependent | ||
| 11 | `Makefile' from `Makefile.c'; `Makefile' is the file which actually | ||
| 12 | controls the compilation of Emacs. Most of this should work | ||
| 13 | transparently to the user; you should only need to run `../configure', | ||
| 14 | and then type `make'. | ||
| 15 | |||
| 16 | See the file VMSBUILD in this directory for instructions on compiling, | ||
| 17 | linking and building Emacs on VMS. | ||
| 18 | |||
| 19 | The files `*.com' and `temacs.opt' are used on VMS only. | ||
| 20 | The files `vlimit.h', `ioclt.h' and `param.h' are stubs to | ||
| 21 | allow compilation on VMS with the minimum amount of #ifdefs. | ||
| 22 | |||
| 23 | `uaf.h' contains VMS uaf structure definitions. This is only needed if | ||
| 24 | you define READ_SYSUAF. This should only be done for single-user | ||
| 25 | systems where you are not overly concerned with security, since it | ||
| 26 | either requires that you install Emacs with SYSPRV or make SYSUAF.DAT | ||
| 27 | world readable. Otherwise, Emacs can determine information about the | ||
| 28 | current 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 | |||
| 92 | void mode_string (); | ||
| 93 | static char ftypelet (); | ||
| 94 | static void rwx (); | ||
| 95 | static 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 | |||
| 133 | void | ||
| 134 | filemodestring (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 | |||
| 144 | void | ||
| 145 | mode_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 | |||
| 168 | static char | ||
| 169 | ftypelet (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 | |||
| 208 | static void | ||
| 209 | rwx (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 | |||
| 221 | static void | ||
| 222 | setst (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 @@ | |||
| 1 | cluster=emacs,,,- | ||
| 2 | DISPNEW.OBJ,- | ||
| 3 | SCROLL.OBJ,- | ||
| 4 | XDISP.OBJ,- | ||
| 5 | WINDOW.OBJ,- | ||
| 6 | TERM.OBJ,- | ||
| 7 | CM.OBJ,- | ||
| 8 | EMACS.OBJ,- | ||
| 9 | KEYBOARD.OBJ,- | ||
| 10 | MACROS.OBJ,- | ||
| 11 | KEYMAP.OBJ,- | ||
| 12 | SYSDEP.OBJ,- | ||
| 13 | BUFFER.OBJ,- | ||
| 14 | FILELOCK.OBJ,- | ||
| 15 | INSDEL.OBJ,- | ||
| 16 | MARKER.OBJ,- | ||
| 17 | MINIBUF.OBJ,- | ||
| 18 | FILEIO.OBJ,- | ||
| 19 | DIRED.OBJ,- | ||
| 20 | FILEMODE.OBJ,- | ||
| 21 | CMDS.OBJ,- | ||
| 22 | CASEFIDDLE.OBJ,- | ||
| 23 | INDENT.OBJ,- | ||
| 24 | SEARCH.OBJ,- | ||
| 25 | REGEX.OBJ,- | ||
| 26 | UNDO.OBJ,- | ||
| 27 | ALLOC.OBJ,- | ||
| 28 | DATA.OBJ,- | ||
| 29 | DOC.OBJ,- | ||
| 30 | EDITFNS.OBJ,- | ||
| 31 | CALLINT.OBJ,- | ||
| 32 | EVAL.OBJ,- | ||
| 33 | FNS.OBJ,- | ||
| 34 | PRINT.OBJ,- | ||
| 35 | LREAD.OBJ,- | ||
| 36 | ABBREV.OBJ,- | ||
| 37 | SYNTAX.OBJ,- | ||
| 38 | MOCKLISP.OBJ,- | ||
| 39 | BYTECODE.OBJ,- | ||
| 40 | PROCESS.OBJ,- | ||
| 41 | CALLPROC.OBJ,- | ||
| 42 | VMSFNS.OBJ,- | ||
| 43 | VMSPROC.OBJ,- | ||
| 44 | DOPRNT.OBJ,- | ||
| 45 | vmsmap.obj,- | ||
| 46 | termcap.obj,- | ||
| 47 | tparam.obj,- | ||
| 48 | lastfile.obj,- | ||
| 49 | alloca.obj,- | ||
| 50 | malloc.obj | ||
| 51 | collect=non_saved_data,- | ||
| 52 | stdin,- | ||
| 53 | stdout,- | ||
| 54 | stderr,- | ||
| 55 | errno,- | ||
| 56 | vaxc$errno,- | ||
| 57 | sys_errlist,- | ||
| 58 | sys_nerr,- | ||
| 59 | environ | ||
| 60 | sys$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 | ||
| 3 | Vminibuffer_local_completion_map Vminibuf_local_completion_map | ||
| 4 | Vminibuffer_local_must_match_map Vminibuf_local_must_match | ||
| 5 | Finsert_abbrev_table_description Finsert_abbrev_table_descrip | ||
| 6 | Sinsert_abbrev_table_description Sinsert_abbrev_table_descrip | ||
| 7 | internal_with_output_to_temp_buffer internal_with_out_to_temp_buf | ||
| 8 | Vminibuffer_completion_predicate Vminibuf_completion_predicate | ||
| 9 | Qminibuffer_completion_predicate Qminibuf_completion_predicate | ||
| 10 | |||