aboutsummaryrefslogtreecommitdiffstats
path: root/src/tparam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tparam.c')
-rw-r--r--src/tparam.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/tparam.c b/src/tparam.c
index c768581aeb5..d8a8f0260f0 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -18,61 +18,14 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18Boston, MA 02110-1301, USA. */ 18Boston, MA 02110-1301, USA. */
19 19
20/* Emacs config.h may rename various library functions such as malloc. */ 20/* Emacs config.h may rename various library functions such as malloc. */
21#ifdef HAVE_CONFIG_H
22#include <config.h> 21#include <config.h>
23#endif
24
25#ifdef emacs
26#include <setjmp.h> 22#include <setjmp.h>
27#include "lisp.h" /* for xmalloc */ 23#include "lisp.h" /* for xmalloc */
28#else
29
30#ifdef STDC_HEADERS
31#include <stdlib.h>
32#include <string.h>
33#else
34char *malloc ();
35char *realloc ();
36#endif
37
38#endif /* not emacs */
39 24
40#ifndef NULL 25#ifndef NULL
41#define NULL (char *) 0 26#define NULL (char *) 0
42#endif 27#endif
43 28
44#ifndef emacs
45static void
46memory_out ()
47{
48 write (2, "virtual memory exhausted\n", 25);
49 exit (1);
50}
51
52static char *
53xmalloc (size)
54 unsigned size;
55{
56 register char *tem = malloc (size);
57
58 if (!tem)
59 memory_out ();
60 return tem;
61}
62
63static char *
64xrealloc (ptr, size)
65 char *ptr;
66 unsigned size;
67{
68 register char *tem = realloc (ptr, size);
69
70 if (!tem)
71 memory_out ();
72 return tem;
73}
74#endif /* not emacs */
75
76/* Assuming STRING is the value of a termcap string entry 29/* Assuming STRING is the value of a termcap string entry
77 containing `%' constructs to expand parameters, 30 containing `%' constructs to expand parameters,
78 merge in parameter values and store result in block OUTSTRING points to. 31 merge in parameter values and store result in block OUTSTRING points to.