comparison src/tparam.c @ 647:b39c14581166

[xemacs-hg @ 2001-08-13 04:45:47 by ben] removal of unsigned, size_t, etc.
author ben
date Mon, 13 Aug 2001 04:46:48 +0000
parents e9a3f8b4de53
children fdefd0186b75
comparison
equal deleted inserted replaced
646:00c54252fe4f 647:b39c14581166
19 Boston, MA 02111-1307, USA. */ 19 Boston, MA 02111-1307, USA. */
20 20
21 /* Synched up with: Not synched with FSF. */ 21 /* Synched up with: Not synched with FSF. */
22 22
23 /* config.h may rename various library functions such as malloc. */ 23 /* config.h may rename various library functions such as malloc. */
24 #ifdef emacs
25
26 #include <config.h> 24 #include <config.h>
27 25 #include "lisp.h"
28 #include <string.h>
29 26
30 #undef realloc 27 #undef realloc
31 #undef malloc 28 #undef malloc
32 #undef free 29 #undef free
33 #define realloc xrealloc 30 #define realloc xrealloc
34 #define malloc xmalloc 31 #define malloc xmalloc
35 #define free xfree 32 #define free xfree
36 extern void *xmalloc (size_t size); 33 extern void *xmalloc (Memory_Count size);
37 extern void *xrealloc (void *, size_t size); 34 extern void *xrealloc (void *, Memory_Count size);
38
39 #else /* !emacs */
40
41 #include <stdlib.h>
42 #include <string.h>
43
44 #endif /* !emacs */
45 35
46 /* Assuming STRING is the value of a termcap string entry 36 /* Assuming STRING is the value of a termcap string entry
47 containing `%' constructs to expand parameters, 37 containing `%' constructs to expand parameters,
48 merge in parameter values and store result in block OUTSTRING points to. 38 merge in parameter values and store result in block OUTSTRING points to.
49 LEN is the length of OUTSTRING. If more space is needed, 39 LEN is the length of OUTSTRING. If more space is needed,
269 strcat (op, up); 259 strcat (op, up);
270 while (doleft-- > 0) 260 while (doleft-- > 0)
271 strcat (op, left); 261 strcat (op, left);
272 return outstring; 262 return outstring;
273 } 263 }
274
275 #ifdef DEBUG
276
277 main (argc, argv)
278 int argc;
279 char **argv;
280 {
281 char buf[50];
282 int args[3];
283 args[0] = atoi (argv[2]);
284 args[1] = atoi (argv[3]);
285 args[2] = atoi (argv[4]);
286 tparam1 (argv[1], buf, "LEFT", "UP", args);
287 printf ("%s\n", buf);
288 return 0;
289 }
290
291 #endif /* DEBUG */