rollup commit
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
ppthtml ChangeLog
|
||||
|
||||
0.3 10/19/2001
|
||||
* Renamed the program to ppthtml...all lowercase
|
||||
|
||||
0.2.8 01/14/2000
|
||||
* Added man page
|
||||
* Added Unicode patch from Hironori
|
||||
* Many Bug Fixes
|
||||
|
||||
0.0.0 10/13/1999
|
||||
*So far its just a dream. :)
|
||||
|
||||
|
||||
|
||||
ppthtml ChangeLog
|
||||
|
||||
0.3 10/19/2001
|
||||
* Renamed the program to ppthtml...all lowercase
|
||||
|
||||
0.2.8 01/14/2000
|
||||
* Added man page
|
||||
* Added Unicode patch from Hironori
|
||||
* Many Bug Fixes
|
||||
|
||||
0.0.0 10/13/1999
|
||||
*So far its just a dream. :)
|
||||
|
||||
|
||||
|
||||
|
762
ppthtml/Makefile
762
ppthtml/Makefile
@@ -1,381 +1,381 @@
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 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 = .
|
||||
top_srcdir = ..
|
||||
prefix = /usr/local
|
||||
exec_prefix = ${prefix}
|
||||
|
||||
bindir = ${exec_prefix}/bin
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
datadir = ${prefix}/share
|
||||
sysconfdir = ${prefix}/etc
|
||||
sharedstatedir = ${prefix}/com
|
||||
localstatedir = ${prefix}/var
|
||||
libdir = ${exec_prefix}/lib
|
||||
infodir = ${prefix}/info
|
||||
mandir = ${prefix}/man
|
||||
includedir = ${prefix}/include
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/xlhtml/xlhtml
|
||||
pkglibdir = $(libdir)/xlhtml/xlhtml
|
||||
pkgincludedir = $(includedir)/xlhtml/xlhtml
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = aclocal
|
||||
AUTOCONF = autoconf
|
||||
AUTOMAKE = automake
|
||||
AUTOHEADER = autoheader
|
||||
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
|
||||
transform = s,x,x,
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = x86_64-unknown-linux-gnu
|
||||
host_triplet =
|
||||
CC = gcc
|
||||
COLE_MAJOR = 2
|
||||
COLE_MICRO = 2
|
||||
COLE_MINOR = 0
|
||||
HOST_ALIAS_NAME = x86_64-unknown-linux-gnu
|
||||
HOST_CANONICAL_NAME =
|
||||
HOST_CPU =
|
||||
HOST_OS =
|
||||
HOST_VENDOR =
|
||||
MAKEINFO = makeinfo
|
||||
PACKAGE = xlhtml/xlhtml
|
||||
RANLIB = ranlib
|
||||
STRIP = strip
|
||||
VERSION = 0.5
|
||||
|
||||
EXTRA_DIST = README ChangeLog TODO THANKS test.ppt ppthtml.1
|
||||
|
||||
INCLUDES = -I../cole
|
||||
|
||||
noinst_PROGRAMS = pptdump
|
||||
man_MANS = ppthtml.1
|
||||
bin_SCRIPTS = nspptview
|
||||
bin_PROGRAMS = ppthtml
|
||||
LDADD = ../cole/libcole.a
|
||||
ppthtml_SOURCES = ppthtml.c vector.c
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
|
||||
CPPFLAGS =
|
||||
LDFLAGS =
|
||||
LIBS =
|
||||
ppthtml_OBJECTS = ppthtml.o vector.o
|
||||
ppthtml_LDADD = $(LDADD)
|
||||
ppthtml_DEPENDENCIES = ../cole/libcole.a
|
||||
ppthtml_LDFLAGS =
|
||||
pptdump_SOURCES = pptdump.c
|
||||
pptdump_OBJECTS = pptdump.o
|
||||
pptdump_LDADD = $(LDADD)
|
||||
pptdump_DEPENDENCIES = ../cole/libcole.a
|
||||
pptdump_LDFLAGS =
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
|
||||
CFLAGS = -g -O2
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
man1dir = $(mandir)/man1
|
||||
MANS = $(man_MANS)
|
||||
|
||||
NROFF = nroff
|
||||
DIST_COMMON = README ChangeLog Makefile.am Makefile.in THANKS
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(ppthtml_SOURCES) pptdump.c
|
||||
OBJECTS = $(ppthtml_OBJECTS) pptdump.o
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps ppthtml/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) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
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:
|
||||
|
||||
ppthtml: $(ppthtml_OBJECTS) $(ppthtml_DEPENDENCIES)
|
||||
@rm -f ppthtml
|
||||
$(LINK) $(ppthtml_LDFLAGS) $(ppthtml_OBJECTS) $(ppthtml_LDADD) $(LIBS)
|
||||
|
||||
pptdump: $(pptdump_OBJECTS) $(pptdump_DEPENDENCIES)
|
||||
@rm -f pptdump
|
||||
$(LINK) $(pptdump_LDFLAGS) $(pptdump_OBJECTS) $(pptdump_LDADD) $(LIBS)
|
||||
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
|
||||
$(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
else if test -f $(srcdir)/$$p; then \
|
||||
echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
|
||||
$(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
else :; fi; fi; \
|
||||
done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
done
|
||||
|
||||
install-man1:
|
||||
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
|
||||
uninstall-man1:
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
install-man: $(MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-man1
|
||||
uninstall-man:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) uninstall-man1
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(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 = ppthtml
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-binPROGRAMS install-binSCRIPTS
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-man
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-man
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) \
|
||||
$(DESTDIR)$(mandir)/man1
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-noinstPROGRAMS \
|
||||
mostlyclean-compile mostlyclean-tags \
|
||||
mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-noinstPROGRAMS clean-compile \
|
||||
clean-tags clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-binPROGRAMS distclean-noinstPROGRAMS \
|
||||
distclean-compile distclean-tags distclean-generic \
|
||||
clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-binPROGRAMS \
|
||||
maintainer-clean-noinstPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: 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 uninstall-binSCRIPTS install-binSCRIPTS \
|
||||
install-man1 uninstall-man1 install-man uninstall-man tags \
|
||||
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||
distdir info-am info dvi-am dvi check check-am installcheck-am \
|
||||
installcheck install-exec-am install-exec install-data-am install-data \
|
||||
install-am install uninstall-am uninstall all-redirect all-am all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
#AM_CFLAGS = -Wall -Wshadow -Wcast-align -Wpointer-arith
|
||||
|
||||
# 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:
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 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 = .
|
||||
top_srcdir = ..
|
||||
prefix = /usr/local
|
||||
exec_prefix = ${prefix}
|
||||
|
||||
bindir = ${exec_prefix}/bin
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
datadir = ${prefix}/share
|
||||
sysconfdir = ${prefix}/etc
|
||||
sharedstatedir = ${prefix}/com
|
||||
localstatedir = ${prefix}/var
|
||||
libdir = ${exec_prefix}/lib
|
||||
infodir = ${prefix}/info
|
||||
mandir = ${prefix}/man
|
||||
includedir = ${prefix}/include
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/xlhtml/xlhtml
|
||||
pkglibdir = $(libdir)/xlhtml/xlhtml
|
||||
pkgincludedir = $(includedir)/xlhtml/xlhtml
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = aclocal
|
||||
AUTOCONF = autoconf
|
||||
AUTOMAKE = automake
|
||||
AUTOHEADER = autoheader
|
||||
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
|
||||
transform = s,x,x,
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = x86_64-unknown-linux-gnu
|
||||
host_triplet =
|
||||
CC = gcc
|
||||
COLE_MAJOR = 2
|
||||
COLE_MICRO = 2
|
||||
COLE_MINOR = 0
|
||||
HOST_ALIAS_NAME = x86_64-unknown-linux-gnu
|
||||
HOST_CANONICAL_NAME =
|
||||
HOST_CPU =
|
||||
HOST_OS =
|
||||
HOST_VENDOR =
|
||||
MAKEINFO = makeinfo
|
||||
PACKAGE = xlhtml/xlhtml
|
||||
RANLIB = ranlib
|
||||
STRIP = strip
|
||||
VERSION = 0.5
|
||||
|
||||
EXTRA_DIST = README ChangeLog TODO THANKS test.ppt ppthtml.1
|
||||
|
||||
INCLUDES = -I../cole
|
||||
|
||||
noinst_PROGRAMS = pptdump
|
||||
man_MANS = ppthtml.1
|
||||
bin_SCRIPTS = nspptview
|
||||
bin_PROGRAMS = ppthtml
|
||||
LDADD = ../cole/libcole.a
|
||||
ppthtml_SOURCES = ppthtml.c vector.c
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
|
||||
CPPFLAGS =
|
||||
LDFLAGS =
|
||||
LIBS =
|
||||
ppthtml_OBJECTS = ppthtml.o vector.o
|
||||
ppthtml_LDADD = $(LDADD)
|
||||
ppthtml_DEPENDENCIES = ../cole/libcole.a
|
||||
ppthtml_LDFLAGS =
|
||||
pptdump_SOURCES = pptdump.c
|
||||
pptdump_OBJECTS = pptdump.o
|
||||
pptdump_LDADD = $(LDADD)
|
||||
pptdump_DEPENDENCIES = ../cole/libcole.a
|
||||
pptdump_LDFLAGS =
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
|
||||
CFLAGS = -g -O2
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
man1dir = $(mandir)/man1
|
||||
MANS = $(man_MANS)
|
||||
|
||||
NROFF = nroff
|
||||
DIST_COMMON = README ChangeLog Makefile.am Makefile.in THANKS
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(ppthtml_SOURCES) pptdump.c
|
||||
OBJECTS = $(ppthtml_OBJECTS) pptdump.o
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps ppthtml/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) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
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:
|
||||
|
||||
ppthtml: $(ppthtml_OBJECTS) $(ppthtml_DEPENDENCIES)
|
||||
@rm -f ppthtml
|
||||
$(LINK) $(ppthtml_LDFLAGS) $(ppthtml_OBJECTS) $(ppthtml_LDADD) $(LIBS)
|
||||
|
||||
pptdump: $(pptdump_OBJECTS) $(pptdump_DEPENDENCIES)
|
||||
@rm -f pptdump
|
||||
$(LINK) $(pptdump_LDFLAGS) $(pptdump_OBJECTS) $(pptdump_LDADD) $(LIBS)
|
||||
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
|
||||
$(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
else if test -f $(srcdir)/$$p; then \
|
||||
echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
|
||||
$(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
else :; fi; fi; \
|
||||
done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
done
|
||||
|
||||
install-man1:
|
||||
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
|
||||
uninstall-man1:
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
install-man: $(MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-man1
|
||||
uninstall-man:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) uninstall-man1
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(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 = ppthtml
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-binPROGRAMS install-binSCRIPTS
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-man
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-man
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) \
|
||||
$(DESTDIR)$(mandir)/man1
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-noinstPROGRAMS \
|
||||
mostlyclean-compile mostlyclean-tags \
|
||||
mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-noinstPROGRAMS clean-compile \
|
||||
clean-tags clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-binPROGRAMS distclean-noinstPROGRAMS \
|
||||
distclean-compile distclean-tags distclean-generic \
|
||||
clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-binPROGRAMS \
|
||||
maintainer-clean-noinstPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: 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 uninstall-binSCRIPTS install-binSCRIPTS \
|
||||
install-man1 uninstall-man1 install-man uninstall-man tags \
|
||||
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||
distdir info-am info dvi-am dvi check check-am installcheck-am \
|
||||
installcheck install-exec-am install-exec install-data-am install-data \
|
||||
install-am install uninstall-am uninstall all-redirect all-am all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
#AM_CFLAGS = -Wall -Wshadow -Wcast-align -Wpointer-arith
|
||||
|
||||
# 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:
|
||||
|
@@ -1,13 +1,13 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
EXTRA_DIST = README ChangeLog TODO THANKS test.ppt ppthtml.1
|
||||
|
||||
AM_CPPFLAGS = -I../cole
|
||||
|
||||
noinst_PROGRAMS = pptdump
|
||||
man_MANS = ppthtml.1
|
||||
bin_SCRIPTS = nspptview
|
||||
bin_PROGRAMS = ppthtml
|
||||
LDADD = ../cole/libcole.a
|
||||
ppthtml_SOURCES = ppthtml.c vector.c
|
||||
#AM_CFLAGS = -Wall -Wshadow -Wcast-align -Wpointer-arith
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
EXTRA_DIST = README ChangeLog TODO THANKS test.ppt ppthtml.1
|
||||
|
||||
AM_CPPFLAGS = -I../cole
|
||||
|
||||
noinst_PROGRAMS = pptdump
|
||||
man_MANS = ppthtml.1
|
||||
bin_SCRIPTS = nspptview
|
||||
bin_PROGRAMS = ppthtml
|
||||
LDADD = ../cole/libcole.a
|
||||
ppthtml_SOURCES = ppthtml.c vector.c
|
||||
#AM_CFLAGS = -Wall -Wshadow -Wcast-align -Wpointer-arith
|
||||
|
@@ -1,24 +1,24 @@
|
||||
# -w-8008 Disable warning "Condition is always true"
|
||||
# -w-8066 Disable warning "Unreachable code"
|
||||
# -q Disable copyright message
|
||||
#CFLAGS_DEBUG = -y -v
|
||||
CFLAGS = -w-8008 -w-8066 -q -DWIN32=1 -I.. -I..\cole $(CFLAGS_DEBUG)
|
||||
LDFLAGS = -q $(CFLAGS_DEBUG)
|
||||
|
||||
LIBCOLE = ..\cole\cole.lib
|
||||
|
||||
all: ppthtml.exe pptdump.exe
|
||||
|
||||
clean:
|
||||
-del *.obj
|
||||
-del *.exe
|
||||
-del *.tds
|
||||
|
||||
ppthtml.exe: ppthtml.obj $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) ppthtml.obj $(LIBCOLE)
|
||||
|
||||
pptdump.exe: pptdump.obj $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) pptdump.obj $(LIBCOLE)
|
||||
|
||||
# eof
|
||||
|
||||
# -w-8008 Disable warning "Condition is always true"
|
||||
# -w-8066 Disable warning "Unreachable code"
|
||||
# -q Disable copyright message
|
||||
#CFLAGS_DEBUG = -y -v
|
||||
CFLAGS = -w-8008 -w-8066 -q -DWIN32=1 -I.. -I..\cole $(CFLAGS_DEBUG)
|
||||
LDFLAGS = -q $(CFLAGS_DEBUG)
|
||||
|
||||
LIBCOLE = ..\cole\cole.lib
|
||||
|
||||
all: ppthtml.exe pptdump.exe
|
||||
|
||||
clean:
|
||||
-del *.obj
|
||||
-del *.exe
|
||||
-del *.tds
|
||||
|
||||
ppthtml.exe: ppthtml.obj $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) ppthtml.obj $(LIBCOLE)
|
||||
|
||||
pptdump.exe: pptdump.obj $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) pptdump.obj $(LIBCOLE)
|
||||
|
||||
# eof
|
||||
|
||||
|
1436
ppthtml/Makefile.in
1436
ppthtml/Makefile.in
File diff suppressed because it is too large
Load Diff
@@ -1,19 +1,19 @@
|
||||
CFLAGS = /nologo /DWIN32=1 /I.. /I..\cole
|
||||
LDFLAGS = /nologo
|
||||
|
||||
LIBCOLE = ..\cole\cole.lib
|
||||
|
||||
all: ppthtml.exe pptdump.exe
|
||||
|
||||
clean:
|
||||
-del *.obj
|
||||
-del *.exe
|
||||
|
||||
ppthtml.exe: ppthtml.obj $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) ppthtml.obj $(LIBCOLE)
|
||||
|
||||
pptdump.exe: pptdump.obj $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) pptdump.obj $(LIBCOLE)
|
||||
|
||||
# eof
|
||||
|
||||
CFLAGS = /nologo /DWIN32=1 /I.. /I..\cole
|
||||
LDFLAGS = /nologo
|
||||
|
||||
LIBCOLE = ..\cole\cole.lib
|
||||
|
||||
all: ppthtml.exe pptdump.exe
|
||||
|
||||
clean:
|
||||
-del *.obj
|
||||
-del *.exe
|
||||
|
||||
ppthtml.exe: ppthtml.obj $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) ppthtml.obj $(LIBCOLE)
|
||||
|
||||
pptdump.exe: pptdump.obj $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) pptdump.obj $(LIBCOLE)
|
||||
|
||||
# eof
|
||||
|
||||
|
138
ppthtml/README
138
ppthtml/README
@@ -1,69 +1,69 @@
|
||||
Welcome to ppthtml.
|
||||
|
||||
|
||||
I. INTRODUCTION
|
||||
The ppthtml program will take a PowerPoint 97/95 file as input and convert
|
||||
it to html. The output is via standard out so it can be re-directed
|
||||
to files or piped to filters or used as a gateway to the internet.
|
||||
|
||||
II. INSTALLATION
|
||||
To build this application, from the top directory, type:
|
||||
|
||||
./configure --prefix=/<target installation directory e.g. /usr/local or /opt>
|
||||
make
|
||||
make install
|
||||
|
||||
Then to finish it up, you will need to go into netscape and tell the navigator
|
||||
to use the nspptview script to handle Microsoft Excel files.
|
||||
|
||||
e.g. <path to executable>/nspptview %s
|
||||
|
||||
You should be able to then browse to a file and open it. There is a file
|
||||
included in the ppthtml directory you can test with, test.ppt.
|
||||
|
||||
The shell script nspptview works well. You may need to modify the
|
||||
path in it to fit you system, though. Also, depending on where you install
|
||||
it, you may have to modify your PATH environmental variable.
|
||||
|
||||
|
||||
III. UNINSTALLING
|
||||
You may want to keep the tar directory around since you can do a make uninstall
|
||||
later. In the meantime, I suggest doing a make clean after installation to
|
||||
get the size down.
|
||||
|
||||
|
||||
IV. COMMANDLINE OPTIONS
|
||||
ppthtml now has several command line options that let you tailor its output. The
|
||||
command is now: ppthtml [] file.ppt
|
||||
|
||||
|
||||
V. PERFORMANCE TUNING
|
||||
There are also some user "tunable" parameters in the beginning of the
|
||||
ppthtml.c file. If you get a red message at the bottom of your web browser after
|
||||
converting a big presentation, these are the parameters to adjust. Generally, you
|
||||
would adjust them up in value. I have them adjusted to what I call normal for
|
||||
my usage. Your usage may differ. Don't increase them greatly...just 10-15% and
|
||||
re-compile. If that don't work, increase another 10-15% until it works.
|
||||
|
||||
|
||||
VI. TROUBLESHOOTING
|
||||
Using Netscape, you may occassionally see a file not found error. This usually
|
||||
comes when printing or going back to a previously converted file. This is
|
||||
the default behavior and it can be changed by commenting out the rm $tmp*
|
||||
in nspptview. I do this so you don't have files hanging around in your tmp
|
||||
directory where other people might be able to see them.
|
||||
|
||||
In general, if you can type ppthtml and get a usage error message, the PATH
|
||||
is working. If you don't, your PATH environmental variable needs adjusting.
|
||||
Next try passing the full path to ppthtml of the file you want converted. If it
|
||||
has problems with it, you may have a file the system can't interpret. To check
|
||||
your installation, try passing the full path of ppthtml/threads.ppt and see what
|
||||
it does with that.
|
||||
|
||||
|
||||
|
||||
|
||||
Charles N Wyble
|
||||
jackshck@thewybles.com
|
||||
|
||||
|
||||
Welcome to ppthtml.
|
||||
|
||||
|
||||
I. INTRODUCTION
|
||||
The ppthtml program will take a PowerPoint 97/95 file as input and convert
|
||||
it to html. The output is via standard out so it can be re-directed
|
||||
to files or piped to filters or used as a gateway to the internet.
|
||||
|
||||
II. INSTALLATION
|
||||
To build this application, from the top directory, type:
|
||||
|
||||
./configure --prefix=/<target installation directory e.g. /usr/local or /opt>
|
||||
make
|
||||
make install
|
||||
|
||||
Then to finish it up, you will need to go into netscape and tell the navigator
|
||||
to use the nspptview script to handle Microsoft Excel files.
|
||||
|
||||
e.g. <path to executable>/nspptview %s
|
||||
|
||||
You should be able to then browse to a file and open it. There is a file
|
||||
included in the ppthtml directory you can test with, test.ppt.
|
||||
|
||||
The shell script nspptview works well. You may need to modify the
|
||||
path in it to fit you system, though. Also, depending on where you install
|
||||
it, you may have to modify your PATH environmental variable.
|
||||
|
||||
|
||||
III. UNINSTALLING
|
||||
You may want to keep the tar directory around since you can do a make uninstall
|
||||
later. In the meantime, I suggest doing a make clean after installation to
|
||||
get the size down.
|
||||
|
||||
|
||||
IV. COMMANDLINE OPTIONS
|
||||
ppthtml now has several command line options that let you tailor its output. The
|
||||
command is now: ppthtml [] file.ppt
|
||||
|
||||
|
||||
V. PERFORMANCE TUNING
|
||||
There are also some user "tunable" parameters in the beginning of the
|
||||
ppthtml.c file. If you get a red message at the bottom of your web browser after
|
||||
converting a big presentation, these are the parameters to adjust. Generally, you
|
||||
would adjust them up in value. I have them adjusted to what I call normal for
|
||||
my usage. Your usage may differ. Don't increase them greatly...just 10-15% and
|
||||
re-compile. If that don't work, increase another 10-15% until it works.
|
||||
|
||||
|
||||
VI. TROUBLESHOOTING
|
||||
Using Netscape, you may occassionally see a file not found error. This usually
|
||||
comes when printing or going back to a previously converted file. This is
|
||||
the default behavior and it can be changed by commenting out the rm $tmp*
|
||||
in nspptview. I do this so you don't have files hanging around in your tmp
|
||||
directory where other people might be able to see them.
|
||||
|
||||
In general, if you can type ppthtml and get a usage error message, the PATH
|
||||
is working. If you don't, your PATH environmental variable needs adjusting.
|
||||
Next try passing the full path to ppthtml of the file you want converted. If it
|
||||
has problems with it, you may have a file the system can't interpret. To check
|
||||
your installation, try passing the full path of ppthtml/threads.ppt and see what
|
||||
it does with that.
|
||||
|
||||
|
||||
|
||||
|
||||
Charles N Wyble
|
||||
jackshck@thewybles.com
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
|
||||
Arturo Tena for the cole 2.0 library
|
||||
Caolan McNamara for MSWordView...where I got the nsopen & nsxlview scripts
|
||||
Hironori Sakamoto for the unicode patch
|
||||
|
||||
Arturo Tena for the cole 2.0 library
|
||||
Caolan McNamara for MSWordView...where I got the nsopen & nsxlview scripts
|
||||
Hironori Sakamoto for the unicode patch
|
||||
|
@@ -1,29 +1,29 @@
|
||||
#!/bin/csh
|
||||
|
||||
if ($#argv != 1) then
|
||||
echo "Usage: $0 file.doc"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
set source = $argv[1]
|
||||
|
||||
#Generate a unique html filename (/tmp/scriptname.pidnum.html)
|
||||
#set com = $0
|
||||
#set tmp = /tmp/$com:t.$$
|
||||
#set html = $tmp.html
|
||||
|
||||
set tmp = `mktemp -q /tmp/nspptview.XXXXXX` || exit 1
|
||||
set tmp2 = `mktemp -q $tmp/nspptview.XXXXXX` || exit 1
|
||||
set html = $tmp2.html
|
||||
|
||||
ppthtml $source > $html
|
||||
if ((!(-r $html)) | ($status)) then
|
||||
echo "$0"": failed to generate HTML file"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
#File exists and is of length > 0, so open it
|
||||
nsopen $html
|
||||
rm -rf $tmp*
|
||||
|
||||
exit 0
|
||||
#!/bin/csh
|
||||
|
||||
if ($#argv != 1) then
|
||||
echo "Usage: $0 file.doc"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
set source = $argv[1]
|
||||
|
||||
#Generate a unique html filename (/tmp/scriptname.pidnum.html)
|
||||
#set com = $0
|
||||
#set tmp = /tmp/$com:t.$$
|
||||
#set html = $tmp.html
|
||||
|
||||
set tmp = `mktemp -q /tmp/nspptview.XXXXXX` || exit 1
|
||||
set tmp2 = `mktemp -q $tmp/nspptview.XXXXXX` || exit 1
|
||||
set html = $tmp2.html
|
||||
|
||||
ppthtml $source > $html
|
||||
if ((!(-r $html)) | ($status)) then
|
||||
echo "$0"": failed to generate HTML file"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
#File exists and is of length > 0, so open it
|
||||
nsopen $html
|
||||
rm -rf $tmp*
|
||||
|
||||
exit 0
|
||||
|
1020
ppthtml/pptdump.c
1020
ppthtml/pptdump.c
File diff suppressed because it is too large
Load Diff
@@ -1,26 +1,26 @@
|
||||
.TH ppthtml 1 "October 13, 2001" "ppthtml"
|
||||
|
||||
.SH NAME
|
||||
ppthtml \- A program for converting Microsoft Power Point Files .ppt
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B ppthtml
|
||||
.RI Filename
|
||||
.br
|
||||
|
||||
.SH DESCRIPTION
|
||||
This manual page explains the
|
||||
.B ppthtml
|
||||
program. The program
|
||||
.B ppthtml
|
||||
is used to convert Microsoft Power Point files into either html or tab delimitted ASCII. The program can be interfaced with helper scripts for viewing email attachments. Most use of this program is through the helper scripts and one would probably rarely resort to using the commandline interface.
|
||||
|
||||
.SH NOTES
|
||||
To interface to Netscape Navigator: first locate the help scripts nspptview & nsopen. Go into the Edit Preferences dialog box. Click on the Navigator Category and hilight the Applications menu item. Look for Microsoft Excel Worksheet. If you don't see it create one. The MIME type should be: application/vnd.ms-powerpoint The suffixes should be: ppt,ppa,pps,pot,pwz In the handled by section of the dialog box, check the Application checkbox and set the path to wherever the nspptview helper script is located and pass a %s argument. For example, if nspptview is located in /usr/local/bin, then you would put:
|
||||
|
||||
/usr/local/bin/nspptview %s
|
||||
|
||||
in the Application path box.. (As a side note, make sure the nspptview script can find the ppthtml program or it won't work.) Click on the OK and you are done. You should be able to use the Test.ppt file that is distributed with the program to verify its configured correctly.
|
||||
|
||||
.SH AUTHOR
|
||||
Charles N Wyble
|
||||
.TH ppthtml 1 "October 13, 2001" "ppthtml"
|
||||
|
||||
.SH NAME
|
||||
ppthtml \- A program for converting Microsoft Power Point Files .ppt
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B ppthtml
|
||||
.RI Filename
|
||||
.br
|
||||
|
||||
.SH DESCRIPTION
|
||||
This manual page explains the
|
||||
.B ppthtml
|
||||
program. The program
|
||||
.B ppthtml
|
||||
is used to convert Microsoft Power Point files into either html or tab delimitted ASCII. The program can be interfaced with helper scripts for viewing email attachments. Most use of this program is through the helper scripts and one would probably rarely resort to using the commandline interface.
|
||||
|
||||
.SH NOTES
|
||||
To interface to Netscape Navigator: first locate the help scripts nspptview & nsopen. Go into the Edit Preferences dialog box. Click on the Navigator Category and hilight the Applications menu item. Look for Microsoft Excel Worksheet. If you don't see it create one. The MIME type should be: application/vnd.ms-powerpoint The suffixes should be: ppt,ppa,pps,pot,pwz In the handled by section of the dialog box, check the Application checkbox and set the path to wherever the nspptview helper script is located and pass a %s argument. For example, if nspptview is located in /usr/local/bin, then you would put:
|
||||
|
||||
/usr/local/bin/nspptview %s
|
||||
|
||||
in the Application path box.. (As a side note, make sure the nspptview script can find the ppthtml program or it won't work.) Click on the OK and you are done. You should be able to use the Test.ppt file that is distributed with the program to verify its configured correctly.
|
||||
|
||||
.SH AUTHOR
|
||||
Charles N Wyble
|
||||
|
1416
ppthtml/ppthtml.c
1416
ppthtml/ppthtml.c
File diff suppressed because it is too large
Load Diff
@@ -1,160 +1,160 @@
|
||||
|
||||
#ifndef PPTHTML_H
|
||||
#define PPTHTML_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <vector.h>
|
||||
|
||||
#undef MAX
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#define TYPE_STRING 0x1e /* 30, VT_LPSTR */
|
||||
#define SUMMARY_ID(x) ((x) & 0xff)
|
||||
|
||||
typedef uint32_t OlePos;
|
||||
typedef int32_t OleSPos;
|
||||
typedef struct _List List;
|
||||
typedef void* pointer;
|
||||
typedef const void *gconstpointer;
|
||||
typedef int gboolean;
|
||||
|
||||
/* definitions for vector array */
|
||||
typedef vector ole_vector;
|
||||
/** The initial size of a ole_vector. */
|
||||
#define OLE_VECTOR_SIZE 10
|
||||
/** The growth factor of a ole_vector. */
|
||||
#define OLE_VECTOR_FACTOR 2
|
||||
#define resize_ole_vector(v, size) \
|
||||
vector_resize(v, size, sizeof(OleSummarySection))
|
||||
#define create_ole_vector(v) \
|
||||
vector_create(v, OLE_VECTOR_SIZE, sizeof(OleSummarySection))
|
||||
#define destroy_ole_vector(v) \
|
||||
vector_destroy(v)
|
||||
#define append_ole(v, token) \
|
||||
vector_append(v, token, 0, OLE_VECTOR_FACTOR)
|
||||
#define insert_ole(v, token, pos) \
|
||||
vector_insert(v, token, pos, 0, OLE_VECTOR_FACTOR)
|
||||
#define insert_ole_space(v, pos, n) \
|
||||
vector_insert_space(v, OleSummarySection, pos, n, 0, OLE_VECTOR_FACTOR)
|
||||
#define ole_at(v, index) \
|
||||
element_at(v, index, OleSummarySection)
|
||||
#define ole_delete(v, pos) \
|
||||
vector_delete(v, OleSummarySection, pos)
|
||||
|
||||
/* definitions for vector array */
|
||||
typedef vector item_vector;
|
||||
/** The initial size of a item_vector. */
|
||||
#define ITEM_VECTOR_SIZE 10
|
||||
/** The growth factor of a item_vector. */
|
||||
#define ITEM_VECTOR_FACTOR 2
|
||||
#define resize_item_vector(v, size) \
|
||||
vector_resize(v, size, sizeof(item_t))
|
||||
#define create_item_vector(v) \
|
||||
vector_create(v, ITEM_VECTOR_SIZE, sizeof(item_t))
|
||||
#define destroy_item_vector(v) \
|
||||
vector_destroy(v)
|
||||
#define append_item(v, token) \
|
||||
vector_append(v, token, 0, ITEM_VECTOR_FACTOR)
|
||||
#define insert_item(v, token, pos) \
|
||||
vector_insert(v, token, pos, 0, ITEM_VECTOR_FACTOR)
|
||||
#define insert_item_space(v, pos, n) \
|
||||
vector_insert_space(v, item_t, pos, n, 0, ITEM_VECTOR_FACTOR)
|
||||
#define item_at(v, index) \
|
||||
element_at(v, index, item_t)
|
||||
#define item_delete(v, pos) \
|
||||
vector_delete(v, item_t, pos)
|
||||
|
||||
|
||||
/* memory allocation functions */
|
||||
|
||||
#define allocate_mem(type, count) \
|
||||
((type *) malloc((unsigned) sizeof (type) * (count)))
|
||||
|
||||
#define GET_UINT16(p) (uint16_t)(*((const uint8_t *)(p)+0) | \
|
||||
(*((const uint8_t *)(p)+1)<<8))
|
||||
|
||||
#define GET_UINT32(p) (uint32_t)(*((const uint8_t *)(p)+0) | \
|
||||
(*((const uint8_t *)(p)+1)<<8) | \
|
||||
(*((const uint8_t *)(p)+2)<<16) | \
|
||||
(*((const uint8_t *)(p)+3)<<24))
|
||||
|
||||
const uint32_t sum_fmtid[4] = {
|
||||
0xF29F85E0,
|
||||
0x10684FF9,
|
||||
0x000891AB,
|
||||
0xD9B3272B
|
||||
};
|
||||
|
||||
/*
|
||||
* Property Set IDs
|
||||
* The SummaryInformation stream contains the SummaryInformation property set.
|
||||
* The DocumentSummaryInformation stream contains both the
|
||||
* DocumentSummaryInformation and the UserDefined property sets as sections.
|
||||
*/
|
||||
typedef enum {
|
||||
OLE_PS_SUMMARY_INFO,
|
||||
OLE_PS_DOCUMENT_SUMMARY_INFO,
|
||||
OLE_PS_USER_DEFINED_SUMMARY_INFO
|
||||
} PropertySetID;
|
||||
|
||||
typedef enum {
|
||||
OLE_ERR_OK,
|
||||
OLE_ERR_EXIST,
|
||||
OLE_ERR_INVALID,
|
||||
OLE_ERR_FORMAT,
|
||||
OLE_ERR_PERM,
|
||||
OLE_ERR_MEM,
|
||||
OLE_ERR_SPACE,
|
||||
OLE_ERR_NOTEMPTY,
|
||||
OLE_ERR_BADARG
|
||||
}OleErr;
|
||||
|
||||
/* SummaryInformation Stream Properties */
|
||||
/* String properties */
|
||||
typedef enum {
|
||||
|
||||
OLE_SUMMARY_TITLE = 0x1002,
|
||||
OLE_SUMMARY_SUBJECT = 0x1003,
|
||||
OLE_SUMMARY_AUTHOR = 0x1004,
|
||||
OLE_SUMMARY_KEYWORDS = 0x1005,
|
||||
OLE_SUMMARY_COMMENTS = 0x1006
|
||||
|
||||
} OleSummaryPID;
|
||||
|
||||
struct _List
|
||||
{
|
||||
pointer data;
|
||||
List *next;
|
||||
List *prev;
|
||||
};
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint8_t class_id[16];
|
||||
ole_vector * sections;
|
||||
item_vector * items;
|
||||
List * write_items;
|
||||
gboolean read_mode;
|
||||
COLEFILE *s;
|
||||
PropertySetID ps_id;
|
||||
} OleSummary;
|
||||
|
||||
typedef struct {
|
||||
uint32_t offset;
|
||||
uint32_t props;
|
||||
uint32_t bytes;
|
||||
PropertySetID ps_id;
|
||||
} OleSummarySection;
|
||||
|
||||
typedef struct {
|
||||
uint32_t offset;
|
||||
uint32_t id;
|
||||
PropertySetID ps_id;
|
||||
} item_t;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef PPTHTML_H
|
||||
#define PPTHTML_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <vector.h>
|
||||
|
||||
#undef MAX
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#define TYPE_STRING 0x1e /* 30, VT_LPSTR */
|
||||
#define SUMMARY_ID(x) ((x) & 0xff)
|
||||
|
||||
typedef uint32_t OlePos;
|
||||
typedef int32_t OleSPos;
|
||||
typedef struct _List List;
|
||||
typedef void* pointer;
|
||||
typedef const void *gconstpointer;
|
||||
typedef int gboolean;
|
||||
|
||||
/* definitions for vector array */
|
||||
typedef vector ole_vector;
|
||||
/** The initial size of a ole_vector. */
|
||||
#define OLE_VECTOR_SIZE 10
|
||||
/** The growth factor of a ole_vector. */
|
||||
#define OLE_VECTOR_FACTOR 2
|
||||
#define resize_ole_vector(v, size) \
|
||||
vector_resize(v, size, sizeof(OleSummarySection))
|
||||
#define create_ole_vector(v) \
|
||||
vector_create(v, OLE_VECTOR_SIZE, sizeof(OleSummarySection))
|
||||
#define destroy_ole_vector(v) \
|
||||
vector_destroy(v)
|
||||
#define append_ole(v, token) \
|
||||
vector_append(v, token, 0, OLE_VECTOR_FACTOR)
|
||||
#define insert_ole(v, token, pos) \
|
||||
vector_insert(v, token, pos, 0, OLE_VECTOR_FACTOR)
|
||||
#define insert_ole_space(v, pos, n) \
|
||||
vector_insert_space(v, OleSummarySection, pos, n, 0, OLE_VECTOR_FACTOR)
|
||||
#define ole_at(v, index) \
|
||||
element_at(v, index, OleSummarySection)
|
||||
#define ole_delete(v, pos) \
|
||||
vector_delete(v, OleSummarySection, pos)
|
||||
|
||||
/* definitions for vector array */
|
||||
typedef vector item_vector;
|
||||
/** The initial size of a item_vector. */
|
||||
#define ITEM_VECTOR_SIZE 10
|
||||
/** The growth factor of a item_vector. */
|
||||
#define ITEM_VECTOR_FACTOR 2
|
||||
#define resize_item_vector(v, size) \
|
||||
vector_resize(v, size, sizeof(item_t))
|
||||
#define create_item_vector(v) \
|
||||
vector_create(v, ITEM_VECTOR_SIZE, sizeof(item_t))
|
||||
#define destroy_item_vector(v) \
|
||||
vector_destroy(v)
|
||||
#define append_item(v, token) \
|
||||
vector_append(v, token, 0, ITEM_VECTOR_FACTOR)
|
||||
#define insert_item(v, token, pos) \
|
||||
vector_insert(v, token, pos, 0, ITEM_VECTOR_FACTOR)
|
||||
#define insert_item_space(v, pos, n) \
|
||||
vector_insert_space(v, item_t, pos, n, 0, ITEM_VECTOR_FACTOR)
|
||||
#define item_at(v, index) \
|
||||
element_at(v, index, item_t)
|
||||
#define item_delete(v, pos) \
|
||||
vector_delete(v, item_t, pos)
|
||||
|
||||
|
||||
/* memory allocation functions */
|
||||
|
||||
#define allocate_mem(type, count) \
|
||||
((type *) malloc((unsigned) sizeof (type) * (count)))
|
||||
|
||||
#define GET_UINT16(p) (uint16_t)(*((const uint8_t *)(p)+0) | \
|
||||
(*((const uint8_t *)(p)+1)<<8))
|
||||
|
||||
#define GET_UINT32(p) (uint32_t)(*((const uint8_t *)(p)+0) | \
|
||||
(*((const uint8_t *)(p)+1)<<8) | \
|
||||
(*((const uint8_t *)(p)+2)<<16) | \
|
||||
(*((const uint8_t *)(p)+3)<<24))
|
||||
|
||||
const uint32_t sum_fmtid[4] = {
|
||||
0xF29F85E0,
|
||||
0x10684FF9,
|
||||
0x000891AB,
|
||||
0xD9B3272B
|
||||
};
|
||||
|
||||
/*
|
||||
* Property Set IDs
|
||||
* The SummaryInformation stream contains the SummaryInformation property set.
|
||||
* The DocumentSummaryInformation stream contains both the
|
||||
* DocumentSummaryInformation and the UserDefined property sets as sections.
|
||||
*/
|
||||
typedef enum {
|
||||
OLE_PS_SUMMARY_INFO,
|
||||
OLE_PS_DOCUMENT_SUMMARY_INFO,
|
||||
OLE_PS_USER_DEFINED_SUMMARY_INFO
|
||||
} PropertySetID;
|
||||
|
||||
typedef enum {
|
||||
OLE_ERR_OK,
|
||||
OLE_ERR_EXIST,
|
||||
OLE_ERR_INVALID,
|
||||
OLE_ERR_FORMAT,
|
||||
OLE_ERR_PERM,
|
||||
OLE_ERR_MEM,
|
||||
OLE_ERR_SPACE,
|
||||
OLE_ERR_NOTEMPTY,
|
||||
OLE_ERR_BADARG
|
||||
}OleErr;
|
||||
|
||||
/* SummaryInformation Stream Properties */
|
||||
/* String properties */
|
||||
typedef enum {
|
||||
|
||||
OLE_SUMMARY_TITLE = 0x1002,
|
||||
OLE_SUMMARY_SUBJECT = 0x1003,
|
||||
OLE_SUMMARY_AUTHOR = 0x1004,
|
||||
OLE_SUMMARY_KEYWORDS = 0x1005,
|
||||
OLE_SUMMARY_COMMENTS = 0x1006
|
||||
|
||||
} OleSummaryPID;
|
||||
|
||||
struct _List
|
||||
{
|
||||
pointer data;
|
||||
List *next;
|
||||
List *prev;
|
||||
};
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint8_t class_id[16];
|
||||
ole_vector * sections;
|
||||
item_vector * items;
|
||||
List * write_items;
|
||||
gboolean read_mode;
|
||||
COLEFILE *s;
|
||||
PropertySetID ps_id;
|
||||
} OleSummary;
|
||||
|
||||
typedef struct {
|
||||
uint32_t offset;
|
||||
uint32_t props;
|
||||
uint32_t bytes;
|
||||
PropertySetID ps_id;
|
||||
} OleSummarySection;
|
||||
|
||||
typedef struct {
|
||||
uint32_t offset;
|
||||
uint32_t id;
|
||||
PropertySetID ps_id;
|
||||
} item_t;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
140
ppthtml/vector.c
140
ppthtml/vector.c
@@ -1,70 +1,70 @@
|
||||
|
||||
/**
|
||||
* @file vector.c
|
||||
* @brief Functions for creating and manipulating vectors.
|
||||
*
|
||||
* @author Jon Schutz
|
||||
* @date 05-Feb-2001
|
||||
**/
|
||||
|
||||
#include "vector.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/** Resize a vector.
|
||||
@param v The vector to resize.
|
||||
@param size The new size of the vector. Must be >= 0.
|
||||
@param element_size The size of elements in the vector.
|
||||
@return 0 on success, -1 if a memory allocation error occurred.
|
||||
*/
|
||||
int
|
||||
vector_resize(vector *v, size_t size, size_t element_size)
|
||||
{
|
||||
void *b;
|
||||
|
||||
b = (v->array)?realloc(v->array, size * element_size)
|
||||
:malloc(size * element_size);
|
||||
|
||||
if ((0 < (size * element_size)) && (NULL == b))
|
||||
return -1;
|
||||
|
||||
if (size > v->array_size) {
|
||||
memset(b + v->array_size * element_size, 0,
|
||||
(size - v->array_size) * element_size);
|
||||
}
|
||||
v->array = b;
|
||||
v->array_size = size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Create a new vector.
|
||||
|
||||
@param v The vector to be initialised.
|
||||
@param size The size of the set.
|
||||
@param element_size The size of elements in the vector.
|
||||
@return 0 on success, -1 on error.
|
||||
*/
|
||||
int
|
||||
vector_create(vector *v, size_t size, size_t element_size)
|
||||
{
|
||||
v->array = NULL;
|
||||
v->array_size = 0;
|
||||
v->index = 0;
|
||||
|
||||
return vector_resize(v, size, element_size);
|
||||
}
|
||||
|
||||
/** Destroy a vector, freeing storage associated with it. */
|
||||
void
|
||||
vector_destroy(vector *v)
|
||||
{
|
||||
free(v->array);
|
||||
v->array = NULL;
|
||||
v->array_size = 0;
|
||||
}
|
||||
|
||||
int
|
||||
word_vector_strcmp(const char **a, const char **b)
|
||||
{
|
||||
return strcmp(*a, *b);
|
||||
}
|
||||
|
||||
/**
|
||||
* @file vector.c
|
||||
* @brief Functions for creating and manipulating vectors.
|
||||
*
|
||||
* @author Jon Schutz
|
||||
* @date 05-Feb-2001
|
||||
**/
|
||||
|
||||
#include "vector.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/** Resize a vector.
|
||||
@param v The vector to resize.
|
||||
@param size The new size of the vector. Must be >= 0.
|
||||
@param element_size The size of elements in the vector.
|
||||
@return 0 on success, -1 if a memory allocation error occurred.
|
||||
*/
|
||||
int
|
||||
vector_resize(vector *v, size_t size, size_t element_size)
|
||||
{
|
||||
void *b;
|
||||
|
||||
b = (v->array)?realloc(v->array, size * element_size)
|
||||
:malloc(size * element_size);
|
||||
|
||||
if ((0 < (size * element_size)) && (NULL == b))
|
||||
return -1;
|
||||
|
||||
if (size > v->array_size) {
|
||||
memset(b + v->array_size * element_size, 0,
|
||||
(size - v->array_size) * element_size);
|
||||
}
|
||||
v->array = b;
|
||||
v->array_size = size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Create a new vector.
|
||||
|
||||
@param v The vector to be initialised.
|
||||
@param size The size of the set.
|
||||
@param element_size The size of elements in the vector.
|
||||
@return 0 on success, -1 on error.
|
||||
*/
|
||||
int
|
||||
vector_create(vector *v, size_t size, size_t element_size)
|
||||
{
|
||||
v->array = NULL;
|
||||
v->array_size = 0;
|
||||
v->index = 0;
|
||||
|
||||
return vector_resize(v, size, element_size);
|
||||
}
|
||||
|
||||
/** Destroy a vector, freeing storage associated with it. */
|
||||
void
|
||||
vector_destroy(vector *v)
|
||||
{
|
||||
free(v->array);
|
||||
v->array = NULL;
|
||||
v->array_size = 0;
|
||||
}
|
||||
|
||||
int
|
||||
word_vector_strcmp(const char **a, const char **b)
|
||||
{
|
||||
return strcmp(*a, *b);
|
||||
}
|
||||
|
504
ppthtml/vector.h
504
ppthtml/vector.h
@@ -1,252 +1,252 @@
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @file vector.h
|
||||
* @brief Functions for creating and manipulating vectors.
|
||||
*
|
||||
* A vector is an array that can be resized to meet changing storage
|
||||
* requirements. Usage is typically as follows:
|
||||
|
||||
\include vector_test.c
|
||||
|
||||
|
||||
*
|
||||
* @author Jon Schutz
|
||||
* @date 05-Feb-2001
|
||||
**/
|
||||
|
||||
#ifndef __VECTOR_H
|
||||
#define __VECTOR_H /* To stop multiple inclusions. */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/** Vector */
|
||||
typedef struct _vector {
|
||||
/** The array to hold the data. */
|
||||
void *array;
|
||||
/** The size of the array. */
|
||||
size_t array_size;
|
||||
/** The used size, assuming vector_append is the only operation
|
||||
which adds elements to the vector. */
|
||||
size_t index;
|
||||
} vector;
|
||||
|
||||
|
||||
/** Add a new item to the end of a vector.
|
||||
|
||||
@param v The vector to which to add an item.
|
||||
@param item The item to add.
|
||||
@param increment The capacity to add when the array is resized.
|
||||
Should be >0, or at least =0 if factor>1.
|
||||
@param factor The factor by which to increase storage when the array is
|
||||
resized. Should be >1, or at least =1 if increment>0.
|
||||
@return 0 on success, -1 if vector_resize() fails.
|
||||
*/
|
||||
#define vector_append(v, item, increment, factor) \
|
||||
({ \
|
||||
int rv=0; \
|
||||
\
|
||||
if ((v)->index >= (v)->array_size) \
|
||||
rv = vector_resize((v), \
|
||||
(v)->array_size * factor + increment, sizeof(item)); \
|
||||
if (0 == rv) \
|
||||
((typeof(item) *)(v)->array)[(v)->index++] = item; \
|
||||
rv; \
|
||||
})
|
||||
|
||||
/** Insert space for several items into a vector at the given
|
||||
position. No items are actually inserted.
|
||||
|
||||
If the given position exceeds the current end index of the array,
|
||||
the new end index, then item is inserted before the specified
|
||||
position and the end index points to the next position after the
|
||||
inserted item.
|
||||
|
||||
If necessary, the vector is resized to accommodate the request.
|
||||
|
||||
@param v The vector to which to insert space.
|
||||
@param item An instance or type of the items in the vector.
|
||||
@param pos The position at which to insert space.
|
||||
@param n The number of items for which to insert space.
|
||||
@param increment The capacity to add when the array is resized.
|
||||
Should be >0, or at least =0 if factor>1.
|
||||
@param factor The factor by which to increase storage when the array is
|
||||
resized. Should be >1, or at least =1 if increment>0.
|
||||
@return 0 on success, -1 if vector_resize() fails.
|
||||
*/
|
||||
#define vector_insert_space(v, item, pos, n, increment, factor) \
|
||||
({ \
|
||||
int _rv=0; \
|
||||
int new_end = ((pos)>(v)->index)?((pos)+(n)):((v)->index+(n)); \
|
||||
if (new_end > (v)->array_size) { \
|
||||
size_t new_size = (v)->array_size * factor + increment; \
|
||||
if (new_end > new_size) \
|
||||
new_size = new_end; \
|
||||
_rv = vector_resize((v), new_size, sizeof(item)); \
|
||||
} \
|
||||
if (0 == _rv) { \
|
||||
if ((v)->index > pos) { \
|
||||
memmove(((char *)(v)->array) + sizeof(item)*((pos)+(n)), \
|
||||
((char *)(v)->array) + sizeof(item)*(pos), \
|
||||
sizeof(item)*((v)->index - pos)); \
|
||||
(v)->index += (n); \
|
||||
} \
|
||||
else \
|
||||
(v)->index = new_end; \
|
||||
} \
|
||||
_rv; \
|
||||
})
|
||||
|
||||
|
||||
/** Add a new item to the vector at a given position. The item is
|
||||
inserted before the specified position.
|
||||
|
||||
If the given position exceeds the current end index of the array,
|
||||
the new end index, the item is inserted before the specified
|
||||
position and the end index points to the next position after the
|
||||
inserted item.
|
||||
|
||||
If necessary, the vector is resized to accommodate the request.
|
||||
|
||||
@param v The vector to which to insert an item.
|
||||
@param item The item to insert.
|
||||
@param pos The position at which to insert the item.
|
||||
@param increment The capacity to add when the array is resized.
|
||||
Should be >0, or at least =0 if factor>1.
|
||||
@param factor The factor by which to increase storage when the array is
|
||||
resized. Should be >1, or at least =1 if increment>0.
|
||||
@return 0 on success, -1 if vector_resize() fails.
|
||||
*/
|
||||
#define vector_insert(v, item, pos, increment, factor) \
|
||||
({ \
|
||||
const int c_pos = pos; \
|
||||
int rv = vector_insert_space(v, item, pos, 1, increment, factor); \
|
||||
if (0 == rv) { \
|
||||
((typeof(item) *)(v)->array)[c_pos] = item; \
|
||||
} \
|
||||
rv; \
|
||||
}) \
|
||||
|
||||
/** Delete several item from a vector.
|
||||
|
||||
@param v The vector in which to delete the item.
|
||||
@param item An instance or type of the item to delete.
|
||||
@param pos The first position at which to delete.
|
||||
@param n The number of items to delete.
|
||||
*/
|
||||
#define vector_delete_n(v, item, pos, n) \
|
||||
if ((v)->index > ((pos) + (n))) { \
|
||||
memmove((v)->array + sizeof(item)*(pos), \
|
||||
(v)->array + sizeof(item)*((pos)+(n)), \
|
||||
sizeof(item)*((v)->index - (pos) - (n))); \
|
||||
(v)->index -= (n); \
|
||||
} \
|
||||
else \
|
||||
(v)->index = pos;
|
||||
|
||||
/** Delete an item from a vector.
|
||||
|
||||
@param v The vector in which to delete the item.
|
||||
@param item An instance or type of the item to delete.
|
||||
@param pos The position at which to delete.
|
||||
*/
|
||||
#define vector_delete(v, item, pos) \
|
||||
vector_delete_n(v, item, pos, 1)
|
||||
|
||||
|
||||
/** Access a member of a vector.
|
||||
@param v The vector to access
|
||||
@param index The index to read.
|
||||
@param element_type The type name or an instance of the
|
||||
type of which the vector is comprised.
|
||||
|
||||
@return v[index]
|
||||
*/
|
||||
#define element_at(v, index, element_type) \
|
||||
(((typeof(element_type) *)(v)->array)[index])
|
||||
|
||||
/** Reverse items in a vector.
|
||||
@param v The vector in which to reverse items.
|
||||
@param item The type name or an instance of the
|
||||
type of which the vector is comprised.
|
||||
@param start The starting index of the sequence to be reversed.
|
||||
@param end The index following the end of the sequence to be
|
||||
reversed.
|
||||
*/
|
||||
#define vector_reverse(v, item, start, end) { \
|
||||
int _i; \
|
||||
int _half = (end-start)/2; \
|
||||
typeof(item) _temp; \
|
||||
for (_i=0; _i<_half; _i++) { \
|
||||
_temp = element_at(v, (start)+_i, item); \
|
||||
element_at(v, (start)+_i, item) = element_at(v, (end)-_i-1, item); \
|
||||
element_at(v, (end)-_i-1, item) = _temp; \
|
||||
} \
|
||||
}
|
||||
|
||||
int vector_resize(vector *v, size_t size, size_t element_size);
|
||||
int vector_create(vector *v, size_t size, size_t element_size);
|
||||
void vector_destroy(vector *v);
|
||||
|
||||
|
||||
/** Finds the next unused slot in a vector, by comparing the contents
|
||||
* of a given \a field with \a thing that indicates a free slot.
|
||||
*
|
||||
* @param v The vector to search through.
|
||||
* @param item The type of data held by the vector.
|
||||
* @param field A field of a struct which is held in the vector's array.
|
||||
* @param thing If the contents of the above field match this thing, we
|
||||
* have found an unused slot.
|
||||
*
|
||||
* @return the index of the first unused slot.
|
||||
**/
|
||||
#define vector_find_next_free_slot(v, item, field, thing) \
|
||||
({ \
|
||||
int i = 0; \
|
||||
if ((NULL != (v)->array) && (0 < (v)->index)) \
|
||||
for (i = 0; i < (v)->index; i++) \
|
||||
if (thing == ((typeof(item) *)(v)->array)[i]field) \
|
||||
break; \
|
||||
i; \
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* Stores a \a token of type \a item into \a v, in the first location in
|
||||
* \a v whose \a field matches \a thing. If all \a v->index slots in \a
|
||||
* v are in use, a new element is inserted at the end of the vector and
|
||||
* \a v->index is incremented, otherwise, \a token is inserted at the
|
||||
* first available slot, and \a v->index is left unchanged. An
|
||||
* extension of the "vector" class, which can be used when
|
||||
* "vector_delete" is not suitable (e.g. if the index into the vector
|
||||
* is being remembered by external software, then vector_delete will not
|
||||
* work, because it deletes from the middle of a vector and moves all
|
||||
* the top entries down to fill the vacated slot(s)).
|
||||
*
|
||||
* @param v Vector into which we will insert the token.
|
||||
* @param token The object to store in the vector.
|
||||
* @param item The data-type of the token that we're inserting.
|
||||
* @param size The size of the token that we're inserting.
|
||||
* @param field A field of a struct which is held in the vector's array.
|
||||
* (May be empty if not using a struct).
|
||||
* @param thing If the contents of the above field match this thing, we
|
||||
* have found an unused slot.
|
||||
*
|
||||
* @return The location of the slot in the vector where the data was
|
||||
* stored.
|
||||
**/
|
||||
#define vector_store(v, token, item, size,field, thing) \
|
||||
({ \
|
||||
int pos = vector_find_next_free_slot(v, item,field, thing); \
|
||||
if (pos == (v)->index) \
|
||||
/* Increment (v)->index */ \
|
||||
vector_append((v), token, size, 1); \
|
||||
else \
|
||||
/* Ignore (v)->index */ \
|
||||
element_at((v), pos, item) = token; \
|
||||
pos; \
|
||||
})
|
||||
|
||||
#endif /* __VECTOR_H */
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @file vector.h
|
||||
* @brief Functions for creating and manipulating vectors.
|
||||
*
|
||||
* A vector is an array that can be resized to meet changing storage
|
||||
* requirements. Usage is typically as follows:
|
||||
|
||||
\include vector_test.c
|
||||
|
||||
|
||||
*
|
||||
* @author Jon Schutz
|
||||
* @date 05-Feb-2001
|
||||
**/
|
||||
|
||||
#ifndef __VECTOR_H
|
||||
#define __VECTOR_H /* To stop multiple inclusions. */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/** Vector */
|
||||
typedef struct _vector {
|
||||
/** The array to hold the data. */
|
||||
void *array;
|
||||
/** The size of the array. */
|
||||
size_t array_size;
|
||||
/** The used size, assuming vector_append is the only operation
|
||||
which adds elements to the vector. */
|
||||
size_t index;
|
||||
} vector;
|
||||
|
||||
|
||||
/** Add a new item to the end of a vector.
|
||||
|
||||
@param v The vector to which to add an item.
|
||||
@param item The item to add.
|
||||
@param increment The capacity to add when the array is resized.
|
||||
Should be >0, or at least =0 if factor>1.
|
||||
@param factor The factor by which to increase storage when the array is
|
||||
resized. Should be >1, or at least =1 if increment>0.
|
||||
@return 0 on success, -1 if vector_resize() fails.
|
||||
*/
|
||||
#define vector_append(v, item, increment, factor) \
|
||||
({ \
|
||||
int rv=0; \
|
||||
\
|
||||
if ((v)->index >= (v)->array_size) \
|
||||
rv = vector_resize((v), \
|
||||
(v)->array_size * factor + increment, sizeof(item)); \
|
||||
if (0 == rv) \
|
||||
((typeof(item) *)(v)->array)[(v)->index++] = item; \
|
||||
rv; \
|
||||
})
|
||||
|
||||
/** Insert space for several items into a vector at the given
|
||||
position. No items are actually inserted.
|
||||
|
||||
If the given position exceeds the current end index of the array,
|
||||
the new end index, then item is inserted before the specified
|
||||
position and the end index points to the next position after the
|
||||
inserted item.
|
||||
|
||||
If necessary, the vector is resized to accommodate the request.
|
||||
|
||||
@param v The vector to which to insert space.
|
||||
@param item An instance or type of the items in the vector.
|
||||
@param pos The position at which to insert space.
|
||||
@param n The number of items for which to insert space.
|
||||
@param increment The capacity to add when the array is resized.
|
||||
Should be >0, or at least =0 if factor>1.
|
||||
@param factor The factor by which to increase storage when the array is
|
||||
resized. Should be >1, or at least =1 if increment>0.
|
||||
@return 0 on success, -1 if vector_resize() fails.
|
||||
*/
|
||||
#define vector_insert_space(v, item, pos, n, increment, factor) \
|
||||
({ \
|
||||
int _rv=0; \
|
||||
int new_end = ((pos)>(v)->index)?((pos)+(n)):((v)->index+(n)); \
|
||||
if (new_end > (v)->array_size) { \
|
||||
size_t new_size = (v)->array_size * factor + increment; \
|
||||
if (new_end > new_size) \
|
||||
new_size = new_end; \
|
||||
_rv = vector_resize((v), new_size, sizeof(item)); \
|
||||
} \
|
||||
if (0 == _rv) { \
|
||||
if ((v)->index > pos) { \
|
||||
memmove(((char *)(v)->array) + sizeof(item)*((pos)+(n)), \
|
||||
((char *)(v)->array) + sizeof(item)*(pos), \
|
||||
sizeof(item)*((v)->index - pos)); \
|
||||
(v)->index += (n); \
|
||||
} \
|
||||
else \
|
||||
(v)->index = new_end; \
|
||||
} \
|
||||
_rv; \
|
||||
})
|
||||
|
||||
|
||||
/** Add a new item to the vector at a given position. The item is
|
||||
inserted before the specified position.
|
||||
|
||||
If the given position exceeds the current end index of the array,
|
||||
the new end index, the item is inserted before the specified
|
||||
position and the end index points to the next position after the
|
||||
inserted item.
|
||||
|
||||
If necessary, the vector is resized to accommodate the request.
|
||||
|
||||
@param v The vector to which to insert an item.
|
||||
@param item The item to insert.
|
||||
@param pos The position at which to insert the item.
|
||||
@param increment The capacity to add when the array is resized.
|
||||
Should be >0, or at least =0 if factor>1.
|
||||
@param factor The factor by which to increase storage when the array is
|
||||
resized. Should be >1, or at least =1 if increment>0.
|
||||
@return 0 on success, -1 if vector_resize() fails.
|
||||
*/
|
||||
#define vector_insert(v, item, pos, increment, factor) \
|
||||
({ \
|
||||
const int c_pos = pos; \
|
||||
int rv = vector_insert_space(v, item, pos, 1, increment, factor); \
|
||||
if (0 == rv) { \
|
||||
((typeof(item) *)(v)->array)[c_pos] = item; \
|
||||
} \
|
||||
rv; \
|
||||
}) \
|
||||
|
||||
/** Delete several item from a vector.
|
||||
|
||||
@param v The vector in which to delete the item.
|
||||
@param item An instance or type of the item to delete.
|
||||
@param pos The first position at which to delete.
|
||||
@param n The number of items to delete.
|
||||
*/
|
||||
#define vector_delete_n(v, item, pos, n) \
|
||||
if ((v)->index > ((pos) + (n))) { \
|
||||
memmove((v)->array + sizeof(item)*(pos), \
|
||||
(v)->array + sizeof(item)*((pos)+(n)), \
|
||||
sizeof(item)*((v)->index - (pos) - (n))); \
|
||||
(v)->index -= (n); \
|
||||
} \
|
||||
else \
|
||||
(v)->index = pos;
|
||||
|
||||
/** Delete an item from a vector.
|
||||
|
||||
@param v The vector in which to delete the item.
|
||||
@param item An instance or type of the item to delete.
|
||||
@param pos The position at which to delete.
|
||||
*/
|
||||
#define vector_delete(v, item, pos) \
|
||||
vector_delete_n(v, item, pos, 1)
|
||||
|
||||
|
||||
/** Access a member of a vector.
|
||||
@param v The vector to access
|
||||
@param index The index to read.
|
||||
@param element_type The type name or an instance of the
|
||||
type of which the vector is comprised.
|
||||
|
||||
@return v[index]
|
||||
*/
|
||||
#define element_at(v, index, element_type) \
|
||||
(((typeof(element_type) *)(v)->array)[index])
|
||||
|
||||
/** Reverse items in a vector.
|
||||
@param v The vector in which to reverse items.
|
||||
@param item The type name or an instance of the
|
||||
type of which the vector is comprised.
|
||||
@param start The starting index of the sequence to be reversed.
|
||||
@param end The index following the end of the sequence to be
|
||||
reversed.
|
||||
*/
|
||||
#define vector_reverse(v, item, start, end) { \
|
||||
int _i; \
|
||||
int _half = (end-start)/2; \
|
||||
typeof(item) _temp; \
|
||||
for (_i=0; _i<_half; _i++) { \
|
||||
_temp = element_at(v, (start)+_i, item); \
|
||||
element_at(v, (start)+_i, item) = element_at(v, (end)-_i-1, item); \
|
||||
element_at(v, (end)-_i-1, item) = _temp; \
|
||||
} \
|
||||
}
|
||||
|
||||
int vector_resize(vector *v, size_t size, size_t element_size);
|
||||
int vector_create(vector *v, size_t size, size_t element_size);
|
||||
void vector_destroy(vector *v);
|
||||
|
||||
|
||||
/** Finds the next unused slot in a vector, by comparing the contents
|
||||
* of a given \a field with \a thing that indicates a free slot.
|
||||
*
|
||||
* @param v The vector to search through.
|
||||
* @param item The type of data held by the vector.
|
||||
* @param field A field of a struct which is held in the vector's array.
|
||||
* @param thing If the contents of the above field match this thing, we
|
||||
* have found an unused slot.
|
||||
*
|
||||
* @return the index of the first unused slot.
|
||||
**/
|
||||
#define vector_find_next_free_slot(v, item, field, thing) \
|
||||
({ \
|
||||
int i = 0; \
|
||||
if ((NULL != (v)->array) && (0 < (v)->index)) \
|
||||
for (i = 0; i < (v)->index; i++) \
|
||||
if (thing == ((typeof(item) *)(v)->array)[i]field) \
|
||||
break; \
|
||||
i; \
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* Stores a \a token of type \a item into \a v, in the first location in
|
||||
* \a v whose \a field matches \a thing. If all \a v->index slots in \a
|
||||
* v are in use, a new element is inserted at the end of the vector and
|
||||
* \a v->index is incremented, otherwise, \a token is inserted at the
|
||||
* first available slot, and \a v->index is left unchanged. An
|
||||
* extension of the "vector" class, which can be used when
|
||||
* "vector_delete" is not suitable (e.g. if the index into the vector
|
||||
* is being remembered by external software, then vector_delete will not
|
||||
* work, because it deletes from the middle of a vector and moves all
|
||||
* the top entries down to fill the vacated slot(s)).
|
||||
*
|
||||
* @param v Vector into which we will insert the token.
|
||||
* @param token The object to store in the vector.
|
||||
* @param item The data-type of the token that we're inserting.
|
||||
* @param size The size of the token that we're inserting.
|
||||
* @param field A field of a struct which is held in the vector's array.
|
||||
* (May be empty if not using a struct).
|
||||
* @param thing If the contents of the above field match this thing, we
|
||||
* have found an unused slot.
|
||||
*
|
||||
* @return The location of the slot in the vector where the data was
|
||||
* stored.
|
||||
**/
|
||||
#define vector_store(v, token, item, size,field, thing) \
|
||||
({ \
|
||||
int pos = vector_find_next_free_slot(v, item,field, thing); \
|
||||
if (pos == (v)->index) \
|
||||
/* Increment (v)->index */ \
|
||||
vector_append((v), token, size, 1); \
|
||||
else \
|
||||
/* Ignore (v)->index */ \
|
||||
element_at((v), pos, item) = token; \
|
||||
pos; \
|
||||
})
|
||||
|
||||
#endif /* __VECTOR_H */
|
||||
|
Reference in New Issue
Block a user