Mercurial > hg > xemacs-beta
comparison src/termcap.c @ 438:84b14dcb0985 r21-2-27
Import from CVS: tag r21-2-27
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:32:25 +0200 |
parents | 3ecd8885ac67 |
children | abe6d1db359e |
comparison
equal
deleted
inserted
replaced
437:e2a4e8b94b82 | 438:84b14dcb0985 |
---|---|
24 #ifdef emacs | 24 #ifdef emacs |
25 #include <config.h> | 25 #include <config.h> |
26 #include "lisp.h" /* For encapsulated open, close, read */ | 26 #include "lisp.h" /* For encapsulated open, close, read */ |
27 #include "device.h" /* For DEVICE_BAUD_RATE */ | 27 #include "device.h" /* For DEVICE_BAUD_RATE */ |
28 #else /* not emacs */ | 28 #else /* not emacs */ |
29 #if defined(USG) || defined(STDC_HEADERS) | 29 |
30 #define memcpy(d, s, n) memcpy ((d), (s), (n)) | |
31 #endif | |
32 | |
33 #ifdef STDC_HEADERS | |
34 #include <stdlib.h> | 30 #include <stdlib.h> |
35 #include <string.h> | 31 #include <string.h> |
36 #else | |
37 char *getenv (); | |
38 char *malloc (); | |
39 char *realloc (); | |
40 #endif | |
41 | 32 |
42 #ifdef HAVE_UNISTD_H | 33 #ifdef HAVE_UNISTD_H |
43 #include <unistd.h> | 34 #include <unistd.h> |
44 #endif | 35 #endif |
45 #ifdef _POSIX_VERSION | 36 #ifdef _POSIX_VERSION |
335 and store it in the block that BP points to. | 326 and store it in the block that BP points to. |
336 Record its address for future use. | 327 Record its address for future use. |
337 | 328 |
338 If BP is zero, space is dynamically allocated. */ | 329 If BP is zero, space is dynamically allocated. */ |
339 | 330 |
340 extern char *getenv (); | |
341 | |
342 int | 331 int |
343 tgetent (bp, name) | 332 tgetent (bp, name) |
344 char *bp; | 333 char *bp; |
345 CONST char *name; | 334 CONST char *name; |
346 { | 335 { |
363 it is a file name to use instead of /etc/termcap. | 352 it is a file name to use instead of /etc/termcap. |
364 If it is non-null and does not start with /, | 353 If it is non-null and does not start with /, |
365 it is the entry itself, but only if | 354 it is the entry itself, but only if |
366 the name the caller requested matches the TERM variable. */ | 355 the name the caller requested matches the TERM variable. */ |
367 | 356 |
368 if (tem && !IS_DIRECTORY_SEP (*tem) && !strcmp (name, (char *) getenv ("TERM"))) | 357 if (tem && !IS_DIRECTORY_SEP (*tem) && !strcmp (name, getenv ("TERM"))) |
369 { | 358 { |
370 indirect = tgetst1 (find_capability (tem, "tc"), 0); | 359 indirect = tgetst1 (find_capability (tem, "tc"), 0); |
371 if (!indirect) | 360 if (!indirect) |
372 { | 361 { |
373 if (!bp) | 362 if (!bp) |