#include TT_C_H_PATH
#endif
-#ifdef APOLLO
-#ifndef APOLLO_SR10
-#include <default_acl.h>
-#endif
-#endif
-
#if defined (WINDOWSNT)
#include <windows.h>
#endif
/* Type of display specified. We cannot use a Lisp symbol here because
Lisp symbols may not initialized at the time that we set this
variable. */
-CONST char *display_use;
+const char *display_use;
/* If non-zero, then the early error handler will only print the error
message and exit. */
# if 0 /* This is evil, rarely useful, and causes grief in some cases. */
/* Check for Sun-style stack printing via /proc */
{
- CONST char *pstack = "/usr/proc/bin/pstack";
+ const char *pstack = "/usr/proc/bin/pstack";
if (access (pstack, X_OK) == 0)
{
char buf[100];
\f
DOESNT_RETURN
-fatal (CONST char *fmt, ...)
+fatal (const char *fmt, ...)
{
va_list args;
va_start (args, fmt);
GETTEXT on the format string. */
int
-stderr_out (CONST char *fmt, ...)
+stderr_out (const char *fmt, ...)
{
int retval;
va_list args;
GETTEXT on the format string. */
int
-stdout_out (CONST char *fmt, ...)
+stdout_out (const char *fmt, ...)
{
int retval;
va_list args;
/* Do not trust to what crt0 has stuffed into argv[0] */
char full_exe_path [MAX_PATH];
GetModuleFileName (NULL, full_exe_path, MAX_PATH);
- result = Fcons (build_ext_string (full_exe_path, FORMAT_FILENAME),
+ result = Fcons (build_ext_string (full_exe_path, Qfile_name),
result);
#if defined(HAVE_SHLIB)
(void)dll_init(full_exe_path);
}
else
#endif
- result = Fcons (build_ext_string (argv [i], FORMAT_FILENAME), result);
+ result = Fcons (build_ext_string (argv [i], Qfile_name),
+ result);
}
}
return result;
for (i = 0, next = argv_list; i < n; i++, next = XCDR (next))
{
- CONST char *temp;
+ const char *temp;
CHECK_STRING (XCAR (next));
- GET_C_STRING_EXT_DATA_ALLOCA (XCAR (next), FORMAT_OS, temp);
+ TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (next),
+ C_STRING_ALLOCA, temp,
+ Qnative);
(*argv) [i] = xstrdup (temp);
}
(*argv) [n] = 0;
sort_args (argc, argv);
- /* Map in shared memory, if we are using that. */
-#ifdef HAVE_SHM
- if (argmatch (argv, argc, "-nl", "--no-shared-memory", 6, NULL, &skip_args))
- {
- map_in_data (0);
- /* The shared memory was just restored, which clobbered this. */
- skip_args = 1;
- }
- else
- {
- map_in_data (1);
- /* The shared memory was just restored, which clobbered this. */
- skip_args = 0;
- }
-#endif /* HAVE_SHM */
-
#if (defined (MSDOS) && defined (EMX)) || defined (WIN32) || defined (_SCO_DS)
environ = envp;
#endif
clearerr (stdin);
-#ifdef APOLLO
-#ifndef APOLLO_SR10
- /* If USE_DOMAIN_ACLS environment variable exists,
- use ACLs rather than UNIX modes. */
- if (egetenv ("USE_DOMAIN_ACLS"))
- default_acl (USE_DEFACL);
-#endif
-#endif /* APOLLO */
-
#if defined (HAVE_MMAP) && defined (REL_ALLOC)
/* ralloc can only be used if using the GNU memory allocator. */
init_ralloc ();
/* Initialize Qnil, Qt, Qunbound, and the
obarray. After this, symbols can be
- interned. This depends on init_alloc_once(). */
+ interned. This depends on init_alloc_once_early(). */
init_symbols_once_early ();
/* Declare the basic symbols pertaining to errors,
The *only* thing that the syms_of_*() functions are allowed to do
is call one of the following three functions:
+ INIT_LRECORD_IMPLEMENTATION()
defsymbol()
defsubr() (i.e. DEFSUBR)
deferror()
syms_of_abbrev ();
syms_of_alloc ();
-#ifdef HAVE_X_WINDOWS
- syms_of_balloon_x ();
-#endif
syms_of_buffer ();
syms_of_bytecode ();
syms_of_callint ();
syms_of_data ();
#ifdef DEBUG_XEMACS
syms_of_debug ();
+ syms_of_tests ();
#endif /* DEBUG_XEMACS */
syms_of_device ();
#ifdef HAVE_DIALOGS
#endif
#ifdef HAVE_X_WINDOWS
+ syms_of_balloon_x ();
syms_of_device_x ();
#ifdef HAVE_DIALOGS
syms_of_dialog_x ();
#ifdef HAVE_MENUBARS
syms_of_menubar_x ();
#endif
- syms_of_xselect ();
+ syms_of_select_x ();
#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
syms_of_gui_x ();
#endif
syms_of_objects_mswindows ();
syms_of_select_mswindows ();
syms_of_glyphs_mswindows ();
+ syms_of_gui_mswindows ();
#ifdef HAVE_MENUBARS
syms_of_menubar_mswindows ();
#endif
vars_of_abbrev ();
vars_of_alloc ();
-#ifdef HAVE_X_WINDOWS
- vars_of_balloon_x ();
-#endif
vars_of_buffer ();
vars_of_bytecode ();
vars_of_callint ();
vars_of_data ();
#ifdef DEBUG_XEMACS
vars_of_debug ();
+ vars_of_tests ();
#endif
vars_of_console_stream ();
vars_of_device ();
vars_of_module ();
#endif
#ifdef WINDOWSNT
+ vars_of_nt ();
vars_of_ntproc ();
#endif
vars_of_objects ();
#endif
#ifdef HAVE_X_WINDOWS
+ vars_of_balloon_x ();
vars_of_device_x ();
#ifdef HAVE_DIALOGS
vars_of_dialog_x ();
vars_of_menubar_x ();
#endif
vars_of_objects_x ();
- vars_of_xselect ();
+ vars_of_select_x ();
#ifdef HAVE_SCROLLBARS
vars_of_scrollbar_x ();
#endif
#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
vars_of_gui_x ();
#endif
-#endif
+#endif /* HAVE_X_WINDOWS */
#ifdef HAVE_MS_WINDOWS
vars_of_device_mswindows ();
earlier. The second may also depend on the first. */
complex_vars_of_mule_charset ();
#endif
-#if defined(FILE_CODING)
+#ifdef FILE_CODING
complex_vars_of_file_coding ();
#endif
#ifdef PDUMP
} else if (!restart) {
reinit_alloc_once_early ();
+ reinit_symbols_once_early ();
reinit_opaque_once_early ();
reinit_console_type_create_stream ();
reinit_vars_of_print ();
reinit_vars_of_redisplay ();
reinit_vars_of_search ();
- reinit_vars_of_scrollbar_x ();
reinit_vars_of_undo ();
reinit_vars_of_window ();
#ifdef HAVE_X_WINDOWS
reinit_vars_of_device_x ();
-#endif
#ifdef HAVE_SCROLLBARS
reinit_vars_of_scrollbar_x ();
+#endif
#ifdef HAVE_MENUBARS
reinit_vars_of_menubar_x ();
#endif
- reinit_vars_of_xselect ();
+ reinit_vars_of_select_x ();
#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
reinit_vars_of_gui_x ();
#endif
-#endif
+#endif /* HAVE_X_WINDOWS */
#if defined(MULE) && defined(HAVE_WNN)
reinit_vars_of_mule_wnn ();
reinit_complex_vars_of_buffer ();
reinit_complex_vars_of_console ();
reinit_complex_vars_of_minibuf ();
-#endif
+#endif /* PDUMP */
}
struct standard_args
{
- CONST char * CONST name;
- CONST char * CONST longname;
+ const char *name;
+ const char *longname;
int priority;
int nargs;
};
-static struct standard_args standard_args[] =
+static const struct standard_args standard_args[] =
{
/* Handled by main_1 above: */
{ "-nl", "--no-shared-memory", 100, 0 },
(int nargs, Lisp_Object *args))
{
int ac;
- CONST Extbyte *wampum;
+ const Extbyte *wampum;
int namesize;
int total_len;
Lisp_Object orig_invoc_name = Fcar (Vcommand_line_args);
- CONST Extbyte **wampum_all = alloca_array (CONST Extbyte *, nargs);
+ const Extbyte **wampum_all = alloca_array (const Extbyte *, nargs);
int *wampum_all_len = alloca_array (int, nargs);
assert (!gc_in_progress);
/* Need to convert the orig_invoc_name and all of the arguments
to external format. */
- GET_STRING_EXT_DATA_ALLOCA (orig_invoc_name, FORMAT_OS, wampum,
- namesize);
+ TO_EXTERNAL_FORMAT (LISP_STRING, orig_invoc_name,
+ ALLOCA, (wampum, namesize),
+ Qnative);
namesize++;
for (ac = 0, total_len = namesize; ac < nargs; ac++)
{
CHECK_STRING (args[ac]);
- GET_STRING_EXT_DATA_ALLOCA (args[ac], FORMAT_OS,
- wampum_all[ac],
- wampum_all_len[ac]);
+ TO_EXTERNAL_FORMAT (LISP_STRING, args[ac],
+ ALLOCA, (wampum_all[ac], wampum_all_len[ac]),
+ Qnative);
wampum_all_len[ac]++;
total_len += wampum_all_len[ac];
}
"\n"
" gdb ");
{
- CONST char *name;
+ const char *name;
char *dir = 0;
/* Now try to determine the actual path to the executable,
\f
#ifndef CANNOT_DUMP
-/* Nothing like this can be implemented on an Apollo.
- What a loss! */
+#if !defined(PDUMP) || !defined(SYSTEM_MALLOC)
extern char my_edata[];
-
-#ifdef HAVE_SHM
-
-DEFUN ("dump-emacs-data", Fdump_emacs_data, 1, 1, 0, /*
-Dump current state of XEmacs into data file FILENAME.
-This function exists on systems that use HAVE_SHM.
-*/
- (intoname))
-{
- /* This function can GC */
- int opurify;
- struct gcpro gcpro1;
- GCPRO1 (intoname);
-
- CHECK_STRING (intoname);
- intoname = Fexpand_file_name (intoname, Qnil);
-
- opurify = purify_flag;
- purify_flag = 0;
-
- fflush (stderr);
- fflush (stdout);
-
- disksave_object_finalization ();
- release_breathing_space ();
-
- /* Tell malloc where start of impure now is */
- /* Also arrange for warnings when nearly out of space. */
-#ifndef SYSTEM_MALLOC
- memory_warnings (my_edata, malloc_warning);
#endif
- UNGCPRO;
- map_out_data (XSTRING_DATA (intoname));
-
- purify_flag = opurify;
- return Qnil;
-}
-
-#else /* not HAVE_SHM */
extern void disable_free_hook (void);
DEFUN ("dump-emacs", Fdump_emacs, 2, 2, 0, /*
char *intoname_ext;
char *symname_ext;
- GET_C_STRING_FILENAME_DATA_ALLOCA (intoname, intoname_ext);
+ TO_EXTERNAL_FORMAT (LISP_STRING, intoname,
+ C_STRING_ALLOCA, intoname_ext,
+ Qfile_name);
+
if (STRINGP (symname))
- GET_C_STRING_FILENAME_DATA_ALLOCA (symname, symname_ext);
+ TO_EXTERNAL_FORMAT (LISP_STRING, symname,
+ C_STRING_ALLOCA, symname_ext,
+ Qfile_name);
else
symname_ext = 0;
return Qnil;
}
-#endif /* not HAVE_SHM */
-
#endif /* not CANNOT_DUMP */
\f
#ifndef SEPCHAR
/* Split STRING into a list of substrings. The substrings are the
parts of original STRING separated by SEPCHAR. */
static Lisp_Object
-split_string_by_emchar_1 (CONST Bufbyte *string, Bytecount size,
+split_string_by_emchar_1 (const Bufbyte *string, Bytecount size,
Emchar sepchar)
{
Lisp_Object result = Qnil;
- CONST Bufbyte *end = string + size;
+ const Bufbyte *end = string + size;
while (1)
{
- CONST Bufbyte *p = string;
+ const Bufbyte *p = string;
while (p < end)
{
if (charptr_emchar (p) == sepchar)
}
/* The same as the above, except PATH is an external C string (it is
- converted as FORMAT_FILENAME), and sepchar is hardcoded to SEPCHAR
+ converted using Qfile_name), and sepchar is hardcoded to SEPCHAR
(':' or whatever). */
Lisp_Object
-decode_path (CONST char *path)
+decode_path (const char *path)
{
- int len;
+ Bytecount newlen;
Bufbyte *newpath;
if (!path)
return Qnil;
- GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA (path, newpath);
+ TO_INTERNAL_FORMAT (C_STRING, path, ALLOCA, (newpath, newlen), Qfile_name);
- len = strlen ((const char *) newpath);
/* #### Does this make sense? It certainly does for
decode_env_path(), but it looks dubious here. Does any code
depend on decode_path("") returning nil instead of an empty
string? */
- if (!len)
+ if (!newlen)
return Qnil;
- return split_string_by_emchar_1 (newpath, (Bytecount)len, SEPCHAR);
+ return split_string_by_emchar_1 (newpath, newlen, SEPCHAR);
}
Lisp_Object
-decode_env_path (CONST char *evarname, CONST char *default_)
+decode_env_path (const char *evarname, const char *default_)
{
- CONST char *path = 0;
+ const char *path = 0;
if (evarname)
path = egetenv (evarname);
if (!path)
/* This highly dubious kludge ... shut up Jamie, I'm tired of your slagging. */
DOESNT_RETURN
-assert_failed (CONST char *file, int line, CONST char *expr)
+assert_failed (const char *file, int line, const char *expr)
{
stderr_out ("Fatal error: assertion failed, file %s, line %d, %s\n",
file, line, expr);
syms_of_emacs (void)
{
#ifndef CANNOT_DUMP
-#ifdef HAVE_SHM
- DEFSUBR (Fdump_emacs_data);
-#else
DEFSUBR (Fdump_emacs);
-#endif
#endif /* !CANNOT_DUMP */
DEFSUBR (Frun_emacs_from_temacs);
Vmail_lock_methods = Fcons (intern ("locking"), Vmail_lock_methods);
#endif
}
-
+
DEFVAR_CONST_LISP ("configure-mail-lock-method", &Vconfigure_mail_lock_method /*
Mail spool locking method suggested by configure. This is one
of the symbols in MAIL-LOCK-METHODS.