From 7fe60435bce6595a9c58a9bfd8244d74b5320e96 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 15 Jan 2013 08:46:13 +0100 Subject: Import DirectFB141_2k11R3_beta5 --- Source/FusionDale/tools/Makefile.am | 15 + Source/FusionDale/tools/Makefile.in | 488 +++++++++++++++++++ Source/FusionDale/tools/fddump.c | 225 +++++++++ Source/FusionDale/tools/gendoc.pl | 921 ++++++++++++++++++++++++++++++++++++ 4 files changed, 1649 insertions(+) create mode 100755 Source/FusionDale/tools/Makefile.am create mode 100755 Source/FusionDale/tools/Makefile.in create mode 100755 Source/FusionDale/tools/fddump.c create mode 100755 Source/FusionDale/tools/gendoc.pl (limited to 'Source/FusionDale/tools') diff --git a/Source/FusionDale/tools/Makefile.am b/Source/FusionDale/tools/Makefile.am new file mode 100755 index 0000000..413717a --- /dev/null +++ b/Source/FusionDale/tools/Makefile.am @@ -0,0 +1,15 @@ +## Makefile.am for FusionDale/tools + +INCLUDES = \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/src \ + $(FUSION_CFLAGS) + +bin_PROGRAMS = fddump + +fddump_SOURCES = fddump.c +fddump_LDADD = ../src/libfusiondale.la $(FUSION_LIBS) + +EXTRA_DIST = \ + gendoc.pl diff --git a/Source/FusionDale/tools/Makefile.in b/Source/FusionDale/tools/Makefile.in new file mode 100755 index 0000000..e4466d4 --- /dev/null +++ b/Source/FusionDale/tools/Makefile.in @@ -0,0 +1,488 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = fddump$(EXEEXT) +subdir = tools +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_fddump_OBJECTS = fddump.$(OBJEXT) +fddump_OBJECTS = $(am_fddump_OBJECTS) +am__DEPENDENCIES_1 = +fddump_DEPENDENCIES = ../src/libfusiondale.la $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(fddump_SOURCES) +DIST_SOURCES = $(fddump_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FUSIONDALE_BINARY_AGE = @FUSIONDALE_BINARY_AGE@ +FUSIONDALE_INTERFACE_AGE = @FUSIONDALE_INTERFACE_AGE@ +FUSIONDALE_MAJOR_VERSION = @FUSIONDALE_MAJOR_VERSION@ +FUSIONDALE_MICRO_VERSION = @FUSIONDALE_MICRO_VERSION@ +FUSIONDALE_MINOR_VERSION = @FUSIONDALE_MINOR_VERSION@ +FUSIONDALE_VERSION = @FUSIONDALE_VERSION@ +FUSION_CFLAGS = @FUSION_CFLAGS@ +FUSION_LIBS = @FUSION_LIBS@ +GREP = @GREP@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULEDIR = @MODULEDIR@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/src \ + $(FUSION_CFLAGS) + +fddump_SOURCES = fddump.c +fddump_LDADD = ../src/libfusiondale.la $(FUSION_LIBS) +EXTRA_DIST = \ + gendoc.pl + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu tools/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +fddump$(EXEEXT): $(fddump_OBJECTS) $(fddump_DEPENDENCIES) + @rm -f fddump$(EXEEXT) + $(LINK) $(fddump_OBJECTS) $(fddump_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fddump.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# 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/Source/FusionDale/tools/fddump.c b/Source/FusionDale/tools/fddump.c new file mode 100755 index 0000000..a9158a1 --- /dev/null +++ b/Source/FusionDale/tools/fddump.c @@ -0,0 +1,225 @@ +/* + (c) Copyright 2006-2007 directfb.org + + All rights reserved. + + Written by Denis Oliver Kropp . + + This file is subject to the terms and conditions of the MIT License: + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + + +static IFusionDale *dale = NULL; + + +static DirectResult +init_fusiondale( int *argc, char **argv[] ) +{ + DirectResult ret; + + /* Initialize FusionDale. */ + ret = FusionDaleInit( argc, argv ); + if (ret) + return FusionDaleError( "FusionDaleInit", ret ); + + /* Create the super interface. */ + ret = FusionDaleCreate( &dale ); + if (ret) + return FusionDaleError( "FusionDaleCreate", ret ); + + return DR_OK; +} + +static void +deinit_fusiondale() +{ + if (dale) + dale->Release( dale ); +} + +static bool +messenger_callback( FusionObjectPool *pool, + FusionObject *object, + void *ctx ) +{ + DirectResult ret; + int refs; + CoreMessenger *messenger = (CoreMessenger*) object; + + if (object->state != FOS_ACTIVE) + return true; + + ret = fusion_ref_stat( &object->ref, &refs ); + if (ret) { + printf( "Fusion error %d!\n", ret ); + return false; + } + +#if FUSION_BUILD_MULTI + printf( "0x%08x : ", object->ref.multi.id ); +#else + printf( "N/A : " ); +#endif + + printf( "%3d ", refs ); + + printf( "%3lu", object->id ); + + printf( " %4u ", fusion_hash_size( messenger->hash ) ); + + + + + printf( "\n" ); + + return true; +} + +static void +dump_messengers( CoreDale *core ) +{ + printf( "\n" + "--------------------------[ Messengers ]--------------------------\n" ); + printf( "Reference . Refs ID Events\n" ); + printf( "------------------------------------------------------------------\n" ); + + fd_core_enum_messengers( core, messenger_callback, NULL ); +} + +int +main( int argc, char *argv[] ) +{ + DirectResult ret; + long long millis; + long int seconds, minutes, hours, days; + IFusionDale_data *data; + + char *buffer = malloc( 0x10000 ); + + setvbuf( stdout, buffer, _IOFBF, 0x10000 ); + + /* FusionDale initialization. */ + ret = init_fusiondale( &argc, &argv ); + if (ret) + goto out; + + millis = direct_clock_get_millis(); + + seconds = millis / 1000; + millis %= 1000; + + minutes = seconds / 60; + seconds %= 60; + + hours = minutes / 60; + minutes %= 60; + + days = hours / 24; + hours %= 24; + + switch (days) { + case 0: + printf( "\nFusionDale uptime: %02ld:%02ld:%02ld\n", + hours, minutes, seconds ); + break; + + case 1: + printf( "\nFusionDale uptime: %ld day, %02ld:%02ld:%02ld\n", + days, hours, minutes, seconds ); + break; + + default: + printf( "\nFusionDale uptime: %ld days, %02ld:%02ld:%02ld\n", + days, hours, minutes, seconds ); + break; + } + + data = ifusiondale_singleton->priv; + + dump_messengers( data->core ); + +#if FUSION_BUILD_MULTI + if (argc > 1 && !strcmp( argv[1], "-s" )) { + SHMemDesc *desc; + unsigned int total = 0; + FusionSHMPoolShared *pool = fd_core_shmpool( data->core ); + + ret = fusion_skirmish_prevail( &pool->lock ); + if (ret) { + D_DERROR( ret, "Could not lock shared memory pool!\n" ); + goto out; + } + + if (pool->allocs) { + printf( "\nShared memory allocations (%d): \n", + direct_list_count_elements_EXPENSIVE( pool->allocs ) ); + + direct_list_foreach (desc, pool->allocs) { + printf( " %9zu bytes at %p allocated in %-30s (%s: %u)\n", + desc->bytes, desc->mem, desc->func, desc->file, desc->line ); + + total += desc->bytes; + } + + printf( " -------\n %7dk total\n", total >> 10 ); + } + + printf( "\nShared memory file size: %dk\n", pool->heap->size >> 10 ); + + fusion_skirmish_dismiss( &pool->lock ); + } +#endif + + printf( "\n" ); + +out: + /* FusionDale deinitialization. */ + deinit_fusiondale(); + + return ret; +} + diff --git a/Source/FusionDale/tools/gendoc.pl b/Source/FusionDale/tools/gendoc.pl new file mode 100755 index 0000000..81007ad --- /dev/null +++ b/Source/FusionDale/tools/gendoc.pl @@ -0,0 +1,921 @@ +#!/usr/bin/perl +# +# (c) Copyright 2001-2007 The DirectFB Organization (directfb.org) +# (c) Copyright 2000-2004 Convergence (integrated media) GmbH +# +# All rights reserved. +# +# Written by Denis Oliver Kropp , +# Andreas Hundt , +# Sven Neumann , +# Ville Syrjälä and +# Claudio Ciccani . +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +################################## +# TODO: CLEANUP CODE FURTHER !!! +################################## + +##################################################################################### +# # +# Documentation generator written by Denis Oliver Kropp # +# # +# - Uses first argument as project name and second as version # +# - Reads header files from stdin, parsing is tied to the coding style # +# - Writes HTML 3.x to different files: 'index', 'types', , # +# # +# FIXME: remove all copy'n'waste code, cleanup more, simplify more, ... # +# # +##################################################################################### + +$COLOR_BG = "#F8F4D8"; +$COLOR_LINK = "#2369E0"; +$COLOR_TEXT = "#232323"; + +$COLOR_TOP_BG = "#000000"; +$COLOR_TOP_LINK = "#FFFFFF"; + +$COLOR_TITLE = "#CC7723"; +$COLOR_TITLE_BG = "#203040"; +$COLOR_TITLE_MAIN = "#DDDDDD"; + +$COLOR_ENTRIES_BG = "#F8F8F0"; +$COLOR_ENTRIES_PTR = "#424242"; +$COLOR_ENTRIES_ID = "#234269"; +$COLOR_ENTRIES_DESC = "#303030"; + +$COLOR_ENUM_NAME = "#B04223"; +$COLOR_ENUM_ENTRY_ID = "#429023"; +$COLOR_ENUM_ENTRY_VAL = "#234269"; + +$COLOR_STRUCT_NAME = "#238423"; + +$COLOR_FUNCTYPE_NAME = "#D06923"; +$COLOR_FUNCTYPE_HEAD = "#232342"; + +$COLOR_MACRO_NAME = "#2342A0"; +$COLOR_MACRO_PARAMS = "#606080"; +$COLOR_MACRO_VALUE = "#232342"; + +$COLOR_METHOD_HEAD = "#425469"; + +$COLOR_COPYRIGHT_BG = "#E0E8F0"; + +######################################################################################################################## +## Top level just calls main function with args +# + +$PROJECT = shift @ARGV; +$VERSION = shift @ARGV; + +gen_doc( $PROJECT, $VERSION ); + +######################################################################################################################## + +######################################################################################################################## +## Utilities +# + +sub trim ($) { + local (*str) = @_; + + # remove leading white space + $str =~ s/^\s*//g; + + # remove trailing white space and new line + $str =~ s/\s*$//g; +} + +sub print_list ($$) { + local (*list, $title) = @_; + + print INDEX "

\n", + "

\n", + "

$title

\n", + " \n"; + + foreach $key (sort keys %list) + { + print INDEX " \n"; + } + + print INDEX "
\n", + " $key\n", + " \n", + " $list{$key}\n", + "
\n", + "

\n"; +} + +sub substitute_links ($) { + local (*str) = @_; + + # Interface Methods + $str =~ s/(I\w+)\:\:(\w+)\(\)/\\1\:\:\2\(\)\<\/a\>/g; + + # Automatic type links + $str =~ s/(\s)([A-Z][A-Z][A-Z][A-Z]?[a-z][a-z][a-z]?[\w0-9]+)/\1\\2\<\/a\>/g; + + # Automatic type links + $str =~ s/(\s)($PROJECT[\w0-9]+)/\1\\2\<\/a\>/g; + + # Explicit type links + $str =~ s/(\s)\@\_(\w[\w0-9]+)/\1\\2\<\/a\>/g; +} + +sub type_link ($) { + my ($type) = @_; + + trim( \$type ); + + if (defined($type_list{$type})) + { + return "$type"; + } + elsif (defined($interfaces{$type})) + { + return "$type"; + } + + return "$type"; +} + +######################################################################################################################## +## Generic parsers +# + +sub parse_comment ($$$$) { + local (*head, *body, *options, $inithead) = @_; + + local $headline_mode = 1; + local $list_open = 0; + + if ($inithead ne "") { + $headline_mode = 0; + } + + $head = $inithead; + $body = ""; + + %options = (); + + while (<>) + { + chomp; + last if /^\s*\*+\/\s*$/; + + s/^\s*[^\*\s]/\* /; + + if ($headline_mode == 1) + { + if (/^\s*\*+\s*$/) + { + $headline_mode = 0; + } + elsif (/^\s*\*+\s*@(\w+)\s*=?\s*(.*)$/) + { + $options{$1} = $2; + } + elsif (/^\s*\*+\s*(.+)\*\/\s*$/) + { + $head .= " $1\n"; + last; + } + elsif (/^\s*\*+\s*(.+)$/) + { + $head .= " $1\n"; + } + } + else + { + if (/^\s*\*+\s*(.+)\*\/\s*$/) + { + $body .= " $1\n"; + last; + } + elsif (/^\s*\*+\s*$/) + { + $body .= "

\n"; + } + elsif (/^\s*\*+\s\-\s(.+)$/) + { + if ($list_open == 0) + { + $list_open = 1; + + $body .= "

  • \n"; + } + else + { + $body .= "
  • \n"; + } + + $body .= " $1\n"; + } + elsif (/^\s*\*+\s\s(.+)$/) + { + $body .= " $1\n"; + } + elsif (/^\s*\*+\s(.+)$/) + { + if ($list_open == 1) + { + $list_open = 0; + + $body .= "
\n"; + } + + $body .= " $1\n"; + } + } + } + + if ($list_open == 1) + { + $body .= " \n"; + } + + substitute_links (\$head); + substitute_links (\$body); +} + +# +# Reads stdin until the end of the parameter list is reached. +# Returns list of parameter records. +# +# TODO: Add full comment support and use it for function types as well. +# +sub parse_params () { + local @entries; + + while (<>) + { + chomp; + last if /^\s*\)\;\s*$/; + + if ( /^\s*(const )?\s*([\w\ ]+)\s+(\**)(\w+,?)\s*$/ ) + { + local $const = $1; + local $type = $2; + local $ptr = $3; + local $name = $4; + + local $rec = { + TYPE => $const . type_link( $type ), + PTR => $ptr, + NAME => $name + }; + + push (@entries, $rec); + } + } + + return @entries; +} + +######################################################################################################################## +## Type parsers +# + +# +# Reads stdin until the end of the interface is reached. +# Writes formatted HTML to one file for the interface and one file per method. +# Parameter is the interface name. +# +sub parse_interface ($) + { + local ($interface) = @_; + + local $section; + + trim( \$interface ); + + html_create( INTERFACE, "$interface.html", + "" . + " $PROJECT Interfaces" . + "", $interface, $interface ); + + print INTERFACE "

\n", + " $headline\n", + " $detailed\n", + "

"; + + print INTERFACE "

\n", + "

\n"; + + print INTERFACE " \n"; + print INTERFACE " \n"; + print INTERFACE " \n"; + + print INTERFACE " \n"; + + while (<>) + { + chomp; + last if /^\s*\)\s*$/; + + if ( /^\s*\/\*\*\s*(.+)\s*\*\*\/\s*$/ ) + { + $section = $1; + } + elsif ( /^\s*(\w+)\s*\(\s*\*\s*(\w+)\s*\)\s*\(?\s*$/ ) + { + print INTERFACE " \n"; + + html_create( FUNCTION, "${interface}_$2.html", + "" . + " $interface" . + "", $2, "$interface - $2" ); + + print FUNCTION "

$headline

\n", + "
Methods of $interface
\n", + " $section\n", + " \n", + " ", + " $2\n", + " \n", + " $headline\n", + "
\n", + " \n"; + + local @params = parse_params(); + local $param; + + for $param (@params) + { + print FUNCTION " \n"; + } + + print FUNCTION " \n", + "
$1 $2 (
\n", + "  \n", + " \n", + " $param->{TYPE}\n", + "  \n", + " $param->{PTR}\n", + " \n", + " $param->{NAME}\n", + "
);
\n", + "

\n"; + + print FUNCTION "

$detailed

\n"; + + $headline = ""; + $detailed = ""; + $section = ""; + + html_close( FUNCTION ); + } + elsif ( /^\s*\/\*\s*$/ ) + { + parse_comment( \$headline, \$detailed, \$options, "" ); + } + } + + print INTERFACE " \n"; + + print INTERFACE "
\n", + "

\n"; + + html_close( INTERFACE ); + } + +# +# Reads stdin until the end of the enum is reached. +# Writes formatted HTML to "types.html". +# +sub parse_enum + { + local %entries; + local @list; + + local $pre; + + while (<>) + { + chomp; + + local $entry; + + # entry with assignment (complete comment) + if ( /^\s*(\w+)\s*=\s*([\w\d\(\)\,\|\!\s]+[^\,\s])\s*,?\s*\/\*\s*(.+)\s*\*\/\s*$/ ) + { + $entry = $1; + $values{ $entry } = $2; + $entries{ $entry } = $3; + } + # entry with assignment (opening comment) + elsif ( /^\s*(\w+)\s*=\s*([\w\d\(\)\,\|\!\s]+[^\,\s])\s*,?\s*\/\*\s*(.+)\s*$/ ) + { + $entry = $1; + $values{ $entry } = $2; + + parse_comment( \$t1, \$t2, \$opt, $3 ); + + $entries{ $entry } = $t1.$t2; + } + # entry with assignment (none or preceding comment) + elsif ( /^\s*(\w+)\s*=\s*([\w\d\(\)\,\|\!\s]+[^\,\s])\s*,?\s*$/ ) + { + $entry = $1; + $values{ $entry } = $2; + $entries{ $entry } = $pre; + } + # entry without assignment (complete comment) + elsif ( /^\s*(\w+)\s*,?\s*\/\*\s*(.+)\s*\*\/\s*$/ ) + { + $entry = $1; + $entries{ $entry } = $2; + } + # entry without assignment (opening comment) + elsif ( /^\s*(\w+)\s*,?\s*\/\*\s*(.+)\s*$/ ) + { + $entry = $1; + + parse_comment( \$t1, \$t2, \$opt, $2 ); + + $entries{ $entry } = $t1.$t2; + } + # entry without assignment (none or preceding comment) + elsif ( /^\s*(\w+)\s*,?\s*$/ ) + { + $entry = $1; + $entries{ $entry } = $pre; + } + # preceding comment (complete) + elsif ( /^\s*\/\*\s*(.+)\s*\*\/\s*$/ ) + { + $pre = $1; + } + # preceding comment (opening) + elsif ( /^\s*\/\*\s*(.+)\s*$/ ) + { + parse_comment( \$t1, \$t2, \$opt, $1 ); + + $pre = $t1.$t2; + } + # end of enum + elsif ( /^\s*\}\s*(\w+)\s*\;\s*$/ ) + { + $enum = $1; + + trim( \$enum ); + + $enum_list{$enum} = $headline; + $type_list{$enum} = $headline; + + last; + } + # blank line? + else + { + $pre = ""; + } + + if ($entry ne "") + { + push (@list, $entry); + } + } + + if (scalar @list > 0) + { + print TYPES "

\n", + " \n", + "

$enum

\n", + " \n", + "

$headline

\n", + " \n"; + + foreach $key (@list) + { + substitute_links (\$entries{$key}); + + print TYPES " \n"; + } + + print TYPES "
 \n", + " $key\n", + "  \n", + " $values{$key}\n", + "  \n", + " $entries{$key}\n", + "
\n", + "

\n", + " $detailed\n", + "


\n"; + } + } + +# +# Reads stdin until the end of the enum is reached. +# Writes formatted HTML to "types.html". +# +sub parse_struct + { + local @entries; + local %entries_params; + local %entries_types; + local %entries_ptrs; + + while (<>) + { + chomp; + + local $entry; + + # without comment + if ( /^\s*(const )?\s*([\w ]+)\s+(\**)([\w\d\+\[\]]+)(\s*:\s*\d+)?;\s*$/ ) + { + $const = $1; + $type = $2; + $ptr = $3; + $entry = $4.$5; + $text = ""; + } + # complete one line entry + elsif ( /^\s*(const )?\s*([\w ]+)\s+(\**)([\w\d\+\[\]]+)(\s*:\s*\d+)?;\s*\/\*\s*(.+)\*\/\s*$/ ) + { + $const = $1; + $type = $2; + $ptr = $3; + $entry = $4.$5; + $text = $6; + } + # with comment opening + elsif ( /^\s*(const )?\s*([\w ]+)\s+(\**)([\w\d\+\[\]]+)(\s*:\s*\d+)?;\s*\/\*\s*(.+)\s*$/ ) + { + $const = $1; + $type = $2; + $ptr = $3; + $entry = $4.$5; + + parse_comment( \$t1, \$t2, \$opt, $6 ); + + $text = $t1.$t2; + } + elsif ( /^\s*\}\s*(\w+)\s*\;\s*$/ ) + { + $struct = $1; + + trim( \$struct ); + + $struct_list{$struct} = $headline; + $type_list{$struct} = $headline; + + last; + } + + if ($entry ne "") + { + # TODO: Use structure + $entries_types{$entry} = $const . type_link( $type ); + $entries_ptrs{$entry} = $ptr; + $entries_params{$entry} = $text; + + push (@entries, $entry); + } + } + + if (scalar @entries > 0) + { + print TYPES "

", + " \n", + "

$struct

\n", + " \n", + "

$headline

\n", + " \n"; + + foreach $key (@entries) + { + substitute_links (\$entries_params{$key}); + + print TYPES " \n"; + } + + print TYPES "
 \n", + " $entries_types{$key}\n", + "  \n", + " $entries_ptrs{$key}\n", + " \n", + " $key\n", + "  \n", + " $entries_params{$key}\n", + "
\n", + "

\n", + " $detailed\n", + "


\n"; + } + } + +# +# Reads stdin until the end of the function type is reached. +# Writes formatted HTML to "types.html". +# Parameters are the return type and function type name. +# +sub parse_func ($$) + { + local ($rtype, $name) = @_; + + local @entries; + local %entries_params; + local %entries_types; + local %entries_ptrs; + + trim( \$rtype ); + trim( \$name ); + + while (<>) + { + chomp; + + local $entry; + + # without comment + if ( /^\s*(const )?\s*([\w ]+)\s+(\**)([\w\d\+\[\]]+)(\s*:\s*\d+)?,?\s*$/ ) + { + $const = $1; + $type = $2; + $ptr = $3; + $entry = $4.$5; + $text = ""; + } + # complete one line entry + elsif ( /^\s*(const )?\s*([\w ]+)\s+(\**)([\w\d\+\[\]]+)(\s*:\s*\d+)?,?\s*\/\*\s*(.+)\*\/\s*$/ ) + { + $const = $1; + $type = $2; + $ptr = $3; + $entry = $4.$5; + $text = $6; + } + # with comment opening + elsif ( /^\s*(const )?\s*([\w ]+)\s+(\**)([\w\d\+\[\]]+)(\s*:\s*\d+)?,?\s*\/\*\s*(.+)\s*$/ ) + { + $const = $1; + $type = $2; + $ptr = $3; + $entry = $4.$5; + + parse_comment( \$t1, \$t2, \$opt, $6 ); + + $text = $t1.$t2; + } + elsif ( /^\s*\)\;\s*$/ ) + { + $func_list{$name} = $headline; + $type_list{$name} = $headline; + + last; + } + + if ($entry ne "") + { + # TODO: Use structure + $entries_types{$entry} = $const . type_link( $type ); + $entries_ptrs{$entry} = $ptr; + $entries_params{$entry} = $text; + + push (@entries, $entry); + } + } + + $rtype = type_link( $rtype ); + + if (scalar @entries > 0) + { + print TYPES "

", + " \n", + "

$name

\n", + " \n", + "

$headline

\n", + " \n", + " \n"; + + foreach $key (@entries) + { + print TYPES " \n"; + } + + print TYPES " \n", + "
\n", + " $rtype (*$name) (\n", + "
\n", + "  \n", + " \n", + " $entries_types{$key}\n", + "  \n", + " $entries_ptrs{$key}\n", + " \n", + " $key\n", + "  \n", + " $entries_params{$key}\n", + "
);
\n", + "

\n", + " $detailed\n", + "


\n"; + } + } + +# +# Reads stdin until the end of the macro is reached. +# Writes formatted HTML to "types.html". +# Parameters are the macro name, parameters and value. +# +sub parse_macro ($$$) + { + local ($macro, $params, $value) = @_; + + trim( \$macro ); + trim( \$params ); + trim( \$value ); + + while (<>) + { + chomp; + + last unless /\\$/; + } + + if (!defined ($options{"internal"}) && $value ne "") { + $macro_list{$macro} = $headline; + $type_list{$macro} = $headline; + + $value =~ s/^\s*\\\s*$//; + + print TYPES "

\n", + " \n", + "

\n", + " $macro\n", + " $params\n", + "

\n", + " \n", + "

$headline

\n", + " $value\n", + "

\n", + " $detailed\n", + "


\n"; + } + } + +######################################################################################################################## +## HTML Files +# + +sub html_create ($$$$$) + { + local ($FILE, $filename, $title, $subtitle, $singletitle) = @_; + + open( $FILE, ">$filename" ) + or die ("*** Can not open '$filename' for writing:\n*** $!"); + + print $FILE "\n", + "\n", + "\n", + "\n", + " $singletitle [$PROJECT Reference Manual]\n", + "\n", + "\n", + "\n", + "\n", + " \n", + " \n", + "
\n", + " \n", + " \n", + "   ", + " Reference Manual - $VERSION\n", + "
\n"; + + if ($subtitle) + { + print $FILE " \n", + " \n", + "
\n", + " $title \n", + " \n", + "  $subtitle\n", + "
\n"; + } + else + { + print $FILE " $title\n"; + } + + print $FILE "
\n", + "\n"; + } + +sub html_close ($) + { + local ($FILE) = @_; + + print $FILE "\n", + "\n", + " \n", + "
\n", + " ", + " \"Creative", + " ", + " \n", + " This work is licensed under a", + " ", + " Creative Commons Attribution-Share Alike 3.0 License", + "
\n", + "\n", + "\n"; + + close( $FILE ); + } + + +######################################################################################################################## +## Main Function +# + +sub gen_doc ($$) { + local ($project, $version) = @_; + + trim( \$project ); + trim( \$version ); + + html_create( INDEX, "index.html", "Index Page", "", "Index" ); + html_create( TYPES, "types.html", "$PROJECT Types", "", "Types" ); + + print INDEX "

\n", + "

\n", + "

Interfaces

\n", + " \n"; + + while (<>) { + chomp; + + if ( /^\s*DECLARE_INTERFACE\s*\(\s*(\w+)\s\)\s*$/ ) { + $interfaces{$1} = "$headline $detailed"; + + print INDEX " \n"; + } + elsif ( /^\s*DEFINE_INTERFACE\s*\(\s*(\w+),\s*$/ ) { + parse_interface( $1 ); + } + elsif ( /^\s*typedef\s+enum\s*\{?\s*$/ ) { + parse_enum(); + } + elsif ( /^\s*typedef\s+(struct|union)\s*\{?\s*$/ ) { + parse_struct(); + } + elsif ( /^\s*typedef\s+(\w+)\s+\(\*(\w+)\)\s*\(\s*$/ ) { + parse_func( $1, $2 ); + } + elsif ( /^\s*#define\s+([^\(\s]+)(\([^\)]*\))?\s*(.*)/ ) { + parse_macro( $1, $2, $3 ); + } + elsif ( /^\s*\/\*\s*$/ ) { + parse_comment( \$headline, \$detailed, \$options, "" ); + } + else { + $headline = ""; + $detailed = ""; + %options = (); + } + } + + print INDEX "
\n", + " $1\n", + " \n", + " $headline $detailed\n", + "
\n", + "

\n"; + + print_list( \%func_list, "Function Types" ); + print_list( \%enum_list, "Enumerated Types" ); + print_list( \%struct_list, "Structured Types" ); + print_list( \%macro_list, "Definitions" ); + + + html_close( INDEX ); + html_close( TYPES ); +} + -- cgit