diff options
| author | Gerd Moellmann | 2000-04-19 14:30:52 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-04-19 14:30:52 +0000 |
| commit | 8bef35f23aa734ac385b5fd825623b9e7fc81afd (patch) | |
| tree | c153cdc9f9db93ce9eaa532fc4d3f74fa8394709 /lib-src | |
| parent | c750667ef3546dcb738a9be79c4a16ea56f46423 (diff) | |
| download | emacs-8bef35f23aa734ac385b5fd825623b9e7fc81afd.tar.gz emacs-8bef35f23aa734ac385b5fd825623b9e7fc81afd.zip | |
(xmalloc, xrealloc): Rewritten.
(declaration): Remove parameter IS_EXTERN.
(class_definition): Remove unused variable.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ebrowse.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 5e70bcd1630..de8f7b9f920 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c | |||
| @@ -498,7 +498,7 @@ void skip_matching P_ ((void)); | |||
| 498 | void member P_ ((struct sym *, int)); | 498 | void member P_ ((struct sym *, int)); |
| 499 | void class_body P_ ((struct sym *, int)); | 499 | void class_body P_ ((struct sym *, int)); |
| 500 | void class_definition P_ ((struct sym *, int, int, int)); | 500 | void class_definition P_ ((struct sym *, int, int, int)); |
| 501 | void declaration P_ ((int, int)); | 501 | void declaration P_ ((int)); |
| 502 | unsigned parm_list P_ ((int *)); | 502 | unsigned parm_list P_ ((int *)); |
| 503 | char *operator_name P_ ((int *)); | 503 | char *operator_name P_ ((int *)); |
| 504 | struct sym *parse_classname P_ ((void)); | 504 | struct sym *parse_classname P_ ((void)); |
| @@ -534,10 +534,12 @@ xmalloc (nbytes) | |||
| 534 | int nbytes; | 534 | int nbytes; |
| 535 | { | 535 | { |
| 536 | void *p = malloc (nbytes); | 536 | void *p = malloc (nbytes); |
| 537 | if (p) | 537 | if (p == NULL) |
| 538 | return p; | 538 | { |
| 539 | yyerror ("out of memory"); | 539 | yyerror ("out of memory"); |
| 540 | exit (1); | 540 | exit (1); |
| 541 | } | ||
| 542 | return p; | ||
| 541 | } | 543 | } |
| 542 | 544 | ||
| 543 | 545 | ||
| @@ -549,10 +551,12 @@ xrealloc (p, sz) | |||
| 549 | int sz; | 551 | int sz; |
| 550 | { | 552 | { |
| 551 | p = realloc (p, sz); | 553 | p = realloc (p, sz); |
| 552 | if (p) | 554 | if (p == NULL) |
| 553 | return p; | 555 | { |
| 554 | yyerror ("out of memory"); | 556 | yyerror ("out of memory"); |
| 555 | exit (1); | 557 | exit (1); |
| 558 | } | ||
| 559 | return p; | ||
| 556 | } | 560 | } |
| 557 | 561 | ||
| 558 | 562 | ||
| @@ -2931,7 +2935,6 @@ class_definition (containing, tag, flags, nested) | |||
| 2931 | int flags; | 2935 | int flags; |
| 2932 | int nested; | 2936 | int nested; |
| 2933 | { | 2937 | { |
| 2934 | register int token; | ||
| 2935 | struct sym *current; | 2938 | struct sym *current; |
| 2936 | struct sym *base_class; | 2939 | struct sym *base_class; |
| 2937 | 2940 | ||
| @@ -2957,7 +2960,7 @@ class_definition (containing, tag, flags, nested) | |||
| 2957 | 2960 | ||
| 2958 | while (!done) | 2961 | while (!done) |
| 2959 | { | 2962 | { |
| 2960 | switch (token = LA1) | 2963 | switch (LA1) |
| 2961 | { | 2964 | { |
| 2962 | case VIRTUAL: case PUBLIC: case PROTECTED: case PRIVATE: | 2965 | case VIRTUAL: case PUBLIC: case PROTECTED: case PRIVATE: |
| 2963 | MATCH (); | 2966 | MATCH (); |
| @@ -3025,8 +3028,7 @@ class_definition (containing, tag, flags, nested) | |||
| 3025 | /* Parse a declaration. */ | 3028 | /* Parse a declaration. */ |
| 3026 | 3029 | ||
| 3027 | void | 3030 | void |
| 3028 | declaration (is_extern, flags) | 3031 | declaration (flags) |
| 3029 | int is_extern; | ||
| 3030 | int flags; | 3032 | int flags; |
| 3031 | { | 3033 | { |
| 3032 | char *id = NULL; | 3034 | char *id = NULL; |
| @@ -3301,7 +3303,7 @@ globals (start_flags) | |||
| 3301 | return 0; | 3303 | return 0; |
| 3302 | 3304 | ||
| 3303 | default: | 3305 | default: |
| 3304 | declaration (0, flags); | 3306 | declaration (flags); |
| 3305 | flags = start_flags; | 3307 | flags = start_flags; |
| 3306 | break; | 3308 | break; |
| 3307 | } | 3309 | } |