annotate src/=mach2.h @ 4146:0c681748d0ce

* xfns.c (Fx_open_connection): Don't trust HAVE_XRMSETDATABASE; use XrmSetDatabase only when HAVE_X11R5 is defined. * xfns.c (Vx_resource_name): Renamed from Vxrdb_name, and made a lisp-visible variable, so lisp/term/x-win.el can set it. Doc it for "internal use only"; no need for NEWS entry. (validate_x_resource_name): New function. (Fx_get_resource): Doc fix. References to Vxrdb_name renamed. Call validate_x_resource_name. (x_window): References to Vxrdb_name renamed. Call validate_x_resource_name. (Fx_open_connection): References to Vxrdb_name renamed. Instead of setting and validating its value here, just call validate_x_resource_name. (syms_of_xfns): Add DEFVAR_LISP for Vx_resource_name. * xfns.c (x_set_frame_parameters): Don't set the frame's size and position unless those parameters are actually specified in ALIST. * xrdb.c: Implement search for app-defaults directory and localized default databases, along with some other functionality provided by Xt. #include <stdio.h>, since we call sprintf. [emacs] (malloc, realloc, free): #define these to xmalloc, xrealloc, and xfree. (x_get_string_resource, file_p): Add forward declarations for these. (x_customization_string): New variable. (x_get_customization_string): New function. (gethomedir): Return malloc'ed space of the right size, instead of writing into a fixed-size buffer; this means that our callers do not impose an arbitrary limit on file name length. (magic_file_p): Rewrite of decode_magic; actually do the substitutions, instead of expanding all %-escapes to "". Support the customization string. Return 0 or the expanded file name, instead of just zero or one. Allocate the space for the expanded file name ourselves, instead of writing into a fixed-size buffer passed to us; this removes an arbitrary limit. (search_magic_path): Rewrite of magic_searchpath_decoder. Return 0 or the expanded file name, instead of just zero or one. Allocate the space for the expanded file name ourselves, instead of writing into a fixed-size buffer passed to us; this means that our callers do not impose an arbitrary limit on file name length. (get_system_app): Changed to work with search_magic_path. (get_user_app): Rewritten to work with search_magic_path, and not to assume that the values of XAPPLRESDIR is a single directory. (get_user_db): Properly use the new version of gethomedir. (get_environ_db): Remove arbitrary limit on length of host name. (x_load_resources): Take a new argument, myname. Call get_user_db early to obtain the customization string. Changes to stand-alone testing code. * xfns.c (Fx_open_connection): Set Vxrdb_name early, and pass it to x_load_resources.
author Jim Blandy <jimb@redhat.com>
date Sun, 18 Jul 1993 06:29:19 +0000
parents 7be0f0a02725
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2621
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 /* Definitions for Emacs running on Mach version 2 (non-kernelized system).
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 Copyright (C) 1990 Free Software Foundation, Inc.
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4 This file is part of GNU Emacs.
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
3699
7be0f0a02725 Updated GPL version to 2.
Jim Blandy <jimb@redhat.com>
parents: 2621
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
2621
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 any later version.
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 GNU General Public License for more details.
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 along with GNU Emacs; see the file COPYING. If not, write to
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20 #include "bsd4-3.h"
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 /* SYSTEM_TYPE should indicate the kind of system you are using.
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 It sets the Lisp variable system-type. We'll need to undo the bsd one. */
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 #undef SYSTEM_TYPE
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 #define SYSTEM_TYPE "next-mach"
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 #define LD_SWITCH_SYSTEM -X -noseglinkedit
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 /* Don't use -lc on the NeXT. */
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 #define LIB_STANDARD -lsys_s
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32 #define LIB_MATH -lm
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 #define environ _environ
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36 #define START_FILES pre-crt0.o
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37 #define UNEXEC unexnext.o
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 /* start_of_text isn't actually used, so make it compile without error. */
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 #define TEXT_START 0
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 /* This seems to be right for end_of_text, but it may not be used anyway. */
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42 #define TEXT_END get_etext ()
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 /* This seems to be right for end_of_data, but it may not be used anyway. */
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 #define DATA_END get_edata ()
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 /* Defining KERNEL_FILE causes lossage because sys/file.h
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 stupidly gets confused by it. */
40bed0333cd3 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 #undef KERNEL_FILE