#include "keyboard.h"
#include "character.h"
#include "keymap.h"
+#include "buildobj.h"
#ifdef HAVE_INDEX
extern char *index P_ ((const char *, int));
}
}
+static const char buildobj[] = BUILDOBJ;
DEFUN ("Snarf-documentation", Fsnarf_documentation, Ssnarf_documentation,
1, 1, 0,
/* Vbuild_files is nil when temacs is run, and non-nil after that. */
if (NILP (Vbuild_files))
{
- size_t cp_size = 0;
- size_t to_read;
- int nr_read;
- char *cp = NULL;
- char *beg, *end;
-
- fd = emacs_open ("buildobj.lst", O_RDONLY, 0);
- if (fd < 0)
- report_file_error ("Opening file buildobj.lst", Qnil);
-
- filled = 0;
- for (;;)
- {
- cp_size += 1024;
- to_read = cp_size - 1 - filled;
- cp = xrealloc (cp, cp_size);
- nr_read = emacs_read (fd, &cp[filled], to_read);
- filled += nr_read;
- if (nr_read < to_read)
- break;
- }
+ const char *beg, *end;
- emacs_close (fd);
- cp[filled] = 0;
-
- for (beg = cp; *beg; beg = end)
+ for (beg = buildobj; *beg; beg = end)
{
int len;
if (len > 0)
Vbuild_files = Fcons (make_string (beg, len), Vbuild_files);
}
-
- xfree (cp);
}
fd = emacs_open (name, O_RDONLY, 0);