diff options
| author | Dan Nicolaescu | 2010-07-07 21:55:07 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-07 21:55:07 -0700 |
| commit | 295d0d8f2008cbd2deb200fc6ecb30d19847f725 (patch) | |
| tree | b5ce54b485bc65a9e4ae0529353da47fed956ebc /src/tparam.c | |
| parent | 49d9e6b07bc34acf755ded0fc255e974a37f9189 (diff) | |
| download | emacs-295d0d8f2008cbd2deb200fc6ecb30d19847f725.tar.gz emacs-295d0d8f2008cbd2deb200fc6ecb30d19847f725.zip | |
Clean up include guards.
* src/tparam.c: Remove include guards for config.h, string.h and code
that assumes #ifndef emacs.
* src/termcap.c:
* src/unexalpha.c:
* src/sysdep.c:
* src/filemode.c:
* src/filelock.c:
* src/bidi.c: Likewise.
Diffstat (limited to 'src/tparam.c')
| -rw-r--r-- | src/tparam.c | 47 |
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, | |||
| 18 | Boston, MA 02110-1301, USA. */ | 18 | Boston, 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 | ||
| 34 | char *malloc (); | ||
| 35 | char *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 | ||
| 45 | static void | ||
| 46 | memory_out () | ||
| 47 | { | ||
| 48 | write (2, "virtual memory exhausted\n", 25); | ||
| 49 | exit (1); | ||
| 50 | } | ||
| 51 | |||
| 52 | static char * | ||
| 53 | xmalloc (size) | ||
| 54 | unsigned size; | ||
| 55 | { | ||
| 56 | register char *tem = malloc (size); | ||
| 57 | |||
| 58 | if (!tem) | ||
| 59 | memory_out (); | ||
| 60 | return tem; | ||
| 61 | } | ||
| 62 | |||
| 63 | static char * | ||
| 64 | xrealloc (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. |