diff options
author | ru <ru@FreeBSD.org> | 2000-01-17 10:42:59 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2000-01-17 10:42:59 +0000 |
commit | 8638a4ebc850b4dbde1c2c618855283c43fadd05 (patch) | |
tree | bffd8db41c243364537b50d1fa89d50a5ad5706d /contrib/texinfo/info | |
parent | b5a89659ea518f3a1817b5aa9569aed569f46835 (diff) | |
download | FreeBSD-src-8638a4ebc850b4dbde1c2c618855283c43fadd05.zip FreeBSD-src-8638a4ebc850b4dbde1c2c618855283c43fadd05.tar.gz |
Remove files not present in last import
Diffstat (limited to 'contrib/texinfo/info')
-rw-r--r-- | contrib/texinfo/info/Makefile.am | 45 | ||||
-rw-r--r-- | contrib/texinfo/info/Makefile.in | 435 | ||||
-rw-r--r-- | contrib/texinfo/info/makedoc.c | 466 |
3 files changed, 0 insertions, 946 deletions
diff --git a/contrib/texinfo/info/Makefile.am b/contrib/texinfo/info/Makefile.am deleted file mode 100644 index 4680550..0000000 --- a/contrib/texinfo/info/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -## Makefile.am for texinfo/info. -## $Id: Makefile.am,v 1.11 1998/02/22 22:55:44 karl Exp $ -## Run automake in .. to produce Makefile.in from this. - -noinst_PROGRAMS = makedoc - -# Use `ginfo' for building to avoid confusion with the standard `info' -# target. The install rule removes the `g' before applying any -# user-specified name transformations. -bin_PROGRAMS = ginfo -transform = s/ginfo/info/; @program_transform_name@ - -localedir = $(datadir)/locale - -# -I. for funs.h. -# Automake puts -I.. and -I$(srcdir) into DEFS by default, but -# we need to override it, so include them ourselves. -INCLUDES = -I. -I$(top_srcdir)/lib -I../intl -I.. -I$(srcdir) -DEFS = -DINFODIR=\"$(infodir)\" -DLOCALEDIR=\"$(localedir)\" @DEFS@ -LDADD = ../lib/libtxi.a @TERMLIBS@ @INTLLIBS@ - -makedoc_SOURCES = makedoc.c -ginfo_SOURCES = dir.c display.c display.h doc.c doc.h dribble.c dribble.h \ - echo-area.c echo-area.h \ - filesys.c filesys.h footnotes.c footnotes.h funs.h gc.c gc.h \ - indices.c indices.h info-utils.c info-utils.h info.c info.h infodoc.c \ - infomap.c infomap.h m-x.c man.c man.h nodemenu.c nodes.c nodes.h \ - search.c search.h session.c session.h signals.c signals.h \ - termdep.h terminal.c terminal.h tilde.c tilde.h \ - variables.c variables.h window.c window.h - -EXTRA_DIST = README - -# The files `doc.c' and `funs.h' are created by ./makedoc run over the source -# files which contain DECLARE_INFO_COMMAND. `funs.h' is a header file -# listing the functions found. `doc.c' is a structure containing pointers -# to those functions along with completable names and documentation strings. -BUILT_SOURCES = doc.c funs.h - -cmd_sources = $(srcdir)/session.c $(srcdir)/echo-area.c $(srcdir)/infodoc.c \ - $(srcdir)/m-x.c $(srcdir)/indices.c $(srcdir)/nodemenu.c \ - $(srcdir)/footnotes.c $(srcdir)/variables.c - -$(BUILT_SOURCES): makedoc $(cmd_sources) - ./makedoc $(cmd_sources) diff --git a/contrib/texinfo/info/Makefile.in b/contrib/texinfo/info/Makefile.in deleted file mode 100644 index c71d319..0000000 --- a/contrib/texinfo/info/Makefile.in +++ /dev/null @@ -1,435 +0,0 @@ -# Makefile.in generated automatically by automake 1.2f from Makefile.am - -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - -SHELL = /bin/sh - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = .. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -DATADIRNAME = @DATADIRNAME@ -GENCAT = @GENCAT@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GT_NO = @GT_NO@ -GT_YES = @GT_YES@ -INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ -INSTOBJEXT = @INSTOBJEXT@ -INTLDEPS = @INTLDEPS@ -INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -PACKAGE = @PACKAGE@ -POFILES = @POFILES@ -POSUB = @POSUB@ -RANLIB = @RANLIB@ -TERMLIBS = @TERMLIBS@ -TEXCONFIG = @TEXCONFIG@ -TEXMF = @TEXMF@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -l = @l@ - -noinst_PROGRAMS = makedoc - -# Use `ginfo' for building to avoid confusion with the standard `info' -# target. The install rule removes the `g' before applying any -# user-specified name transformations. -bin_PROGRAMS = ginfo -transform = s/ginfo/info/; @program_transform_name@ - -localedir = $(datadir)/locale - -# -I. for funs.h. -# Automake puts -I.. and -I$(srcdir) into DEFS by default, but -# we need to override it, so include them ourselves. -INCLUDES = -I. -I$(top_srcdir)/lib -I../intl -I.. -I$(srcdir) -DEFS = -DINFODIR=\"$(infodir)\" -DLOCALEDIR=\"$(localedir)\" @DEFS@ -LDADD = ../lib/libtxi.a @TERMLIBS@ @INTLLIBS@ - -makedoc_SOURCES = makedoc.c -ginfo_SOURCES = dir.c display.c display.h doc.c doc.h dribble.c dribble.h \ - echo-area.c echo-area.h \ - filesys.c filesys.h footnotes.c footnotes.h funs.h gc.c gc.h \ - indices.c indices.h info-utils.c info-utils.h info.c info.h infodoc.c \ - infomap.c infomap.h m-x.c man.c man.h nodemenu.c nodes.c nodes.h \ - search.c search.h session.c session.h signals.c signals.h \ - termdep.h terminal.c terminal.h tilde.c tilde.h \ - variables.c variables.h window.c window.h - -EXTRA_DIST = README - -# The files `doc.c' and `funs.h' are created by ./makedoc run over the source -# files which contain DECLARE_INFO_COMMAND. `funs.h' is a header file -# listing the functions found. `doc.c' is a structure containing pointers -# to those functions along with completable names and documentation strings. -BUILT_SOURCES = doc.c funs.h - -cmd_sources = $(srcdir)/session.c $(srcdir)/echo-area.c $(srcdir)/infodoc.c \ - $(srcdir)/m-x.c $(srcdir)/indices.c $(srcdir)/nodemenu.c \ - $(srcdir)/footnotes.c $(srcdir)/variables.c -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = ../config.h -CONFIG_CLEAN_FILES = -PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) - -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -ginfo_OBJECTS = dir.o display.o doc.o dribble.o echo-area.o filesys.o \ -footnotes.o gc.o indices.o info-utils.o info.o infodoc.o infomap.o \ -m-x.o man.o nodemenu.o nodes.o search.o session.o signals.o terminal.o \ -tilde.o variables.o window.o -ginfo_LDADD = $(LDADD) -ginfo_DEPENDENCIES = ../lib/libtxi.a -ginfo_LDFLAGS = -makedoc_OBJECTS = makedoc.o -makedoc_LDADD = $(LDADD) -makedoc_DEPENDENCIES = ../lib/libtxi.a -makedoc_LDFLAGS = -CFLAGS = @CFLAGS@ -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -DIST_COMMON = README Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = tar -GZIP = --best -SOURCES = $(ginfo_SOURCES) $(makedoc_SOURCES) -OBJECTS = $(ginfo_OBJECTS) $(makedoc_OBJECTS) - -default: all - -.SUFFIXES: -.SUFFIXES: .S .c .o .s -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps info/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -mostlyclean-binPROGRAMS: - -clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) - -distclean-binPROGRAMS: - -maintainer-clean-binPROGRAMS: - -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(bindir) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \ - $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - list='$(bin_PROGRAMS)'; for p in $$list; do \ - rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \ - done - -mostlyclean-noinstPROGRAMS: - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -distclean-noinstPROGRAMS: - -maintainer-clean-noinstPROGRAMS: - -.c.o: - $(COMPILE) -c $< - -.s.o: - $(COMPILE) -c $< - -.S.o: - $(COMPILE) -c $< - -mostlyclean-compile: - -rm -f *.o core *.core - -clean-compile: - -distclean-compile: - -rm -f *.tab.c - -maintainer-clean-compile: - -ginfo: $(ginfo_OBJECTS) $(ginfo_DEPENDENCIES) - @rm -f ginfo - $(LINK) $(ginfo_LDFLAGS) $(ginfo_OBJECTS) $(ginfo_LDADD) $(LIBS) - -makedoc: $(makedoc_OBJECTS) $(makedoc_DEPENDENCIES) - @rm -f makedoc - $(LINK) $(makedoc_LDFLAGS) $(makedoc_OBJECTS) $(makedoc_LDADD) $(LIBS) - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP) - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) - -mostlyclean-tags: - -clean-tags: - -distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = info - -distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file; \ - done -dir.o: dir.c info.h ../lib/system.h ../config.h filesys.h display.h \ - info-utils.h nodes.h window.h infomap.h search.h terminal.h \ - session.h dribble.h echo-area.h doc.h footnotes.h gc.h tilde.h -display.o: display.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h -doc.o: doc.c doc.h info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h footnotes.h gc.h \ - funs.h -dribble.o: dribble.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h -echo-area.o: echo-area.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h -filesys.o: filesys.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h tilde.h -footnotes.o: footnotes.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h -gc.o: gc.c info.h ../lib/system.h ../config.h filesys.h display.h \ - info-utils.h nodes.h window.h infomap.h search.h terminal.h \ - session.h dribble.h echo-area.h doc.h footnotes.h gc.h -indices.o: indices.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h indices.h -info-utils.o: info-utils.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h man.h -info.o: info.c info.h ../lib/system.h ../config.h filesys.h display.h \ - info-utils.h nodes.h window.h infomap.h search.h terminal.h \ - session.h dribble.h echo-area.h doc.h footnotes.h gc.h \ - indices.h ../lib/getopt.h man.h -infodoc.o: infodoc.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h -infomap.o: infomap.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h funs.h -m-x.o: m-x.c info.h ../lib/system.h ../config.h filesys.h display.h \ - info-utils.h nodes.h window.h infomap.h search.h terminal.h \ - session.h dribble.h echo-area.h doc.h footnotes.h gc.h -makedoc.o: makedoc.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h -man.o: man.c info.h ../lib/system.h ../config.h filesys.h display.h \ - info-utils.h nodes.h window.h infomap.h search.h terminal.h \ - session.h dribble.h echo-area.h doc.h footnotes.h gc.h \ - signals.h tilde.h man.h -nodemenu.o: nodemenu.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h -nodes.o: nodes.c info.h ../lib/system.h ../config.h filesys.h display.h \ - info-utils.h nodes.h window.h infomap.h search.h terminal.h \ - session.h dribble.h echo-area.h doc.h footnotes.h gc.h man.h -search.o: search.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h -session.o: session.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h man.h -signals.o: signals.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h signals.h -terminal.o: terminal.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h termdep.h -tilde.o: tilde.c info.h ../lib/system.h ../config.h filesys.h display.h \ - info-utils.h nodes.h window.h infomap.h search.h terminal.h \ - session.h dribble.h echo-area.h doc.h footnotes.h gc.h -variables.o: variables.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h variables.h -window.o: window.c info.h ../lib/system.h ../config.h filesys.h \ - display.h info-utils.h nodes.h window.h infomap.h search.h \ - terminal.h session.h dribble.h echo-area.h doc.h footnotes.h \ - gc.h - -info: -dvi: -check: all - $(MAKE) -installcheck: -install-exec: install-binPROGRAMS - @$(NORMAL_INSTALL) - -install-data: - @$(NORMAL_INSTALL) - -install: install-exec install-data all - @: - -uninstall: uninstall-binPROGRAMS - -all: Makefile $(PROGRAMS) - -install-strip: - $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install -installdirs: - $(mkinstalldirs) $(bindir) - - -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f Makefile $(DISTCLEANFILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -mostlyclean: mostlyclean-binPROGRAMS mostlyclean-noinstPROGRAMS \ - mostlyclean-compile mostlyclean-tags \ - mostlyclean-generic - -clean: clean-binPROGRAMS clean-noinstPROGRAMS clean-compile clean-tags \ - clean-generic mostlyclean - -distclean: distclean-binPROGRAMS distclean-noinstPROGRAMS \ - distclean-compile distclean-tags distclean-generic \ - clean - -rm -f config.status - -maintainer-clean: maintainer-clean-binPROGRAMS \ - maintainer-clean-noinstPROGRAMS \ - maintainer-clean-compile maintainer-clean-tags \ - maintainer-clean-generic distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -.PHONY: default mostlyclean-binPROGRAMS distclean-binPROGRAMS \ -clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \ -install-binPROGRAMS mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ -clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ -mostlyclean-compile distclean-compile clean-compile \ -maintainer-clean-compile tags mostlyclean-tags distclean-tags \ -clean-tags maintainer-clean-tags distdir info dvi installcheck \ -install-exec install-data install uninstall all installdirs \ -mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - -$(BUILT_SOURCES): makedoc $(cmd_sources) - ./makedoc $(cmd_sources) - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/contrib/texinfo/info/makedoc.c b/contrib/texinfo/info/makedoc.c deleted file mode 100644 index c88663f..0000000 --- a/contrib/texinfo/info/makedoc.c +++ /dev/null @@ -1,466 +0,0 @@ -/* makedoc.c -- Make doc.c and funs.h from input files. - $Id: makedoc.c,v 1.4 1997/07/15 18:35:59 karl Exp $ - - This file is part of GNU Info, a program for reading online documentation - stored in Info format. - - Copyright (C) 1993, 97 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Written by Brian Fox (bfox@ai.mit.edu). */ - -/* This program grovels the contents of the source files passed as arguments - and writes out a file of function pointers and documentation strings, and - a header file which describes the contents. This only does the functions - declared with DECLARE_INFO_COMMAND. */ - -#include "info.h" - -static void fatal_file_error (); - -/* Name of the header file which receives the declarations of functions. */ -static char *funs_filename = "funs.h"; - -/* Name of the documentation to function pointer file. */ -static char *doc_filename = "doc.c"; - -static char *doc_header[] = { - "/* doc.c -- Generated structure containing function names and doc strings.", - "", - " This file was automatically made from various source files with the", - " command \"%s\". DO NOT EDIT THIS FILE, only \"%s.c\".", - (char *)NULL -}; - -static char *doc_header_1[] = { - " An entry in the array FUNCTION_DOC_ARRAY is made for each command", - " found in the above files; each entry consists of a function pointer,", -#if defined (NAMED_FUNCTIONS) - " a string which is the user-visible name of the function,", -#endif /* NAMED_FUNCTIONS */ - " and a string which documents its purpose. */", - "", - "#include \"doc.h\"", - "#include \"funs.h\"", - "", - "FUNCTION_DOC function_doc_array[] = {", - "", - (char *)NULL -}; - -/* How to remember the locations of the functions found so that Emacs - can use the information in a tag table. */ -typedef struct { - char *name; /* Name of the tag. */ - int line; /* Line number at which it appears. */ - long char_offset; /* Character offset at which it appears. */ -} EMACS_TAG; - -typedef struct { - char *filename; /* Name of the file containing entries. */ - long entrylen; /* Total number of characters in tag block. */ - EMACS_TAG **entries; /* Entries found in FILENAME. */ - int entries_index; - int entries_slots; -} EMACS_TAG_BLOCK; - -EMACS_TAG_BLOCK **emacs_tags = (EMACS_TAG_BLOCK **)NULL; -int emacs_tags_index = 0; -int emacs_tags_slots = 0; - -#define DECLARATION_STRING "\nDECLARE_INFO_COMMAND" - -static void process_one_file (); -static void maybe_dump_tags (); -static FILE *must_fopen (); - -int -main (argc, argv) - int argc; - char **argv; -{ - register int i; - int tags_only = 0; - FILE *funs_stream, *doc_stream; - - for (i = 1; i < argc; i++) - if (strcmp (argv[i], "-tags") == 0) - { - tags_only++; - break; - } - - if (tags_only) - { - funs_filename = "/dev/null"; - doc_filename = "/dev/null"; - } - - funs_stream = must_fopen (funs_filename, "w"); - doc_stream = must_fopen (doc_filename, "w"); - - fprintf (funs_stream, - "/* %s -- Generated declarations for Info commands. */\n", - funs_filename); - - for (i = 0; doc_header[i]; i++) - { - fprintf (doc_stream, doc_header[i], argv[0], argv[0]); - fprintf (doc_stream, "\n"); - } - - fprintf (doc_stream, - _(" Source files groveled to make this file include:\n\n")); - - for (i = 1; i < argc; i++) - fprintf (doc_stream, "\t%s\n", argv[i]); - - fprintf (doc_stream, "\n"); - - for (i = 0; doc_header_1[i]; i++) - fprintf (doc_stream, "%s\n", doc_header_1[i]); - - - for (i = 1; i < argc; i++) - { - char *curfile; - curfile = argv[i]; - - if (*curfile == '-') - continue; - - fprintf (doc_stream, "/* Commands found in \"%s\". */\n", curfile); - fprintf (funs_stream, "\n/* Functions declared in \"%s\". */\n", - curfile); - - process_one_file (curfile, doc_stream, funs_stream); - } - - fprintf (doc_stream, - " { (VFunction *)NULL, (char *)NULL, (char *)NULL }\n};\n"); - - fclose (funs_stream); - fclose (doc_stream); - - if (tags_only) - maybe_dump_tags (stdout); - exit (0); -} - -/* Dumping out the contents of an Emacs tags table. */ -static void -maybe_dump_tags (stream) - FILE *stream; -{ - register int i; - - /* Print out the information for each block. */ - for (i = 0; i < emacs_tags_index; i++) - { - register int j; - register EMACS_TAG_BLOCK *block; - register EMACS_TAG *etag; - long block_len; - - block_len = 0; - block = emacs_tags[i]; - - /* Calculate the length of the dumped block first. */ - for (j = 0; j < block->entries_index; j++) - { - char digits[30]; - etag = block->entries[j]; - block_len += 3 + strlen (etag->name); - sprintf (digits, "%d,%ld", etag->line, etag->char_offset); - block_len += strlen (digits); - } - - /* Print out the defining line. */ - fprintf (stream, "\f\n%s,%ld\n", block->filename, block_len); - - /* Print out the individual tags. */ - for (j = 0; j < block->entries_index; j++) - { - etag = block->entries[j]; - - fprintf (stream, "%s,\177%d,%ld\n", - etag->name, etag->line, etag->char_offset); - } - } -} - -/* Keeping track of names, line numbers and character offsets of functions - found in source files. */ -static EMACS_TAG_BLOCK * -make_emacs_tag_block (filename) - char *filename; -{ - EMACS_TAG_BLOCK *block; - - block = (EMACS_TAG_BLOCK *)xmalloc (sizeof (EMACS_TAG_BLOCK)); - block->filename = xstrdup (filename); - block->entrylen = 0; - block->entries = (EMACS_TAG **)NULL; - block->entries_index = 0; - block->entries_slots = 0; - return (block); -} - -static void -add_tag_to_block (block, name, line, char_offset) - EMACS_TAG_BLOCK *block; - char *name; - int line; - long char_offset; -{ - EMACS_TAG *tag; - - tag = (EMACS_TAG *)xmalloc (sizeof (EMACS_TAG)); - tag->name = name; - tag->line = line; - tag->char_offset = char_offset; - add_pointer_to_array (tag, block->entries_index, block->entries, - block->entries_slots, 50, EMACS_TAG *); -} - -/* Read the file represented by FILENAME into core, and search it for Info - function declarations. Output the declarations in various forms to the - DOC_STREAM and FUNS_STREAM. */ -static void -process_one_file (filename, doc_stream, funs_stream) - char *filename; - FILE *doc_stream, *funs_stream; -{ - int descriptor, decl_len; - char *buffer, *decl_str; - struct stat finfo; - long offset; - long file_size; - EMACS_TAG_BLOCK *block; - - if (stat (filename, &finfo) == -1) - fatal_file_error (filename); - - descriptor = open (filename, O_RDONLY, 0666); - - if (descriptor == -1) - fatal_file_error (filename); - - file_size = (long) finfo.st_size; - buffer = (char *)xmalloc (1 + file_size); - read (descriptor, buffer, file_size); - close (descriptor); - - offset = 0; - decl_str = DECLARATION_STRING; - decl_len = strlen (decl_str); - - block = make_emacs_tag_block (filename); - - while (1) - { - long point = 0; - long line_start = 0; - int line_number = 0; - - char *func, *doc; -#if defined (NAMED_FUNCTIONS) - char *func_name; -#endif /* NAMED_FUNCTIONS */ - - for (; offset < (file_size - decl_len); offset++) - { - if (buffer[offset] == '\n') - { - line_number++; - line_start = offset + 1; - } - - if (strncmp (buffer + offset, decl_str, decl_len) == 0) - { - offset += decl_len; - point = offset; - break; - } - } - - if (!point) - break; - - /* Skip forward until we find the open paren. */ - while (point < file_size) - { - if (buffer[point] == '\n') - { - line_number++; - line_start = point + 1; - } - else if (buffer[point] == '(') - break; - - point++; - } - - while (point++ < file_size) - { - if (!whitespace_or_newline (buffer[point])) - break; - else if (buffer[point] == '\n') - { - line_number++; - line_start = point + 1; - } - } - - if (point >= file_size) - break; - - /* Now looking at name of function. Get it. */ - for (offset = point; buffer[offset] != ','; offset++); - func = (char *)xmalloc (1 + (offset - point)); - strncpy (func, buffer + point, offset - point); - func[offset - point] = '\0'; - - /* Remember this tag in the current block. */ - { - char *tag_name; - - tag_name = (char *)xmalloc (1 + (offset - line_start)); - strncpy (tag_name, buffer + line_start, offset - line_start); - tag_name[offset - line_start] = '\0'; - add_tag_to_block (block, tag_name, line_number, point); - } - -#if defined (NAMED_FUNCTIONS) - /* Generate the user-visible function name from the function's name. */ - { - register int i; - char *name_start; - - name_start = func; - - if (strncmp (name_start, "info_", 5) == 0) - name_start += 5; - - func_name = xstrdup (name_start); - - /* Fix up "ea" commands. */ - if (strncmp (func_name, "ea_", 3) == 0) - { - char *temp_func_name; - - temp_func_name = (char *)xmalloc (10 + strlen (func_name)); - strcpy (temp_func_name, "echo_area_"); - strcat (temp_func_name, func_name + 3); - free (func_name); - func_name = temp_func_name; - } - - for (i = 0; func_name[i]; i++) - if (func_name[i] == '_') - func_name[i] = '-'; - } -#endif /* NAMED_FUNCTIONS */ - - /* Find doc string. */ - point = offset + 1; - - while (point < file_size) - { - if (buffer[point] == '\n') - { - line_number++; - line_start = point + 1; - } - - if (buffer[point] == '"') - break; - else - point++; - } - - offset = point + 1; - - while (offset < file_size) - { - if (buffer[offset] == '\n') - { - line_number++; - line_start = offset + 1; - } - - if (buffer[offset] == '\\') - offset += 2; - else if (buffer[offset] == '"') - break; - else - offset++; - } - - offset++; - if (offset >= file_size) - break; - - doc = (char *)xmalloc (1 + (offset - point)); - strncpy (doc, buffer + point, offset - point); - doc[offset - point] = '\0'; - -#if defined (NAMED_FUNCTIONS) - fprintf (doc_stream, " { %s, \"%s\", %s },\n", func, func_name, doc); - free (func_name); -#else /* !NAMED_FUNCTIONS */ - fprintf (doc_stream, " { %s, %s },\n", func, doc); -#endif /* !NAMED_FUNCTIONS */ - - fprintf (funs_stream, "extern void %s ();\n", func); - free (func); - free (doc); - } - free (buffer); - - /* If we created any tags, remember this file on our global list. Otherwise, - free the memory already allocated to it. */ - if (block->entries) - add_pointer_to_array (block, emacs_tags_index, emacs_tags, - emacs_tags_slots, 10, EMACS_TAG_BLOCK *); - else - { - free (block->filename); - free (block); - } -} - -static void -fatal_file_error (filename) - char *filename; -{ - fprintf (stderr, _("Couldn't manipulate the file %s.\n"), filename); - exit (2); -} - -static FILE * -must_fopen (filename, mode) - char *filename, *mode; -{ - FILE *stream; - - stream = fopen (filename, mode); - if (!stream) - fatal_file_error (filename); - - return (stream); -} - |