diff options
Diffstat (limited to 'lib-src/make-docfile.c')
| -rw-r--r-- | lib-src/make-docfile.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 79d421a0a8e..bada8df9f72 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -707,12 +707,9 @@ write_globals (void) | |||
| 707 | globals[i].name, globals[i].name); | 707 | globals[i].name, globals[i].name); |
| 708 | } | 708 | } |
| 709 | else if (globals[i].type == SYMBOL) | 709 | else if (globals[i].type == SYMBOL) |
| 710 | printf (("DEFINE_LISP_SYMBOL_BEGIN (%s)\n" | 710 | printf (("#define i%s %d\n" |
| 711 | "#define i%s %d\n" | 711 | "DEFINE_LISP_SYMBOL (%s)\n"), |
| 712 | "#define %s builtin_lisp_symbol (i%s)\n" | 712 | globals[i].name, symnum++, globals[i].name); |
| 713 | "DEFINE_LISP_SYMBOL_END (%s)\n\n"), | ||
| 714 | globals[i].name, globals[i].name, symnum++, | ||
| 715 | globals[i].name, globals[i].name, globals[i].name); | ||
| 716 | else | 713 | else |
| 717 | { | 714 | { |
| 718 | if (globals[i].flags & DEFUN_noreturn) | 715 | if (globals[i].flags & DEFUN_noreturn) |
| @@ -740,15 +737,19 @@ write_globals (void) | |||
| 740 | puts ("#ifdef DEFINE_SYMBOLS"); | 737 | puts ("#ifdef DEFINE_SYMBOLS"); |
| 741 | puts ("static char const *const defsym_name[] = {"); | 738 | puts ("static char const *const defsym_name[] = {"); |
| 742 | for (int i = 0; i < num_globals; i++) | 739 | for (int i = 0; i < num_globals; i++) |
| 743 | { | 740 | if (globals[i].type == SYMBOL) |
| 744 | if (globals[i].type == SYMBOL) | 741 | printf ("\t\"%s\",\n", globals[i].v.svalue); |
| 745 | printf ("\t\"%s\",\n", globals[i].v.svalue); | ||
| 746 | while (i + 1 < num_globals | ||
| 747 | && strcmp (globals[i].name, globals[i + 1].name) == 0) | ||
| 748 | i++; | ||
| 749 | } | ||
| 750 | puts ("};"); | 742 | puts ("};"); |
| 751 | puts ("#endif"); | 743 | puts ("#endif"); |
| 744 | |||
| 745 | puts ("#define Qnil builtin_lisp_symbol (0)"); | ||
| 746 | puts ("#if DEFINE_NON_NIL_Q_SYMBOL_MACROS"); | ||
| 747 | num_symbols = 0; | ||
| 748 | for (int i = 0; i < num_globals; i++) | ||
| 749 | if (globals[i].type == SYMBOL && num_symbols++ != 0) | ||
| 750 | printf ("# define %s builtin_lisp_symbol (%d)\n", | ||
| 751 | globals[i].name, num_symbols - 1); | ||
| 752 | puts ("#endif"); | ||
| 752 | } | 753 | } |
| 753 | 754 | ||
| 754 | 755 | ||