aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-03-07 15:19:01 +0000
committerdos-reis <gdr@axiomatics.org>2008-03-07 15:19:01 +0000
commit8531f4c74274b8aa99168d220738227557a9c418 (patch)
treec50b77870e432317be8f99c248e1339f74b51661
parent33949ff2e6e5b5abe8d22c5604f42a6c9371079a (diff)
downloadopen-axiom-8531f4c74274b8aa99168d220738227557a9c418.tar.gz
* hyper/: De-pamphletize.
-rwxr-xr-xconfigure18
-rw-r--r--configure.ac2
-rw-r--r--configure.ac.pamphlet2
-rw-r--r--src/ChangeLog4
-rw-r--r--src/hyper/Makefile.in94
-rw-r--r--src/hyper/ReadBitmap.c (renamed from src/hyper/ReadBitmap.pamphlet)111
-rw-r--r--src/hyper/addfile.c (renamed from src/hyper/addfile.pamphlet)108
-rw-r--r--src/hyper/addfile.h41
-rw-r--r--src/hyper/bitmaps.pamphlet143
-rw-r--r--src/hyper/cond.c (renamed from src/hyper/cond.pamphlet)108
-rw-r--r--src/hyper/debug.c48
-rw-r--r--src/hyper/debug.pamphlet77
-rw-r--r--src/hyper/dialog.c (renamed from src/hyper/dialog.pamphlet)109
-rw-r--r--src/hyper/display.c (renamed from src/hyper/display.pamphlet)108
-rw-r--r--src/hyper/display.h44
-rw-r--r--src/hyper/event.c (renamed from src/hyper/event.pamphlet)119
-rw-r--r--src/hyper/event.h44
-rw-r--r--src/hyper/ex2ht.c (renamed from src/hyper/ex2ht.pamphlet)98
-rw-r--r--src/hyper/extent.h129
-rw-r--r--src/hyper/extent.pamphlet157
-rw-r--r--src/hyper/extent1.c (renamed from src/hyper/extent1.pamphlet)96
-rw-r--r--src/hyper/extent2.c (renamed from src/hyper/extent2.pamphlet)98
-rw-r--r--src/hyper/form-ext.c (renamed from src/hyper/form-ext.pamphlet)98
-rw-r--r--src/hyper/group.c (renamed from src/hyper/group.pamphlet)111
-rw-r--r--src/hyper/group.h44
-rw-r--r--src/hyper/halloc.c76
-rw-r--r--src/hyper/halloc.pamphlet104
-rw-r--r--src/hyper/hash.c (renamed from src/hyper/hash.pamphlet)100
-rw-r--r--src/hyper/ht_icon22
-rw-r--r--src/hyper/htadd.c (renamed from src/hyper/htadd.pamphlet)119
-rw-r--r--src/hyper/hterror.c (renamed from src/hyper/hterror.pamphlet)110
-rw-r--r--src/hyper/hterror.h45
-rw-r--r--src/hyper/hthits.c (renamed from src/hyper/hthits.pamphlet)114
-rw-r--r--src/hyper/htinp.c (renamed from src/hyper/htinp.pamphlet)177
-rwxr-xr-xsrc/hyper/htsearch12
-rw-r--r--src/hyper/hyper.c487
-rw-r--r--src/hyper/hyper.h575
-rw-r--r--src/hyper/hyper.pamphlet1079
-rw-r--r--src/hyper/initx.c (renamed from src/hyper/initx.pamphlet)110
-rw-r--r--src/hyper/initx.h43
-rw-r--r--src/hyper/input.c (renamed from src/hyper/input.pamphlet)100
-rw-r--r--src/hyper/item.c127
-rw-r--r--src/hyper/item.pamphlet155
-rw-r--r--src/hyper/keyin.c (renamed from src/hyper/keyin.pamphlet)168
-rw-r--r--src/hyper/keyin.h55
-rw-r--r--src/hyper/lex.c (renamed from src/hyper/lex.pamphlet)148
-rw-r--r--src/hyper/lex.h46
-rw-r--r--src/hyper/macro.c (renamed from src/hyper/macro.pamphlet)109
-rw-r--r--src/hyper/mem.c (renamed from src/hyper/mem.pamphlet)137
-rw-r--r--src/hyper/mouse11.bitmap8
-rw-r--r--src/hyper/mouse11.mask6
-rw-r--r--src/hyper/parse-aux.c (renamed from src/hyper/parse-aux.pamphlet)148
-rw-r--r--src/hyper/parse-input.c (renamed from src/hyper/parse-input.pamphlet)139
-rw-r--r--src/hyper/parse-paste.c (renamed from src/hyper/parse-paste.pamphlet)112
-rw-r--r--src/hyper/parse-paste.h44
-rw-r--r--src/hyper/parse-types.c (renamed from src/hyper/parse-types.pamphlet)120
-rw-r--r--src/hyper/parse-types.h47
-rw-r--r--src/hyper/parse.c (renamed from src/hyper/parse.pamphlet)197
-rw-r--r--src/hyper/parse.h107
-rwxr-xr-xsrc/hyper/presea27
-rw-r--r--src/hyper/scrollbar.c (renamed from src/hyper/scrollbar.pamphlet)108
-rw-r--r--src/hyper/scrollbar.h43
-rw-r--r--src/hyper/sdown.bitmap9
-rw-r--r--src/hyper/sdown3d.bitmap9
-rw-r--r--src/hyper/sdown3dpr.bitmap9
-rw-r--r--src/hyper/search.pamphlet67
-rw-r--r--src/hyper/show-types.c (renamed from src/hyper/show-types.pamphlet)110
-rw-r--r--src/hyper/spadbuf.c (renamed from src/hyper/spadbuf.pamphlet)104
-rw-r--r--src/hyper/spadint.c (renamed from src/hyper/spadint.pamphlet)132
-rw-r--r--src/hyper/sup.bitmap9
-rw-r--r--src/hyper/sup3d.bitmap9
-rw-r--r--src/hyper/sup3dpr.bitmap9
-rw-r--r--src/hyper/titlebar.c (renamed from src/hyper/titlebar.pamphlet)110
-rw-r--r--src/hyper/titlebar.h44
-rw-r--r--src/hyper/token.h360
-rw-r--r--src/hyper/token.pamphlet389
76 files changed, 3901 insertions, 4804 deletions
diff --git a/configure b/configure
index 201412d4..547c9326 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for OpenAxiom 1.2.0-2008-03-05.
+# Generated by GNU Autoconf 2.60 for OpenAxiom 1.2.0-2008-03-07.
#
# Report bugs to <open-axiom-bugs@lists.sf.net>.
#
@@ -713,8 +713,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='OpenAxiom'
PACKAGE_TARNAME='openaxiom'
-PACKAGE_VERSION='1.2.0-2008-03-05'
-PACKAGE_STRING='OpenAxiom 1.2.0-2008-03-05'
+PACKAGE_VERSION='1.2.0-2008-03-07'
+PACKAGE_STRING='OpenAxiom 1.2.0-2008-03-07'
PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net'
ac_unique_file="src/Makefile.pamphlet"
@@ -1387,7 +1387,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenAxiom 1.2.0-2008-03-05 to adapt to many kinds of systems.
+\`configure' configures OpenAxiom 1.2.0-2008-03-07 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1457,7 +1457,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenAxiom 1.2.0-2008-03-05:";;
+ short | recursive ) echo "Configuration of OpenAxiom 1.2.0-2008-03-07:";;
esac
cat <<\_ACEOF
@@ -1561,7 +1561,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenAxiom configure 1.2.0-2008-03-05
+OpenAxiom configure 1.2.0-2008-03-07
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1575,7 +1575,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenAxiom $as_me 1.2.0-2008-03-05, which was
+It was created by OpenAxiom $as_me 1.2.0-2008-03-07, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -25230,7 +25230,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenAxiom $as_me 1.2.0-2008-03-05, which was
+This file was extended by OpenAxiom $as_me 1.2.0-2008-03-07, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -25279,7 +25279,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-OpenAxiom config.status 1.2.0-2008-03-05
+OpenAxiom config.status 1.2.0-2008-03-07
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index c8e9c466..93d6b310 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
sinclude(config/open-axiom.m4)
sinclude(config/aclocal.m4)
-AC_INIT([OpenAxiom], [1.2.0-2008-03-05],
+AC_INIT([OpenAxiom], [1.2.0-2008-03-07],
[open-axiom-bugs@lists.sf.net])
AC_CONFIG_AUX_DIR(config)
diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet
index f89a52ff..e85bfff8 100644
--- a/configure.ac.pamphlet
+++ b/configure.ac.pamphlet
@@ -1022,7 +1022,7 @@ information:
<<Autoconf init>>=
sinclude(config/open-axiom.m4)
sinclude(config/aclocal.m4)
-AC_INIT([OpenAxiom], [1.2.0-2008-03-05],
+AC_INIT([OpenAxiom], [1.2.0-2008-03-07],
[open-axiom-bugs@lists.sf.net])
@
diff --git a/src/ChangeLog b/src/ChangeLog
index 6daa63eb..901055a9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2008-03-07 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * hyper/: De-pamphletize.
+
2008-03-05 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/compiler.boot (compColon): Literal flag types are valid
diff --git a/src/hyper/Makefile.in b/src/hyper/Makefile.in
index 02cef2e8..f3896a99 100644
--- a/src/hyper/Makefile.in
+++ b/src/hyper/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, Gabriel Dos Reis.
+# Copyright (C) 2007-2008, Gabriel Dos Reis.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -53,15 +53,15 @@ SCRIPTS=${OUTLIB}/htsearch ${OUTLIB}/presea
BINFILES= $(addprefix $(OUTLIB)/,$(bin_PROGRAMS))
-HEADERS = addfile.h cond.h dialog.h display.h event.h extent.h \
- group.h hterror.h hyper.h initx.h keyin.h lex.h mem.h \
- parse.h parse-aux.h parse-paste.h parse-types.h scrollbar.h \
- show-types.h titlebar.h token.h $(axiom_c_macros_h)
+HEADERS = addfile.h display.h event.h extent.h \
+ group.h hterror.h hyper.h initx.h keyin.h lex.h \
+ parse.h parse-paste.h parse-types.h scrollbar.h \
+ titlebar.h token.h $(axiom_c_macros_h)
build_libdir = $(abs_top_builddir)/src/lib
-hypertex_sources = addfile.c cond.c dialog.c display.c event.c extent1.c \
+hypertex_SOURCES = addfile.c cond.c dialog.c display.c event.c extent1.c \
extent2.c form-ext.c group.c halloc.c hash.c hterror.c \
htinp.c hyper.c initx.c input.c item.c keyin.c lex.c \
macro.c mem.c parse.c parse-aux.c parse-input.c \
@@ -70,41 +70,30 @@ hypertex_sources = addfile.c cond.c dialog.c display.c event.c extent1.c \
libspad_la = $(axiom_target_libdir)/libspad.la
-hypertex_SOURCES = $(hypertex_sources:.c=.pamphlet)
-hypertex_objects = $(hypertex_sources:.c=.lo)
+hypertex_objects = $(hypertex_SOURCES:.c=.lo)
hypertex_LDADD = $(libspad_la)
hypertex_DEPENDENCIES =
-htadd_sources = addfile.c halloc.c hash.c htadd.c hterror.c lex.c
-htadd_SOURCES = $(htadd_sources:.c=.pamphlet)
-htadd_objects = $(htadd_sources:.c=.lo)
+htadd_SOURCES = addfile.c halloc.c hash.c htadd.c hterror.c lex.c
+htadd_objects = $(htadd_SOURCES:.c=.lo)
htadd_LDADD = $(libspad_la)
htadd_DEPENDENCIES =
-htsearch_SOURCES = search.pamphlet
-
-spadbuf_sources = spadbuf.c
-spadbuf_SOURCES = $(spadbuf_sources:.c=.pamphlet)
-spadbuf_objects = $(spadbuf_sources:.c=.lo)
+spadbuf_SOURCES = spadbuf.c
+spadbuf_objects = $(spadbuf_SOURCES:.c=.lo)
spadbuf_LDADD = $(libspad_la)
spadbuf_DEPENDENCIES =
-hthits_sources = hthits.c
-hthits_SOURCES = $(hthits_sources:.c=.pamphlet)
-hthits_objects = $(hthits_sources:.c=.lo)
+hthits_SOURCES = hthits.c
+hthits_objects = $(hthits_SOURCES:.c=.lo)
hthits_LDADD = $(libspad_la)
hthits_DEPENDENCIES =
-ex2ht_sources = ex2ht.c
-ex2ht_SOURCES = $(ex2ht_sources:.c=.pamphlet)
-ex2ht_objects = $(ex2ht_sources:.c=.lo)
+ex2ht_SOURCES = ex2ht.c
+ex2ht_objects = $(ex2ht_SOURCES:.c=.lo)
ex2ht_LDADD = $(libspad_la)
ex2ht_DEPENDENCIES =
-pamphlets = Makefile.pamphlet $(hypertex_SOURCES) $(htadd_SOURCES) \
- $(htsearch_SOURCES) $(spadbuf_SOURCES) $(hthits_SOURCES) \
- $(ex2ht_SOURCES)
-
subdir = src/hyper/
.PHONY: all all-hyper
@@ -124,58 +113,15 @@ mostclean-local:
clean-local: mostclean-local
-rm -f $(objects)
- -rm -f $(hypertex_sources)
- -rm -f $(htadd_sources)
- -rm -f $(htsearch_sources)
- -rm -f $(spadbuf_sources)
- -rm -f $(hthits_sources)
- -rm -f $(ex2ht_sources)
-rm -f $(BINFILES)
distclean-local: clean-local
-.PRECIOUS: %.h
-
-$(HEADERS): %.h: $(srcdir)/%.pamphlet
- $(axiom_build_document) --tangle=$*.h --output=$@ $<
-
.PRECIOUS: %.lo %.$(OBJEXT)
-.PRECIOUS: %.c
%.lo: %.c $(HEADERS)
$(COMPILE) -o $@ $(CFLAGS) ${CCF} $(axiom_includes) $(AXIOM_X11_CFLAGS) -I. $<
-%.c: $(srcdir)/%.pamphlet
- $(axiom_build_document) --tangle --output=$@ $<
-
-
-mouse11.bitmap: $(srcdir)/bitmaps.pamphlet
- $(axiom_build_document) --tangle=mouse11.bitmap --output=$@ $<
-
-mouse11.mask: $(srcdir)/bitmaps.pamphlet
- $(axiom_build_document) --tangle=mouse11.mask --output=$@ $<
-
-sdown3d.bitmap: $(srcdir)/bitmaps.pamphlet
- $(axiom_build_document) --tangle=sdown3d.bitmap --output=$@ $<
-
-sdown3dpr.bitmap: $(srcdir)/bitmaps.pamphlet
- $(axiom_build_document) --tangle=sdown3dpr.bitmap --output=$@ $<
-
-sdown.bitmap: $(srcdir)/bitmaps.pamphlet
- $(axiom_build_document) --tangle=sdown.bitmap --output=$@ $<
-
-sup3d.bitmap: $(srcdir)/bitmaps.pamphlet
- $(axiom_build_document) --tangle=sup3d.bitmap --output=$@ $<
-
-sup3dpr.bitmap: $(srcdir)/bitmaps.pamphlet
- $(axiom_build_document) --tangle=sup3dpr.bitmap --output=$@ $<
-
-sup.bitmap: $(srcdir)/bitmaps.pamphlet
- $(axiom_build_document) --tangle=sup.bitmap --output=$@ $<
-
-ht_icon: $(srcdir)/bitmaps.pamphlet
- $(axiom_build_document) --tangle=hticon --output=$@ $<
-
${HYPER}/pages/ht.db: $(HTADD) $(srcdir)/pages/*.ht $(srcdir)/pages/*.pht
@echo making ${HYPER}/pages from $(axiom_src_srcdir)/pages directory
@ mkdir -p ${HYPER}/pages
@@ -191,13 +137,11 @@ ${HYPER}/pages/ht.db: $(HTADD) $(srcdir)/pages/*.ht $(srcdir)/pages/*.pht
@ cp -pr $(srcdir)/viewports $(axiom_target_datadir)
-${OUTLIB}/htsearch: $(srcdir)/search.pamphlet
- $(axiom_build_document) --tangle=htsearch --output=$@ $<
- chmod a+x ${OUTLIB}/htsearch
+${OUTLIB}/htsearch: htsearch
+ $(INSTALL_PROGRAM) $< $@
-${OUTLIB}/presea: $(srcdir)/search.pamphlet
- $(axiom_build_document) --tangle=presea --output=$@ $<
- chmod a+x ${OUTLIB}/presea
+${OUTLIB}/presea: presea
+ $(INSTALL_PROGRAM) $< $@
${OUTLIB}/ex2ht$(EXEEXT): $(ex2ht_objects) $(ex2ht_DEPENDENCIES)
${LINK} -o $@ $(ex2ht_objects) $(ex2ht_LDADD) $(AXIOM_X11_LDFLAGS) -lm
diff --git a/src/hyper/ReadBitmap.pamphlet b/src/hyper/ReadBitmap.c
index 9712f0e6..7eb09303 100644
--- a/src/hyper/ReadBitmap.pamphlet
+++ b/src/hyper/ReadBitmap.c
@@ -1,27 +1,36 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/ReadBitmap}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{ReadBitmap.c}
-\subsection{zzopen change}
-The [[zzopen]] function used to be called [[zopen]] but this name has
-been picked up by Unix so we change it globally.
-<<zzopen change>>=
- if (!(fd = zzopen(filename, "r"))) {
- fprintf(stderr, "ReadBitmapFile: File >%s< not found\n", filename);
- exit(-1);
- }
+/*
+Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-@
-\subsection{ReadBitmap.c}
-<<ReadBitmap.c>>=
#define _READBITMAP_C
#include "axiom-c-macros.h"
@@ -65,7 +74,11 @@ HTReadBitmapFile(Display *display,int screen,char * filename,
(image)->bitmap_unit = 8; /* bitmap-unit */
(image)->bitmap_bit_order = LSBFirst; /* bitmap-bit-order */
-<<zzopen change>>
+ if (!(fd = zzopen(filename, "r"))) {
+ fprintf(stderr, "ReadBitmapFile: File >%s< not found\n", filename);
+ exit(-1);
+ }
+
/*
* Once it is open, lets get the width and height
*/
@@ -244,53 +257,3 @@ insert_image_struct(char *filename)
}
return image;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<ReadBitmap.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/addfile.pamphlet b/src/hyper/addfile.c
index 4a1e15ae..c7df3f1a 100644
--- a/src/hyper/addfile.pamphlet
+++ b/src/hyper/addfile.c
@@ -1,26 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/addfile}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{addfile.h}
-<<addfile.h>>=
-<<license>>
-#ifndef _ADDFILE_H_
-#define _ADDFILE_H_ 1
-
-extern char *gDatabasePath;
-
-#endif
-@
-\section{addfile.c}
-<<addfile.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#define _ADDFILE_C
#include "useproto.h"
#include "debug.h"
@@ -295,53 +307,3 @@ temp_file_open(char *temp_db_file)
}
return temp_db_fp;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<addfile.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/addfile.h b/src/hyper/addfile.h
new file mode 100644
index 00000000..fd6a14e0
--- /dev/null
+++ b/src/hyper/addfile.h
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _ADDFILE_H_
+#define _ADDFILE_H_ 1
+
+extern char *gDatabasePath;
+
+#endif
diff --git a/src/hyper/bitmaps.pamphlet b/src/hyper/bitmaps.pamphlet
deleted file mode 100644
index 7e0a1dfb..00000000
--- a/src/hyper/bitmaps.pamphlet
+++ /dev/null
@@ -1,143 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/bitmaps}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{bitmaps.h}
-<<bitmaps.h>>=
-<<license>>
-@
-\section{ht\_icon}
-<<hticon>>=
-#define ht_icon_width 40
-#define ht_icon_height 40
-#define ht_icon_x_hot -1
-#define ht_icon_y_hot -1
-static char ht_icon_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x00, 0x00, 0x00,
- 0x00, 0xe7, 0x00, 0x00, 0x00, 0x00, 0xe7, 0xef, 0x7b, 0x3c, 0xe7, 0xff,
- 0xef, 0x7f, 0x7e, 0xff, 0xff, 0xe7, 0xef, 0xe7, 0xfe, 0xe7, 0x6e, 0xe7,
- 0xe7, 0xde, 0xe7, 0x7e, 0xe7, 0xff, 0x0e, 0xe7, 0x3c, 0xe7, 0x07, 0x0e,
- 0xe7, 0x3c, 0xf7, 0xcf, 0x0e, 0xf7, 0x18, 0x7f, 0xfe, 0x1f, 0x00, 0x1c,
- 0x3f, 0x7c, 0x1f, 0x00, 0x0e, 0x07, 0x00, 0x00, 0x00, 0x0f, 0x07, 0x00,
- 0x00, 0x00, 0x87, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00,
- 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x77,
- 0x00, 0x00, 0x00, 0x00, 0x77, 0x3e, 0xdc, 0x00, 0x00, 0x77, 0x7f, 0xfe,
- 0x00, 0x00, 0xf7, 0xe3, 0xef, 0x00, 0x00, 0xf7, 0xe3, 0xc7, 0x00, 0x00,
- 0xf7, 0xe3, 0x07, 0x00, 0x00, 0xf7, 0xe3, 0x07, 0x00, 0x00, 0xf7, 0xe3,
- 0xcf, 0x00, 0x80, 0x7f, 0x7f, 0xfe, 0x00, 0x80, 0x3f, 0x3e, 0x7c, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-@
-\section{mouse11.bitmap}
-<<mouse11.bitmap>>=
-#define mouseBitmap_width 16
-#define mouseBitmap_height 16
-#define mouseBitmap_x_hot 8
-#define mouseBitmap_y_hot 0
-static char mouseBitmap_bits[] = {
- 0x00, 0x01, 0x00, 0x01, 0x80, 0x02, 0x40, 0x04, 0xc0, 0x06, 0x20, 0x08,
- 0x20, 0x08, 0x30, 0x18, 0x50, 0x14, 0x58, 0x34, 0x90, 0x12, 0x20, 0x08,
- 0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
-@
-\section{mouse11.mask}
-<<mouse11.mask>>=
-#define mouseMask_width 16
-#define mouseMask_height 16
-static char mouseMask_bits[] = {
- 0x00, 0x01, 0x00, 0x01, 0x80, 0x03, 0xc0, 0x07, 0xc0, 0x07, 0xe0, 0x0f,
- 0xe0, 0x0f, 0xf0, 0x1f, 0xf0, 0x1f, 0xf8, 0x3f, 0xf0, 0x1f, 0xe0, 0x0f,
- 0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
-@
-\section{sdown3d.bitmap}
-<<sdown3d.bitmap>>=
-#define sdown3d_width 21
-#define sdown3d_height 21
-static char sdown3d_bits[] = {
- 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x15, 0x02, 0x00, 0x0c, 0x51, 0x55, 0x15,
- 0xaa, 0xaa, 0x0e, 0x51, 0x5f, 0x15, 0xaa, 0xae, 0x0e, 0x51, 0x5f, 0x15,
- 0xaa, 0xae, 0x0e, 0x51, 0x5f, 0x15, 0xea, 0xff, 0x0e, 0xd1, 0x7f, 0x15,
- 0xaa, 0xbf, 0x0e, 0x51, 0x5f, 0x15, 0xaa, 0xae, 0x0e, 0x51, 0x55, 0x15,
- 0xaa, 0xaa, 0x0e, 0x51, 0x55, 0x15, 0xfe, 0xff, 0x0f, 0x55, 0x55, 0x15,
- 0xaa, 0xaa, 0x0a};
-@
-\section{sdown3dpr.bitmap}
-<<sdown3dpr.bitmap>>=
-#define sdown3dpr_width 21
-#define sdown3dpr_height 21
-static char sdown3dpr_bits[] = {
- 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x15, 0xfe, 0xff, 0x0f, 0x55, 0x55, 0x11,
- 0xae, 0xaa, 0x0a, 0x55, 0x55, 0x11, 0xae, 0xbe, 0x0a, 0x55, 0x5d, 0x11,
- 0xae, 0xbe, 0x0a, 0x55, 0x5d, 0x11, 0xae, 0xbe, 0x0a, 0xd5, 0xff, 0x11,
- 0xae, 0xff, 0x0a, 0x55, 0x7f, 0x11, 0xae, 0xbe, 0x0a, 0x55, 0x5d, 0x11,
- 0xae, 0xaa, 0x0a, 0x55, 0x55, 0x11, 0x06, 0x00, 0x08, 0x55, 0x55, 0x15,
- 0xaa, 0xaa, 0x0a};
-@
-\section{sdown.bitmap}
-<<sdown.bitmap>>=
-#define sdown_width 21
-#define sdown_height 21
-static char sdown_bits[] = {
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf0,
- 0x03, 0x00, 0xf8, 0x07, 0x00, 0xfc, 0x0f, 0x00, 0xfe, 0x1f, 0x00, 0xff,
- 0x3f, 0x80, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xf1, 0xff,
- 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff};
-@
-\section{sup3d.bitmap}
-<<sup3d.bitmap>>=
-#define sup3d_width 21
-#define sup3d_height 21
-static char sup3d_bits[] = {
- 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x15, 0x02, 0x00, 0x0c, 0x51, 0x55, 0x15,
- 0xaa, 0xaa, 0x0e, 0x51, 0x55, 0x15, 0xaa, 0xae, 0x0e, 0x51, 0x5f, 0x15,
- 0xaa, 0xbf, 0x0e, 0xd1, 0x7f, 0x15, 0xea, 0xff, 0x0e, 0x51, 0x5f, 0x15,
- 0xaa, 0xae, 0x0e, 0x51, 0x5f, 0x15, 0xaa, 0xae, 0x0e, 0x51, 0x5f, 0x15,
- 0xaa, 0xaa, 0x0e, 0x51, 0x55, 0x15, 0xfa, 0xff, 0x0f, 0x55, 0x55, 0x15,
- 0xaa, 0xaa, 0x0a};
-@
-\section{sup3dpr.bitmap}
-<<sup3dpr.bitmap>>=
-#define sup3dpr_width 21
-#define sup3dpr_height 21
-static char sup3dpr_bits[] = {
- 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x15, 0xfe, 0xff, 0x0f, 0x55, 0x55, 0x11,
- 0xae, 0xaa, 0x0a, 0x55, 0x55, 0x11, 0xae, 0xaa, 0x0a, 0x55, 0x5d, 0x11,
- 0xae, 0xbe, 0x0a, 0x55, 0x7f, 0x11, 0xae, 0xff, 0x0a, 0xd5, 0xff, 0x11,
- 0xae, 0xbe, 0x0a, 0x55, 0x5d, 0x11, 0xae, 0xbe, 0x0a, 0x55, 0x5d, 0x11,
- 0xae, 0xbe, 0x0a, 0x55, 0x55, 0x11, 0x06, 0x00, 0x08, 0x55, 0x55, 0x15,
- 0xaa, 0xaa, 0x0a};
-@
-\section{sup.bitmap}
-<<sup.bitmap>>=
-#define sup_width 21
-#define sup_height 21
-static char sup_bits[] = {
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfb, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xe0, 0xff, 0x7f, 0xc0, 0xff,
- 0x3f, 0x80, 0xff, 0x1f, 0x00, 0xff, 0x0f, 0x00, 0xfe, 0x07, 0x00, 0xfc,
- 0x03, 0x00, 0xf8, 0x01, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff};
-@
-<<*>>=
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/cond.pamphlet b/src/hyper/cond.c
index 6a698068..c619d9e0 100644
--- a/src/hyper/cond.pamphlet
+++ b/src/hyper/cond.c
@@ -1,26 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/cond}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{cond.h}
-<<cond.h>>=
-<<license>>
-#ifndef _COND_H_
-#define _COND_H_ 1
-
-#include "hyper.h"
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{cond.c}
-<<cond.c>>=
/******************************************************************************
*
* cond.c: Routines for handling "cond" nodes.
@@ -33,7 +45,7 @@
#include "useproto.h"
#include "debug.h"
-#include "cond.h"
+#include "hyper.h"
#include "all_hyper_proto.H1"
#include "sockio-c.H1"
@@ -136,53 +148,3 @@ check_condition(TextNode *node)
return 0;
}
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<cond.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/debug.c b/src/hyper/debug.c
new file mode 100644
index 00000000..98c7d3c8
--- /dev/null
+++ b/src/hyper/debug.c
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following debugitions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of debugitions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of debugitions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#define _DEBUG_C
+#include "axiom-c-macros.h"
+#include "useproto.h"
+#include "debug.h"
+
+#ifdef free
+#undef free
+hfree(char *p)
+{
+ free(p);
+}
+#endif
+
diff --git a/src/hyper/debug.pamphlet b/src/hyper/debug.pamphlet
deleted file mode 100644
index 3ed9ac81..00000000
--- a/src/hyper/debug.pamphlet
+++ /dev/null
@@ -1,77 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/debug}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{debug.h}
-\section{debug.c}
-<<debug.c>>=
-#define _DEBUG_C
-#include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
-
-#ifdef free
-#undef free
-hfree(char *p)
-{
- free(p);
-}
-#endif
-
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following debugitions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of debugitions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of debugitions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<debug.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/dialog.pamphlet b/src/hyper/dialog.c
index 82f67bda..f955e783 100644
--- a/src/hyper/dialog.pamphlet
+++ b/src/hyper/dialog.c
@@ -1,26 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/dialog}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{dialog.h}
-<<dialog.h>>=
-<<license>>
-#ifndef _DIALOG_H_
-#define _DIALOG_H_ 1
-
-#include "hyper.h"
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{dialog.c}
-<<dialog.c>>=
/******************************************************************************
*
* dialog.c:
@@ -33,9 +45,8 @@
#include "useproto.h"
#include "debug.h"
-#include "dialog.h"
+#include "hyper.h"
#include "keyin.h"
-#include "mem.h"
#include "display.h"
#include "group.h"
@@ -1336,53 +1347,3 @@ dialog(XEvent *event, KeySym keysym, char *buffer)
break;
}
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<dialog.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/display.pamphlet b/src/hyper/display.c
index 8bbf3cfc..9ffe6c96 100644
--- a/src/hyper/display.pamphlet
+++ b/src/hyper/display.c
@@ -1,29 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/display}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{display.h}
-<<display.h>>=
-<<license>>
-#ifndef _DISPLAY_H_
-#define _DISPLAY_H_ 1
-
-#include "hyper.h"
-
-extern short int gDisplayRegion;
-extern int gRegionOffset;
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{display.c}
-<<display.c>>=
/******************************************************************************
*
* display.c: HyperDoc functions to format and display a page.
@@ -48,12 +57,11 @@ extern int gRegionOffset;
#include "extent.h"
-#include "mem.h"
+#include "hyper.h"
#include "display.h"
#include "group.h"
#include "scrollbar.h"
#include "titlebar.h"
-#include "show-types.h"
#include "all_hyper_proto.H1"
@@ -289,49 +297,3 @@ paste_page(TextNode *node)
}
XFlush(gXDisplay);
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<display.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/hyper/display.h b/src/hyper/display.h
new file mode 100644
index 00000000..39bcf2a7
--- /dev/null
+++ b/src/hyper/display.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _DISPLAY_H_
+#define _DISPLAY_H_ 1
+
+#include "hyper.h"
+
+extern short int gDisplayRegion;
+extern int gRegionOffset;
+
+#endif
diff --git a/src/hyper/event.pamphlet b/src/hyper/event.c
index 3dcb69ff..5066fc1e 100644
--- a/src/hyper/event.pamphlet
+++ b/src/hyper/event.c
@@ -1,29 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/event}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{event.h}
-<<event.h>>=
-<<license>>
-#ifndef _EVENT_H_
-#define _EVENT_H_ 1
-
-#include "hyper.h"
-
-extern Window gActiveWindow;
-extern int gNeedIconName;
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{event.c}
-<<event.c>>=
#define _EVENT_C
#include "axiom-c-macros.h"
#include "useproto.h"
@@ -46,7 +55,7 @@ extern int gNeedIconName;
#include "event.h"
#include "keyin.h"
-#include "mem.h"
+#include "hyper.h"
#include "display.h"
#include "parse.h"
#include "parse-paste.h"
@@ -293,8 +302,8 @@ quitHyperDoc(void)
if (gSessionHashTable.num_entries == 1 || gParentWindow == gWindow) {
if (!strcmp(gWindow->page->name, "ProtectedQuitPage")){
- exitHyperDoc();
- }
+ exitHyperDoc();
+ }
page = (HyperDocPage *) hash_find(gWindow->fPageHashTable, "ProtectedQuitPage");
if (page == NULL) {
fprintf(stderr, "Unknown page name %s\n", "ProtectedQuitPage");
@@ -485,9 +494,9 @@ paste_button(PasteNode * paste)
if ( paste->end_node ==NULL || paste->begin_node==NULL || paste->arg_node==NULL ){
- BeepAtTheUser();
- return NULL;
- }
+ BeepAtTheUser();
+ return NULL;
+ }
page=parse_patch(paste);
/* paste has changed after this call so use pastewhere*/
@@ -797,7 +806,7 @@ set_window(Window window)
else {
/* check for a grandparent */
st = XQueryTree(gXDisplay, parent, &root, &grandparent, &children, &nchildren);
- if (st==0) goto ERROR;
+ if (st==0) goto ERROR;
if (nchildren > 0)
XFree(children);
htw = (HDWindow *) hash_find(&gSessionHashTable, (char *)&grandparent);
@@ -1051,49 +1060,3 @@ set_error_handlers(void)
{
XSetErrorHandler(HyperDocErrorHandler);
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<event.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/hyper/event.h b/src/hyper/event.h
new file mode 100644
index 00000000..517fc3ea
--- /dev/null
+++ b/src/hyper/event.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserbed.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _EVENT_H_
+#define _EVENT_H_ 1
+
+#include "hyper.h"
+
+extern Window gActiveWindow;
+extern int gNeedIconName;
+
+#endif
diff --git a/src/hyper/ex2ht.pamphlet b/src/hyper/ex2ht.c
index c26c26b0..e09106bb 100644
--- a/src/hyper/ex2ht.pamphlet
+++ b/src/hyper/ex2ht.c
@@ -1,16 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/ex2ht}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{ex2ht.c}
-<<ex2ht.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
/* ex2ht creates a cover page for structured HyperDoc example pages */
@@ -153,8 +175,8 @@ exToHt(char *filename)
tvp.tv_sec =buf.st_mtime;
tvp.tv_usec =0;
if timercmp(&tvp,&latest_date[1],>){
- latest_date[1].tv_sec=buf.st_mtime;
- }
+ latest_date[1].tv_sec=buf.st_mtime;
+ }
}
void
@@ -262,49 +284,3 @@ addFile(char *filename)
fclose(file);
unlink(filename);
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<ex2ht.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/hyper/extent.h b/src/hyper/extent.h
new file mode 100644
index 00000000..cebf6049
--- /dev/null
+++ b/src/hyper/extent.h
@@ -0,0 +1,129 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _EXTENT_H_
+#define _EXTENT_H_ 1
+
+#include "axiom-c-macros.h"
+#include "hyper.h"
+
+/*
+ * This file contains global macros extern declarations for the extent
+ * computation routines found in extent1.c and extent2.c.
+ */
+
+/*
+ * Definitions of standard text formatting dimensions, etc.
+ * dimensions given in pixels
+ */
+
+#define left_margin 20
+#define non_scroll_right_margin_space 20
+#define scroll_right_margin_space 40
+#define bottom_margin 15
+#define top_margin 5
+#define scroll_top_margin top_margin
+#define scrollingTopMargin 5
+#define inter_line_space 5
+#define inter_word_space 5
+#define term_punct_space 5
+#define paragraph_space 30
+#define box_space 3
+#define horiz_line_space 3
+#define spadcom_indent 30
+#define min_inter_column_space 10
+#define box_width 3
+#define dash_width 5
+#define dash_y 4
+
+
+/* next two from display.h. Reorg! */
+
+extern short int gDisplayRegion;
+extern int gRegionOffset;
+
+#define not_in_scroll (!(gDisplayRegion == Scrolling))
+
+#define visible(y, h) \
+ (not_in_scroll || ((y) + gRegionOffset + gWindow->page->scroll_off \
+ <= gWindow->scrollheight && \
+ (y) + gRegionOffset + gWindow->page->scroll_off - (h) >= 0))
+
+#define pix_visible(y, h) \
+ (not_in_scroll || ((y) + gRegionOffset + gWindow->page->scroll_off - h + \
+ line_height < gWindow->page->bot_scroll_margin \
+ - gWindow->page->top_scroll_margin && \
+ (y) + gRegionOffset + gWindow->page->scroll_off >= 0))
+
+#define above(y) ((y) + gWindow->page->scroll_off < gWindow->page->top_scroll_margin)
+#define below(y) ((y) + gWindow->page->scroll_off >= gWindow->page->bot_scroll_margin)
+
+
+/* Variables for the formatting state */
+
+extern int right_margin_space;
+extern int right_margin;
+extern int indent;
+extern int item_indent;
+extern int text_x;
+extern int text_y;
+extern int y_off;
+extern int scroll_bot;
+extern int need_scroll_up_button;
+extern int need_scroll_down_button;
+extern int item_space;
+extern int present_line_height;
+extern int past_line_height;
+extern int line_height; /* space between lines */
+extern int normal_text_height; /* space between lines */
+extern int space_width; /* the maximum width of a character */
+extern int word_off_height; /* the diff between text height and */
+
+
+/*
+ * externs from extent1.c
+ */
+
+extern short int gExtentRegion;
+
+extern short int gInAxiomCommand; /* true iff we are in a \spadcommand */
+extern short int gInDesc;
+extern short int gInItem; /* true iff we are in a \item */
+extern short int gInLine; /* true iff there have been words printed */
+extern short int gInTable;
+
+extern TextNode *gLineNode;
+
+#endif
diff --git a/src/hyper/extent.pamphlet b/src/hyper/extent.pamphlet
deleted file mode 100644
index 801689f7..00000000
--- a/src/hyper/extent.pamphlet
+++ /dev/null
@@ -1,157 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/extent}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{extent.h}
-<<extent.h>>=
-<<license>>
-#ifndef _EXTENT_H_
-#define _EXTENT_H_ 1
-
-#include "axiom-c-macros.h"
-#include "hyper.h"
-
-/*
- * This file contains global macros extern declarations for the extent
- * computation routines found in extent1.c and extent2.c.
- */
-
-/*
- * Definitions of standard text formatting dimensions, etc.
- * dimensions given in pixels
- */
-
-#define left_margin 20
-#define non_scroll_right_margin_space 20
-#define scroll_right_margin_space 40
-#define bottom_margin 15
-#define top_margin 5
-#define scroll_top_margin top_margin
-#define scrollingTopMargin 5
-#define inter_line_space 5
-#define inter_word_space 5
-#define term_punct_space 5
-#define paragraph_space 30
-#define box_space 3
-#define horiz_line_space 3
-#define spadcom_indent 30
-#define min_inter_column_space 10
-#define box_width 3
-#define dash_width 5
-#define dash_y 4
-
-
-/* next two from display.h. Reorg! */
-
-extern short int gDisplayRegion;
-extern int gRegionOffset;
-
-#define not_in_scroll (!(gDisplayRegion == Scrolling))
-
-#define visible(y, h) \
- (not_in_scroll || ((y) + gRegionOffset + gWindow->page->scroll_off \
- <= gWindow->scrollheight && \
- (y) + gRegionOffset + gWindow->page->scroll_off - (h) >= 0))
-
-#define pix_visible(y, h) \
- (not_in_scroll || ((y) + gRegionOffset + gWindow->page->scroll_off - h + \
- line_height < gWindow->page->bot_scroll_margin \
- - gWindow->page->top_scroll_margin && \
- (y) + gRegionOffset + gWindow->page->scroll_off >= 0))
-
-#define above(y) ((y) + gWindow->page->scroll_off < gWindow->page->top_scroll_margin)
-#define below(y) ((y) + gWindow->page->scroll_off >= gWindow->page->bot_scroll_margin)
-
-
-/* Variables for the formatting state */
-
-extern int right_margin_space;
-extern int right_margin;
-extern int indent;
-extern int item_indent;
-extern int text_x;
-extern int text_y;
-extern int y_off;
-extern int scroll_bot;
-extern int need_scroll_up_button;
-extern int need_scroll_down_button;
-extern int item_space;
-extern int present_line_height;
-extern int past_line_height;
-extern int line_height; /* space between lines */
-extern int normal_text_height; /* space between lines */
-extern int space_width; /* the maximum width of a character */
-extern int word_off_height; /* the diff between text height and */
-
-
-/*
- * externs from extent1.c
- */
-
-extern short int gExtentRegion;
-
-extern short int gInAxiomCommand; /* true iff we are in a \spadcommand */
-extern short int gInDesc;
-extern short int gInItem; /* true iff we are in a \item */
-extern short int gInLine; /* true iff there have been words printed */
-extern short int gInTable;
-
-extern TextNode *gLineNode;
-
-#endif
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/extent1.pamphlet b/src/hyper/extent1.c
index a7263f5e..a18dbfd8 100644
--- a/src/hyper/extent1.pamphlet
+++ b/src/hyper/extent1.c
@@ -1,16 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/extent1}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{extent1.c}
-<<extent1.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
/******************************************************************************
*
* extent1.h: HyperDoc extent computation routines
@@ -25,7 +47,7 @@
#include "extent.h"
-#include "cond.h"
+#include "hyper.h"
#include "group.h"
#include "titlebar.h"
#include "scrollbar.h"
@@ -1347,49 +1369,3 @@ compute_scrolling_extent(HyperDocPage *page)
page->scrolling->height = text_y;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<extent1.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/hyper/extent2.pamphlet b/src/hyper/extent2.c
index d553a73e..5a7a6848 100644
--- a/src/hyper/extent2.pamphlet
+++ b/src/hyper/extent2.c
@@ -1,16 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/extent2}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{extent2.c}
-<<extent2.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
/******************************************************************************
*
* extent2.h: HyperDoc extent computation routines
@@ -905,53 +927,3 @@ plh(int height)
}
return rheight;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<extent2.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/form-ext.pamphlet b/src/hyper/form-ext.c
index 158447c6..f33babfd 100644
--- a/src/hyper/form-ext.pamphlet
+++ b/src/hyper/form-ext.c
@@ -1,16 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/form-ext}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{form-ext.c}
-<<form-ext.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#define _FORM_EXT_C
#include "axiom-c-macros.h"
#include "useproto.h"
@@ -142,53 +164,3 @@ form_scrolling_extent(HyperDocPage *page)
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<form-ext.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/group.pamphlet b/src/hyper/group.c
index 0cc6377a..700ba42e 100644
--- a/src/hyper/group.pamphlet
+++ b/src/hyper/group.c
@@ -1,29 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/group}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{group.h}
-<<group.h>>=
-<<license>>
-#ifndef _GROUP_H_
-#define _GROUP_H_ 1
-
-#include "axiom-c-macros.h"
-#include "hyper.h"
-
-extern GroupItem *gTopOfGroupStack;
-
-#endif
-@
-\section{group.c}
-<<group.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
/******************************************************************************
*
* group.c: Routines for managing the HyperDoc group stack.
@@ -231,53 +240,3 @@ free_group_stack(GroupItem *g)
free(junk);
}
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<group.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/group.h b/src/hyper/group.h
new file mode 100644
index 00000000..ce2ee5dd
--- /dev/null
+++ b/src/hyper/group.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _GROUP_H_
+#define _GROUP_H_ 1
+
+#include "axiom-c-macros.h"
+#include "hyper.h"
+
+extern GroupItem *gTopOfGroupStack;
+
+#endif
diff --git a/src/hyper/halloc.c b/src/hyper/halloc.c
new file mode 100644
index 00000000..2c923850
--- /dev/null
+++ b/src/hyper/halloc.c
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#define _HALLOC_C
+#include "axiom-c-macros.h"
+#include "useproto.h"
+#include "debug.h"
+#include <stdio.h>
+#include <stdlib.h>
+#if !defined(BSDplatform)
+#include <malloc.h>
+#endif
+
+FILE *fp;
+
+#include "halloc.H1"
+
+/* allocate memory and bomb if none left (HyperDoc alloc) */
+
+char *
+halloc(int bytes, char *msg)
+{
+ static char buf[200];
+ char *result;
+
+#ifdef DEBUG
+ static int first = 1;
+
+ if (first) {
+ fp = fopen("/tmp/hallocs", "w");
+ first = 0;
+ }
+#endif
+ result = (char *) malloc(bytes);
+#ifdef DEBUG
+ fprintf(fp, "%d\tAlocating %d Bytes for %s\n", result,bytes, msg);
+#endif
+ if (result == NULL) {
+ sprintf(buf, "Ran out of memory allocating %s.\b", msg);
+ fprintf(stderr, "%s\n", buf);
+ exit(-1);
+ }
+ return result;
+}
diff --git a/src/hyper/halloc.pamphlet b/src/hyper/halloc.pamphlet
deleted file mode 100644
index 66931187..00000000
--- a/src/hyper/halloc.pamphlet
+++ /dev/null
@@ -1,104 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/halloc}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{halloc.c}
-<<halloc.c>>=
-#define _HALLOC_C
-#include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
-#include <stdio.h>
-#include <stdlib.h>
-#if !defined(BSDplatform)
-#include <malloc.h>
-#endif
-
-FILE *fp;
-
-#include "halloc.H1"
-
-/* allocate memory and bomb if none left (HyperDoc alloc) */
-
-char *
-halloc(int bytes, char *msg)
-{
- static char buf[200];
- char *result;
-
-#ifdef DEBUG
- static int first = 1;
-
- if (first) {
- fp = fopen("/tmp/hallocs", "w");
- first = 0;
- }
-#endif
- result = (char *) malloc(bytes);
-#ifdef DEBUG
- fprintf(fp, "%d\tAlocating %d Bytes for %s\n", result,bytes, msg);
-#endif
- if (result == NULL) {
- sprintf(buf, "Ran out of memory allocating %s.\b", msg);
- fprintf(stderr, "%s\n", buf);
- exit(-1);
- }
- return result;
-}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<halloc.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/hash.pamphlet b/src/hyper/hash.c
index b1104820..515c935c 100644
--- a/src/hyper/hash.pamphlet
+++ b/src/hyper/hash.c
@@ -1,16 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/hash}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{hash.c}
-<<hash.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights resrved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#define _HASH_C
#include "axiom-c-macros.h"
#include "useproto.h"
@@ -54,7 +76,7 @@ free_hash(HashTable *table, FreeFunction free_fun)
for (e = table->table[i]; e != NULL;) {
next = e->next;
(*free_fun) (e->data);
- (*e).data=0;
+ (*e).data=0;
free(e);
e = next;
}
@@ -197,53 +219,3 @@ alloc_string(char *str)
strcpy(result,str);
return (result);
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<hash.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/ht_icon b/src/hyper/ht_icon
new file mode 100644
index 00000000..859e0fe2
--- /dev/null
+++ b/src/hyper/ht_icon
@@ -0,0 +1,22 @@
+#define ht_icon_width 40
+#define ht_icon_height 40
+#define ht_icon_x_hot -1
+#define ht_icon_y_hot -1
+static char ht_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xf7, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x00, 0x00, 0x00,
+ 0x00, 0xe7, 0x00, 0x00, 0x00, 0x00, 0xe7, 0xef, 0x7b, 0x3c, 0xe7, 0xff,
+ 0xef, 0x7f, 0x7e, 0xff, 0xff, 0xe7, 0xef, 0xe7, 0xfe, 0xe7, 0x6e, 0xe7,
+ 0xe7, 0xde, 0xe7, 0x7e, 0xe7, 0xff, 0x0e, 0xe7, 0x3c, 0xe7, 0x07, 0x0e,
+ 0xe7, 0x3c, 0xf7, 0xcf, 0x0e, 0xf7, 0x18, 0x7f, 0xfe, 0x1f, 0x00, 0x1c,
+ 0x3f, 0x7c, 0x1f, 0x00, 0x0e, 0x07, 0x00, 0x00, 0x00, 0x0f, 0x07, 0x00,
+ 0x00, 0x00, 0x87, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00,
+ 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x77,
+ 0x00, 0x00, 0x00, 0x00, 0x77, 0x3e, 0xdc, 0x00, 0x00, 0x77, 0x7f, 0xfe,
+ 0x00, 0x00, 0xf7, 0xe3, 0xef, 0x00, 0x00, 0xf7, 0xe3, 0xc7, 0x00, 0x00,
+ 0xf7, 0xe3, 0x07, 0x00, 0x00, 0xf7, 0xe3, 0x07, 0x00, 0x00, 0xf7, 0xe3,
+ 0xcf, 0x00, 0x80, 0x7f, 0x7f, 0xfe, 0x00, 0x80, 0x3f, 0x3e, 0x7c, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/src/hyper/htadd.pamphlet b/src/hyper/htadd.c
index 657864c2..02ec8f84 100644
--- a/src/hyper/htadd.pamphlet
+++ b/src/hyper/htadd.c
@@ -1,37 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/htadd}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{htadd.c}
-The [[htadd]] function can manipulate the database of hypertex pages.
-To rebuild the hypertex database changes to the [[$AXIOM/share/hypertex]]
-subdirectory and type:
-\begin{verbatim}
-htadd -f pages -n pages/*
-\end{verbatim}
-This will create a file called [[pages/ht.db]] which contains entries
-similar to:
-\begin{verbatim}
- algebra.ht 1102052108
-\page AlgebraPage 216 9
-\page NumberTheoryPage 763 28
- ALIST.ht 1102052108
-\newcommand AssociationListXmpTitle 140 3
-\newcommand AssociationListXmpNumber 195 4
-\page AssociationListXmpPage 313 7
- ALIST.pht 1102052108
-\patch AssociationListXmpPagePatch1 0 1
-\patch AssociationListXmpPageEmpty1 447 11
-...
-\end{verbatim}
-<<htadd.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
/* HyperDoc database file manager */
@@ -534,53 +535,3 @@ delete_db(FILE *db, FILE *temp_db, char *name)
c = get_char();
} while (c != EOF);
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<htadd.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/hterror.pamphlet b/src/hyper/hterror.c
index f2bdddf6..8cd1e665 100644
--- a/src/hyper/hterror.pamphlet
+++ b/src/hyper/hterror.c
@@ -1,30 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/hterror}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{hterror.h}
-<<hterror.h>>=
-<<license>>
-#define HTCONDNODE 1 /* unrecognized condition node */
-#define KEYTYPE 2 /* unrecognized keyword found in lex.c */
-#define Numerrors 2
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All right reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#ifdef HTERROR
-char *errmess[] = {
- "place holder",
- "parsing condition node",
- "unrecognized keyword" };
-#endif
-@
-\section{hterror.c}
-<<hterror.c>>=
#define _HTERROR_C
#define HTERROR
@@ -214,53 +222,3 @@ htperror(char *msg, int errno)
print_next_ten_tokens();
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<hterror.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/hterror.h b/src/hyper/hterror.h
new file mode 100644
index 00000000..1ecf63d1
--- /dev/null
+++ b/src/hyper/hterror.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#define HTCONDNODE 1 /* unrecognized condition node */
+#define KEYTYPE 2 /* unrecognized keyword found in lex.c */
+#define Numerrors 2
+
+#ifdef HTERROR
+char *errmess[] = {
+ "place holder",
+ "parsing condition node",
+ "unrecognized keyword" };
+#endif
diff --git a/src/hyper/hthits.pamphlet b/src/hyper/hthits.c
index c3dc4e1b..b3e24774 100644
--- a/src/hyper/hthits.pamphlet
+++ b/src/hyper/hthits.c
@@ -1,34 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-
-\title{\$SPAD/src/hthits}
-\author{The Axiom Team}
-
-\begin{document}
-\maketitle
-
-\begin{abstract}
-\end{abstract}
-\eject
-
-\tableofcontents
-\eject
-
-\section{hthits.c}
-
-This source file implements HyperDoc's ability to scan files for a
-given pattern. For that purpose it needs a ``regex'' for string
-pattern matching.
-
-This source file used to rely on [[<regexp.h>]],
-which was originally part of the X/Open System Interface and Headers
-Issue 2. However, since then, it has been withdrawn and no longer
-always available on newer platfroms. Consequently,
-we need to use a different, portable regex library. The POSIX
-definition provides one, namely through [[<regex.h>]]. That is what we
-use now. Its availability is tested at configure time.
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-<<hthits.c>>=
/*
* hthits pattern htdb-file
*
@@ -422,53 +426,3 @@ regerr(int code)
fprintf(stderr, "%s: regular expression error %d for \"%s\"\n",
progName, code, pattern);
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<hthits.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/htinp.pamphlet b/src/hyper/htinp.c
index 0b2a12c9..30d975ad 100644
--- a/src/hyper/htinp.pamphlet
+++ b/src/hyper/htinp.c
@@ -1,16 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/htinp}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{htinp.c}
-<<htinp.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#define _HTINP_C
#include "axiom-c-macros.h"
#include "useproto.h"
@@ -21,7 +43,6 @@
#include <setjmp.h>
#include "hyper.h"
-#include "mem.h"
#include "group.h"
#include "parse.h"
#include "bsdsignal.h"
@@ -191,49 +212,49 @@ make_input_file_from_page(HyperDocPage *page)
for (node = page->scrolling; node != NULL; node = node->next)
if (node->type == Spadcommand || node->type == Spadgraph
- || node->type == Spadsrc) {
- if (starting_file) {
- example_number = 1;
- if (make_patch_files) {
- send_lisp_command("(|clearCmdAll|)");
- send_lisp_command("(|resetWorkspaceVariables|)");
- send_lisp_command("(setq $linelength 55)");
- send_lisp_command("(|setOutputCharacters| '(default))");
- send_lisp_command("(setq |$printLoadMsgs| NIL)");
- send_lisp_command("(setq |$UserLevel| '|development|)");
- send_lisp_command("(verbos 0)");
- }
- if (make_patch_files) {
- pfile = fopen(c, "a");
- if (pfile == NULL) {
- fprintf(stderr, "couldn't open output file %s\n", c);
- exit(-1);
- }
- }
- starting_file = 0;
- }
- else
- example_number++;
- buf = print_to_string(node->next);
- com = alloc_string(buf);
- fprintf(file, "%s\n", buf);
- fflush(file);
- fprintf(stderr, "writing:\t%s\n", buf);
- include_bf = 1;
- buf = print_to_string(node->next);
- include_bf = 0;
- if (make_patch_files) {
- if (node->type == Spadcommand || node->type == Spadsrc)
- print_paste(pfile, com, buf, page->name, node->type);
- else
- print_graph_paste(pfile, com, buf, page->name, node->type);
- }
+ || node->type == Spadsrc) {
+ if (starting_file) {
+ example_number = 1;
+ if (make_patch_files) {
+ send_lisp_command("(|clearCmdAll|)");
+ send_lisp_command("(|resetWorkspaceVariables|)");
+ send_lisp_command("(setq $linelength 55)");
+ send_lisp_command("(|setOutputCharacters| '(default))");
+ send_lisp_command("(setq |$printLoadMsgs| NIL)");
+ send_lisp_command("(setq |$UserLevel| '|development|)");
+ send_lisp_command("(verbos 0)");
+ }
+ if (make_patch_files) {
+ pfile = fopen(c, "a");
+ if (pfile == NULL) {
+ fprintf(stderr, "couldn't open output file %s\n", c);
+ exit(-1);
+ }
+ }
+ starting_file = 0;
+ }
+ else
+ example_number++;
+ buf = print_to_string(node->next);
+ com = alloc_string(buf);
+ fprintf(file, "%s\n", buf);
+ fflush(file);
+ fprintf(stderr, "writing:\t%s\n", buf);
+ include_bf = 1;
+ buf = print_to_string(node->next);
+ include_bf = 0;
+ if (make_patch_files) {
+ if (node->type == Spadcommand || node->type == Spadsrc)
+ print_paste(pfile, com, buf, page->name, node->type);
+ else
+ print_graph_paste(pfile, com, buf, page->name, node->type);
+ }
}
if (!starting_file && make_patch_files) {
ret_val = fclose(pfile);
if (ret_val == -1) {
- fprintf(stderr, "couldn't close file %s\n", b);
- exit(-1);
+ fprintf(stderr, "couldn't close file %s\n", b);
+ exit(-1);
}
}
ret_val = fclose(file);
@@ -476,53 +497,3 @@ print_graph_paste(FILE *pfile,char *realcom,char *command,char *pagename,int com
fprintf(pfile, "\\end{paste}\\end{patch}\n\n");
fflush(pfile);
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<htinp.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/htsearch b/src/hyper/htsearch
new file mode 100755
index 00000000..84e272c7
--- /dev/null
+++ b/src/hyper/htsearch
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+htbindir=$AXIOM/lib
+htpagedir=$AXIOM/share/hypertex/pages
+
+
+if test -z "$1"
+then
+ echo ""|$htbindir/presea case=1 -
+else
+( cd $htpagedir; $htbindir/hthits "$1" $htpagedir/ht.db |sort -r -n +0.22 |$htbindir/presea case=0 expr="$1" -)
+fi
diff --git a/src/hyper/hyper.c b/src/hyper/hyper.c
new file mode 100644
index 00000000..627c3ca3
--- /dev/null
+++ b/src/hyper/hyper.c
@@ -0,0 +1,487 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+ * This is the main module of the HyperDoc program. It contains the main
+ * routine which initializes all the X stuff, and the tables. Then it passes
+ * control over to the main event loop.
+ */
+
+/* #define DEBUG 1 */
+
+/* Include all the needed include files */
+#define _HYPER_C
+#include "useproto.h"
+#include "debug.h"
+
+
+#include "hyper.h"
+
+#include <sys/signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <setjmp.h>
+#include <X11/cursorfont.h>
+
+#include "keyin.h"
+#include "initx.h"
+#include "event.h"
+#include "hyper.h"
+#include "bsdsignal.h"
+
+#include "all_hyper_proto.H1"
+#include "sockio-c.H1"
+#include "bsdsignal.H1"
+/*
+ * Here is a flag used to tell me whether I made a good connection to the
+ * menu server. Needed so I don't send spad commands when I should not
+ */
+
+int MenuServerOpened = 1;
+
+/* include icon bitmap data */
+
+#define BITMAPDEPTH 1
+
+/* X11 display and screen variables */
+
+Display *gXDisplay;
+int gXScreenNumber;
+
+/*
+ * Information about the top level HyperDoc window
+ */
+
+HDWindow *gWindow = NULL; /* the current window */
+HDWindow *gParentWindow =NULL; /* the parent window. The one that appears
+ * when you first start HyperDoc */
+
+HashTable gSessionHashTable; /* hash table of HD windows */
+HashTable init_page_hash; /* initial hash table of HD pages */
+HashTable init_macro_hash; /* initial hash table of HD macros */
+HashTable init_patch_hash; /* initial hash table of HD patches */
+
+/* The various Cursors we use */
+
+Cursor gNormalCursor; /* The normal mouse cursor */
+Cursor gActiveCursor; /* The cursor in active regions */
+Cursor gBusyCursor; /* The clock cursor for when I am busy */
+
+
+HashTable gFileHashTable; /* hash table of HyperDoc files */
+HashTable gImageHashTable; /* hash table for images */
+
+
+/* Some things needed for Handling interupts properly */
+
+int gIsEndOfOutput; /* set to true when spad has finished output */
+int received_window_request = 0;/* true iff Spad wants a pop-up */
+int in_next_event = 0; /* true when in XNextEvent */
+int make_input_file = 0; /* true when making input files from ht */
+int make_patch_files = 0; /* true when making patch files from ht */
+int gmake_record_file= 0; /* true when making record files from ht */
+int gverify_record_file = 0; /* true when verifying record files from ht */
+int gverify_dates = 0; /* true when we want hypertex to verify ht.db dates */
+
+Sock *session_server; /* socket connecting to session manager */
+
+int gIsAxiomServer = 0; /* true iff HyperDoc is acting as a */
+ /* an Axiom server */
+
+int kill_spad = 0; /* kill spad when finished with paste file */
+
+int gSwitch_to_mono=0; /* will be set to 1 if at any time we don't have
+ enough colours for the images. We will know this
+ when read_pixmap_file returns -1. We will use this
+ when deciding what to do in case of \inputimage */
+
+int gTtFontIs850=0; /* a flag that tells us if the Tt font is a IBM pagecode 850
+ font and hence supports the graphics chars
+ set when the TtFont is opened*/
+
+/*
+ * Global copies of the command line arguments, so they never have to be
+ * passed as parameters. This is also so any child process starting up also
+ * has the same values.
+ */
+
+int gArgc;
+char **gArgv;
+
+char **input_file_list;
+int input_file_count;
+
+/*
+ * SIGUSR2 is raised by the spadbuf program when it is done with the current
+ * command
+ */
+
+void
+sigusr2_handler(int sig)
+{
+ gIsEndOfOutput = 1;
+ return ;
+}
+
+void
+sigcld_handler(int sig)
+{
+
+ /* why were we waiting after the child had already died ??
+ because we don't want zombies */
+
+ int x;
+ wait(&x);
+
+}
+
+extern jmp_buf env;
+
+
+/* Clean up spad sockets on exit */
+void
+clean_socket(void )
+{
+ char name[256];
+
+ make_server_name(name, MenuServerName);
+ unlink(name);
+}
+
+/*
+ * initialize hash tables, signal handlers and windows, then call the main
+ * event handling loop
+ */
+
+int
+main(int argc, char **argv)
+{
+ int ret_status;
+
+ /* Initialize some global values */
+/* fprintf(stderr,"hyper:main:entered\n");*/
+ gArgc = argc;
+ gArgv = argv;
+ gIsEndOfOutput = 1;
+
+/* fprintf(stderr,"hyper:main:calling check_arguments\n");*/
+ check_arguments();
+/* fprintf(stderr,"hyper:main:returned check_arguments\n");*/
+
+ /*
+ * initialize the hash tables for the files and the windows and images
+ */
+/* fprintf(stderr,"hyper:main:calling init_hash\n");*/
+ init_hash();
+/* fprintf(stderr,"hyper:main:returned init_hash\n");*/
+
+ /*
+ * initialize the parser keyword hash table
+ */
+/* fprintf(stderr,"hyper:main:calling parser_init\n");*/
+ parser_init();
+/* fprintf(stderr,"hyper:main:returned parser_init\n");*/
+
+/* fprintf(stderr,"hyper:main:calling read_ht_db\n");*/
+ read_ht_db(&init_page_hash, &init_macro_hash, &init_patch_hash);
+/* fprintf(stderr,"hyper:main:returned read_ht_db\n");*/
+
+ /*
+ * Now initialize x. This includes opening the display, setting the
+ * screen and display global values, and also gets all the fonts and
+ * colors we will need.
+ */
+
+ if (!make_input_file && !gmake_record_file && !gverify_record_file) {
+/* fprintf(stderr,"hyper:main:calling initializeWindowSystem\n");*/
+ initializeWindowSystem();
+/* fprintf(stderr,"hyper:main:returned initializeWindowSystem\n");*/
+
+ /*
+ * Initialize some of the global values used by the input string
+ * routines
+ */
+/* fprintf(stderr,"hyper:main:calling init_keyin\n");*/
+ init_keyin();
+/* fprintf(stderr,"hyper:main:returned init_keyin\n");*/
+
+ /*
+ * regardless of what else happened, we should always pop up an
+ * initial window.
+ */
+
+/* fprintf(stderr,"hyper:main:calling init_top_window\n");*/
+ ret_status = init_top_window("RootPage");
+/* fprintf(stderr,"hyper:main:returned init_top_window\n");*/
+ gParentWindow = gWindow;
+ if (ret_status == -1) {
+ fprintf(stderr,
+ "(HyperDoc) Could not find RootPage for top-level window.\n");
+ exit(-1);
+ }
+
+ /*
+ * Tell it how to handle the user defined signals I may get
+ */
+ bsdSignal(SIGUSR2, sigusr2_handler,RestartSystemCalls);
+ bsdSignal(SIGUSR1, SIG_IGN,RestartSystemCalls);
+#if defined(BSDplatform) || defined(MACOSXplatform)
+ bsdSignal(SIGCHLD, sigcld_handler,RestartSystemCalls);
+#else
+ bsdSignal(SIGCLD, sigcld_handler,RestartSystemCalls);
+#endif
+ bsdSignal(SIGINT, SIG_IGN,RestartSystemCalls);
+
+ /*
+ * Now go to the main event loop. I will never return, so just end
+ * the main routine after that
+ */
+
+ /*
+ * make an input file if requested
+ */
+ }
+ else {
+
+ /*
+ * Try to establish all the socket connections I need. If I am an
+ * gIsAxiomServer and the routine fails, it will exit for me
+ */
+/* fprintf(stderr,"hyper:main:in else case\n");*/
+/* fprintf(stderr,"hyper:main:calling make_server_connections\n");*/
+ make_server_connections();
+/* fprintf(stderr,"hyper:main:returned make_server_connections\n");*/
+
+
+ if (make_input_file) ht2_input();
+ if (gmake_record_file) make_record();
+ if (gverify_record_file) verify_record();
+ exit(0);
+ }
+
+ /*
+ * Try to establish all the socket connections I need. If I am an
+ * gIsAxiomServer and the routine fails, it will exit for me
+ */
+/* fprintf(stderr,"hyper:main:calling make_server_connections\n");*/
+ make_server_connections();
+/* fprintf(stderr,"hyper:main:returned make_server_connections\n");*/
+
+
+/* fprintf(stderr,"hyper:main:calling mainEventLoop\n");*/
+ mainEventLoop();
+/* fprintf(stderr,"hyper:main:returned mainEventLoop\n");*/
+
+ return 0;
+}
+
+/*
+ * Initializes the hash table for Files, and Windows
+ */
+
+static void
+init_hash(void)
+{
+ hash_init(&gFileHashTable,
+ FileHashSize,
+ (EqualFunction)string_equal,
+ (HashcodeFunction) string_hash);
+ hash_init(&gSessionHashTable,
+ SessionHashSize,
+ (EqualFunction) window_equal,
+ (HashcodeFunction) window_code);
+ hash_init(&gImageHashTable,
+ ImageHashSize,
+ (EqualFunction) string_equal,
+ (HashcodeFunction) string_hash);
+}
+
+/* initialize the HyperDoc page hierarchy data structures */
+
+void
+init_page_structs(HDWindow *w)
+{
+ int i;
+
+ w->fMemoStackIndex = 0;
+ for (i = 0; i < MaxMemoDepth; i++) {
+ w->fMemoStack[i] = NULL;
+ w->fDownLinkStackTop[i] = 0;
+ }
+ w->fDownLinkStackIndex = 0;
+ for (i = 0; i < MaxDownlinkDepth; i++)
+ w->fDownLinkStack[i] = NULL;
+}
+
+static void
+check_arguments(void)
+{
+ int i;
+
+ /*
+ * Now check the command line arguments, to see if I am supposed to be a
+ * server or not
+ */
+ for (i = 1; i < gArgc; i++) {
+ if (gArgv[i][0] == '-')
+ switch (gArgv[i][1]) {
+ case 'p':
+ gverify_dates=1;
+ break;
+ case 's':
+ if (!MenuServerOpened) {
+ fprintf(stderr, "(HyperDoc) Server already in use.\n");
+ exit(-1);
+ }
+ gIsAxiomServer = 1;
+ break;
+ case 'i':
+ if (gArgv[i][2] == 'p')
+ make_patch_files = 1;
+ make_input_file = 1;
+ input_file_list = gArgv + i + 1;
+ input_file_count = gArgc - i - 1;
+ break;
+ case 'k':
+ kill_spad = 1;
+ break;
+ case 'r':
+ if (gArgv[i][2] == 'm')
+ gmake_record_file=1;
+ else if (gArgv[i][2] == 'v')
+ gverify_record_file=1;
+ else
+ fprintf(stderr, "(HyperDoc) v or m must follow -r\n");
+ input_file_list = gArgv + i + 1;
+ input_file_count = gArgc - i - 1;
+ break;
+ default:
+ fprintf(stderr, "(HyperDoc) Unexpected Command Line Argument %s\n", gArgv[i]);
+ fprintf(stderr, " Usage: hypertex [-s]\n");
+ break;
+ }
+ }
+}
+
+static void
+make_server_connections(void)
+{
+ int i, wait_time;
+
+ /*
+ * Try to open the menuserver socket, if I can not, then set a flag
+ */
+
+ if (open_server(MenuServerName) == -2) {
+ fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM Server!\n");
+ MenuServerOpened = 0;
+ } else {
+ atexit(&clean_socket);
+ MenuServerOpened = 1;
+ }
+
+
+ /*
+ * If I have opened the MenuServer socket, then I should also try to open
+ * the SpadServer socket, so I can send stuff right to SPAD.
+ */
+
+ if (MenuServerOpened) {
+
+ /*
+ * If I am a ht server, then I should not continue on unless I
+ * establish some sort of connection
+ */
+
+ /*
+ * Modified on 11/20 so that it prints an error message every ten for
+ * ten tries at opeing the socket. If it fails all ten times, it
+ * gives up and exits.
+ */
+
+ if (!gIsAxiomServer)
+ wait_time = 2;
+ else
+ wait_time = 1000;
+
+ for (i = 0, spad_socket = NULL; i < 2 && spad_socket == NULL; i++) {
+ spad_socket = connect_to_local_server(SpadServer,
+ MenuServer, wait_time);
+ if (gIsAxiomServer && spad_socket == NULL)
+ fprintf(stderr, "(HyperDoc) Error opening AXIOM server. Retrying ...\n");
+ else
+ i = 11;
+ }
+ if (! spad_socket) {
+ fprintf(stderr, "(HyperDoc) Couldn't connect to AXIOM server!\n");
+ if (!gIsAxiomServer)
+ MenuServerOpened = 0;
+ else {
+ fprintf(stderr, "(HyperDoc) Couldn't connect to AXIOM server!\n");
+ exit(-1);
+ }
+ }
+ else {
+
+ /*
+ * Do the same thing for the SessionServer
+ */
+
+ for (i = 0, session_server = NULL; i < 2 && session_server == NULL
+ ; i++) {
+ session_server =
+ connect_to_local_server(SessionServer, MenuServer,
+ wait_time);
+ if (gIsAxiomServer && session_server == NULL) {
+ fprintf(stderr,
+ "(HyperDoc) Error opening SessionServer, Retrying ...\n");
+ }
+ else
+ i = 11;
+ }
+ if (session_server == NULL) {
+ fprintf(stderr, "(HyperDoc) Connection attempt to session manager timed out.\n");
+ if (gIsAxiomServer) {
+ fprintf(stderr,
+ "(HyperDoc) Server unable to connect to session server\n");
+ exit(-1);
+ }
+ else {
+ MenuServerOpened = 0;
+ }
+ }
+ }
+ }
+}
diff --git a/src/hyper/hyper.h b/src/hyper/hyper.h
new file mode 100644
index 00000000..1a9a53e1
--- /dev/null
+++ b/src/hyper/hyper.h
@@ -0,0 +1,575 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _HYPER_H_
+#define _HYPER_H_ 1
+
+#include "axiom-c-macros.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <limits.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xos.h>
+
+#include "com.h"
+#include "token.h"
+#include "hash.h"
+
+#define boolean unsigned short int
+
+#ifndef TRUE
+#define TRUE ((boolean) 0x1)
+#endif
+#ifndef FALSE
+#define FALSE ((boolean) 0x0)
+#endif
+
+/* Struct forward declarations */
+
+struct text_node;
+struct input_box;
+struct input_window;
+struct paste_node;
+struct radio_boxes;
+struct group_item;
+
+#define Scrollupbutton 1
+#define Scrolldownbutton 2
+#define Noopbutton 6
+
+#define Scrolling 1
+#define Header 2
+#define Footer 3
+#define Title 4
+
+#ifndef HTADD
+extern int MenuServerOpened;
+
+/* These are all the colors one can use in HyperDoc. */
+
+extern int gActiveColor,
+ gAxiomColor,
+ gBackgroundColor,
+ gBfColor,
+ gControlBackgroundColor,
+ gControlForegroundColor,
+ gEmColor,
+ gInputBackgroundColor,
+ gInputForegroundColor,
+ gItColor,
+ gRmColor,
+ gSlColor,
+ gTtColor;
+
+/* These are all the different fonts one can use in HyperDoc. */
+
+extern XFontStruct *gActiveFont,
+ *gAxiomFont,
+ *gBfFont,
+ *gEmFont,
+ *gInputFont,
+ *gItFont,
+ *gRmFont,
+ *gSlFont,
+ *gTitleFont,
+ *gTtFont;
+
+
+#endif
+
+
+/** I am implementing a state node stack, this is the structure I store **/
+
+typedef struct state_node {
+ int last_ch, last_token, input_type;
+ long fpos, keyword_fpos;
+ long page_start_fpos;
+ Token token;
+ char *input_string;
+ FILE *cfile;
+ int keyword;
+ struct state_node *next;
+} StateNode;
+
+#ifndef HTADD
+/** pointer to the top of the state node graph **/
+extern StateNode *top_state_node;
+#endif
+
+
+/* structure for a hyper text link */
+typedef struct hyper_link {
+ int type; /* Memolink, Spadlink, Downlink etc. */
+ Window win; /* X11 window containing active area */
+ union {
+ struct text_node *node; /* ID of link to which link refers */
+ struct input_box *box;
+ struct input_window *string;
+ struct paste_node *paste; /* the paste node area */
+ } reference;
+ int x,y; /* relative position inside page */
+} HyperLink;
+
+
+typedef struct if_node {
+ struct text_node *cond; /* the condition nodes*/
+ struct text_node *thennode;
+ struct text_node *elsenode;
+} IfNode;
+
+typedef struct item_stack {
+ int indent;
+ int item_indent;
+ int in_item;
+ struct item_stack *next;
+} ItemStack;
+
+typedef struct paste_node {
+ char *name;
+ int where; /* where should I be parsing from? */
+ short int hasbutton;
+ short int haspaste;
+ struct group_item *group;
+ ItemStack *item_stack;
+ struct text_node *arg_node;
+ struct text_node *end_node;
+ struct text_node *begin_node;
+ struct input_window *paste_item;
+} PasteNode;
+
+/* Structure for formatted hypertext */
+
+typedef struct text_node {
+ short type; /* type of node (text, link, etc.) */
+ int x,y, width, height; /* relative location on screen */
+ int space; /* was there space in front of me ? */
+ union {
+ char *text; /* piece of text to display */
+ struct text_node *node; /* argument text */
+ struct if_node *ifnode;
+ } data;
+ HyperLink *link; /* link for active text */
+ union {
+ Pixmap pm; /* pixmap for bit images */
+ XImage *xi; /* pixmap image */
+ } image;
+ struct text_node *next; /* next node in formatted text */
+} TextNode;
+
+/** Structure used to store pixmaps and bitmaps **/
+
+typedef struct image_struct {
+ int width,height; /** It's width and height **/
+ union {
+ Pixmap pm;
+ XImage *xi;
+ } image;
+ char *filename; /** The filename used to reference it **/
+} ImageStruct;
+
+/* Structure for locating HyperDoc pages in a source file */
+
+typedef struct {
+ char *name; /* file name */
+ long pos; /* position in file */
+ int ln; /* the line number */
+} FilePosition;
+
+/*** The structure needed for storing a macro **/
+
+typedef struct macro_store {
+ short int loaded;
+ FilePosition fpos;
+ char *name;
+ char *macro_string;
+ short number_parameters;
+} MacroStore;
+
+
+/** Structure needed for storing a patch **/
+typedef struct patch_store {
+ short int loaded;
+ FilePosition fpos;
+ char *name;
+ char *string;
+} PatchStore;
+
+/* Here are the structures needed for doing input to HyperDoc windows. */
+
+typedef struct line_struct {
+ char *buffer;
+ int changed; /* Has the line changed */
+ int line_number;
+ int buff_pntr;
+ int len;
+ struct line_struct *prev, *next;
+} LineStruct;
+
+typedef struct input_window {
+ char *name; /* symbol name **/
+ int size; /* the length of the window **/
+ int cursor_x; /* x-coordinate for the cursor **/
+ int entered; /* tells me whether I have typed here
+ before */
+ int num_lines; /* number of lines needed to store
+ buffer */
+ LineStruct *lines;
+ LineStruct *curr_line; /* the current line on which the cursor */
+ Window win;
+ struct input_window *next;
+} InputItem;
+
+
+/* structure for storing input boxes **/
+typedef struct input_box {
+ char *name;
+ ImageStruct *selected, *unselected;
+ short int picked;
+ struct input_box *next;
+ struct radio_boxes *rbs;
+ Window win;
+} InputBox;
+
+typedef struct radio_boxes {
+ char *name;
+ InputBox *boxes;
+ ImageStruct *selected, *unselected;
+ int width, height;
+ struct radio_boxes *next;
+} RadioBoxes;
+
+/* Structure for spadcommand dependencies hash table entries */
+typedef struct spadcom_depend {
+ char *label; /* dependency label */
+ TextNode *spadcom; /* spadcommand defining the label */
+ short executed; /* true iff spadcommand has benn executed */
+} SpadcomDepend;
+
+typedef struct button_list {
+ int x0,y0,x1,y1;
+ HyperLink *link;
+ Window win;
+ struct button_list *next;
+} ButtonList;
+
+/* Stucture for unformatted hyper text page */
+
+typedef struct hyperdoc_page {
+ short type; /* Normal, Quitbutton, Upbutton etc. */
+ char *name; /* ID of page */
+ char *filename; /* The name of the file in which the page
+ occurs, Null if not */
+ int scroll_off; /* The offset in the scrolling region */
+ int bot_scroll_margin; /* bottom of the scrolling region */
+ int top_scroll_margin; /* top of the scrolling region */
+ TextNode *title; /* the title of the page */
+ TextNode *header; /* formatted version of page */
+ TextNode *scrolling; /* Top of scrolling region */
+ TextNode *footer; /* top of non-scrolling region at bottom */
+ Sock *sock; /* socket connection for spad buffer */
+ HashTable *fLinkHashTable; /* active link hash table */
+ ButtonList *s_button_list; /* active buttons on page */
+ ButtonList *button_list; /* active buttons on page */
+ HashTable *depend_hash; /* Hash tables of spadcommand dependencies */
+ InputItem *input_list; /* List of input structures */
+ InputItem *current_item; /* a pntr to the currently active item */
+ HashTable *box_hash; /* place where all the boxes are stored */
+ RadioBoxes *radio_boxes; /* a linked list of radio boxes */
+ short page_flags; /* A list of flags for the page */
+ char *helppage; /* the name of the helppage */
+} HyperDocPage;
+
+/* Structure for an unloaded page */
+
+typedef struct unloaded_page {
+ short type; /* indicator of unloaded page */
+ char *name; /* name of page */
+ FilePosition fpos; /* where to find the page */
+} UnloadedPage;
+
+/* Structure for a HyperDoc Window */
+
+typedef struct {
+ Window fMainWindow; /* The main text field window. */
+ Window fScrollWindow; /* The scrolling area of the window */
+ Window fDisplayedWindow; /* The current window of the above two, */
+ /* being filled by display */
+
+ Window fScrollUpWindow; /* Window for scrolling up a line */
+ Window fScrollDownWindow; /* Window for scrolling down a line */
+
+ Window scrollbar; /* the window for scrolling */
+ Window scroller; /* the scroller window */
+
+ Window fTitleBarButton1; /* 1st titlebar bitmap button */
+ Window fTitleBarButton2; /* 2nd titlebar bitmap button */
+ Window fTitleBarButton3; /* 3rd titlebar bitmap button */
+ Window fTitleBarButton4; /* 4th titlebar bitmap button */
+
+ int fScrollerTopPos; /* where the top of the scroller is */
+ int fScrollerHeight; /* the height of the scroller */
+ int fScrollBarHeight; /* the height for the scrollbar */
+
+ int scrollwidth; /* the width of the scrolling area */
+ int scrollheight; /* the height of the scrolling area */
+ int scrollupy; /* Current y position of the scroll up */
+ /* button */
+ int scrolldowny; /* Current y position of the scroll */
+ /* downbutton */
+ int scrollbary; /* Current y position of teh scrollbar */
+ int scrollx; /* X coordinates for all of the above */
+ int border_width; /* Width of the border */
+ HyperDocPage *page; /* currently displayed page */
+ int width, height; /* in pixels */
+ int columns; /* Width in characters, only setable */
+ /* for form pages */
+ HyperDocPage **fMemoStack; /* stack of memo links */
+ HyperDocPage **fDownLinkStack;/* stack of down links */
+
+ int *fDownLinkStackTop; /* stack of down links */
+ int fMemoStackIndex; /* memo stack pointer */
+ int fDownLinkStackIndex; /* downlink stack pointer */
+
+ HashTable *fWindowHashTable; /* hash table of active subwindows */
+ HashTable *fPageHashTable; /* hash table of HyperDoc pages */
+ HashTable *fPasteHashTable; /* hash table for paste in areas */
+ HashTable *fMacroHashTable; /* hash table of HyperDoc macros */
+ HashTable *fCondHashTable; /* hash table for values */
+ HashTable *fPatchHashTable; /* hash table for patch locations */
+
+ int fAxiomFrame; /* Axiom frame number initializing window */
+ GC fStandardGC; /* Graphics context for window */
+ GC fInputGC; /* Graphics context for the input windows */
+ GC fCursorGC; /* Graphics context for the cursors */
+ GC fControlGC; /* Graphics context for the buttons */
+ Cursor fDisplayedCursor; /* The currently displayed cursor */
+} HDWindow;
+
+/* Structure for identifying appropriate link hash tables */
+
+typedef struct {
+ int code; /* code of active area */
+ HyperDocPage *page; /* page for which hash table applies */
+} LinkHashID;
+
+/*** Flags for the page ***/
+
+#define NOLINES 0000001 /* Ibid, for the bottom of the page ***/
+
+
+/* external variables and functions. See the source file for a description
+ of their purposes */
+
+extern HashTable gSessionHashTable; /* hash table of HD windows */
+
+extern HDWindow *gParentWindow; /* the parent window. The one that
+ * appears when you first start HD */
+
+extern HyperLink *quitLink; /** a special link to the protected quit page **/
+
+
+#ifndef HTADD
+/* From hyper.c */
+extern int gXScreenNumber;
+extern Display *gXDisplay;
+extern int gSwitch_to_mono;
+extern unsigned long * spadColors;
+extern int gIsEndOfOutput;
+extern HDWindow *gWindow;
+extern Sock *session_server;
+extern Sock *spad_socket;
+extern HashTable gFileHashTable;
+extern HashTable gImageHashTable; /* A global hash table for images */
+extern Cursor gNormalCursor; /* The normal mouse cursor */
+extern Cursor gActiveCursor; /* The cursor in active regions */
+extern Cursor gBusyCursor; /* The clock cursor for when I am busy */
+extern int gIsAxiomServer; /* true iff HyperDoc is acting as an Axiom server */
+extern int gArgc; /* original argc from main */
+extern char **gArgv; /* original argv from main */
+/* from lex.c */
+extern long fpos, keyword_fpos;
+extern Token token;
+extern int last_token, input_type, last_ch;
+extern char *input_string;
+extern FILE *cfile;
+/* from input.c */
+extern XImage *picked;
+extern int picked_height;
+extern int picked_width;
+extern XImage *unpicked;
+extern int unpicked_height;
+extern int unpicked_width;
+/* from display.c */
+extern int line_height;
+extern int need_scroll_up_button;
+extern int scrolling;
+extern int need_scroll_down_button;
+extern int space_width;
+#endif
+
+/* Here are some of the functions and constants declared and needed in
+ htadd.c ******/
+
+#define NoChar -9999
+#define temp_dir "/tmp/"
+#define db_file_name "ht.db"
+#define def_spad "/usr/local/axiom"
+
+
+/* Types of HyperDoc pages */
+
+#define UlUnknownPage 9993 /*I hate this hack, but I have to know whether*/
+#define UnknownPage 9994 /*this page has been loaded or not. */
+#define ErrorPage 9995
+#define Unixfd 9996
+#define SpadGen 9997
+#define Normal 9998
+#define UnloadedPageType 9999
+
+/* Commands from Axiom */
+
+#define EndOfPage 99
+#define SendLine 98
+#define StartPage 97 /* A normal HyperDoc page */
+#define LinkToPage 96
+#define PopUpPage 95 /* A pop-up page */
+#define PopUpNamedPage 94
+#define KillPage 93
+#define ReplacePage 92
+#define ReplaceNamedPage 91
+#define SpadError 90
+
+/* Constants declaring size of page stacks */
+
+#define MaxMemoDepth 25 /* max nesting level for memolinks */
+#define MaxDownlinkDepth 50 /* max downlink nesting depth */
+
+/* Constants defining the size of various hash tables */
+
+#define PageHashSize 1000
+#define FileHashSize 30
+#define SessionHashSize 10
+#define MacroHashSize 100
+#define ImageHashSize 100
+#define CondHashSize 100
+#define BoxHashSize 20
+#define PasteHashSize 100
+#define PatchHashSize 100
+
+/* A couple of macros for memo and down links */
+
+#define need_up_button \
+ (gWindow->fMemoStackIndex ? gWindow->fDownLinkStackIndex >= \
+ gWindow->fDownLinkStackTop[gWindow->fMemoStackIndex-1] \
+ : gWindow->fDownLinkStackIndex)
+
+#define need_return_button (gWindow->fMemoStackIndex)
+
+#define need_help_button (gWindow->page->helppage != NULL)
+
+#define max(x,y) ((x) > (y) ? (x) : (y))
+
+
+#define pick_box(box) fill_box(box->win, box->selected)
+#define unpick_box(box) fill_box(box->win, box->unselected)
+
+#define TopLevelHelpPage "ugHyperPage"
+#define NoMoreHelpPage "NoMoreHelpPage"
+#define KeyDefsHelpPage "ugHyperKeysPage"
+#define InputAreaHelpPage "ugHyperInputPage"
+
+/* definitions for connecting to the Axiom server */
+
+#define Connected 0
+#define NotConnected 1
+#define SpadBusy 2
+
+/* some GUI-dependent stuff */
+
+#define BeepAtTheUser() /* (XBell(gXDisplay, 5)) */
+#define LoudBeepAtTheUser() /* (XBell(gXDisplay, 50)) */
+
+
+/*** default fonts ***/
+
+#if defined(RTplatform) || defined(PS2platform) || defined(RIOSplatform) || defined(AIX370platform)
+#define RmFontDefault "Rom14"
+#define TtFontDefault "Erg14"
+#define ActiveFontDefault "Bld14"
+#define AxiomFontDefault "Erg14"
+#define EmphasizeFontDefault "Itl14"
+#define BoldFontDefault "Bld14"
+#endif
+
+#if defined(SUNplatform) || defined (SUN4OS5platform) || defined(SGIplatform) || defined (HP9platform) || defined(HP10platform) || defined (ALPHAplatform) || defined(LINUXplatform) || defined(MACOSXplatform) || defined(BSDplatform)
+#define RmFontDefault "-adobe-courier-medium-r-normal--18-*-*-*-m-*-iso8859-1"
+#define TtFontDefault "-adobe-courier-medium-r-normal--18-*-*-*-m-*-iso8859-1"
+#define ActiveFontDefault "-adobe-courier-bold-r-normal--18-*-*-*-m-*-iso8859-1"
+#define AxiomFontDefault "-adobe-courier-bold-o-normal--18-*-*-*-m-*-iso8859-1"
+#define EmphasizeFontDefault "-adobe-courier-medium-o-normal--18-*-*-*-m-*-iso8859-1"
+#define BoldFontDefault "-adobe-courier-bold-r-normal--18-*-*-*-m-*-iso8859-1"
+#endif
+
+
+
+
+
+
+typedef struct group_item {
+ int cur_color;
+ XFontStruct *cur_font;
+ int center;
+ struct group_item *next;
+} GroupItem;
+
+
+extern GroupItem *gTopOfGroupStack;
+
+
+typedef struct cond_node {
+ char *label;
+ char *cond;
+} CondNode;
+
+typedef struct parameter_list_type {
+ char **list; /** The parameters in string form **/
+ short number; /** How many parameters are there **/
+ struct parameter_list_type *next;
+} *ParameterList;
+
+#endif
diff --git a/src/hyper/hyper.pamphlet b/src/hyper/hyper.pamphlet
deleted file mode 100644
index 8f514af8..00000000
--- a/src/hyper/hyper.pamphlet
+++ /dev/null
@@ -1,1079 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/hyper}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{hyper.h}
-The [[hypertex]] function, of which this is the top level, is a browser
-for Axiom information. It works off a database of pages. The pages are
-stored in the [[$AXIOM/share/hypertex/pages]] subdirectory and there is
-a key file called [[ht.db]] in that subdirectory which contains
-critical information about each page. If you add or delete pages you
-must rerun the [[htadd]] command.
-(See the [[htadd]] command in [[src/hyper/htadd.pamphlet]].)
-
-Generally, if you add or delete pages you can recreate a proper
-[[pages/ht.db]] file by doing:
-\begin{verbatim}
-cd $AXIOM/share/hypertex
-htadd -f pages -n pages/*
-\end{verbatim}
-
-
-The [[hypertex]] function looks in [[$AXIOM/share/hypertex/pages]] by
-default. This can be over-ridden by setting the [[HTPATH]] shell
-variable to point to the desired directory containing the pages and
-the ht.db file.
-<<hyper.h>>=
-<<license>>
-#ifndef _HYPER_H_
-#define _HYPER_H_ 1
-
-#include "axiom-c-macros.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <limits.h>
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xos.h>
-
-#include "com.h"
-#include "token.h"
-#include "hash.h"
-
-#define boolean unsigned short int
-
-#ifndef TRUE
-#define TRUE ((boolean) 0x1)
-#endif
-#ifndef FALSE
-#define FALSE ((boolean) 0x0)
-#endif
-
-/* Struct forward declarations */
-
-struct text_node;
-struct input_box;
-struct input_window;
-struct paste_node;
-struct radio_boxes;
-struct group_item;
-
-#define Scrollupbutton 1
-#define Scrolldownbutton 2
-#define Noopbutton 6
-
-#define Scrolling 1
-#define Header 2
-#define Footer 3
-#define Title 4
-
-#ifndef HTADD
-extern int MenuServerOpened;
-
-/* These are all the colors one can use in HyperDoc. */
-
-extern int gActiveColor,
- gAxiomColor,
- gBackgroundColor,
- gBfColor,
- gControlBackgroundColor,
- gControlForegroundColor,
- gEmColor,
- gInputBackgroundColor,
- gInputForegroundColor,
- gItColor,
- gRmColor,
- gSlColor,
- gTtColor;
-
-/* These are all the different fonts one can use in HyperDoc. */
-
-extern XFontStruct *gActiveFont,
- *gAxiomFont,
- *gBfFont,
- *gEmFont,
- *gInputFont,
- *gItFont,
- *gRmFont,
- *gSlFont,
- *gTitleFont,
- *gTtFont;
-
-
-#endif
-
-
-/** I am implementing a state node stack, this is the structure I store **/
-
-typedef struct state_node {
- int last_ch, last_token, input_type;
- long fpos, keyword_fpos;
- long page_start_fpos;
- Token token;
- char *input_string;
- FILE *cfile;
- int keyword;
- struct state_node *next;
-} StateNode;
-
-#ifndef HTADD
-/** pointer to the top of the state node graph **/
-extern StateNode *top_state_node;
-#endif
-
-
-/* structure for a hyper text link */
-typedef struct hyper_link {
- int type; /* Memolink, Spadlink, Downlink etc. */
- Window win; /* X11 window containing active area */
- union {
- struct text_node *node; /* ID of link to which link refers */
- struct input_box *box;
- struct input_window *string;
- struct paste_node *paste; /* the paste node area */
- } reference;
- int x,y; /* relative position inside page */
-} HyperLink;
-
-
-typedef struct if_node {
- struct text_node *cond; /* the condition nodes*/
- struct text_node *thennode;
- struct text_node *elsenode;
-} IfNode;
-
-typedef struct item_stack {
- int indent;
- int item_indent;
- int in_item;
- struct item_stack *next;
-} ItemStack;
-
-typedef struct paste_node {
- char *name;
- int where; /* where should I be parsing from? */
- short int hasbutton;
- short int haspaste;
- struct group_item *group;
- ItemStack *item_stack;
- struct text_node *arg_node;
- struct text_node *end_node;
- struct text_node *begin_node;
- struct input_window *paste_item;
-} PasteNode;
-
-/* Structure for formatted hypertext */
-
-typedef struct text_node {
- short type; /* type of node (text, link, etc.) */
- int x,y, width, height; /* relative location on screen */
- int space; /* was there space in front of me ? */
- union {
- char *text; /* piece of text to display */
- struct text_node *node; /* argument text */
- struct if_node *ifnode;
- } data;
- HyperLink *link; /* link for active text */
- union {
- Pixmap pm; /* pixmap for bit images */
- XImage *xi; /* pixmap image */
- } image;
- struct text_node *next; /* next node in formatted text */
-} TextNode;
-
-/** Structure used to store pixmaps and bitmaps **/
-
-typedef struct image_struct {
- int width,height; /** It's width and height **/
- union {
- Pixmap pm;
- XImage *xi;
- } image;
- char *filename; /** The filename used to reference it **/
-} ImageStruct;
-
-/* Structure for locating HyperDoc pages in a source file */
-
-typedef struct {
- char *name; /* file name */
- long pos; /* position in file */
- int ln; /* the line number */
-} FilePosition;
-
-/*** The structure needed for storing a macro **/
-
-typedef struct macro_store {
- short int loaded;
- FilePosition fpos;
- char *name;
- char *macro_string;
- short number_parameters;
-} MacroStore;
-
-
-/** Structure needed for storing a patch **/
-typedef struct patch_store {
- short int loaded;
- FilePosition fpos;
- char *name;
- char *string;
-} PatchStore;
-
-/* Here are the structures needed for doing input to HyperDoc windows. */
-
-typedef struct line_struct {
- char *buffer;
- int changed; /* Has the line changed */
- int line_number;
- int buff_pntr;
- int len;
- struct line_struct *prev, *next;
-} LineStruct;
-
-typedef struct input_window {
- char *name; /* symbol name **/
- int size; /* the length of the window **/
- int cursor_x; /* x-coordinate for the cursor **/
- int entered; /* tells me whether I have typed here
- before */
- int num_lines; /* number of lines needed to store
- buffer */
- LineStruct *lines;
- LineStruct *curr_line; /* the current line on which the cursor */
- Window win;
- struct input_window *next;
-} InputItem;
-
-
-/* structure for storing input boxes **/
-typedef struct input_box {
- char *name;
- ImageStruct *selected, *unselected;
- short int picked;
- struct input_box *next;
- struct radio_boxes *rbs;
- Window win;
-} InputBox;
-
-typedef struct radio_boxes {
- char *name;
- InputBox *boxes;
- ImageStruct *selected, *unselected;
- int width, height;
- struct radio_boxes *next;
-} RadioBoxes;
-
-/* Structure for spadcommand dependencies hash table entries */
-typedef struct spadcom_depend {
- char *label; /* dependency label */
- TextNode *spadcom; /* spadcommand defining the label */
- short executed; /* true iff spadcommand has benn executed */
-} SpadcomDepend;
-
-typedef struct button_list {
- int x0,y0,x1,y1;
- HyperLink *link;
- Window win;
- struct button_list *next;
-} ButtonList;
-
-/* Stucture for unformatted hyper text page */
-
-typedef struct hyperdoc_page {
- short type; /* Normal, Quitbutton, Upbutton etc. */
- char *name; /* ID of page */
- char *filename; /* The name of the file in which the page
- occurs, Null if not */
- int scroll_off; /* The offset in the scrolling region */
- int bot_scroll_margin; /* bottom of the scrolling region */
- int top_scroll_margin; /* top of the scrolling region */
- TextNode *title; /* the title of the page */
- TextNode *header; /* formatted version of page */
- TextNode *scrolling; /* Top of scrolling region */
- TextNode *footer; /* top of non-scrolling region at bottom */
- Sock *sock; /* socket connection for spad buffer */
- HashTable *fLinkHashTable; /* active link hash table */
- ButtonList *s_button_list; /* active buttons on page */
- ButtonList *button_list; /* active buttons on page */
- HashTable *depend_hash; /* Hash tables of spadcommand dependencies */
- InputItem *input_list; /* List of input structures */
- InputItem *current_item; /* a pntr to the currently active item */
- HashTable *box_hash; /* place where all the boxes are stored */
- RadioBoxes *radio_boxes; /* a linked list of radio boxes */
- short page_flags; /* A list of flags for the page */
- char *helppage; /* the name of the helppage */
-} HyperDocPage;
-
-/* Structure for an unloaded page */
-
-typedef struct unloaded_page {
- short type; /* indicator of unloaded page */
- char *name; /* name of page */
- FilePosition fpos; /* where to find the page */
-} UnloadedPage;
-
-/* Structure for a HyperDoc Window */
-
-typedef struct {
- Window fMainWindow; /* The main text field window. */
- Window fScrollWindow; /* The scrolling area of the window */
- Window fDisplayedWindow; /* The current window of the above two, */
- /* being filled by display */
-
- Window fScrollUpWindow; /* Window for scrolling up a line */
- Window fScrollDownWindow; /* Window for scrolling down a line */
-
- Window scrollbar; /* the window for scrolling */
- Window scroller; /* the scroller window */
-
- Window fTitleBarButton1; /* 1st titlebar bitmap button */
- Window fTitleBarButton2; /* 2nd titlebar bitmap button */
- Window fTitleBarButton3; /* 3rd titlebar bitmap button */
- Window fTitleBarButton4; /* 4th titlebar bitmap button */
-
- int fScrollerTopPos; /* where the top of the scroller is */
- int fScrollerHeight; /* the height of the scroller */
- int fScrollBarHeight; /* the height for the scrollbar */
-
- int scrollwidth; /* the width of the scrolling area */
- int scrollheight; /* the height of the scrolling area */
- int scrollupy; /* Current y position of the scroll up */
- /* button */
- int scrolldowny; /* Current y position of the scroll */
- /* downbutton */
- int scrollbary; /* Current y position of teh scrollbar */
- int scrollx; /* X coordinates for all of the above */
- int border_width; /* Width of the border */
- HyperDocPage *page; /* currently displayed page */
- int width, height; /* in pixels */
- int columns; /* Width in characters, only setable */
- /* for form pages */
- HyperDocPage **fMemoStack; /* stack of memo links */
- HyperDocPage **fDownLinkStack;/* stack of down links */
-
- int *fDownLinkStackTop; /* stack of down links */
- int fMemoStackIndex; /* memo stack pointer */
- int fDownLinkStackIndex; /* downlink stack pointer */
-
- HashTable *fWindowHashTable; /* hash table of active subwindows */
- HashTable *fPageHashTable; /* hash table of HyperDoc pages */
- HashTable *fPasteHashTable; /* hash table for paste in areas */
- HashTable *fMacroHashTable; /* hash table of HyperDoc macros */
- HashTable *fCondHashTable; /* hash table for values */
- HashTable *fPatchHashTable; /* hash table for patch locations */
-
- int fAxiomFrame; /* Axiom frame number initializing window */
- GC fStandardGC; /* Graphics context for window */
- GC fInputGC; /* Graphics context for the input windows */
- GC fCursorGC; /* Graphics context for the cursors */
- GC fControlGC; /* Graphics context for the buttons */
- Cursor fDisplayedCursor; /* The currently displayed cursor */
-} HDWindow;
-
-/* Structure for identifying appropriate link hash tables */
-
-typedef struct {
- int code; /* code of active area */
- HyperDocPage *page; /* page for which hash table applies */
-} LinkHashID;
-
-/*** Flags for the page ***/
-
-#define NOLINES 0000001 /* Ibid, for the bottom of the page ***/
-
-
-/* external variables and functions. See the source file for a description
- of their purposes */
-
-extern HashTable gSessionHashTable; /* hash table of HD windows */
-
-extern HDWindow *gParentWindow; /* the parent window. The one that
- * appears when you first start HD */
-
-extern HyperLink *quitLink; /** a special link to the protected quit page **/
-
-
-#ifndef HTADD
-/* From hyper.c */
-extern int gXScreenNumber;
-extern Display *gXDisplay;
-extern int gSwitch_to_mono;
-extern unsigned long * spadColors;
-extern int gIsEndOfOutput;
-extern HDWindow *gWindow;
-extern Sock *session_server;
-extern Sock *spad_socket;
-extern HashTable gFileHashTable;
-extern HashTable gImageHashTable; /* A global hash table for images */
-extern Cursor gNormalCursor; /* The normal mouse cursor */
-extern Cursor gActiveCursor; /* The cursor in active regions */
-extern Cursor gBusyCursor; /* The clock cursor for when I am busy */
-extern int gIsAxiomServer; /* true iff HyperDoc is acting as an Axiom server */
-extern int gArgc; /* original argc from main */
-extern char **gArgv; /* original argv from main */
-/* from lex.c */
-extern long fpos, keyword_fpos;
-extern Token token;
-extern int last_token, input_type, last_ch;
-extern char *input_string;
-extern FILE *cfile;
-/* from input.c */
-extern XImage *picked;
-extern int picked_height;
-extern int picked_width;
-extern XImage *unpicked;
-extern int unpicked_height;
-extern int unpicked_width;
-/* from display.c */
-extern int line_height;
-extern int need_scroll_up_button;
-extern int scrolling;
-extern int need_scroll_down_button;
-extern int space_width;
-#endif
-
-/* Here are some of the functions and constants declared and needed in
- htadd.c ******/
-
-#define NoChar -9999
-#define temp_dir "/tmp/"
-#define db_file_name "ht.db"
-#define def_spad "/usr/local/axiom"
-
-
-/* Types of HyperDoc pages */
-
-#define UlUnknownPage 9993 /*I hate this hack, but I have to know whether*/
-#define UnknownPage 9994 /*this page has been loaded or not. */
-#define ErrorPage 9995
-#define Unixfd 9996
-#define SpadGen 9997
-#define Normal 9998
-#define UnloadedPageType 9999
-
-/* Commands from Axiom */
-
-#define EndOfPage 99
-#define SendLine 98
-#define StartPage 97 /* A normal HyperDoc page */
-#define LinkToPage 96
-#define PopUpPage 95 /* A pop-up page */
-#define PopUpNamedPage 94
-#define KillPage 93
-#define ReplacePage 92
-#define ReplaceNamedPage 91
-#define SpadError 90
-
-/* Constants declaring size of page stacks */
-
-#define MaxMemoDepth 25 /* max nesting level for memolinks */
-#define MaxDownlinkDepth 50 /* max downlink nesting depth */
-
-/* Constants defining the size of various hash tables */
-
-#define PageHashSize 1000
-#define FileHashSize 30
-#define SessionHashSize 10
-#define MacroHashSize 100
-#define ImageHashSize 100
-#define CondHashSize 100
-#define BoxHashSize 20
-#define PasteHashSize 100
-#define PatchHashSize 100
-
-/* A couple of macros for memo and down links */
-
-#define need_up_button \
- (gWindow->fMemoStackIndex ? gWindow->fDownLinkStackIndex >= \
- gWindow->fDownLinkStackTop[gWindow->fMemoStackIndex-1] \
- : gWindow->fDownLinkStackIndex)
-
-#define need_return_button (gWindow->fMemoStackIndex)
-
-#define need_help_button (gWindow->page->helppage != NULL)
-
-#define max(x,y) ((x) > (y) ? (x) : (y))
-
-
-#define pick_box(box) fill_box(box->win, box->selected)
-#define unpick_box(box) fill_box(box->win, box->unselected)
-
-#define TopLevelHelpPage "ugHyperPage"
-#define NoMoreHelpPage "NoMoreHelpPage"
-#define KeyDefsHelpPage "ugHyperKeysPage"
-#define InputAreaHelpPage "ugHyperInputPage"
-
-/* definitions for connecting to the Axiom server */
-
-#define Connected 0
-#define NotConnected 1
-#define SpadBusy 2
-
-/* some GUI-dependent stuff */
-
-#define BeepAtTheUser() /* (XBell(gXDisplay, 5)) */
-#define LoudBeepAtTheUser() /* (XBell(gXDisplay, 50)) */
-
-
-/*** default fonts ***/
-
-#if defined(RTplatform) || defined(PS2platform) || defined(RIOSplatform) || defined(AIX370platform)
-#define RmFontDefault "Rom14"
-#define TtFontDefault "Erg14"
-#define ActiveFontDefault "Bld14"
-#define AxiomFontDefault "Erg14"
-#define EmphasizeFontDefault "Itl14"
-#define BoldFontDefault "Bld14"
-#endif
-
-#if defined(SUNplatform) || defined (SUN4OS5platform) || defined(SGIplatform) || defined (HP9platform) || defined(HP10platform) || defined (ALPHAplatform) || defined(LINUXplatform) || defined(MACOSXplatform) || defined(BSDplatform)
-#define RmFontDefault "-adobe-courier-medium-r-normal--18-*-*-*-m-*-iso8859-1"
-#define TtFontDefault "-adobe-courier-medium-r-normal--18-*-*-*-m-*-iso8859-1"
-#define ActiveFontDefault "-adobe-courier-bold-r-normal--18-*-*-*-m-*-iso8859-1"
-#define AxiomFontDefault "-adobe-courier-bold-o-normal--18-*-*-*-m-*-iso8859-1"
-#define EmphasizeFontDefault "-adobe-courier-medium-o-normal--18-*-*-*-m-*-iso8859-1"
-#define BoldFontDefault "-adobe-courier-bold-r-normal--18-*-*-*-m-*-iso8859-1"
-#endif
-
-
-
-
-
-
-typedef struct group_item {
- int cur_color;
- XFontStruct *cur_font;
- int center;
- struct group_item *next;
-} GroupItem;
-
-
-extern GroupItem *gTopOfGroupStack;
-
-
-typedef struct cond_node {
- char *label;
- char *cond;
-} CondNode;
-
-typedef struct parameter_list_type {
- char **list; /** The parameters in string form **/
- short number; /** How many parameters are there **/
- struct parameter_list_type *next;
-} *ParameterList;
-
-#endif
-@
-\section{hyper.c}
-<<hyper.c>>=
-/*
- * This is the main module of the HyperDoc program. It contains the main
- * routine which initializes all the X stuff, and the tables. Then it passes
- * control over to the main event loop.
- */
-
-/* #define DEBUG 1 */
-
-/* Include all the needed include files */
-#define _HYPER_C
-#include "useproto.h"
-#include "debug.h"
-
-
-#include "hyper.h"
-
-#include <sys/signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <setjmp.h>
-#include <X11/cursorfont.h>
-
-#include "keyin.h"
-#include "initx.h"
-#include "event.h"
-#include "parse-aux.h"
-#include "bsdsignal.h"
-
-#include "all_hyper_proto.H1"
-#include "sockio-c.H1"
-#include "bsdsignal.H1"
-/*
- * Here is a flag used to tell me whether I made a good connection to the
- * menu server. Needed so I don't send spad commands when I should not
- */
-
-int MenuServerOpened = 1;
-
-/* include icon bitmap data */
-
-#define BITMAPDEPTH 1
-
-/* X11 display and screen variables */
-
-Display *gXDisplay;
-int gXScreenNumber;
-
-/*
- * Information about the top level HyperDoc window
- */
-
-HDWindow *gWindow = NULL; /* the current window */
-HDWindow *gParentWindow =NULL; /* the parent window. The one that appears
- * when you first start HyperDoc */
-
-HashTable gSessionHashTable; /* hash table of HD windows */
-HashTable init_page_hash; /* initial hash table of HD pages */
-HashTable init_macro_hash; /* initial hash table of HD macros */
-HashTable init_patch_hash; /* initial hash table of HD patches */
-
-/* The various Cursors we use */
-
-Cursor gNormalCursor; /* The normal mouse cursor */
-Cursor gActiveCursor; /* The cursor in active regions */
-Cursor gBusyCursor; /* The clock cursor for when I am busy */
-
-
-HashTable gFileHashTable; /* hash table of HyperDoc files */
-HashTable gImageHashTable; /* hash table for images */
-
-
-/* Some things needed for Handling interupts properly */
-
-int gIsEndOfOutput; /* set to true when spad has finished output */
-int received_window_request = 0;/* true iff Spad wants a pop-up */
-int in_next_event = 0; /* true when in XNextEvent */
-int make_input_file = 0; /* true when making input files from ht */
-int make_patch_files = 0; /* true when making patch files from ht */
-int gmake_record_file= 0; /* true when making record files from ht */
-int gverify_record_file = 0; /* true when verifying record files from ht */
-int gverify_dates = 0; /* true when we want hypertex to verify ht.db dates */
-
-Sock *session_server; /* socket connecting to session manager */
-
-int gIsAxiomServer = 0; /* true iff HyperDoc is acting as a */
- /* an Axiom server */
-
-int kill_spad = 0; /* kill spad when finished with paste file */
-
-int gSwitch_to_mono=0; /* will be set to 1 if at any time we don't have
- enough colours for the images. We will know this
- when read_pixmap_file returns -1. We will use this
- when deciding what to do in case of \inputimage */
-
-int gTtFontIs850=0; /* a flag that tells us if the Tt font is a IBM pagecode 850
- font and hence supports the graphics chars
- set when the TtFont is opened*/
-
-/*
- * Global copies of the command line arguments, so they never have to be
- * passed as parameters. This is also so any child process starting up also
- * has the same values.
- */
-
-int gArgc;
-char **gArgv;
-
-char **input_file_list;
-int input_file_count;
-
-/*
- * SIGUSR2 is raised by the spadbuf program when it is done with the current
- * command
- */
-
-void
-sigusr2_handler(int sig)
-{
- gIsEndOfOutput = 1;
- return ;
-}
-
-void
-sigcld_handler(int sig)
-{
-
- /* why were we waiting after the child had already died ??
- because we don't want zombies */
-
- int x;
- wait(&x);
-
-}
-
-extern jmp_buf env;
-
-
-/* Clean up spad sockets on exit */
-void
-clean_socket(void )
-{
- char name[256];
-
- make_server_name(name, MenuServerName);
- unlink(name);
-}
-
-/*
- * initialize hash tables, signal handlers and windows, then call the main
- * event handling loop
- */
-
-int
-main(int argc, char **argv)
-{
- int ret_status;
-
- /* Initialize some global values */
-/* fprintf(stderr,"hyper:main:entered\n");*/
- gArgc = argc;
- gArgv = argv;
- gIsEndOfOutput = 1;
-
-/* fprintf(stderr,"hyper:main:calling check_arguments\n");*/
- check_arguments();
-/* fprintf(stderr,"hyper:main:returned check_arguments\n");*/
-
- /*
- * initialize the hash tables for the files and the windows and images
- */
-/* fprintf(stderr,"hyper:main:calling init_hash\n");*/
- init_hash();
-/* fprintf(stderr,"hyper:main:returned init_hash\n");*/
-
- /*
- * initialize the parser keyword hash table
- */
-/* fprintf(stderr,"hyper:main:calling parser_init\n");*/
- parser_init();
-/* fprintf(stderr,"hyper:main:returned parser_init\n");*/
-
-/* fprintf(stderr,"hyper:main:calling read_ht_db\n");*/
- read_ht_db(&init_page_hash, &init_macro_hash, &init_patch_hash);
-/* fprintf(stderr,"hyper:main:returned read_ht_db\n");*/
-
- /*
- * Now initialize x. This includes opening the display, setting the
- * screen and display global values, and also gets all the fonts and
- * colors we will need.
- */
-
- if (!make_input_file && !gmake_record_file && !gverify_record_file) {
-/* fprintf(stderr,"hyper:main:calling initializeWindowSystem\n");*/
- initializeWindowSystem();
-/* fprintf(stderr,"hyper:main:returned initializeWindowSystem\n");*/
-
- /*
- * Initialize some of the global values used by the input string
- * routines
- */
-/* fprintf(stderr,"hyper:main:calling init_keyin\n");*/
- init_keyin();
-/* fprintf(stderr,"hyper:main:returned init_keyin\n");*/
-
- /*
- * regardless of what else happened, we should always pop up an
- * initial window.
- */
-
-/* fprintf(stderr,"hyper:main:calling init_top_window\n");*/
- ret_status = init_top_window("RootPage");
-/* fprintf(stderr,"hyper:main:returned init_top_window\n");*/
- gParentWindow = gWindow;
- if (ret_status == -1) {
- fprintf(stderr,
- "(HyperDoc) Could not find RootPage for top-level window.\n");
- exit(-1);
- }
-
- /*
- * Tell it how to handle the user defined signals I may get
- */
- bsdSignal(SIGUSR2, sigusr2_handler,RestartSystemCalls);
- bsdSignal(SIGUSR1, SIG_IGN,RestartSystemCalls);
-#if defined(BSDplatform) || defined(MACOSXplatform)
- bsdSignal(SIGCHLD, sigcld_handler,RestartSystemCalls);
-#else
- bsdSignal(SIGCLD, sigcld_handler,RestartSystemCalls);
-#endif
- bsdSignal(SIGINT, SIG_IGN,RestartSystemCalls);
-
- /*
- * Now go to the main event loop. I will never return, so just end
- * the main routine after that
- */
-
- /*
- * make an input file if requested
- */
- }
- else {
-
- /*
- * Try to establish all the socket connections I need. If I am an
- * gIsAxiomServer and the routine fails, it will exit for me
- */
-/* fprintf(stderr,"hyper:main:in else case\n");*/
-/* fprintf(stderr,"hyper:main:calling make_server_connections\n");*/
- make_server_connections();
-/* fprintf(stderr,"hyper:main:returned make_server_connections\n");*/
-
-
- if (make_input_file) ht2_input();
- if (gmake_record_file) make_record();
- if (gverify_record_file) verify_record();
- exit(0);
- }
-
- /*
- * Try to establish all the socket connections I need. If I am an
- * gIsAxiomServer and the routine fails, it will exit for me
- */
-/* fprintf(stderr,"hyper:main:calling make_server_connections\n");*/
- make_server_connections();
-/* fprintf(stderr,"hyper:main:returned make_server_connections\n");*/
-
-
-/* fprintf(stderr,"hyper:main:calling mainEventLoop\n");*/
- mainEventLoop();
-/* fprintf(stderr,"hyper:main:returned mainEventLoop\n");*/
-
- return 0;
-}
-
-/*
- * Initializes the hash table for Files, and Windows
- */
-
-static void
-init_hash(void)
-{
- hash_init(&gFileHashTable,
- FileHashSize,
- (EqualFunction)string_equal,
- (HashcodeFunction) string_hash);
- hash_init(&gSessionHashTable,
- SessionHashSize,
- (EqualFunction) window_equal,
- (HashcodeFunction) window_code);
- hash_init(&gImageHashTable,
- ImageHashSize,
- (EqualFunction) string_equal,
- (HashcodeFunction) string_hash);
-}
-
-/* initialize the HyperDoc page hierarchy data structures */
-
-void
-init_page_structs(HDWindow *w)
-{
- int i;
-
- w->fMemoStackIndex = 0;
- for (i = 0; i < MaxMemoDepth; i++) {
- w->fMemoStack[i] = NULL;
- w->fDownLinkStackTop[i] = 0;
- }
- w->fDownLinkStackIndex = 0;
- for (i = 0; i < MaxDownlinkDepth; i++)
- w->fDownLinkStack[i] = NULL;
-}
-
-static void
-check_arguments(void)
-{
- int i;
-
- /*
- * Now check the command line arguments, to see if I am supposed to be a
- * server or not
- */
- for (i = 1; i < gArgc; i++) {
- if (gArgv[i][0] == '-')
- switch (gArgv[i][1]) {
- case 'p':
- gverify_dates=1;
- break;
- case 's':
- if (!MenuServerOpened) {
- fprintf(stderr, "(HyperDoc) Server already in use.\n");
- exit(-1);
- }
- gIsAxiomServer = 1;
- break;
- case 'i':
- if (gArgv[i][2] == 'p')
- make_patch_files = 1;
- make_input_file = 1;
- input_file_list = gArgv + i + 1;
- input_file_count = gArgc - i - 1;
- break;
- case 'k':
- kill_spad = 1;
- break;
- case 'r':
- if (gArgv[i][2] == 'm')
- gmake_record_file=1;
- else if (gArgv[i][2] == 'v')
- gverify_record_file=1;
- else
- fprintf(stderr, "(HyperDoc) v or m must follow -r\n");
- input_file_list = gArgv + i + 1;
- input_file_count = gArgc - i - 1;
- break;
- default:
- fprintf(stderr, "(HyperDoc) Unexpected Command Line Argument %s\n", gArgv[i]);
- fprintf(stderr, " Usage: hypertex [-s]\n");
- break;
- }
- }
-}
-
-static void
-make_server_connections(void)
-{
- int i, wait_time;
-
- /*
- * Try to open the menuserver socket, if I can not, then set a flag
- */
-
- if (open_server(MenuServerName) == -2) {
- fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM Server!\n");
- MenuServerOpened = 0;
- } else {
- atexit(&clean_socket);
- MenuServerOpened = 1;
- }
-
-
- /*
- * If I have opened the MenuServer socket, then I should also try to open
- * the SpadServer socket, so I can send stuff right to SPAD.
- */
-
- if (MenuServerOpened) {
-
- /*
- * If I am a ht server, then I should not continue on unless I
- * establish some sort of connection
- */
-
- /*
- * Modified on 11/20 so that it prints an error message every ten for
- * ten tries at opeing the socket. If it fails all ten times, it
- * gives up and exits.
- */
-
- if (!gIsAxiomServer)
- wait_time = 2;
- else
- wait_time = 1000;
-
- for (i = 0, spad_socket = NULL; i < 2 && spad_socket == NULL; i++) {
- spad_socket = connect_to_local_server(SpadServer,
- MenuServer, wait_time);
- if (gIsAxiomServer && spad_socket == NULL)
- fprintf(stderr, "(HyperDoc) Error opening AXIOM server. Retrying ...\n");
- else
- i = 11;
- }
- if (! spad_socket) {
- fprintf(stderr, "(HyperDoc) Couldn't connect to AXIOM server!\n");
- if (!gIsAxiomServer)
- MenuServerOpened = 0;
- else {
- fprintf(stderr, "(HyperDoc) Couldn't connect to AXIOM server!\n");
- exit(-1);
- }
- }
- else {
-
- /*
- * Do the same thing for the SessionServer
- */
-
- for (i = 0, session_server = NULL; i < 2 && session_server == NULL
- ; i++) {
- session_server =
- connect_to_local_server(SessionServer, MenuServer,
- wait_time);
- if (gIsAxiomServer && session_server == NULL) {
- fprintf(stderr,
- "(HyperDoc) Error opening SessionServer, Retrying ...\n");
- }
- else
- i = 11;
- }
- if (session_server == NULL) {
- fprintf(stderr, "(HyperDoc) Connection attempt to session manager timed out.\n");
- if (gIsAxiomServer) {
- fprintf(stderr,
- "(HyperDoc) Server unable to connect to session server\n");
- exit(-1);
- }
- else {
- MenuServerOpened = 0;
- }
- }
- }
- }
-}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<hyper.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/initx.pamphlet b/src/hyper/initx.c
index 1efef762..b2f85e59 100644
--- a/src/hyper/initx.pamphlet
+++ b/src/hyper/initx.c
@@ -1,28 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/initx}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{initx.h}
-<<initx.h>>=
-<<license>>
-#ifndef _INITX_H_
-#define _INITX_H_ 1
-
-#include "hyper.h"
-
-extern int gBorderColor;
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{initx.c}
-<<initx.c>>=
/****************************************************************
*
* initx.h: HyperDoc X Window window initialization code
@@ -54,7 +64,7 @@ extern int gethostname(char *, int );
#include "ht_icon"
#include "extent.h"
#include "group.h"
-#include "mem.h"
+#include "hyper.h"
#include "scrollbar.h"
#include "titlebar.h"
@@ -1006,53 +1016,3 @@ is_it_850(XFontStruct *fontarg)
return(0);
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<initx.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/initx.h b/src/hyper/initx.h
new file mode 100644
index 00000000..7533fe78
--- /dev/null
+++ b/src/hyper/initx.h
@@ -0,0 +1,43 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _INITX_H_
+#define _INITX_H_ 1
+
+#include "hyper.h"
+
+extern int gBorderColor;
+
+#endif
diff --git a/src/hyper/input.pamphlet b/src/hyper/input.c
index aa916d68..725b9ace 100644
--- a/src/hyper/input.pamphlet
+++ b/src/hyper/input.c
@@ -1,24 +1,44 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/input}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{input.c}
-<<input.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#define _INPUT_C
#include "axiom-c-macros.h"
#include "useproto.h"
#include "debug.h"
#include "hyper.h"
-#include "dialog.h"
-#include "mem.h"
#include "all_hyper_proto.H1"
@@ -216,53 +236,3 @@ delete_item(char *name)
return 0;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<input.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/item.c b/src/hyper/item.c
new file mode 100644
index 00000000..18311ec8
--- /dev/null
+++ b/src/hyper/item.c
@@ -0,0 +1,127 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include "axiom-c-macros.h"
+#include "useproto.h"
+#define _ITEM_C
+#include "debug.h"
+#include "extent.h"
+
+#include "all_hyper_proto.H1"
+
+/*
+ * Here are structures needed for manipulating the item stack
+ */
+ItemStack *gTopOfItemStack = NULL;
+
+
+void
+push_item_stack(void)
+{
+ ItemStack *is = (ItemStack *) halloc(sizeof(ItemStack), "Item stack");
+
+ is->indent = indent;
+ is->item_indent = item_indent;
+ is->next = gTopOfItemStack;
+ is->in_item = gInItem;
+ gTopOfItemStack = is;
+ return;
+}
+void
+clear_item_stack(void)
+{
+ ItemStack *is = gTopOfItemStack, *chuck;
+
+ while (is != NULL) {
+ chuck = is;
+ is = is->next;
+ free(chuck);
+ }
+ return;
+}
+void
+pop_item_stack(void)
+{
+ ItemStack *chuck;
+
+ if (gTopOfItemStack == NULL) {
+ fprintf(stderr, "Tried to pop an empty item stack\n");
+ return;
+ }
+ chuck = gTopOfItemStack;
+ gTopOfItemStack = gTopOfItemStack->next;
+ indent = chuck->indent;
+ item_indent = chuck->item_indent;
+ gInItem = chuck->in_item;
+ free(chuck);
+}
+
+ItemStack *
+copy_item_stack(void)
+{
+ ItemStack *new = NULL;
+ ItemStack *prev = NULL;
+ ItemStack *trace = gTopOfItemStack;
+ ItemStack *first = NULL;
+
+ while (trace) {
+ new = (ItemStack *) halloc(sizeof(ItemStack), "Item stack");
+ new->indent = trace->indent;
+ new->item_indent = trace->item_indent;
+ new->in_item = gInItem;
+ if (!first)
+ first = new;
+ else
+ prev->next = new;
+ prev = new;
+ trace = trace->next;
+ }
+ if (new)
+ new->next = NULL;
+ return first;
+}
+
+void
+free_item_stack(ItemStack *is)
+{
+ ItemStack *junk = NULL;
+ ItemStack *trace = is;
+
+ while (trace) {
+ junk = trace;
+ trace = trace->next;
+ free(junk);
+ }
+}
diff --git a/src/hyper/item.pamphlet b/src/hyper/item.pamphlet
deleted file mode 100644
index f65a69f3..00000000
--- a/src/hyper/item.pamphlet
+++ /dev/null
@@ -1,155 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/item}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{item.c}
-<<item.c>>=
-#include "axiom-c-macros.h"
-#include "useproto.h"
-#define _ITEM_C
-#include "debug.h"
-#include "extent.h"
-
-#include "all_hyper_proto.H1"
-
-/*
- * Here are structures needed for manipulating the item stack
- */
-ItemStack *gTopOfItemStack = NULL;
-
-
-void
-push_item_stack(void)
-{
- ItemStack *is = (ItemStack *) halloc(sizeof(ItemStack), "Item stack");
-
- is->indent = indent;
- is->item_indent = item_indent;
- is->next = gTopOfItemStack;
- is->in_item = gInItem;
- gTopOfItemStack = is;
- return;
-}
-void
-clear_item_stack(void)
-{
- ItemStack *is = gTopOfItemStack, *chuck;
-
- while (is != NULL) {
- chuck = is;
- is = is->next;
- free(chuck);
- }
- return;
-}
-void
-pop_item_stack(void)
-{
- ItemStack *chuck;
-
- if (gTopOfItemStack == NULL) {
- fprintf(stderr, "Tried to pop an empty item stack\n");
- return;
- }
- chuck = gTopOfItemStack;
- gTopOfItemStack = gTopOfItemStack->next;
- indent = chuck->indent;
- item_indent = chuck->item_indent;
- gInItem = chuck->in_item;
- free(chuck);
-}
-
-ItemStack *
-copy_item_stack(void)
-{
- ItemStack *new = NULL;
- ItemStack *prev = NULL;
- ItemStack *trace = gTopOfItemStack;
- ItemStack *first = NULL;
-
- while (trace) {
- new = (ItemStack *) halloc(sizeof(ItemStack), "Item stack");
- new->indent = trace->indent;
- new->item_indent = trace->item_indent;
- new->in_item = gInItem;
- if (!first)
- first = new;
- else
- prev->next = new;
- prev = new;
- trace = trace->next;
- }
- if (new)
- new->next = NULL;
- return first;
-}
-
-void
-free_item_stack(ItemStack *is)
-{
- ItemStack *junk = NULL;
- ItemStack *trace = is;
-
- while (trace) {
- junk = trace;
- trace = trace->next;
- free(junk);
- }
-}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<item.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/keyin.pamphlet b/src/hyper/keyin.c
index c1e5f267..b6d2004e 100644
--- a/src/hyper/keyin.pamphlet
+++ b/src/hyper/keyin.c
@@ -1,40 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/keyin}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{keyin.h}
-<<keyin.h>>=
-<<license>>
-#ifndef _KEYIN_H_
-#define _KEYIN_H_ 1
-
-extern int in_cursor_height;
-extern int in_cursor_width;
-extern int out_cursor_height;
-extern int out_cursor_width;
-extern int in_cursor_y;
-extern int out_cursor_y;
-extern int start_x;
-extern int start_y;
-extern int simple_box_width;
-
-extern int gInInsertMode;
-
-extern unsigned int ModifiersMask;
-extern unsigned int ShiftModMask;
-
-
-#endif
-@
-\section{keyin.c}
-<<keyin.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
/******************************************************************************
*
* keyin.c:
@@ -51,9 +49,7 @@ extern unsigned int ShiftModMask;
#include "hyper.h"
#include "keyin.h"
#include "event.h"
-#include "dialog.h"
#include "parse.h"
-#include "parse-aux.h"
#include "scrollbar.h"
#include "all_hyper_proto.H1"
@@ -136,44 +132,44 @@ handle_key(XEvent *event)
fclose(filehandle);
hash_delete(&gFileHashTable, filename);
gWindow->fMacroHashTable =
- (HashTable *) halloc(sizeof(HashTable), "macro hash");
+ (HashTable *) halloc(sizeof(HashTable), "macro hash");
hash_init(
- gWindow->fMacroHashTable,
- MacroHashSize,
- (EqualFunction ) string_equal,
- (HashcodeFunction) string_hash);
+ gWindow->fMacroHashTable,
+ MacroHashSize,
+ (EqualFunction ) string_equal,
+ (HashcodeFunction) string_hash);
gWindow->fPatchHashTable = (HashTable *) halloc(sizeof(HashTable), "patch hash");
hash_init(
- gWindow->fPatchHashTable,
- PatchHashSize,
- (EqualFunction ) string_equal,
- (HashcodeFunction) string_hash);
+ gWindow->fPatchHashTable,
+ PatchHashSize,
+ (EqualFunction ) string_equal,
+ (HashcodeFunction) string_hash);
gWindow->fPasteHashTable = (HashTable *) halloc(sizeof(HashTable), "paste hash");
hash_init(gWindow->fPasteHashTable,
- PasteHashSize,
+ PasteHashSize,
(EqualFunction ) string_equal,
- (HashcodeFunction) string_hash);
+ (HashcodeFunction) string_hash);
gWindow->fCondHashTable = (HashTable *) halloc(sizeof(HashTable), "cond hash");
hash_init(
- gWindow->fCondHashTable,
- CondHashSize,
+ gWindow->fCondHashTable,
+ CondHashSize,
(EqualFunction ) string_equal,
- (HashcodeFunction) string_hash);
+ (HashcodeFunction) string_hash);
gWindow->fPageHashTable = (HashTable *) halloc(sizeof(HashTable), "page hash");
hash_init(
- gWindow->fPageHashTable,
- PageHashSize,
+ gWindow->fPageHashTable,
+ PageHashSize,
(EqualFunction ) string_equal,
- (HashcodeFunction) string_hash);
+ (HashcodeFunction) string_hash);
make_special_pages(gWindow->fPageHashTable);
read_ht_db(
- gWindow->fPageHashTable,
- gWindow->fMacroHashTable,
- gWindow->fPatchHashTable);
+ gWindow->fPageHashTable,
+ gWindow->fMacroHashTable,
+ gWindow->fPatchHashTable);
gWindow->page = (HyperDocPage *) hash_find(gWindow->fPageHashTable, name);
if (gWindow->page == NULL) {
- fprintf(stderr, "lose...gWindow->page for %s is null\n", name);
- exit(-1);
+ fprintf(stderr, "lose...gWindow->page for %s is null\n", name);
+ exit(-1);
}
display_again = 1;
}
@@ -288,53 +284,3 @@ init_keyin(void)
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<keyin.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/keyin.h b/src/hyper/keyin.h
new file mode 100644
index 00000000..e1bc564c
--- /dev/null
+++ b/src/hyper/keyin.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _KEYIN_H_
+#define _KEYIN_H_ 1
+
+extern int in_cursor_height;
+extern int in_cursor_width;
+extern int out_cursor_height;
+extern int out_cursor_width;
+extern int in_cursor_y;
+extern int out_cursor_y;
+extern int start_x;
+extern int start_y;
+extern int simple_box_width;
+
+extern int gInInsertMode;
+
+extern unsigned int ModifiersMask;
+extern unsigned int ShiftModMask;
+
+
+#endif
diff --git a/src/hyper/lex.pamphlet b/src/hyper/lex.c
index df161580..6b4bf6d5 100644
--- a/src/hyper/lex.pamphlet
+++ b/src/hyper/lex.c
@@ -1,49 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/lex}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{dumpToken function}
-We need a function to print the token object for debugging.
-
-To use this function the caller provides its own name and the
-token to be printed. For instance, a call would look like:
-\begin{verbatim}
-dumpToken("fnname",token)
-\end{verbatim}
-There is no return value.
-<<dumptoken function>>=
-void
-dumpToken(char *caller, Token t)
-{ fprintf(stderr,"%s:dumpToken type=%s id=%s\n",
- caller,token_table[t.type],t.id);
-}
-
-@
-
-\section{lex.h}
-<<lex.h>>=
-<<license>>
-#ifndef _LEX_H_
-#define _LEX_H_ 1
-
-#include "hyper.h"
-
-extern HyperDocPage *gPageBeingParsed;
-
-extern short int gInSpadsrc;
-extern short int gInVerbatim;
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{lex.c}
-<<lex.c>>=
/*
* Lexical analyzer stuff. Exported functions: parser_init() --
* initialize the parser tables with keywords init_scanner() --
@@ -119,7 +108,12 @@ char sock_buf[1024]; /* buffer for socket input */
static HashTable tokenHashTable; /* hash table of parser tokens */
-<<dumptoken function>>
+void
+dumpToken(char *caller, Token t)
+{ fprintf(stderr,"%s:dumpToken type=%s id=%s\n",
+ caller,token_table[t.type],t.id);
+}
+
/* initialize the parser keyword hash table */
void
@@ -131,10 +125,10 @@ parser_init(void)
/* First I initialize the hash table for the tokens */
hash_init(
- &tokenHashTable,
- TokenHashSize,
- (EqualFunction)string_equal,
- (HashcodeFunction)string_hash);
+ &tokenHashTable,
+ TokenHashSize,
+ (EqualFunction)string_equal,
+ (HashcodeFunction)string_hash);
for (i = 2; i <= NumberUserTokens; i++) {
toke = (Token *) halloc(sizeof(Token), "Token");
toke->type = i;
@@ -152,7 +146,7 @@ init_scanner(void)
useAscii = (strcmp(getenv("HTASCII"), "yes") == 0);
}
else {
- if(gTtFontIs850==1) useAscii = 0;
+ if(gTtFontIs850==1) useAscii = 0;
else useAscii = 1;
}
keyword = 0;
@@ -330,7 +324,7 @@ AGAIN:
read_again = get_string_buf(spad_socket, sock_buf, 1023);
/* this will be null if this is the last time*/
input_string = sock_buf;
- goto AGAIN;
+ goto AGAIN;
default:
fprintf(stderr, "Get Char: Unknown type of input: %d\n", input_type);
return -1;
@@ -881,53 +875,3 @@ connect_spad(void)
/* if (spad_busy()) return SpadBusy; */
return Connected;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<lex.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/lex.h b/src/hyper/lex.h
new file mode 100644
index 00000000..8cb3cf0a
--- /dev/null
+++ b/src/hyper/lex.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _LEX_H_
+#define _LEX_H_ 1
+
+#include "hyper.h"
+
+extern HyperDocPage *gPageBeingParsed;
+
+extern short int gInSpadsrc;
+extern short int gInVerbatim;
+
+#endif
diff --git a/src/hyper/macro.pamphlet b/src/hyper/macro.c
index 43b7ef8d..80bd3dc6 100644
--- a/src/hyper/macro.pamphlet
+++ b/src/hyper/macro.c
@@ -1,24 +1,45 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/macro}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{macro.c}
-<<macro.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#define _MACRO_C
#include "axiom-c-macros.h"
#include "useproto.h"
#include "debug.h"
#include "parse.h"
-#include "parse-aux.h"
-#include "mem.h"
+#include "hyper.h"
#include "all_hyper_proto.H1"
@@ -205,10 +226,10 @@ pop_parameters(void)
/** Free the parameter text and pointers **/
if (old->number >0) {
- for (count = 0; count < old->number; count++)
- if ( (old->list)[count] ) free((char *) (old->list)[count]);
- free(old->list);
- }
+ for (count = 0; count < old->number; count++)
+ if ( (old->list)[count] ) free((char *) (old->list)[count]);
+ free(old->list);
+ }
free(old); /** free the parameter **/
@@ -369,53 +390,3 @@ parse_parameters(void)
curr_node->type = Endparameter;
return;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<macro.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/mem.pamphlet b/src/hyper/mem.c
index 7f98b0ef..6f2cb646 100644
--- a/src/hyper/mem.pamphlet
+++ b/src/hyper/mem.c
@@ -1,28 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/mem}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{mem.h}
-<<mem.h>>=
-<<license>>
-#ifndef _MEM_H_
-#define _MEM_H_ 1
-
-#include "hyper.h"
-#include "cond.h"
-
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reversed.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{mem.c}
-<<mem.c>>=
/******************************************************************************
*
* mem.c: HyperDoc Memory Management Routines.
@@ -35,10 +45,9 @@
#include "debug.h"
-#include "mem.h"
+#include "hyper.h"
#include "group.h"
#include "event.h"
-#include "parse-aux.h"
#include "all_hyper_proto.H1"
@@ -78,17 +87,17 @@ alloc_hd_window(void)
/* Now I initialize the hash tables for the page */
w->fCondHashTable = (HashTable *) halloc(sizeof(HashTable), "cond hash");
hash_init(
- w->fCondHashTable,
- CondHashSize,
- (EqualFunction) string_equal,
- (HashcodeFunction) string_hash);
+ w->fCondHashTable,
+ CondHashSize,
+ (EqualFunction) string_equal,
+ (HashcodeFunction) string_hash);
w->fPasteHashTable = (HashTable *) halloc(sizeof(HashTable), "paste hash");
hash_init(
- w->fPasteHashTable,
- PasteHashSize,
- (EqualFunction) string_equal,
- (HashcodeFunction) string_hash);
+ w->fPasteHashTable,
+ PasteHashSize,
+ (EqualFunction) string_equal,
+ (HashcodeFunction) string_hash);
w->fPageHashTable = hash_copy_table(&init_page_hash);
w->fPatchHashTable = hash_copy_table(&init_patch_hash);
w->fMacroHashTable = hash_copy_table(&init_macro_hash);
@@ -266,7 +275,7 @@ free_node(TextNode *node, short int des)
XDestroyWindow(gXDisplay, node->link->win);
}
/* TTT don't free the link before freeing nodes off it */
- /* free_node(node->link->reference.node);*/
+ /* free_node(node->link->reference.node);*/
free_if_non_NULL(node->link);
free_node(node->next, des);
break;
@@ -491,12 +500,12 @@ free_pastearea(TextNode *node, short int des)
paste = (PasteNode *) hash_find(gWindow->fPasteHashTable, node->data.text);
if (paste) {
if (!paste->hasbutton) {
- /* squash this thing */
- hash_delete(gWindow->fPasteHashTable, node->data.text);
- free_paste(paste, des);
+ /* squash this thing */
+ hash_delete(gWindow->fPasteHashTable, node->data.text);
+ free_paste(paste, des);
}
else
- paste->haspaste = 0;
+ paste->haspaste = 0;
}
}
@@ -736,53 +745,3 @@ resizeBuffer(int size, char *oldBuf, int *oldSize)
return newBuf;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<mem.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/mouse11.bitmap b/src/hyper/mouse11.bitmap
new file mode 100644
index 00000000..231c6630
--- /dev/null
+++ b/src/hyper/mouse11.bitmap
@@ -0,0 +1,8 @@
+#define mouseBitmap_width 16
+#define mouseBitmap_height 16
+#define mouseBitmap_x_hot 8
+#define mouseBitmap_y_hot 0
+static char mouseBitmap_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x80, 0x02, 0x40, 0x04, 0xc0, 0x06, 0x20, 0x08,
+ 0x20, 0x08, 0x30, 0x18, 0x50, 0x14, 0x58, 0x34, 0x90, 0x12, 0x20, 0x08,
+ 0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
diff --git a/src/hyper/mouse11.mask b/src/hyper/mouse11.mask
new file mode 100644
index 00000000..6e5621f4
--- /dev/null
+++ b/src/hyper/mouse11.mask
@@ -0,0 +1,6 @@
+#define mouseMask_width 16
+#define mouseMask_height 16
+static char mouseMask_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x80, 0x03, 0xc0, 0x07, 0xc0, 0x07, 0xe0, 0x0f,
+ 0xe0, 0x0f, 0xf0, 0x1f, 0xf0, 0x1f, 0xf8, 0x3f, 0xf0, 0x1f, 0xe0, 0x0f,
+ 0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
diff --git a/src/hyper/parse-aux.pamphlet b/src/hyper/parse-aux.c
index e6809680..09972872 100644
--- a/src/hyper/parse-aux.pamphlet
+++ b/src/hyper/parse-aux.c
@@ -1,37 +1,47 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/parse-aux}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{parse-aux.h}
-<<parse-aux.h>>=
-<<license>>
-#ifndef _PARSE_AUX_H_
-#define _PARSE_AUX_H_ 1
-
-#include "hyper.h"
-
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reverved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{parse-aux.c}
-<<parse-aux.c>>=
#include "axiom-c-macros.h"
#define _PARSE_AUX_C
#include "useproto.h"
#include "debug.h"
#include "parse.h"
-#include "parse-aux.h"
#include "addfile.h"
#include "lex.h"
-#include "mem.h"
+#include "hyper.h"
#include "all_hyper_proto.H1"
@@ -92,27 +102,27 @@ read_ht_db(HashTable *page_hash, HashTable *macro_hash, HashTable *patch_hash)
gDatabasePath = NULL;
hash_init(
- page_hash,
- PageHashSize,
- (EqualFunction) string_equal,
- (HashcodeFunction) string_hash);
+ page_hash,
+ PageHashSize,
+ (EqualFunction) string_equal,
+ (HashcodeFunction) string_hash);
hash_init(
- macro_hash,
- MacroHashSize,
- (EqualFunction) string_equal,
- (HashcodeFunction) string_hash);
+ macro_hash,
+ MacroHashSize,
+ (EqualFunction) string_equal,
+ (HashcodeFunction) string_hash);
hash_init(
- patch_hash,
- PatchHashSize,
- (EqualFunction) string_equal,
- (HashcodeFunction) string_hash);
+ patch_hash,
+ PatchHashSize,
+ (EqualFunction) string_equal,
+ (HashcodeFunction) string_hash);
/* Lets initialize the FileHashTable */
hash_init(
- &ht_gFileHashTable,
- htfhSize,
- (EqualFunction) string_equal,
- (HashcodeFunction) string_hash);
+ &ht_gFileHashTable,
+ htfhSize,
+ (EqualFunction) string_equal,
+ (HashcodeFunction) string_hash);
while ((db_fp = db_file_open(db_file)) != NULL) {
i++;
@@ -436,10 +446,10 @@ add_dependencies(void)
gPageBeingParsed->depend_hash =
(HashTable *) halloc(sizeof(HashTable), "Hash Table");
hash_init(
- gPageBeingParsed->depend_hash,
- DependHashSize,
+ gPageBeingParsed->depend_hash,
+ DependHashSize,
(EqualFunction) string_equal,
- (HashcodeFunction) string_hash);
+ (HashcodeFunction) string_hash);
}
for (node = bound_node->data.node; node->type != Endarg; node = node->next) {
if (node->type == Word) {
@@ -618,53 +628,3 @@ find_fp(FilePosition fp)
line_number = fp.ln;
return lfile;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<parse-aux.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/parse-input.pamphlet b/src/hyper/parse-input.c
index 020ff97a..bdaee8da 100644
--- a/src/hyper/parse-input.pamphlet
+++ b/src/hyper/parse-input.c
@@ -1,16 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/parse-input}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{parse-input.c}
-<<parse-input.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#include "axiom-c-macros.h"
#define _PARSE_INPUT_C
/***
@@ -24,9 +46,8 @@
#include "debug.h"
#include "parse.h"
-#include "parse-aux.h"
#include "lex.h"
-#include "mem.h"
+#include "hyper.h"
#include "all_hyper_proto.H1"
@@ -49,8 +70,8 @@ make_input_window(InputItem * item)
at.background_pixel = gInputBackgroundColor;
at.border_pixel = gActiveColor;
link->win = XCreateWindow(gXDisplay, gWindow->fDisplayedWindow, 0, 0, 100, 100, 0,
- 0, InputOutput, CopyFromParent,
- CWCursor | CWBackPixel | CWBorderPixel, &at);
+ 0, InputOutput, CopyFromParent,
+ CWCursor | CWBackPixel | CWBorderPixel, &at);
XSelectInput(gXDisplay, link->win, ButtonPressMask);
link->type = Inputstring;
link->x = link->y = 0;
@@ -80,9 +101,9 @@ make_box_window(InputBox * box, int type)
at.cursor = gActiveCursor;
at.background_pixel = gInputBackgroundColor;
link->win = XCreateWindow(gXDisplay, gWindow->fDisplayedWindow,
- 0, 0, 100, 100, 0,
- 0, InputOutput, CopyFromParent,
- CWCursor | CWBackPixel, &at);
+ 0, 0, 100, 100, 0,
+ 0, InputOutput, CopyFromParent,
+ CWCursor | CWBackPixel, &at);
XSelectInput(gXDisplay, link->win, ButtonPressMask);
link->type = type;
link->x = link->y = 0;
@@ -217,7 +238,7 @@ parse_simplebox(void)
get_expected_token(Word);
if (!is_number(token.id)) {
fprintf(stderr,
- "parse_simple_box: Expected a value not %s\n", token.id);
+ "parse_simple_box: Expected a value not %s\n", token.id);
print_page_and_filename();
jump();
}
@@ -272,12 +293,12 @@ parse_simplebox(void)
/* Now add the box to the box_has table for this window */
if (gPageBeingParsed->box_hash == NULL) {
gPageBeingParsed->box_hash = (HashTable *) halloc(sizeof(HashTable),
- "Box Hash");
+ "Box Hash");
hash_init(
- gPageBeingParsed->box_hash,
- BoxHashSize,
- (EqualFunction) string_equal,
- (HashcodeFunction) string_hash);
+ gPageBeingParsed->box_hash,
+ BoxHashSize,
+ (EqualFunction) string_equal,
+ (HashcodeFunction) string_hash);
}
hash_insert(gPageBeingParsed->box_hash, (char *)box, box->name);
}
@@ -308,7 +329,7 @@ parse_radiobox(void)
get_expected_token(Word);
if (!is_number(token.id)) {
fprintf(stderr,
- "parse_simple_box: Expected a value not %s\n", token.id);
+ "parse_simple_box: Expected a value not %s\n", token.id);
print_page_and_filename();
jump();
}
@@ -371,12 +392,12 @@ parse_radiobox(void)
/* Now add the box to the box_has table for this window */
if (gPageBeingParsed->box_hash == NULL) {
gPageBeingParsed->box_hash = (HashTable *) halloc(sizeof(HashTable),
- "Box Hash");
+ "Box Hash");
hash_init(
- gPageBeingParsed->box_hash,
- BoxHashSize,
- (EqualFunction) string_equal,
- (HashcodeFunction) string_hash);
+ gPageBeingParsed->box_hash,
+ BoxHashSize,
+ (EqualFunction) string_equal,
+ (HashcodeFunction) string_hash);
}
hash_insert(gPageBeingParsed->box_hash, (char *)box, box->name);
@@ -397,7 +418,7 @@ add_box_to_rb_list(char *name,InputBox *box)
if (!trace) {
fprintf(stderr, "Tried to add a radio box to a non-existent group %s\n",
- name);
+ name);
print_page_and_filename();
jump();
}
@@ -480,7 +501,7 @@ repaste_item(void)
if (save_item) {
for (trace = gPageBeingParsed->input_list; trace && trace->next != NULL;
- trace = trace->next);
+ trace = trace->next);
if (trace) {
trace->next = save_item;
}
@@ -579,53 +600,3 @@ parse_radioboxes(void)
curr_node = return_node;
return;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<parse-input.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/parse-paste.pamphlet b/src/hyper/parse-paste.c
index af851bd7..3cd35b1f 100644
--- a/src/hyper/parse-paste.pamphlet
+++ b/src/hyper/parse-paste.c
@@ -1,29 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/parse-paste}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{parse-paste.h}
-<<parse-paste.h>>=
-<<license>>
-#ifndef _PARSE_PASTE_H_
-#define _PARSE_PASTE_H_ 1
-
-#include "axiom-c-macros.h"
-#include "hyper.h"
-
-extern short int gInPaste;
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{parse-paste.c}
-<<parse-paste.c>>=
/******************************************************************************
*
* parse-paste.c: HyperDoc routines for paste-in areas.
@@ -38,8 +47,7 @@ extern short int gInPaste;
#include "parse.h"
-#include "parse-aux.h"
-#include "mem.h"
+#include "hyper.h"
#include "display.h"
#include "group.h"
@@ -376,53 +384,3 @@ load_patch(PatchStore *patch)
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<parse-paste.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/parse-paste.h b/src/hyper/parse-paste.h
new file mode 100644
index 00000000..ec550ff3
--- /dev/null
+++ b/src/hyper/parse-paste.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyirght (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _PARSE_PASTE_H_
+#define _PARSE_PASTE_H_ 1
+
+#include "axiom-c-macros.h"
+#include "hyper.h"
+
+extern short int gInPaste;
+
+#endif
diff --git a/src/hyper/parse-types.pamphlet b/src/hyper/parse-types.c
index 8f3902ce..047423e9 100644
--- a/src/hyper/parse-types.pamphlet
+++ b/src/hyper/parse-types.c
@@ -1,32 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/parse-types}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{parse-types.h}
-<<parse-types.h>>=
-<<license>>
-#ifndef _PARSE_TYPES_H_
-#define _PARSE_TYPES_H_ 1
-
-#include "hyper.h"
-
-extern boolean gInButton;
-extern boolean gInIf;
-extern boolean gInItems;
-extern boolean gInOptional;
-
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{parse-types.c}
-<<parse-types.c>>=
/******************************************************************************
*
* parse-types.h: HyperDoc parsing routines for node types.
@@ -40,11 +46,9 @@ extern boolean gInOptional;
#include "debug.h"
#include "parse.h"
-#include "parse-aux.h"
#include "parse-types.h"
-#include "cond.h"
+#include "hyper.h"
#include "lex.h"
-#include "mem.h"
#include "extent.h"
#include "hterror.h"
@@ -392,9 +396,9 @@ parse_input_pix(void)
strcat(f, ".pm");
#endif
strcat(f, ".xpm.Z");
- p=pixnode->data.text;
+ p=pixnode->data.text;
pixnode->data.text = alloc_string(f);
- free(p);
+ free(p);
}
}
}
@@ -769,53 +773,3 @@ parse_help(void)
jump();
}
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<parse-types.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/parse-types.h b/src/hyper/parse-types.h
new file mode 100644
index 00000000..c5bd3802
--- /dev/null
+++ b/src/hyper/parse-types.h
@@ -0,0 +1,47 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _PARSE_TYPES_H_
+#define _PARSE_TYPES_H_ 1
+
+#include "hyper.h"
+
+extern boolean gInButton;
+extern boolean gInIf;
+extern boolean gInItems;
+extern boolean gInOptional;
+
+
+#endif
diff --git a/src/hyper/parse.pamphlet b/src/hyper/parse.c
index c685dd38..92703cc6 100644
--- a/src/hyper/parse.pamphlet
+++ b/src/hyper/parse.c
@@ -1,102 +1,47 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/parse}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{parse.h}
-<<parse.h>>=
-<<license>>
-#ifndef _PARSE_H_
-#define _PARSE_H_ 1
-
-#include "axiom-c-macros.h"
-#include "hterror.h"
-
-#ifdef SUNplatform
-#include <sys/types.h>
-#endif
-
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/errno.h>
-#include <ctype.h>
-#include "hyper.h"
-
-#include <setjmp.h>
-
-extern jmp_buf jmpbuf;
-extern int vbuff;
-
-extern TextNode *cur_spadcom; /* spad command being parsed *** */
-extern TextNode *curr_node;
-extern long page_start_fpos;/* tells the character position of the start
- * of the page, needed to find the current
- * position when restoring the scanner */
-
-/*
- * Default sizes of hash tables
- */
-
-#define LinkHashSize 25
-#define DependHashSize 20
-
-extern HashTable *gLinkHashTable; /* the hash table of active link windows */
-
-/*
- * Flags and defines for the modes the parser can be in
- */
-
-#define AllMode 0
-#define NoVerticalMode 1
-#define SimpleMode 2
-
-extern short int gParserMode;
-
-/*
- * Flags and defines for telling us what part of the page is being parsed.
- */
-
-extern short int gParserRegion;
-extern short int gStringValueOk;
-extern boolean gEndedPage;
-
-extern int line_number;
-
-/*
- * Things for handling macro parameters
- */
-
-
-
-extern ParameterList parameters;
-
-
/*
- * The error buffer
- */
-
-extern char ebuffer[];
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{parse.c}
-<<parse.c>>=
#define _PARSE_C
#include "useproto.h"
#include "debug.h"
#include "parse.h"
-#include "parse-aux.h"
#include "parse-paste.h"
#include "parse-types.h"
#include "lex.h"
-#include "mem.h"
+#include "hyper.h"
#include "extent.h"
#include "event.h"
#include "display.h"
@@ -342,10 +287,10 @@ init_parse_page(HyperDocPage *page)
cur_spadcom = NULL;
gLinkHashTable = page->fLinkHashTable;
hash_init(
- gLinkHashTable,
- LinkHashSize,
- (EqualFunction) window_equal,
- (HashcodeFunction) window_code);
+ gLinkHashTable,
+ LinkHashSize,
+ (EqualFunction) window_equal,
+ (HashcodeFunction) window_code);
gPageBeingParsed = page;
}
@@ -741,10 +686,10 @@ parse_page_from_socket(void)
cur_spadcom = NULL;
gLinkHashTable = page->fLinkHashTable;
hash_init(
- gLinkHashTable,
- LinkHashSize,
- (EqualFunction) window_equal,
- (HashcodeFunction) window_code);
+ gLinkHashTable,
+ LinkHashSize,
+ (EqualFunction) window_equal,
+ (HashcodeFunction) window_code);
gPageBeingParsed = page;
replace_page = NULL;
if (setjmp(jmpbuf)) {
@@ -784,10 +729,10 @@ parse_page_from_unixfd(void)
cur_spadcom = NULL;
gLinkHashTable = page->fLinkHashTable;
hash_init(
- gLinkHashTable,
- LinkHashSize,
- (EqualFunction) window_equal,
- (HashcodeFunction) window_code);
+ gLinkHashTable,
+ LinkHashSize,
+ (EqualFunction) window_equal,
+ (HashcodeFunction) window_code);
gPageBeingParsed = page;
if (setjmp(jmpbuf)) {
/* Ooops, somewhere I had an error */
@@ -895,53 +840,3 @@ parse_replacepage(void)
replace_page = alloc_string(token.id);
get_expected_token(Rbrace);
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<parse.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/parse.h b/src/hyper/parse.h
new file mode 100644
index 00000000..6ea2e75d
--- /dev/null
+++ b/src/hyper/parse.h
@@ -0,0 +1,107 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _PARSE_H_
+#define _PARSE_H_ 1
+
+#include "axiom-c-macros.h"
+#include "hterror.h"
+
+#ifdef SUNplatform
+#include <sys/types.h>
+#endif
+
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/errno.h>
+#include <ctype.h>
+#include "hyper.h"
+
+#include <setjmp.h>
+
+extern jmp_buf jmpbuf;
+extern int vbuff;
+
+extern TextNode *cur_spadcom; /* spad command being parsed *** */
+extern TextNode *curr_node;
+extern long page_start_fpos;/* tells the character position of the start
+ * of the page, needed to find the current
+ * position when restoring the scanner */
+
+/*
+ * Default sizes of hash tables
+ */
+
+#define LinkHashSize 25
+#define DependHashSize 20
+
+extern HashTable *gLinkHashTable; /* the hash table of active link windows */
+
+/*
+ * Flags and defines for the modes the parser can be in
+ */
+
+#define AllMode 0
+#define NoVerticalMode 1
+#define SimpleMode 2
+
+extern short int gParserMode;
+
+/*
+ * Flags and defines for telling us what part of the page is being parsed.
+ */
+
+extern short int gParserRegion;
+extern short int gStringValueOk;
+extern boolean gEndedPage;
+
+extern int line_number;
+
+/*
+ * Things for handling macro parameters
+ */
+
+
+
+extern ParameterList parameters;
+
+
+/*
+ * The error buffer
+ */
+
+extern char ebuffer[];
+
+#endif
diff --git a/src/hyper/presea b/src/hyper/presea
new file mode 100755
index 00000000..b3b9485c
--- /dev/null
+++ b/src/hyper/presea
@@ -0,0 +1,27 @@
+#!/bin/awk -f
+BEGIN {n=0;m=0
+}
+
+{
+ a[n] = $0;
+ n=n+1;
+ j=split($0,b,"{");
+ m=m+substr(b[j],1,length(b[j])-1);
+}
+
+END {
+ if (case==1)
+ printf ("\\begin{page}{staticsearchpage}{No matches found}\n")
+ else if ( n==0 || m==0 )
+ printf ("\\begin{page}{staticsearchpage}{No matches found for {\\em %s}}\n",expr)
+ else
+ printf ("\\begin{page}{staticsearchpage}{%d matches found in %d pages for {\\em %s}}\n",m,n,expr);
+ printf ("Matches\\tab{8}in Page\n");
+ printf "\\beginscroll\n";
+ printf "\\beginmenu\n";
+ for(i=0;i<n;i++) printf ("%s\n",a[i]);
+ printf "\\endmenu\n";
+ printf "\\endscroll\n";
+ printf "\\end{page}\n";
+}
+
diff --git a/src/hyper/scrollbar.pamphlet b/src/hyper/scrollbar.c
index 11532305..734054aa 100644
--- a/src/hyper/scrollbar.pamphlet
+++ b/src/hyper/scrollbar.c
@@ -1,28 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/scrollbar}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{scrollbar.h}
-<<scrollbar.h>>=
-<<license>>
-#ifndef _SCROLLBAR_H_
-#define _SCROLLBAR_H_ 1
-
-#include "hyper.h"
-
-extern int gScrollbarWidth;
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{scrollbar.c}
-<<scrollbar.c>>=
/******************************************************************************
*
* scrollbar.c: HyperDoc Scrollbar routines
@@ -694,53 +704,3 @@ changeWindowBackgroundPixmap(Window window, Pixmap pixmap)
XClearWindow(gXDisplay, window);
}
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<scrollbar.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/scrollbar.h b/src/hyper/scrollbar.h
new file mode 100644
index 00000000..c1721fe8
--- /dev/null
+++ b/src/hyper/scrollbar.h
@@ -0,0 +1,43 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _SCROLLBAR_H_
+#define _SCROLLBAR_H_ 1
+
+#include "hyper.h"
+
+extern int gScrollbarWidth;
+
+#endif
diff --git a/src/hyper/sdown.bitmap b/src/hyper/sdown.bitmap
new file mode 100644
index 00000000..c16c607f
--- /dev/null
+++ b/src/hyper/sdown.bitmap
@@ -0,0 +1,9 @@
+#define sdown_width 21
+#define sdown_height 21
+static char sdown_bits[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf0,
+ 0x03, 0x00, 0xf8, 0x07, 0x00, 0xfc, 0x0f, 0x00, 0xfe, 0x1f, 0x00, 0xff,
+ 0x3f, 0x80, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xf1, 0xff,
+ 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff};
diff --git a/src/hyper/sdown3d.bitmap b/src/hyper/sdown3d.bitmap
new file mode 100644
index 00000000..e34dc105
--- /dev/null
+++ b/src/hyper/sdown3d.bitmap
@@ -0,0 +1,9 @@
+#define sdown3d_width 21
+#define sdown3d_height 21
+static char sdown3d_bits[] = {
+ 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x15, 0x02, 0x00, 0x0c, 0x51, 0x55, 0x15,
+ 0xaa, 0xaa, 0x0e, 0x51, 0x5f, 0x15, 0xaa, 0xae, 0x0e, 0x51, 0x5f, 0x15,
+ 0xaa, 0xae, 0x0e, 0x51, 0x5f, 0x15, 0xea, 0xff, 0x0e, 0xd1, 0x7f, 0x15,
+ 0xaa, 0xbf, 0x0e, 0x51, 0x5f, 0x15, 0xaa, 0xae, 0x0e, 0x51, 0x55, 0x15,
+ 0xaa, 0xaa, 0x0e, 0x51, 0x55, 0x15, 0xfe, 0xff, 0x0f, 0x55, 0x55, 0x15,
+ 0xaa, 0xaa, 0x0a};
diff --git a/src/hyper/sdown3dpr.bitmap b/src/hyper/sdown3dpr.bitmap
new file mode 100644
index 00000000..6ce090b1
--- /dev/null
+++ b/src/hyper/sdown3dpr.bitmap
@@ -0,0 +1,9 @@
+#define sdown3dpr_width 21
+#define sdown3dpr_height 21
+static char sdown3dpr_bits[] = {
+ 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x15, 0xfe, 0xff, 0x0f, 0x55, 0x55, 0x11,
+ 0xae, 0xaa, 0x0a, 0x55, 0x55, 0x11, 0xae, 0xbe, 0x0a, 0x55, 0x5d, 0x11,
+ 0xae, 0xbe, 0x0a, 0x55, 0x5d, 0x11, 0xae, 0xbe, 0x0a, 0xd5, 0xff, 0x11,
+ 0xae, 0xff, 0x0a, 0x55, 0x7f, 0x11, 0xae, 0xbe, 0x0a, 0x55, 0x5d, 0x11,
+ 0xae, 0xaa, 0x0a, 0x55, 0x55, 0x11, 0x06, 0x00, 0x08, 0x55, 0x55, 0x15,
+ 0xaa, 0xaa, 0x0a};
diff --git a/src/hyper/search.pamphlet b/src/hyper/search.pamphlet
deleted file mode 100644
index 7033b007..00000000
--- a/src/hyper/search.pamphlet
+++ /dev/null
@@ -1,67 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/search}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{search.h}
-Construct a page with a menu of references to the word.
-The syntax of the command is:
-\begin{verbatim}
-htsearch word
-\end{verbatim}
-<<htsearch>>=
-#!/bin/sh
-
-htbindir=$AXIOM/lib
-htpagedir=$AXIOM/share/hypertex/pages
-
-
-if test -z "$1"
-then
- echo ""|$htbindir/presea case=1 -
-else
-( cd $htpagedir; $htbindir/hthits "$1" $htpagedir/ht.db |sort -r -n +0.22 |$htbindir/presea case=0 expr="$1" -)
-fi
-@
-<<presea>>=
-#!/bin/awk -f
-BEGIN {n=0;m=0
-}
-
-{
- a[n] = $0;
- n=n+1;
- j=split($0,b,"{");
- m=m+substr(b[j],1,length(b[j])-1);
-}
-
-END {
- if (case==1)
- printf ("\\begin{page}{staticsearchpage}{No matches found}\n")
- else if ( n==0 || m==0 )
- printf ("\\begin{page}{staticsearchpage}{No matches found for {\\em %s}}\n",expr)
- else
- printf ("\\begin{page}{staticsearchpage}{%d matches found in %d pages for {\\em %s}}\n",m,n,expr);
- printf ("Matches\\tab{8}in Page\n");
- printf "\\beginscroll\n";
- printf "\\beginmenu\n";
- for(i=0;i<n;i++) printf ("%s\n",a[i]);
- printf "\\endmenu\n";
- printf "\\endscroll\n";
- printf "\\end{page}\n";
-}
-
-@
-<<*>>=
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/hyper/show-types.pamphlet b/src/hyper/show-types.c
index 4bb68ae9..50413414 100644
--- a/src/hyper/show-types.pamphlet
+++ b/src/hyper/show-types.c
@@ -1,26 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/show-types}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{show-types.h}
-<<show-types.h>>=
-<<license>>
-#ifndef _SHOW_TYPES_H_
-#define _SHOW_TYPES_H_ 1
-
-#include "hyper.h"
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{show-types.c}
-<<show-types.c>>=
/******************************************************************************
*
* show_types.c: Show the various types of things that can show up in text
@@ -34,12 +46,10 @@
#include "debug.h"
-#include "show-types.h"
-#include "dialog.h"
+#include "hyper.h"
#include "display.h"
#include "extent.h"
#include "group.h"
-#include "mem.h"
#include "all_hyper_proto.H1"
@@ -587,53 +597,3 @@ show_image(TextNode *node, GC gc)
break;
}
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<show-types.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/spadbuf.pamphlet b/src/hyper/spadbuf.c
index d50041cd..46f6dbd4 100644
--- a/src/hyper/spadbuf.pamphlet
+++ b/src/hyper/spadbuf.c
@@ -1,16 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/spadbuf}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{spadbuf.c}
-<<spadbuf.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#define _SPADBUF_C
#include "axiom-c-macros.h"
#include "useproto.h"
@@ -63,10 +85,10 @@ short PTY;
int MODE; /* Am I in cbreak, raw, or canonical */
char in_buff[1024]; /* buffer for storing characters read
- until they are processed */
-char buff[MAXLINE]; /* Buffers for collecting input and */
+ until they are processed */
+char buff[MAXLINE]; /* Buffers for collecting input and */
int buff_flag[MAXLINE]; /* flags for whether buff chars
- are printing or non-printing */
+ are printing or non-printing */
int (*old_handler) ();
Sock *session_sock, *menu_sock;
char *buff_name = NULL; /* name for the aixterm */
@@ -234,53 +256,3 @@ main(int argc,char ** argv)
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<spadbuf.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/spadint.pamphlet b/src/hyper/spadint.c
index 0c0869e6..eb90c2fa 100644
--- a/src/hyper/spadint.pamphlet
+++ b/src/hyper/spadint.c
@@ -1,16 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/spadint}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{spadint.c}
-<<spadint.c>>=
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
/* Still a problem with close_client */
/* Communication interface for external AXIOM buffers */
@@ -22,8 +44,6 @@
#include <signal.h>
#include "hyper.h"
-#include "cond.h"
-#include "mem.h"
#include "parse.h"
#include "bsdsignal.h"
@@ -354,8 +374,8 @@ print_to_string(TextNode *command)
/*
see the code in ht-util.boot
- $funnyQuote := char 127
- $funnyBacks := char 128
+ $funnyQuote := char 127
+ $funnyBacks := char 128
*/
#define funnyEscape(c) ((c) == '"' ? '\177' : ((c) == '\\' ? '\200' : c))
#define funnyUnescape(c) ((c) == '\177' ? '"' : ((c) == '\200' ? '\\' : c))
@@ -598,7 +618,7 @@ print_to_string1(TextNode *command,int * sizeBuf)
fprintf(stderr,
"Print_to_string: Unrecognized Keyword Type %d\n",
node->type);
- node=node->next;
+ node=node->next;
break;
}
}
@@ -867,7 +887,7 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
TextNode *node;
/*
- print out HyperDoc source for what you see
+ print out HyperDoc source for what you see
*/
for (node = command; node != NULL;) {
@@ -877,18 +897,18 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
node = node->next;
break;
case Par:
- storeString("\n\n");
+ storeString("\n\n");
node = node->next;
break;
case Indentrel:
storeString("\\indentrel{");
- storeString(node->data.node->data.text);
+ storeString(node->data.node->data.text);
storeChar('}');
node = node->next;
break;
case Tab:
storeString("\\tab{");
- storeString(node->data.node->data.text);
+ storeString(node->data.node->data.text);
storeChar('}');
node = node->next;
break;
@@ -904,7 +924,7 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
case Endbutton:
storeChar('}');
node = node->next;
- break;
+ break;
case Endverbatim:
case Endif:
case Fi:
@@ -1029,7 +1049,7 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
if (node->next->type==Endgroup){
node=node->next->next;
break;
- }
+ }
storeChar('{');
node = node->next;
break;
@@ -1074,22 +1094,22 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
node = node->next;
break;
case Free:
- {
+ {
TextNode *n2 = node->data.node;
storeString("\\free{");
for (; n2->type != Endarg; n2 = n2->next) {
if (n2->type == Word) {
- storeString(n2->data.text);
+ storeString(n2->data.text);
storeChar(' ');
- }
+ }
}
storeChar('}');
- }
+ }
node = node->next;
break;
case Macro:
- storeChar(' ');
+ storeChar(' ');
node = node->next;
break;
case Pound:
@@ -1106,7 +1126,7 @@ print_source_to_string1(TextNode *command,int * sizeBuf)
case Inputbitmap:
storeString("\\inputbitmap{");
storeString(node->data.text);
- storeString("}\n");
+ storeString("}\n");
node = node->next;
break;
case Endscrolling:
@@ -1230,60 +1250,10 @@ we close the brace then */
fprintf(stderr,
"Print_to_string: Unrecognized Keyword Type %d\n",
node->type);
- node=node->next;
+ node=node->next;
break;
}
}
storeChar('\0');
return p2sBuf;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<spadint.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/sup.bitmap b/src/hyper/sup.bitmap
new file mode 100644
index 00000000..1b5f823e
--- /dev/null
+++ b/src/hyper/sup.bitmap
@@ -0,0 +1,9 @@
+#define sup_width 21
+#define sup_height 21
+static char sup_bits[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xfb, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xe0, 0xff, 0x7f, 0xc0, 0xff,
+ 0x3f, 0x80, 0xff, 0x1f, 0x00, 0xff, 0x0f, 0x00, 0xfe, 0x07, 0x00, 0xfc,
+ 0x03, 0x00, 0xf8, 0x01, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff};
diff --git a/src/hyper/sup3d.bitmap b/src/hyper/sup3d.bitmap
new file mode 100644
index 00000000..c1dd285b
--- /dev/null
+++ b/src/hyper/sup3d.bitmap
@@ -0,0 +1,9 @@
+#define sup3d_width 21
+#define sup3d_height 21
+static char sup3d_bits[] = {
+ 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x15, 0x02, 0x00, 0x0c, 0x51, 0x55, 0x15,
+ 0xaa, 0xaa, 0x0e, 0x51, 0x55, 0x15, 0xaa, 0xae, 0x0e, 0x51, 0x5f, 0x15,
+ 0xaa, 0xbf, 0x0e, 0xd1, 0x7f, 0x15, 0xea, 0xff, 0x0e, 0x51, 0x5f, 0x15,
+ 0xaa, 0xae, 0x0e, 0x51, 0x5f, 0x15, 0xaa, 0xae, 0x0e, 0x51, 0x5f, 0x15,
+ 0xaa, 0xaa, 0x0e, 0x51, 0x55, 0x15, 0xfa, 0xff, 0x0f, 0x55, 0x55, 0x15,
+ 0xaa, 0xaa, 0x0a};
diff --git a/src/hyper/sup3dpr.bitmap b/src/hyper/sup3dpr.bitmap
new file mode 100644
index 00000000..2617792f
--- /dev/null
+++ b/src/hyper/sup3dpr.bitmap
@@ -0,0 +1,9 @@
+#define sup3dpr_width 21
+#define sup3dpr_height 21
+static char sup3dpr_bits[] = {
+ 0xaa, 0xaa, 0x0a, 0x55, 0x55, 0x15, 0xfe, 0xff, 0x0f, 0x55, 0x55, 0x11,
+ 0xae, 0xaa, 0x0a, 0x55, 0x55, 0x11, 0xae, 0xaa, 0x0a, 0x55, 0x5d, 0x11,
+ 0xae, 0xbe, 0x0a, 0x55, 0x7f, 0x11, 0xae, 0xff, 0x0a, 0xd5, 0xff, 0x11,
+ 0xae, 0xbe, 0x0a, 0x55, 0x5d, 0x11, 0xae, 0xbe, 0x0a, 0x55, 0x5d, 0x11,
+ 0xae, 0xbe, 0x0a, 0x55, 0x55, 0x11, 0x06, 0x00, 0x08, 0x55, 0x55, 0x15,
+ 0xaa, 0xaa, 0x0a};
diff --git a/src/hyper/titlebar.pamphlet b/src/hyper/titlebar.c
index 1808cc63..51ff3696 100644
--- a/src/hyper/titlebar.pamphlet
+++ b/src/hyper/titlebar.c
@@ -1,29 +1,38 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/titlebar}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{titlebar.h}
-<<titlebar.h>>=
-<<license>>
-#ifndef _TITLEBAR_H_
-#define _TITLEBAR_H_ 1
-
-#include "hyper.h"
-
-extern int twwidth, twheight; /* the width and height for all windows in the */
- /* title bar */
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
-#endif
-@
-\section{titlebar.c}
-<<titlebar.c>>=
/******************************************************************************
*
* titlebar.c: Produces HyperDoc titlebar
@@ -42,7 +51,6 @@ extern int twwidth, twheight; /* the width and height for all windows in the *
#include "display.h"
#include "group.h"
#include "initx.h"
-#include "show-types.h"
#include "parse.h"
#include "all_hyper_proto.H1"
@@ -346,53 +354,3 @@ getTitleBarMinimumSize(int *width, int *height)
(*width) = 4 * twwidth + 40;
(*height) = twheight + 2;
}
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<titlebar.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-
diff --git a/src/hyper/titlebar.h b/src/hyper/titlebar.h
new file mode 100644
index 00000000..2bf66cbe
--- /dev/null
+++ b/src/hyper/titlebar.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All right reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _TITLEBAR_H_
+#define _TITLEBAR_H_ 1
+
+#include "hyper.h"
+
+extern int twwidth, twheight; /* the width and height for all windows in the */
+ /* title bar */
+
+#endif
diff --git a/src/hyper/token.h b/src/hyper/token.h
new file mode 100644
index 00000000..cc8ed0be
--- /dev/null
+++ b/src/hyper/token.h
@@ -0,0 +1,360 @@
+/*
+ Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All right reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical Algorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _TOKEN_H_
+#define _TOKEN_H_ 1
+
+/*
+ Here are a couple of flags added for whitespace stuff. They tell
+ punctuation if there was space in front of it or not
+*/
+
+#define FRONTSPACE 0001
+#define BACKSPACE 0002
+
+/* HyperDoc parser tokens */
+
+typedef struct toke {
+ int type; /* token type. One of those listed below */
+ char *id; /* string value if type == Identifier */
+} Token;
+
+/*
+ User tokens. ie, these can be found on a page
+*/
+
+#define Word 1
+#define Page 2
+#define Lispcommandquit 3
+#define BoldFace 4
+#define Link 5
+#define Downlink 6
+#define Beginscroll 7
+#define Spadcommand 8
+#define NoLines 9
+#define Env 10
+#define Par 11
+#define Center 12
+#define Begin 13
+#define Beginitems 14
+#define Item 15
+#define Table 16
+#define Box 17
+#define Tab 18
+#define Space 19
+#define Indent 20
+#define Horizontalline 21
+#define Newline 22
+#define Enditems 23
+#define Returnbutton 24
+#define Memolink 25
+#define Upbutton 26
+#define Endscroll 27
+#define Thispage 28
+#define Returnto 29
+#define Free 30
+#define Bound 31
+#define Lisplink 32
+#define Unixlink 33
+#define Mbox 34
+#define Inputstring 35
+#define StringValue 36
+#define Spadlink 37
+#define Inputbitmap 38
+#define Inputpixmap 39
+#define Unixcommand 40
+#define Emphasize 41
+#define Lispcommand 42
+#define LispMemoLink 43
+#define LispDownLink 44
+#define Spadcall 45
+#define Spadcallquit 46
+#define Spaddownlink 47
+#define Spadmemolink 48
+#define Qspadcall 49
+#define Qspadcallquit 50
+#define SimpleBox 51
+#define Radioboxes 52
+#define BoxValue 53
+#define VSpace 54
+#define HSpace 55
+#define NewCommand 56
+#define WindowId 57
+#define Beep 58
+#define Quitbutton 59
+#define Begintitems 60
+#define Titem 61
+#define End 62
+#define It 63
+#define Sl 64
+#define Tt 65
+#define Rm 66
+#define Ifcond 67
+#define Else 68
+#define Fi 69
+#define Newcond 70
+#define Setcond 71
+#define Button 72
+#define Windowlink 73
+#define Haslisp 74
+#define Hasup 75
+#define Hasreturn 76
+#define Hasreturnto 77
+#define Lastwindow 78
+#define Endtitems 79
+#define Lispwindowlink 80
+#define Beginpile 81
+#define Endpile 82
+#define Nextline 83
+#define Pastebutton 84
+#define Color 85
+#define Helppage 86
+#define Patch 87
+#define Radiobox 88
+#define ifrecond 89
+#define Math 90
+#define Mitem 91
+#define Pagename 92
+#define Examplenumber 93
+#define Replacepage 94
+#define Inputimage 95
+#define Spadgraph 96
+#define Indentrel 97
+#define Controlbitmap 98
+
+#define NumberUserTokens 98
+
+
+extern char *token_table[];
+
+#ifdef PARSER
+char *token_table[] = {
+ "", /* Dummy token name */
+ "word",
+ "page",
+ "lispcommandquit",
+ "bf",
+ "link",
+ "downlink",
+ "beginscroll",
+ "spadcommand",
+ "nolines",
+ "env",
+ "par",
+ "centerline",
+ "begin",
+ "beginitems",
+ "item",
+ "table",
+ "fbox",
+ "tab",
+ "space",
+ "indent",
+ "horizontalline",
+ "newline",
+ "enditems",
+ "returnbutton",
+ "memolink",
+ "upbutton",
+ "endscroll",
+ "thispage",
+ "returnto",
+ "free",
+ "bound",
+ "lisplink",
+ "unixlink",
+ "mbox",
+ "inputstring",
+ "stringvalue",
+ "spadlink",
+ "inputbitmap",
+ "inputpixmap",
+ "unixcommand",
+ "em",
+ "lispcommand",
+ "lispmemolink",
+ "lispdownlink",
+ "spadcall",
+ "spadcallquit",
+ "spaddownlink",
+ "spadmemolink",
+ "qspadcall",
+ "qspadcallquit",
+ "inputbox",
+ "radioboxes",
+ "boxvalue",
+ "vspace",
+ "hspace",
+ "newcommand",
+ "windowid",
+ "beep",
+ "quitbutton",
+ "begintitems",
+ "titem",
+ "end",
+ "it",
+ "sl",
+ "tt",
+ "rm",
+ "ifcond",
+ "else",
+ "fi",
+ "newcond",
+ "setcond" ,
+ "button",
+ "windowlink",
+ "haslisp",
+ "hasup",
+ "hasreturn",
+ "hasreturnto",
+ "lastwindow",
+ "endtitems",
+ "lispwindowlink",
+ "beginpile",
+ "endpile",
+ "nextline",
+ "pastebutton",
+ "color",
+ "helppage",
+ "patch",
+ "radiobox",
+ "ifrecond",
+ "math",
+ "mitem",
+ "pagename",
+ "examplenumber",
+ "replacepage",
+ "inputimage",
+ "spadgraph",
+ "indentrel",
+ "controlbitmap"
+ };
+#endif
+
+
+/* places from which input may be read */
+#define FromFile 1
+#define FromString 2
+#define FromSpadSocket 3
+#define FromUnixFD 4
+
+extern FILE *unixfd;
+
+/*
+ * Here are the system tokens. These are used internally to help
+ * with parsing and displaying of text
+ */
+
+#define SystemTokens 1001
+#define Lbrace 1001
+#define Rbrace 1002
+#define Macro 1003
+#define Group 1004
+#define Scrollbar 1005
+#define Pound 1006
+#define Lsquarebrace 1007
+#define Rsquarebrace 1008
+#define Punctuation 1009
+#define Dash 1010
+#define Tableitem 1011
+#define Scrollingnode 1012
+#define Headernode 1013
+#define Footernode 1014
+#define Verbatim 1015
+#define Scroll 1016
+#define Dollar 1017
+#define Percent 1018
+#define Carrot 1019
+#define Underscore 1020
+#define Tilde 1021
+#define Cond 1022
+#define Noop 1023
+#define Description 1024
+#define Icorrection 1025
+#define Boxcond 1026
+#define Unkeyword 1027
+#define Titlenode 1028
+#define Paste 1029
+#define Spadsrc 1030
+#define Helpbutton 1031
+#define Spadsrctxt 1032
+
+
+/*
+ * Here are the tokens used to mark the end to some sort of group of
+ * tokens. ie, the tokens found in a centerline command
+ */
+
+#define Endtokens 2000
+#define End1 2001
+#define End2 2002
+#define Endbutton 2003
+#define Endlink 2004
+#define Endheader 2005
+#define Endfooter 2006
+#define Endscrolling 2007
+#define Endgroup 2008
+#define Endarg 2009
+#define Endbox 2010
+#define Endmbox 2011
+#define Endspadcommand 2012
+#define Endpix 2013
+#define Endmacro 2014
+#define Endparameter 2015
+#define Endtable 2016
+#define Endtableitem 2017
+#define End3 2018
+#define Endif 2019
+#define Enddescription 2020
+#define Endinputbox 2021
+#define Endtitle 2022
+#define Endpastebutton 2023
+
+#define Endtypes 3000
+#define Endpage 3002
+#define EndScroll 3007 /* had to use a S because Endscroll is
+ already a keyword */
+
+#define Endcenter 3012
+#define EndItems 3014 /* Same thing here as EndScroll except
+ with the i */
+#define EndTitems 3060 /* Ibid for the T */
+#define Endpatch 3087
+#define Endverbatim 4015
+#define Endmath 4016
+#define Endpaste 4029
+#define Endspadsrc 4030
+
+#endif
diff --git a/src/hyper/token.pamphlet b/src/hyper/token.pamphlet
deleted file mode 100644
index 49360601..00000000
--- a/src/hyper/token.pamphlet
+++ /dev/null
@@ -1,389 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/token}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{token.h}
-<<token.h>>=
-<<license>>
-#ifndef _TOKEN_H_
-#define _TOKEN_H_ 1
-
-/*
- Here are a couple of flags added for whitespace stuff. They tell
- punctuation if there was space in front of it or not
-*/
-
-#define FRONTSPACE 0001
-#define BACKSPACE 0002
-
-/* HyperDoc parser tokens */
-
-typedef struct toke {
- int type; /* token type. One of those listed below */
- char *id; /* string value if type == Identifier */
-} Token;
-
-/*
- User tokens. ie, these can be found on a page
-*/
-
-#define Word 1
-#define Page 2
-#define Lispcommandquit 3
-#define BoldFace 4
-#define Link 5
-#define Downlink 6
-#define Beginscroll 7
-#define Spadcommand 8
-#define NoLines 9
-#define Env 10
-#define Par 11
-#define Center 12
-#define Begin 13
-#define Beginitems 14
-#define Item 15
-#define Table 16
-#define Box 17
-#define Tab 18
-#define Space 19
-#define Indent 20
-#define Horizontalline 21
-#define Newline 22
-#define Enditems 23
-#define Returnbutton 24
-#define Memolink 25
-#define Upbutton 26
-#define Endscroll 27
-#define Thispage 28
-#define Returnto 29
-#define Free 30
-#define Bound 31
-#define Lisplink 32
-#define Unixlink 33
-#define Mbox 34
-#define Inputstring 35
-#define StringValue 36
-#define Spadlink 37
-#define Inputbitmap 38
-#define Inputpixmap 39
-#define Unixcommand 40
-#define Emphasize 41
-#define Lispcommand 42
-#define LispMemoLink 43
-#define LispDownLink 44
-#define Spadcall 45
-#define Spadcallquit 46
-#define Spaddownlink 47
-#define Spadmemolink 48
-#define Qspadcall 49
-#define Qspadcallquit 50
-#define SimpleBox 51
-#define Radioboxes 52
-#define BoxValue 53
-#define VSpace 54
-#define HSpace 55
-#define NewCommand 56
-#define WindowId 57
-#define Beep 58
-#define Quitbutton 59
-#define Begintitems 60
-#define Titem 61
-#define End 62
-#define It 63
-#define Sl 64
-#define Tt 65
-#define Rm 66
-#define Ifcond 67
-#define Else 68
-#define Fi 69
-#define Newcond 70
-#define Setcond 71
-#define Button 72
-#define Windowlink 73
-#define Haslisp 74
-#define Hasup 75
-#define Hasreturn 76
-#define Hasreturnto 77
-#define Lastwindow 78
-#define Endtitems 79
-#define Lispwindowlink 80
-#define Beginpile 81
-#define Endpile 82
-#define Nextline 83
-#define Pastebutton 84
-#define Color 85
-#define Helppage 86
-#define Patch 87
-#define Radiobox 88
-#define ifrecond 89
-#define Math 90
-#define Mitem 91
-#define Pagename 92
-#define Examplenumber 93
-#define Replacepage 94
-#define Inputimage 95
-#define Spadgraph 96
-#define Indentrel 97
-#define Controlbitmap 98
-
-#define NumberUserTokens 98
-
-
-extern char *token_table[];
-
-#ifdef PARSER
-char *token_table[] = {
- "", /* Dummy token name */
- "word",
- "page",
- "lispcommandquit",
- "bf",
- "link",
- "downlink",
- "beginscroll",
- "spadcommand",
- "nolines",
- "env",
- "par",
- "centerline",
- "begin",
- "beginitems",
- "item",
- "table",
- "fbox",
- "tab",
- "space",
- "indent",
- "horizontalline",
- "newline",
- "enditems",
- "returnbutton",
- "memolink",
- "upbutton",
- "endscroll",
- "thispage",
- "returnto",
- "free",
- "bound",
- "lisplink",
- "unixlink",
- "mbox",
- "inputstring",
- "stringvalue",
- "spadlink",
- "inputbitmap",
- "inputpixmap",
- "unixcommand",
- "em",
- "lispcommand",
- "lispmemolink",
- "lispdownlink",
- "spadcall",
- "spadcallquit",
- "spaddownlink",
- "spadmemolink",
- "qspadcall",
- "qspadcallquit",
- "inputbox",
- "radioboxes",
- "boxvalue",
- "vspace",
- "hspace",
- "newcommand",
- "windowid",
- "beep",
- "quitbutton",
- "begintitems",
- "titem",
- "end",
- "it",
- "sl",
- "tt",
- "rm",
- "ifcond",
- "else",
- "fi",
- "newcond",
- "setcond" ,
- "button",
- "windowlink",
- "haslisp",
- "hasup",
- "hasreturn",
- "hasreturnto",
- "lastwindow",
- "endtitems",
- "lispwindowlink",
- "beginpile",
- "endpile",
- "nextline",
- "pastebutton",
- "color",
- "helppage",
- "patch",
- "radiobox",
- "ifrecond",
- "math",
- "mitem",
- "pagename",
- "examplenumber",
- "replacepage",
- "inputimage",
- "spadgraph",
- "indentrel",
- "controlbitmap"
- };
-#endif
-
-
-/* places from which input may be read */
-#define FromFile 1
-#define FromString 2
-#define FromSpadSocket 3
-#define FromUnixFD 4
-
-extern FILE *unixfd;
-
-/*
- * Here are the system tokens. These are used internally to help
- * with parsing and displaying of text
- */
-
-#define SystemTokens 1001
-#define Lbrace 1001
-#define Rbrace 1002
-#define Macro 1003
-#define Group 1004
-#define Scrollbar 1005
-#define Pound 1006
-#define Lsquarebrace 1007
-#define Rsquarebrace 1008
-#define Punctuation 1009
-#define Dash 1010
-#define Tableitem 1011
-#define Scrollingnode 1012
-#define Headernode 1013
-#define Footernode 1014
-#define Verbatim 1015
-#define Scroll 1016
-#define Dollar 1017
-#define Percent 1018
-#define Carrot 1019
-#define Underscore 1020
-#define Tilde 1021
-#define Cond 1022
-#define Noop 1023
-#define Description 1024
-#define Icorrection 1025
-#define Boxcond 1026
-#define Unkeyword 1027
-#define Titlenode 1028
-#define Paste 1029
-#define Spadsrc 1030
-#define Helpbutton 1031
-#define Spadsrctxt 1032
-
-
-/*
- * Here are the tokens used to mark the end to some sort of group of
- * tokens. ie, the tokens found in a centerline command
- */
-
-#define Endtokens 2000
-#define End1 2001
-#define End2 2002
-#define Endbutton 2003
-#define Endlink 2004
-#define Endheader 2005
-#define Endfooter 2006
-#define Endscrolling 2007
-#define Endgroup 2008
-#define Endarg 2009
-#define Endbox 2010
-#define Endmbox 2011
-#define Endspadcommand 2012
-#define Endpix 2013
-#define Endmacro 2014
-#define Endparameter 2015
-#define Endtable 2016
-#define Endtableitem 2017
-#define End3 2018
-#define Endif 2019
-#define Enddescription 2020
-#define Endinputbox 2021
-#define Endtitle 2022
-#define Endpastebutton 2023
-
-#define Endtypes 3000
-#define Endpage 3002
-#define EndScroll 3007 /* had to use a S because Endscroll is
- already a keyword */
-
-#define Endcenter 3012
-#define EndItems 3014 /* Same thing here as EndScroll except
- with the i */
-#define EndTitems 3060 /* Ibid for the T */
-#define Endpatch 3087
-#define Endverbatim 4015
-#define Endmath 4016
-#define Endpaste 4029
-#define Endspadsrc 4030
-
-#endif
-@
-\section{License}
-<<license>>=
-/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-@
-<<*>>=
-<<license>>
-<<token.c>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
-
-
-