Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial revision

  • Loading branch information...
commit eab1131e8b07ceef2187e7addc9128631497da96 0 parents
@docelic docelic authored
Showing with 9,230 additions and 0 deletions.
  1. +185 −0 Makefile
  2. +90 −0 README
  3. +194 −0 bin/dbgen
  4. +214 −0 bin/mkreport
  5. +195 −0 bin/pp
  6. +251 −0 bin/stattree
  7. BIN  cache/cvs-head/.cache.bin
  8. +80 −0 cache/cvs-head/.objectlist.c.txt
  9. +1,842 −0 cache/cvs-head/.objectlist.perl.txt
  10. +3,916 −0 cache/cvs-head/.tags
  11. +19 −0 docbook/catalog.xml
  12. +25 −0 docbook/common.xsl
  13. +31 −0 docbook/docbookxi.dtd
  14. +20 −0 docbook/html-chunks.xsl
  15. +30 −0 docbook/html-common.xsl
  16. +15 −0 docbook/html-nochunks.xsl
  17. +18 −0 docbook/olinkdb.xml
  18. +56 −0 docbook/xmldocs.css
  19. +10 −0 files/tutorial-phase1/bottom
  20. +9 −0 files/tutorial-phase1/catalog.cfg
  21. +5 −0 files/tutorial-phase1/left
  22. +6 −0 files/tutorial-phase1/pages/index.html
  23. +25 −0 files/tutorial-phase1/permissions.txt
  24. +5 −0 files/tutorial-phase1/products/products.txt
  25. +11 −0 files/tutorial-phase1/top
  26. +10 −0 files/tutorial-phase2/bottom
  27. +9 −0 files/tutorial-phase2/catalog.cfg
  28. +5 −0 files/tutorial-phase2/left
  29. +9 −0 files/tutorial-phase2/pages/flypage.html
  30. +21 −0 files/tutorial-phase2/pages/index.html
  31. +5 −0 files/tutorial-phase2/products/products.txt
  32. +6 −0 files/tutorial-phase2/special_pages/missing.html
  33. +11 −0 files/tutorial-phase2/top
  34. +10 −0 files/tutorial-phase3/bottom
  35. +9 −0 files/tutorial-phase3/catalog.cfg
  36. +5 −0 files/tutorial-phase3/left
  37. +9 −0 files/tutorial-phase3/pages/flypage.html
  38. +24 −0 files/tutorial-phase3/pages/index.html
  39. +40 −0 files/tutorial-phase3/pages/ord/basket.html
  40. +5 −0 files/tutorial-phase3/products/products.txt
  41. +6 −0 files/tutorial-phase3/special_pages/missing.html
  42. +11 −0 files/tutorial-phase3/top
  43. +10 −0 files/tutorial-phase4/bottom
  44. +9 −0 files/tutorial-phase4/catalog.cfg
  45. +14 −0 files/tutorial-phase4/etc/profiles.order
  46. +14 −0 files/tutorial-phase4/etc/report
  47. +5 −0 files/tutorial-phase4/left
  48. +85 −0 files/tutorial-phase4/pages/checkout.html
  49. +9 −0 files/tutorial-phase4/pages/flypage.html
  50. +24 −0 files/tutorial-phase4/pages/index.html
  51. +40 −0 files/tutorial-phase4/pages/ord/basket.html
  52. +5 −0 files/tutorial-phase4/products/products.txt
  53. +6 −0 files/tutorial-phase4/special_pages/missing.html
  54. +10 −0 files/tutorial-phase4/special_pages/needfield.html
  55. +5 −0 files/tutorial-phase4/special_pages/receipt.html
  56. +11 −0 files/tutorial-phase4/top
  57. +10 −0 files/tutorial-phase5/bottom
  58. +27 −0 files/tutorial-phase5/catalog.cfg
  59. +14 −0 files/tutorial-phase5/etc/profiles.order
  60. +14 −0 files/tutorial-phase5/etc/report
  61. +17 −0 files/tutorial-phase5/left
  62. +123 −0 files/tutorial-phase5/pages/checkout.html
  63. +9 −0 files/tutorial-phase5/pages/flypage.html
  64. +24 −0 files/tutorial-phase5/pages/index.html
  65. +40 −0 files/tutorial-phase5/pages/ord/basket.html
  66. +38 −0 files/tutorial-phase5/pages/results.html
  67. +5 −0 files/tutorial-phase5/products/products.txt
  68. +6 −0 files/tutorial-phase5/special_pages/missing.html
  69. +10 −0 files/tutorial-phase5/special_pages/needfield.html
  70. +5 −0 files/tutorial-phase5/special_pages/receipt.html
  71. +11 −0 files/tutorial-phase5/top
  72. +1,150 −0 guides/iccattut.xml
  73. +5 −0 images/.xvpics/end-example.png
  74. +5 −0 images/.xvpics/end-example.xcf
  75. BIN  images/.xvpics/example.png
  76. BIN  images/.xvpics/example.xcf
  77. BIN  images/.xvpics/example2.png
  78. BIN  images/.xvpics/example2.xcf
  79. +23 −0 images/.xvpics/icon_ic2.png
  80. BIN  images/1.png
  81. BIN  images/10.png
  82. BIN  images/2.png
  83. BIN  images/3.png
  84. BIN  images/4.png
  85. BIN  images/5.png
  86. BIN  images/6.png
  87. BIN  images/7.png
  88. BIN  images/8.png
  89. BIN  images/9.png
  90. BIN  images/caution.png
  91. BIN  images/end-example.png
  92. BIN  images/end-example.xcf
  93. BIN  images/example.png
  94. BIN  images/example.xcf
  95. BIN  images/example2.png
  96. BIN  images/example2.xcf
  97. BIN  images/home.png
  98. BIN  images/icon_ic.png
  99. BIN  images/icon_ic2.png
  100. BIN  images/important.png
  101. BIN  images/interch-logo1.png
  102. BIN  images/interch-logo1.xcf
  103. BIN  images/logo2.png
  104. BIN  images/next.png
  105. BIN  images/note.png
  106. BIN  images/prev.png
  107. BIN  images/tip.png
  108. BIN  images/toc-blank.png
  109. BIN  images/toc-minus.png
  110. BIN  images/toc-plus.png
  111. BIN  images/up.png
  112. BIN  images/valid-css.png
  113. BIN  images/valid-xhtml10.png
  114. BIN  images/warning.png
185 Makefile
@@ -0,0 +1,185 @@
+#
+# ICDEVGROUP Documentation makefile
+# http://www.icdevgroup.org
+# http://www.icdevgroup.org/cgi-bin/cvsweb/xmldocs
+#
+
+# Base definitions
+SHELL = /bin/sh
+export OUTPUT = OUTPUT
+export CACHE = cache
+export XML_CATALOG_FILES = $(DOCBOOKDIR)/catalog.xml
+DOCBOOKDIR = docbook
+XSLT = xsltproc
+XSLT_FLAGS = --xinclude
+
+VPATH = guides
+
+## ## ##
+# Future updates (as documentation expands) go here:
+GUIDES = $(OUTPUT)/iccattut.html $(OUTPUT)/iccattut
+OLINKDBS_UNCHUNKED = $(DOCBOOKDIR)/iccattut-nochunks-targets.db
+OLINKDBS_CHUNKED = $(DOCBOOKDIR)/iccattut-chunks-targets.db
+
+BASE_OUTPUT = output-skel image-files support-files css
+TREE_STATS = tree-cache tree-reports
+# END
+## ## ##
+#
+# Plain "make" cleans up and builds everything. To invoke targets
+# manually, use names from the section above.
+#
+# The targets not autobuilt are tree-stats, tags and objlists. They generate
+# files in cache/. cache/ contains information derived from IC
+# releases.
+# When you want to re-generate the cache information (because say,
+# CVS update happends), make sure the "sources" directory or symlink
+# points to a directory with the release you wish to update (for
+# example, "cvs-head" or "5.2.0"), then run 'make cache'.
+# And don't forget to commit updated cache/ files (if any) to docs CVS.
+
+############## No need to modify below ##############
+
+
+.PHONY: $(BASE_OUTPUT) $(TREE_STATS) cache distclean clean FORCE
+
+all: distclean $(BASE_OUTPUT) $(TREE_STATS) \
+ $(OLINKDBS_UNCHUNKED) $(OLINKDBS_CHUNKED) \
+ $(GUIDES)
+
+#
+# XML documentation
+#
+#@echo GOT $*-shortname / $?-all prereqs / $@-output.html / $<-first prereq
+$(OUTPUT)/%.html: %.xml $(DOCBOOKDIR)/* OUTPUT
+ # Unchunked document
+ $(XSLT) $(XSLT_FLAGS) \
+ --stringparam current.docid $* \
+ --stringparam target.database.document ../$(DOCBOOKDIR)/olinkdb.xml \
+ -o $@ \
+ $(DOCBOOKDIR)/html-nochunks.xsl $<
+
+$(OUTPUT)/%: %.xml $(DOCBOOKDIR)/* OUTPUT
+ # Chunked document
+ $(XSLT) $(XSLT_FLAGS) \
+ --stringparam current.docid $* \
+ --stringparam target.database.document ../$(DOCBOOKDIR)/olinkdb.xml \
+ -o $@/ \
+ $(DOCBOOKDIR)/html-chunks.xsl $<
+
+#
+# OLink databases
+#
+$(DOCBOOKDIR)/%-nochunks-targets.db: %.xml
+ # Generate olink databases for unchunked html files
+ $(XSLT) $(XSLT_FLAGS) \
+ --stringparam collect.xref.targets only \
+ --stringparam targets.filename $@ \
+ $(DOCBOOKDIR)/html-nochunks.xsl \
+ $<
+
+$(DOCBOOKDIR)/%-chunks-targets.db: %.xml
+ # Generate olink databases for chunked html files
+ $(XSLT) $(XSLT_FLAGS) \
+ --stringparam collect.xref.targets only \
+ --stringparam targets.filename $@ \
+ $(DOCBOOKDIR)/html-chunks.xsl \
+ $<
+
+#
+# Support files
+#
+OUTPUT: $(BASE_OUTPUT)
+
+cache: tree-stats objlists tags
+
+objlists:
+ # Generate human-readable ctags information
+ cd sources; for p in *; do \
+ cd ..; \
+ ctags -R -x --languages=perl --perl-kinds=cls sources/$$p/ \
+ > $(CACHE)/$$p/.objectlist.perl.txt; \
+ ctags -R -x --languages=c --c-kinds=cdf sources/$$p/ \
+ > $(CACHE)/$$p/.objectlist.c.txt; \
+ cd sources \
+ ; done
+
+tags:
+ # Generate ctags information
+ cd sources; for p in *; do \
+ cd ..; \
+ ctags -f $(CACHE)/$$p/.tags -R --extra=fq --fields=afikKlmnsSz --line-directives sources/$$p; \
+ cd sources \
+ ; done
+
+tree-stats:
+ # Generate stats to bin dump
+ # Only do that when sources/ is populated
+ cd sources; for p in *; do \
+ cd ..; \
+ mkdir -p $(CACHE)/$$p; \
+ ./bin/stattree sources/$$p \
+ ; done
+
+tree-reports:
+ # Make report from $(OUTPUT)/<ver>/.cache.bin
+ cd cache; for p in *; do \
+ cd ..; \
+ mkdir -p $(CACHE)/$$p; \
+ ./bin/mkreport cache/$$p \
+ ; done
+
+tree-cache:
+ # Copy tree stats to $(OUTPUT)
+ for p in cache/*; do \
+ cp -a $$p $(OUTPUT) \
+ ; done
+
+output-skel:
+ # Mirror cache/ structure in output (actually, determine releases)
+ mkdir -p $(OUTPUT)
+ cd cache; for p in *; do \
+ mkdir -p ../$(OUTPUT)/$$p \
+ ; done
+ mkdir -p $(OUTPUT)/images
+ mkdir -p $(OUTPUT)/files
+
+image-files: $(OUTPUT)/images
+ # Images
+ #cp images/*.{png,gif,jpg,jpeg} $(OUTPUT)/images/
+ -cp images/*.png $(OUTPUT)/images/
+
+support-files:
+ # Copy support files
+ cp -a files/* $(OUTPUT)/files/
+ cp bin/dbgen $(OUTPUT)/files/
+ cd files; for p in *; do \
+ if test -d $$p; then \
+ tar cf ../$(OUTPUT)/files/$$p.tar $$p; \
+ tar zcf ../$(OUTPUT)/files/$$p.tgz $$p; \
+ tar jcf ../$(OUTPUT)/files/$$p.tbz2 $$p; \
+ fi \
+ ; done
+
+css:
+ # Copy css definitions
+ cp $(DOCBOOKDIR)/*.css $(OUTPUT)/
+
+#
+# sources/ directory related
+# TODO Make target that conveniently checks out all IC releases from CVS,
+# sets them in appropriate directories under cache/ and runs the tree
+# statistics generator.
+
+#
+#
+#
+distclean clean:
+ -rm -r $(OUTPUT)
+ -rm $(DOCBOOKDIR)/*.db
+ -for p in $(CACHE)/*; do \
+ rm $$p/* \
+ ; done
+
+FORCE: ;
+
90 README
@@ -0,0 +1,90 @@
+
+The Interchange Development Group
+http://www.icdevgroup.org
+
+ICDEVGROUP Documentation Set
+http://www.icdevgroup.org/cgi-bin/cvsweb/xmldocs/
+
+
+INTRODUCTION
+
+The (new) Interchange XML documentation set is completely self-contained.
+To build the complete documentation set, run:
+
+ make
+
+To build specific targets, see Makefile for target names.
+
+
+PREREQUISITES
+
+To perform a successful build, this programs and modules must be available:
+
+ - Perl
+ - Shell commands: mkdir, cp, tar, gzip, bzip2
+ - DocBook XML
+ - xsltproc
+
+
+FINAL OUTPUT
+
+During the invocation of 'make', few files will be created:
+
+ docbook/*.db - OLink DB files generated from source .xml files
+
+ cache/<ver>/* - Various Interchange source tree statistics, available
+ over a filesystem interface. (For XInclusion in .xml
+ sources and similar purposes). The files are generated
+ from cache/<ver>/.cache.bin.
+
+ OUTPUT/ - Autogenerated:
+ directory containing the actual completely self-contained
+ and interlinked documentation set. Once it's created, you
+ can move it out of the build tree and package as you see
+ fit.
+
+
+DEVELOPMENT NOTES
+
+
+ The directory structure:
+ Makefile - Main Makefile
+ bin - Helper tools
+ cache - Interchange source trees metadata
+ docbook - DocBook XML support files
+ files - Support files, such as examples etc.
+ guides - Collection of guides
+ howtos - Collection of howtos
+ refs - Collection of reference pages
+ images - All images
+ tmp - A scratch space and a kind of a pending/ directory.
+ If you have a chunk which you'd like to integrate in
+ the docset, but don't have the time to prepare it
+ yourself, just drop it in there and someone will pick
+ it up.
+
+
+ Updating cache/:
+ The dotfiles found in cache/ can only be generated when the sources/
+ directory is present, and contains Interchange releases in directories
+ named after release numbers (with the exception of "cvs-head").
+ (Or the "sources" file can be a symlink to the right location where
+ you keep such directory structure).
+
+ Once that's in place, run "make cache". This will regenerate files for
+ the versions you have.
+
+ As this is only rarely done (only when the release changes due to an
+ important backport or something - and even then it probably doesn't
+ change any figures because the updates are small), the generated files
+ *are* kept in the CVS because they can be considered static.
+
+
+ The XML "preprocessor" tool:
+ There's bin/pp tool which you can use to write XML more conveniently.
+ See the script itself for usage notes.
+
+
+
+Davor Ocelic, docelic@icdevgroup.org
+
194 bin/dbgen
@@ -0,0 +1,194 @@
+#!/usr/bin/perl
+# Davor Ocelic, docelic@mail.inet.hr
+# Simple perl script that creates text database files.
+
+#
+# PURPOSE:
+# dbgen.pl can be used to quickly create sample Minivend
+# or Interchange databases. It should come handy during the
+# test phase.
+#
+# It currently creates text, TAB delimited files.
+#
+# The generated data will, of course, be meaningless, but the
+# user can specify column names and types, which should allow
+# him to test the engine on arbitrary number of random-generated
+# records.
+#
+# COMMAND LINE OPTIONS:
+# -f --fields : Set column names
+# -v --values : Specify data types for the columns.
+# Use the same order in which you specified --fields
+# -c --count : The number of records to generate
+# -d --debug --nodebug : Print few lines of debug data
+# -r --chartable : Load in the charset/symbols to use from a file.
+#
+# USAGE:
+# Use program defaults for column names and types, and print out
+# 5 sample records:
+# perl dbgen.pl
+#
+# Which is equal to:
+# perl dbgen.pl --fields='sku|description|price'
+# --values='INC(0,1)|STRAND(8)|RAND(1500,"%.2f")'
+# --count=5
+#
+# SYNTAX:
+# --values='INC(0,1)|STRAND(8)|RAND(1500,"%.2f")' can also be specified as:
+# --values='INC(0,1)|STRAND(8)' --values='RAND(1500,"%.2f")'
+#
+# The pipe (|) character is used as the element separator.
+#
+# The "fields" option just accepts the column names, where their order
+# in the database file is the same as the one on the command line.
+# For example, this specifies a 5-column db:
+# --fields="sku|description|price" --fields="desc_long|quant"
+#
+#
+# The "values" field accepts column specifications, and can be any
+# combination of:
+# INC(st,inc) - start from "st", and increment by "inc". Useful for
+# auto-increment fields or unique keys (SKUs for example).
+# For example, --fields=sku --values='INC(0,2)' --count 4
+# would create a single-column table with SKUs 0,2,4 and 8 (start from 0
+# and increment by 2 in each of 4 iterations).
+# RAND(num,'fmt') - generate a random number, not greater than "num",
+# and output it via the standard printf routine, using "fmt" as the
+# format specification.
+# STRAND(len) - Using the characters available in a specified character
+# map, create a random string of length "len". When specifying a custom
+# character map, each "character" has to be alone in it's own line.
+# It is also possible to specify /usr/share/dict/words or something
+# similar as the "chartable" file, but then the generated string lengths
+# would not be exact (they would be equal, or few characters larger than
+# the length you specified).
+# SET("something") - Fixed-content field. Anything you specify will be
+# inserted in the database verbatim.
+#
+#
+
+use Getopt::Long;
+
+# Basic init
+my @fields = ();
+my @values = ();
+my $count = 5;
+my @chartable = ();
+my $current_field_num = 0;
+my $debug = 0;
+my @defchartable = qw/a b c d e f g h i j k l m n o p q r s t u w x y z _/;
+push (@defchartable, " ");
+
+# GetOptions
+unless ( GetOptions (
+ "f|fields=s" => \@fields,
+ "v|values=s" => \@values,
+ "c|count=s" => \$count,
+
+ "d|debug!" => \$debug,
+ "r|chartable=s" => \$chartablefile
+
+)) { die "Can't process command line options\n" } ;
+
+# Option checks
+@fields = split(/\|/, join('|', @fields));
+@values = split(/\|/, join('|', @values));
+unless ($chartablefile) {
+ @chartable = @defchartable;
+} else {
+ open(CHARTABLE, "< $chartablefile")
+ or die "Can't open character table file '$chartablefile' for reading ($!)\n";
+ while (<CHARTABLE>) {
+ chomp;
+ push (@chartable, $_);
+ }
+ close(CHARTABLE);
+}
+
+# Okay, set defaults here.
+scalar(@fields) or @fields = qw/sku description price/;
+scalar(@values) or @values = qw/INC(0,1) STRAND(16) RAND(1500,'%.2f')/;
+
+# Check for fields/values match
+die "Field/value parameters do not match\n" unless (scalar(@fields) == scalar(@values));
+
+# Print out summary
+if ($debug) {
+ print STDERR "FIELDS(", scalar(@fields), "): ", join(',', @fields), "\n";
+ print STDERR "VALUES(", scalar(@values), "): ", join(',', @values), "\n";
+ print STDERR "CHARTABLE: ", join(',', @chartable), ".\n";
+ print STDERR " COUNT: ", $count, "\n";
+}
+
+# Let's prepare the array we will use in a loop to produce results
+for (my $p = 0; $p < scalar(@fields); $p++ ) {
+ # So, each entry has an array which holds its definition and a value from the previous pass
+ $runtime[$p] = $values[$p];
+ $oldval[$p] = '';
+}
+
+
+# Okay, let's begin
+print join("\t", @fields), "\n";
+
+
+for (my $l = 0; $l < $count; $l++ ) {
+ for (my $p = 0; $p < scalar(@runtime); $p++ ) {
+ $current_field_num = $p;
+ my $res = eval ( $runtime[$p] );
+ print $res;
+ print $p < $#runtime ? "\t" : "\n";
+ $oldval[$p] = $res;
+ }
+}
+
+
+
+
+
+
+
+## Helper functions
+# strand(length) - generate a random string of specified 'length'
+sub STRAND {
+ my $len = shift;
+ my $rndstring = '';
+ # ascii space from 65 to 91
+
+ unless ( $len =~ m/^\d+$/ ) { die "STRAND argument '$len' is invalid\n" };
+
+ for (my $p = 0; $p < $len; $p++ ) {
+ my $rndchr = $chartable[int(rand(scalar(@chartable)))];
+ $rndstring .= $rndchr;
+ length($rndchr) > 1 and $rndstring .= " ";
+ # Just to cover the case of specifying /usr/share/dict/words
+ # as the character table file
+ last if ( length($rndstring) >= $len );
+ }
+
+ return $rndstring;
+}
+
+
+# random number
+sub RAND {
+ my $max = shift;
+ my $fmtstring = shift;
+ my $last = shift;
+
+ my $rndnumber = rand($max);
+ return printf($fmtstring, $rndnumber);
+
+}
+
+# inc: starts with x, and increments by y in each pass
+sub INC {
+ my $start = shift;
+ my $inc = shift;
+
+ return "$oldval[$current_field_num]" ne '' ? $oldval[$current_field_num] + $inc : $start;
+}
+
+# Simple user-defined value for a field
+sub SET { return shift; }
+
214 bin/mkreport
@@ -0,0 +1,214 @@
+#!/usr/bin/perl
+
+# Loads csche dump from stattree and generates statistics
+# TODO needs serious work (on producing report.txt file)
+
+use warnings;
+use strict;
+use Fatal qw/chdir/;
+use File::Find;
+use Data::Dumper;
+use Getopt::Long;
+use Storable qw/nstore_fd fd_retrieve/;
+use Fcntl qw/:DEFAULT :flock/;
+
+$Data::Dumper::Indent = 1;
+$Data::Dumper::Terse++;
+$Data::Dumper::Sortkeys++;
+
+my $dumpdb = 0;
+my $verbose = 0;
+my %refcache; # memory cache of Storable files. Not really needed but I
+ # copied old code which had it, so ...
+my %hash; # complete tree data
+my $cachedir = $ENV{CACHE} || "cache";
+my $reportdir = $ENV{CACHE} || "cache";
+my %i; # internally derived data
+
+unless ( GetOptions (
+ "verbosedb|dumpdb|d!" => \$dumpdb,
+ "verbose|v!" => \$verbose,
+)) { die "Error parsing options\n" }
+
+@ARGV == 1 or die "Usage: $0 path[/]\n";
+
+
+my $path = shift;
+( my $dumppath = $path ) =~ s#.+?/##;
+( $i{ver} = $dumppath ) =~ s/\/$//;
+my $dumpdir = $dumppath;
+$dumppath .= "/.cache.bin";
+
+# Load DB
+loaddb( "$cachedir/$dumppath" );
+
+# First dump leafnodes-to-files
+# Hashvalue -> file conversion
+my @stack = ();
+while (my($k,$v) = each %hash) {
+ procitem(\@stack, $k,$v);
+}
+
+open(OUT, "> $reportdir/$i{ver}/treestats.txt") or
+ die "Cant write/open report file: $!\n";
+select OUT;
+
+O("
+== Interchange version $i{ver}
+
+ =FILES= ===%=== ===BYTES=== ===%===
+
+ Overall:${\( gs() )}
+
++ Perl code:${\( gs('extensions', [qw/pm pl/], 1) )}
+
+ C code:${\( gs('extensions', [qw/c/], 0) )}
+ HTML pages:${\( gs('extensions', [qw/html/], 0) )}
+
++ ITL Tags:${\( gs('extensions', [qw/coretag tag/], 1) )}
+
++ Images:${\( gs('extensions', [qw/png gif jpg/], 1) )}
+
+ Text:${\( gs('extensions', [qw/txt/], 0) )}
+
+ =KLOCS= ===%===
+
++ KLOCS:${\( gs('klocs', [qw/code html coretag tag pod comment/],1) )}
+
+");
+
+
+close (OUT);
+exit 0;
+
+#################################################################
+# Helpers below
+
+sub gs {
+# my $stype = shift;
+# my @exts = @{(shift)};
+ my @stat = (0,0,0,0); # important to initialize, we use $#stat below
+# my $extended = shift;
+ my %estats;
+#
+ $^A = "";
+#
+# # BY EXTENSION
+# if ( $stype eq 'extensions' ) { # By extension
+# if ( @exts ) {
+# for my $ext ( @exts ) {
+# $estats{$ext}[0] += $h{$stype}{$ext}{files};
+# $estats{$ext}[2] += $h{$stype}{$ext}{size};
+# $estats{$ext}[1] = sprintf("%.2f", $estats{$ext}[0] /
+# $h{total}{files} * 100);
+# $estats{$ext}[3] = sprintf("%.2f", $estats{$ext}[2] /
+# $h{total}{size} * 100);
+#
+# $stat[$_] += $estats{$ext}[$_] for (0..$#stat);
+# # Fill empty fields with ""
+# push @{$estats{$ext}}, "", "", "", "";
+# }
+#
+# } else { # Total statistics
+ unless ( @_ ) {
+ @stat = ( $hash{total}{files}, "100.00",
+ $hash{total}{size}, "100.00",
+ $hash{total}{lines}, "100.00" );
+ }
+#
+# } elsif ( $stype eq 'klocs' ) { # By contents
+# @stat = (0, 0);
+# if ( @exts ) {
+# for my $styp ( @exts ) {
+# $estats{$styp}[0] += $h{$stype}{$styp}{lines};
+# $estats{$styp}[1] = sprintf("%.2f", $estats{$styp}[0] /
+# $h{total}{klocs} * 100);
+# $estats{$styp}[0] = sprintf("%.2f", $estats{$styp}[0] / 1000);
+#
+# # Fill empty fields with ""
+# push @{$estats{$styp}}, "", "", "", "";
+#
+# for my $f (0..$#stat) { $stat[$f] += $estats{$styp}[$f] }
+# }
+# } else {
+# @stat = ( $h{total}{klocs}, "100.00" );
+# }
+# }
+#
+# unless ( $stype eq 'klocs' ) {
+ for (my $i = 0; $i <= $#stat; $i+=2 ) {
+ ( $stat[$i] = reverse $stat[$i] ) =~ s/(.{3})(?!$)/$1,/g;
+ $stat[$i] = reverse $stat[$i];
+ }
+ for my $key ( keys %estats ) {
+ ( $estats{$key}[0] = reverse $estats{$key}[0] ) =~ s/(.{3})(?!$)/$1,/g;
+ ( $estats{$key}[2] = reverse $estats{$key}[2] ) =~ s/(.{3})(?!$)/$1./g;
+ $estats{$key}[0] = reverse $estats{$key}[0];
+ $estats{$key}[2] = reverse $estats{$key}[2];
+ }
+# }
+
+ # Fill empty fields with ""
+ push @stat, "", "", "", "";
+
+ formline <<'ENDD', @stat;
+@>>>>>>> @>>>>>> @>>>>>>>>>> @>>>>>>
+ENDD
+
+# if ( $extended ) {
+# for my $ext ( @exts ) {
+# formline <<'ENDD', $desc{$ext} || $ext, @{$estats{$ext}};
+#`@>>>>>>>>>>>:@>>>>>>> @>>>>>> @>>>>>>>>>> @>>>>>>
+#ENDD
+# }
+# }
+ chomp($^A); $^A
+}
+
+sub loaddb {
+ my $dbpath = shift;
+
+ unless ( exists $refcache{$dbpath} ) {
+ open( IN, "< $dbpath") or
+ die "Can't open database ($dbpath) ($!).\n";
+ flock( IN, LOCK_SH ) or
+ die "Can't shared-lock database ($dbpath) ($!).\n";
+ $refcache{$dbpath} = fd_retrieve( \*IN );
+ close IN or
+ die "Can't properly close database ($dbpath) ($!).\n";
+ }
+
+ %hash = %{ $refcache{$dbpath} };
+
+ if ( $dumpdb ) {
+ print STDERR Dumper \%hash;
+ exit 0;
+ }
+}
+
+# Recursive procedure to find leaf nodes in a hash
+# (For hashvalue -> file conversion)
+sub procitem {
+ my ($stack, $key, $val) = @_;
+
+ # Ignores:
+ return if "$key" eq "tree";
+ return if "@$stack" eq "total" and $key eq "matches";
+
+ unless (ref $val) {
+ local $" = ".";
+ open OUT, "> $cachedir/$dumpdir/@$stack.$key" or
+ die "Can't dump $dumpdir/@$stack.$key ($!)\n";
+ print OUT $val;
+ close OUT;
+ } else {
+ push @$stack, $key;
+ while (my($k,$v) = each %$val) {
+ procitem($stack, $k, $v);
+ }
+ pop @$stack;
+ }
+}
+
+sub O { print "@_\n"; print STDOUT "@_\n" if $verbose }
+
195 bin/pp
@@ -0,0 +1,195 @@
+#!/usr/bin/perl
+
+# docelic@icdevgroup.org / July 10, 2004.
+
+# Script that expands various shorthands to valid XML. Useful if
+# writing long chunks of new XML and want a little help in the
+# process. Then preprocess the source with this script, and you'll
+# get full, expanded XML out.
+#
+# See comments below for all the syntax and expansions/modifications
+# performed on the input stream (search for "# \d:" to jump directly)
+
+use warnings;
+use strict;
+
+# Translation table
+my %tt = (
+ L => 'itemizedlist',
+ I => [qw/listitem para/],
+ P => 'para',
+ C => 'command',
+ E => 'emphasis',
+ PL => 'programlisting',
+ PLC => 'programlisting', # PL with CDATA
+ SRC => 'xi:include',
+ NOTE => [qw/note para/],
+ IMP => [qw/important para/],
+ WARN => [qw/warning para/],
+);
+
+# Mimic docbook entities
+my %entities = (
+ IC =>'<ulink url="http://www.icdevgroup.org">Interchange</ulink>',
+ ICCVS => '<ulink url="http://www.icdevgroup.org/i/dev/cvs.html">CVS</ulink>',
+ ICDL => '<ulink url="http://http://www.icdevgroup.org/i/dev/download.html">tarball</ulink>',
+ ICSTDCAT => 'interchange-cat-standard',
+ FS => '<ulink url="http://www.fsf.org">Free Software</ulink>',
+ GNU => '<ulink url="http://www.gnu.org">GNU</ulink>',
+ DEB => '<ulink url="http://www.debian.org">Debian</ulink>',
+ RH => '<ulink url="http://www.redhat.com">Red Hat</ulink>',
+ "RFC-STATE" => '<ulink url="http://www.ietf.org/rfc/rfc2109.txt">RFC 2109</ulink>',
+);
+
+# Default parameters (Watch out for the starting/ending space!)
+my %dp = (
+ SRC => " parse='text' "
+);
+
+# Default content for tags
+my %dcstart = (
+ PLC => '<![CDATA[',
+);
+my %dcend = (
+ PLC => ']]>',
+);
+
+my $sect = 0;
+my $active = 1;
+
+while (<STDIN>) {
+
+ my $line = $_;
+
+ #
+ # 0: control flow. Possibility to turn off the expander (to avoid
+ # wrong expansions in say, <programlisting><![CDATA[ ... ]]>
+ #
+ # Stop preprocessor with <-NOEX(PAND)?>, re-enable with <-EX(PAND)?>
+ #
+ # Although xml uses only lowecase tags and we use only uppercase,
+ # the dash in "<-.*" needs to be present just to be sure we don't
+ # clash with html or anything eventually in uppercase.
+ #
+ if ( $line =~ s/<-NOEX(PAND)?>// ) { $active = 0; next}
+ if ( $line =~ s/<-EX(PAND)?>// ) { $active++; next}
+ goto DUMP unless $active;
+
+ # 1: Handle automatic IDS:
+ #
+ # <sectX>
+ # <title>something cool</title>
+ #
+ # becomes
+ #
+ # <sectX id="SomethingCool">
+ # <title>Something Cool</title>
+ #
+ # If <sect> contains a parameter (say, <sect something>), it's skipped.
+ # Also, if the <title> is not found on the next line, everything's
+ # passed on as-is.
+ #
+ if ( /(\s*)<sect(.)>\s*$/ ) {
+ my ( $space, $sectnum ) = ( $1, $2 );
+ my $title = <STDIN>;
+ $title =~ m#<title>(.+)</title># and do {
+ my @titles = split / /, $title;
+ for my $r (@titles) { $r = ucfirst($r) unless $r =~ /^(a|and|of|in|the|for|or)$/; }
+ $title = "@titles";
+ $title =~ m#<title>(.+)</title>#;
+ ( my $stitle = $1 ) =~ s/\s+//g;
+ $stitle =~ s/[\/\-\.,]/_/g;
+ $stitle =~ s/.html?$//;
+ $stitle =~ s/^_//;
+ $line = "$space<sect$sectnum id='$stitle'>\n";
+ } or do {
+ $line = "$space<sect$sectnum>\n";
+ };
+ $line .= $title;
+ }
+
+
+ #
+ # 2: GENERIC EXPANDER - turn every <X arg > or <X.arg.> to
+ # <xexpanded arg>. And every </X> to </xexpanded>.
+ # Character before "arg" and the one after it must match, they
+ # designate argument list (space is also accepted as shown above).
+ #
+ # Expansion is done according to a list, and expansion can turn one
+ # element into more elements: for example, <I> turns into
+ # <listitem><para> and </I> to </para></listitem>. Tags can also
+ # have values appended. For example, <PL> turns into
+ # "<programlisting><![CDATA[" and </PL> into "]]></programlisting>".
+ #
+ # General invocation is:
+ # For start tags: <-SHORTNAME((.)args(.))?>
+ # (where the first "." and second "." must be the same characters).
+ # For end tags: <-/SHORTNAME>
+ # Which shorthands are available, check in the list at the top
+ # of the file.
+ #
+ # 1- cmd name (optional with "/"), 4- arguments
+ while ( $line =~ s/<-(\/?[A-Z]+)((.)(.+?)\3)?>/expandtag($1,$4)/ge ) {}
+
+
+ #
+ # 3: TODO
+ # Automatic file includer. If you call, say, <-INCL xyz>, it checks
+ # what variants of files/xyz* exist, and adds links to each.
+ # If we have, say, files/{xyz/,xyz.tar,xyz.tgz,xyz.tbz2}, INCL
+ # would detect all that and provide <ulinks> for each of the
+ # packages.
+
+
+ #
+ # 4: Simple entities replacement
+ while ( $line =~ s/&(\S+?);/$entities{$1} || $1/ge ) {}
+
+
+ # Finished
+ DUMP:
+ print $line;
+}
+
+
+sub expandtag {
+ # tag is in capslock (to differ from xml). $arg is optional
+ my ($tag, $arg) = @_;
+ length $tag or warn "Empty tag ?\n";
+
+ my $rev = ( $tag =~ s/^\/// ); # is it a closing tag?
+ $arg = " $arg" if $arg or $arg = ""; # for easier output later
+ my $ret = ""; # final string we'll return
+
+ # get the list of tags we expand to. in the tt table, you can specify
+ # both a scalar (single tags) and arrays if we expand to multiple tags.
+ my @tags = $tt{$tag} ?
+ ( @{ ref $tt{$tag} ? $tt{$tag} : [$tt{$tag}] } ) : ();
+
+ # Check for unusual patterns
+ die "Closing tag has args in '$tag $arg' ?\n" if $rev and $arg;
+ unless ( scalar @tags ) {
+ #warn "Translation empty for $tag ?\n"
+ # We pass unrecognized tags just lowercased. (Maybe they have the
+ # $dcstart{} or $dcend{} entry even they're not in %tt ).
+ @tags = ( lc($tag) );
+ }
+
+ # Reverse the output line if we're closing
+ @tags = reverse @tags if $rev;
+
+ # build the return value
+ my $cnt; # Adding user parameters only to the first tag (if tag expands
+ # to multiple tags)
+ for my $t (@tags) {
+ $ret .=
+ ( $rev ? $dcend{$tag} || "" : "" ) . # prepend $dcend{} before close
+ '<' . ( $rev ? "/" : "" ) . $t . # we have <tag or </tag now
+ ( !$rev ? $dp{$tag} || "": "" ) . # Default parms for a tag
+ ( !$cnt++ ? $arg||"" : "" ) . # User-specified parms for first tag!
+ '>' . # Ended tag
+ ( $rev ? "" : $dcstart{$tag} || "" ); # append $dcstart{} after open
+ }
+ $ret;
+}
+
251 bin/stattree
@@ -0,0 +1,251 @@
+#!/usr/bin/perl
+#
+# Perl script to build Interchange source tree statistics.
+# Data is collected and dumped using Storable, that's where
+# this script's job ends.
+#
+# Other tools can then only read the dump to get information,
+# they shouldn't parse the sources again.
+#
+
+use warnings;
+use strict;
+use Fatal qw/chdir/;
+use File::Find;
+use Data::Dumper;
+use Getopt::Long;
+use Storable qw/nstore_fd fd_retrieve/;
+use Fcntl qw/:DEFAULT :flock/;
+
+# Dumper behavior
+$Data::Dumper::Indent = 1;
+$Data::Dumper::Terse++;
+$Data::Dumper::Sortkeys++;
+
+# Vars
+my $verbose = 0;
+my $cachedir = $ENV{CACHE} || "cache";
+my %hash;
+my $cpath = $ENV{PWD};
+
+# All types should be listed here or the stats wont. It should be
+# reported if an unknown file is found in the archive
+# Order is important. First match wins.
+my %binary_types = (
+ images => [qw/\.gif \.jpeg \.jpg \.png \.bmp/],
+ );
+my %text_types = (
+ database => [qw|\.(..)?sql \.ora \..?dbm \.notes \.csv
+ /products/\S+\.txt \.asc|],
+ release_helpfile => [qw/^WHATSNEW-\d+\.\d+ README(\..+)? TODO
+ ^LICENSE ^MANIFEST(\.skip)? ^UPGRADE \.cvsignore \.append/],
+ build_helpfile => [qw/configure ^debian.* ^SPECS.*/],
+ catalog_helpfile => [qw/\.access \.log \.error \.(auto)?number \.empty/],
+ config => [qw/\.cfg \.dist/],
+ c => [qw/\.c \.in/],
+ perl => [qw/\.pl \.pm/],
+ usertag => [qw|UserTag/\S+\.tag \.tag|],
+ systemtag => [qw|SystemTag/\S+\.coretag|],
+ uitag => [qw|UI_Tag/\S+\.coretag|],
+ filter => [qw/\.filter/],
+ actionmap => [qw/\.am/],
+ html => [qw/\.css \.html?/],
+ widget => [qw/\.widget/],
+ profile => [qw|/profiles/.+ \.profiles \.login \.order|],
+ globalsub => [qw|/globalsub/.+|],
+ variable => [qw|/vars/.+ /variables/.+|],
+);
+
+my $binary_types;
+my $text_types;
+for ( keys %binary_types ) { $binary_types += scalar @{ $binary_types{$_} } }
+for ( keys %text_types ) { $text_types += scalar @{ $text_types{$_} } }
+
+# A general overview: how many different contents do we have
+$hash{total}{types} = $binary_types + $text_types;
+$hash{total}{binary_types} = $binary_types;
+$hash{total}{text_types} = $text_types;
+
+
+# Parse args (not much available anyway :)
+unless ( GetOptions (
+ "verbose|v!" => \$verbose,
+)) { die "Error parsing options\n" }
+
+@ARGV == 1 or die "Usage: $0 path[/] \n";
+
+# $path is the dir to process, $dumppath is relocated name, say
+# sources/cvs-head becomes output/cvs-head/cache
+my $path = shift;
+( my $dumppath = $path ) =~ s#.+?/##;
+my $dumpdir = $dumppath;
+$dumppath .= "/.cache.bin";
+
+# Convenient routine to just discover all files in a module
+chdir $path; # Go into the directory
+find({
+ wanted => \&wanted,
+ bydepth => 0,
+ no_chdir=> 1,
+}, ".");
+chdir $cpath; # Return to starting location
+
+
+# Dump
+print STDERR Dumper \%hash if $verbose;
+dumpdb( "$cachedir/$dumppath" );
+
+exit 0;
+
+#################################################################
+# Helpers below
+sub wanted {
+ ( my $file = $_ ) =~ s/^\.\///;
+
+ # Things we ignore
+ return if /(^|\/)(CVS|\.cvs|\.svn|\.autoload)(\/.+[^\/])?$/;
+
+ stat($file);
+
+ # totals
+ if ( -d $file ) {
+ $hash{total}{directories}++;
+ $hash{tree}{$file}{type} = "directory";
+ return;
+ } else {
+ $hash{total}{files}++;
+ $hash{total}{size} += (stat _)[7];
+ }
+
+ # file data itself (collected for all types)
+ $hash{tree}{$file} = {
+ size => (stat _)[7],
+ atime => (stat _)[8],
+ mtime => (stat _)[9],
+ ctime => (stat _)[10],
+ };
+
+ #
+ # Make sure the file extension is known (we're entering
+ # content-based processing now, not filename-based as above).
+
+ my $ftype;
+ my $fsubtype;
+ my $fext;
+ # Binary
+ for my $k ( keys %binary_types ) {
+ for my $t ( @{ $binary_types{$k} } ) {
+ if ( $file =~ /$t$/i ) {
+ $ftype = "binary"; $fsubtype = "$k"; $fext = $t;
+ goto EXTDONE;
+ }
+ }
+ }
+ #Text
+ for my $k ( keys %text_types ) {
+ for my $t ( @{ $text_types{$k} } ) {
+ if ( $file =~ /$t$/i ) {
+ $ftype = "text"; $fsubtype = "$k"; $fext = $t;
+ goto EXTDONE;
+ }
+ }
+ }
+ # Unknown
+ print STDERR "$file UNKNOWN\n" if $verbose;
+ return; # We're not interested in handling that
+
+ EXTDONE:
+
+ # ftype, fsubtype and fext are known here
+ $hash{total}{$ftype."_files"}++;
+ $hash{total}{filetypes}{$fsubtype}++;
+ $hash{total}{matches}{$fext}++;
+ $hash{tree}{$file}{type} = "$ftype";
+ $hash{tree}{$file}{subtype} = "$fsubtype";
+ $hash{tree}{$file}{ext} = "$fext";
+
+ # No more job with binary files
+ return if $ftype eq 'binary';
+
+ # Open text file, parse contents
+ open IN, "< $file" or die "Can't open $file ($!)\n";
+
+ while (<IN>) {
+ $hash{tree}{$file}{lines}++
+
+ # TODO:
+ # - parse contents, identify blocks and add to appropriate
+ # counters.
+ # - code with inline comments or html with tags count as "gray area"
+ # (adds 1 to both)
+ }
+
+ close IN;
+}
+
+# Storable dumper
+sub dumpdb {
+
+ my $dbpath = shift;
+
+ sysopen( OUT, $dbpath, O_WRONLY|O_CREAT, 0664 ) or
+ die "Can't dump ($dbpath) ($!).\n";
+ flock( OUT, LOCK_EX ) or
+ die "Can't exclusive-lock ($dbpath) ($!).\n";;
+ nstore_fd(\%hash, \*OUT ) or
+ die "Can't dump to ($dbpath) ($!).\n";
+ truncate( OUT, tell(OUT));
+ close OUT or
+ die "Can't properly close database ($dbpath) ($!).\n";
+
+}
+
+#
+# This is how the final dumped hash looks like:
+# The %hash is per-module (main directory) of course!
+#
+# %hash = (
+# # General overview, summarized statistics
+# total => {
+#
+# types # all extensions: binary + text
+#
+# binary_types # how many file types are considered binary
+#
+# text_types # how many file types are considered text
+#
+# files # total number of files (non-dirs)
+#
+# directories # total number of dirs
+#
+# binary_files # how many bin files in total
+#
+# text_files # how many text files in total
+#
+# size # total size
+#
+# matches => { # files with that extension/selector
+# ...ext...
+# }
+#
+# filetypes => { # files of that type
+# ...ftype...
+# }
+#
+# # Each file's stat() data
+# tree => {
+# ...file... => {
+# size => (stat _)[7],
+# atime => (stat _)[8],
+# mtime => (stat _)[9],
+# ctime => (stat _)[10],
+# type => directory/text/binary
+# (for text only below)
+# subtype> subtype (binary image, text c source, text perl source..)
+# ext => extension as recognized by file matcher
+# lines => number of lines
+# }
+# }
+# )
+#
+#
BIN  cache/cvs-head/.cache.bin
Binary file not shown
80 cache/cvs-head/.objectlist.c.txt
@@ -0,0 +1,80 @@
+AF_LOCAL macro 49 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define AF_LOCAL AF_UNIX
+BUFSIZE macro 319 sources/cvs-head/dist/src/vlink.c #define BUFSIZE 16384
+BUFSIZE macro 383 sources/cvs-head/dist/src/tlink.c #define BUFSIZE 16384
+CGIOUT macro 46 sources/cvs-head/dist/src/vlink.c #define CGIOUT 1
+CGIOUT macro 58 sources/cvs-head/dist/src/tlink.c #define CGIOUT 1
+ERRMSG macro 49 sources/cvs-head/dist/src/vlink.c #define ERRMSG strerror
+ERRMSG macro 51 sources/cvs-head/dist/src/vlink.c #define ERRMSG perror
+ERRMSG macro 64 sources/cvs-head/dist/src/tlink.c #define ERRMSG strerror
+ERRMSG macro 66 sources/cvs-head/dist/src/tlink.c #define ERRMSG perror
+IC_CONFIG_STRING_LEN macro 70 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define IC_CONFIG_STRING_LEN 100
+IC_DEFAULT_ADDR macro 61 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define IC_DEFAULT_ADDR "127.0.0.1"
+IC_DEFAULT_CONNECT_RETRY_DELAY macro 64 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define IC_DEFAULT_CONNECT_RETRY_DELAY 2
+IC_DEFAULT_CONNECT_TRIES macro 63 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define IC_DEFAULT_CONNECT_TRIES 10
+IC_DEFAULT_PORT macro 60 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define IC_DEFAULT_PORT 7786
+IC_DEFAULT_TIMEOUT macro 62 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define IC_DEFAULT_TIMEOUT 10
+IC_MAX_DROPLIST macro 66 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define IC_MAX_DROPLIST 10
+IC_MAX_LIST_ENTRYSIZE macro 68 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define IC_MAX_LIST_ENTRYSIZE 40
+IC_MAX_ORDINARYLIST macro 67 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define IC_MAX_ORDINARYLIST 10
+IC_MAX_SERVERS macro 69 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define IC_MAX_SERVERS 2
+INADDR_NONE macro 51 sources/cvs-head/dist/src/tlink.c #define INADDR_NONE -1
+MODULE_VERSION macro 1 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define MODULE_VERSION "mod_interchange/1.30"
+PERL macro 25 sources/cvs-head/dist/src/mvctl.c #define PERL "/usr/bin/perl"
+PF_LOCAL macro 53 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define PF_LOCAL PF_UNIX
+SUN_LEN macro 57 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c #define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+VendRoot macro 26 sources/cvs-head/dist/src/mvctl.c #define VendRoot "/home/minivend"
+buf_size macro 120 sources/cvs-head/dist/src/vlink.c #define buf_size 1024 /* output buffer size */
+buf_size macro 153 sources/cvs-head/dist/src/tlink.c #define buf_size 1024 /* output buffer size */
+close_socket function 174 sources/cvs-head/dist/src/vlink.c static void close_socket()
+close_socket function 238 sources/cvs-head/dist/src/tlink.c static void close_socket()
+die function 71 sources/cvs-head/dist/src/vlink.c static void die(e, msg)
+die function 104 sources/cvs-head/dist/src/tlink.c static void die(e, msg)
+get_entity function 89 sources/cvs-head/dist/src/vlink.c get_entity()
+get_entity function 122 sources/cvs-head/dist/src/tlink.c get_entity()
+get_the_host function 81 sources/cvs-head/dist/src/tlink.c struct hostent *get_the_host(char *host, struct in_addr *ip_address)
+ic_connect function 390 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static BUFF *ic_connect(request_rec *r,ic_conf_rec *conf_rec)
+ic_connectretrydelay_cmd function 331 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static const char *ic_connectretrydelay_cmd(cmd_parms *parms,void *mconfig,const char *arg)
+ic_connecttries_cmd function 318 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static const char *ic_connecttries_cmd(cmd_parms *parms,void *mconfig,const char *arg)
+ic_create_dir_config function 131 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static void *ic_create_dir_config(pool *p,char *dir)
+ic_droprequestlist_cmd function 344 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static const char *ic_droprequestlist_cmd(cmd_parms *parms,void *mconfig,const char *arg)
+ic_handler function 805 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static int ic_handler(request_rec *r)
+ic_initialise function 118 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static void ic_initialise(server_rec *s,pool *p)
+ic_interchangescript_cmd function 376 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static const char *ic_interchangescript_cmd(cmd_parms *parms,void *mconfig,const char *arg)
+ic_ordinaryfilelist_cmd function 360 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static const char *ic_ordinaryfilelist_cmd(cmd_parms *parms,void *mconfig,const char *arg)
+ic_select function 458 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static int ic_select(int sock_rd,int sock_wr,int secs,int usecs)
+ic_send_request function 489 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static int ic_send_request(request_rec *r,ic_conf_rec *conf_rec,BUFF *ic_buff)
+ic_server_cmd function 200 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static const char *ic_server_cmd(cmd_parms *parms,void *mconfig,const char *arg)
+ic_server_setup function 227 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static const char *ic_server_setup(cmd_parms *parms,void *mconfig,int server,const char *arg)
+ic_serverbackup_cmd function 210 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static const char *ic_serverbackup_cmd(cmd_parms *parms,void *mconfig,const char *arg)
+ic_transfer_response function 699 sources/cvs-head/dist/src/mod_interchange/mod_interchange.c static int ic_transfer_response(request_rec *r,BUFF *ic_buff)
+itoa function 241 sources/cvs-head/dist/src/vlink.c static char* itoa(i)
+itoa function 305 sources/cvs-head/dist/src/tlink.c static char* itoa(i)
+main function 34 sources/cvs-head/dist/src/mvctl.c int main(argc, argv)
+main function 478 sources/cvs-head/dist/src/vlink.c int main(argc, argv)
+main function 542 sources/cvs-head/dist/src/tlink.c int main(argc, argv)
+new_buffer function 328 sources/cvs-head/dist/src/vlink.c static struct buffer* new_buffer()
+new_buffer function 392 sources/cvs-head/dist/src/tlink.c static struct buffer* new_buffer()
+open_socket function 130 sources/cvs-head/dist/src/vlink.c static void open_socket()
+open_socket function 163 sources/cvs-head/dist/src/tlink.c static void open_socket()
+out function 208 sources/cvs-head/dist/src/vlink.c static void out(len, str)
+out function 272 sources/cvs-head/dist/src/tlink.c static void out(len, str)
+outs function 233 sources/cvs-head/dist/src/vlink.c static void outs(str)
+outs function 297 sources/cvs-head/dist/src/tlink.c static void outs(str)
+outv function 253 sources/cvs-head/dist/src/vlink.c static void outv(str)
+outv function 317 sources/cvs-head/dist/src/tlink.c static void outv(str)
+read_from_server function 339 sources/cvs-head/dist/src/vlink.c static int read_from_server(bp)
+read_from_server function 403 sources/cvs-head/dist/src/tlink.c static int read_from_server(bp)
+return_response function 377 sources/cvs-head/dist/src/vlink.c static void return_response()
+return_response function 441 sources/cvs-head/dist/src/tlink.c static void return_response()
+send_arguments function 267 sources/cvs-head/dist/src/vlink.c static void send_arguments(argc, argv)
+send_arguments function 331 sources/cvs-head/dist/src/tlink.c static void send_arguments(argc, argv)
+send_entity function 303 sources/cvs-head/dist/src/vlink.c send_entity()
+send_entity function 367 sources/cvs-head/dist/src/tlink.c send_entity()
+send_environment function 283 sources/cvs-head/dist/src/vlink.c static void send_environment()
+send_environment function 347 sources/cvs-head/dist/src/tlink.c static void send_environment()
+server_not_running function 58 sources/cvs-head/dist/src/vlink.c void server_not_running()
+server_not_running function 71 sources/cvs-head/dist/src/tlink.c void server_not_running()
+write_out function 184 sources/cvs-head/dist/src/vlink.c static void write_out()
+write_out function 248 sources/cvs-head/dist/src/tlink.c static void write_out()
+write_to_client function 360 sources/cvs-head/dist/src/vlink.c static int write_to_client(bp)
+write_to_client function 424 sources/cvs-head/dist/src/tlink.c static int write_to_client(bp)
1,842 cache/cvs-head/.objectlist.perl.txt
1,842 additions, 0 deletions not shown
3,916 cache/cvs-head/.tags
3,916 additions, 0 deletions not shown
19 docbook/catalog.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+
+
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+
+ <public publicId="-//OASIS//DTD DocBook-Interchange XML V4.2//EN"
+ uri="../docbook/docbookxi.dtd"/>
+
+ <system systemId="iccattut-nochunks-targets"
+ uri="iccattut-nochunks-targets.db" />
+
+ <system systemId="iccattut-chunks-targets"
+ uri="iccattut-chunks-targets.db" />
+
+</catalog>
+
25 docbook/common.xsl
@@ -0,0 +1,25 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:xi="http://www.w3.org/2003/XInclude"
+ version="1.0">
+
+ <xsl:param name="section.autolabel">1</xsl:param>
+
+ <xsl:param name="admon.graphics">1</xsl:param>
+ <xsl:param name="admon.graphics.path">./images/</xsl:param>
+
+ <xsl:param name="navig.graphics">1</xsl:param>
+ <xsl:param name="navig.graphics.path">./images/</xsl:param>
+ <xsl:param name="navig.showtitles">1</xsl:param>
+
+ <xsl:param name="callout.graphics">1</xsl:param>
+ <xsl:param name="callout.graphics.path">./images/</xsl:param>
+
+ <xsl:param name="use.extensions">1</xsl:param>
+ <xsl:param name="textinsert.extension">1</xsl:param>
+
+</xsl:stylesheet>
+
31 docbook/docbookxi.dtd
@@ -0,0 +1,31 @@
+
+<!-- Remove MsgSet -->
+<!ENTITY % compound.class "procedure|sidebar">
+<!ENTITY % msgset.content.module "IGNORE">
+
+
+<!ELEMENT xi:include (xi:fallback?)>
+<!ATTLIST xi:include
+ xmlns:xi CDATA #FIXED "http://www.w3.org/2003/XInclude"
+ href CDATA #IMPLIED
+ parse (xml|text) "text"
+ xpointer CDATA #IMPLIED
+ encoding CDATA #IMPLIED
+ accept CDATA #IMPLIED
+ accept-charset CDATA #IMPLIED
+ accept-language CDATA #IMPLIED
+>
+
+<!ELEMENT xi:fallback ANY>
+<!ATTLIST xi:fallback
+ xmlns:xi CDATA #FIXED "http://www.w3.org/2003/XInclude"
+>
+
+<!ENTITY % local.para.char.mix "|xi:include">
+<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED">
+
+
+<!-- Load DocBook -->
+<!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd"> %DocBookDTD;
+
20 docbook/html-chunks.xsl
@@ -0,0 +1,20 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:import
+ href="/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/chunk.xsl"/>
+
+ <xsl:include href="common.xsl"/>
+ <xsl:include href="html-common.xsl"/>
+
+ <xsl:param name="use.id.as.filename"/>
+ <xsl:param name="root.filename">index</xsl:param>
+ <xsl:param name="base.dir">iccattut/</xsl:param>
+ <xsl:param name="chunk.fast">1</xsl:param>
+ <xsl:param name="chunk.section.depth">1</xsl:param>
+ <xsl:param name="chunker.output.encoding">ISO8859-1</xsl:param>
+ <xsl:param name="chunker.output.indent">yes</xsl:param>
+
+</xsl:stylesheet>
+
30 docbook/html-common.xsl
@@ -0,0 +1,30 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+ <xsl:param name="html.stylesheet">xmldocs.css</xsl:param>
+ <xsl:param name="para.propagates.style">1</xsl:param>
+
+ <!-- <xsl:param name="glossary.auto.link">1</xsl:param> -->
+
+ <xsl:template name="user.footer.content" >
+ <p class='w3c'>
+ <a href="http://jigsaw.w3.org/css-validator/">
+ <img
+ src="images/valid-css.png"
+ alt="Valid CSS!"
+ class='w3cimg'/>
+ </a>
+ <a href="http://validator.w3.org/check?uri=referer">
+ <img
+ src="images/valid-xhtml10.png"
+ alt="Valid XHTML 1.0!" height="31" width="88"
+ class='w3cimg'/>
+ </a>
+ </p>
+ </xsl:template>
+
+</xsl:stylesheet>
+
15 docbook/html-nochunks.xsl
@@ -0,0 +1,15 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xi="http://www.w3.org/2003/XInclude"
+ version="1.0">
+
+ <xsl:import
+ href="/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl"/>
+
+ <xsl:include href="common.xsl"/>
+ <xsl:include href="html-common.xsl"/>
+
+</xsl:stylesheet>
+
18 docbook/olinkdb.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+
+<targetset>
+ <targetsetinfo>
+ Interchange (http://www.icdevgroup.org) XML Documentation System Sitemap
+ </targetsetinfo>
+
+ <sitemap>
+ <dir name="OUTPUT">
+ <document targetdoc="iccattut" baseuri="docbook">
+ <xi:include href="iccattut-nochunks-targets.db"
+ xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ </document>
+ </dir>
+ </sitemap>
+
+</targetset>
+
56 docbook/xmldocs.css
@@ -0,0 +1,56 @@
+
+.title {
+ /*background-color: #064485;*/
+ /*background-color: #228ebd;*/
+ /*background-color: #d2aa55;*/
+ /*background-color: #bb720b;*/
+ /*background-color: #f4710c;*/
+ background-color: #ffcc66;
+ border: dotted 1px gray;
+ padding: 2px 0px 2px 10px;
+}
+
+h1.title {
+ background-image: url(images/icon_ic2.png);
+ background-position: center right;
+ background-repeat: no-repeat;
+}
+
+.toc {
+ border: dotted 1px #208cbd;
+ padding: 14px;
+}
+
+.programlisting, .screen {
+ padding: 5px 5px 0px 5px;
+ /* border-left: dashed 2px #ffe2cc; */
+ padding-left: 20px;
+ border-left: dotted 1px #ffcc66;
+ border-bottom: dotted 1px #ffcc66;
+ background-image: url(images/example2.png);
+ background-position: top left;
+ background-repeat: no-repeat;
+}
+
+hr {
+ border: 0;
+ width: 100%;
+ height: 4px;
+ /* color: #208cbd;
+ background-color: #208cbd; */
+ border-top: 1px dashed #208cbd;
+ border-bottom: 1px solid #208cbd;
+}
+
+.w3c {
+ padding-right: 0px;
+ text-align: right;
+ padding: 6px;
+ border: dotted 1px #ffcc66;
+ border-top: none;
+}
+
+.w3cimg {
+ border: 0px;
+}
+
10 files/tutorial-phase1/bottom
@@ -0,0 +1,10 @@
+ </td>
+ </tr>
+ <tr><td colspan="2" align="center">
+ (bottom)
+ </td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
9 files/tutorial-phase1/catalog.cfg
@@ -0,0 +1,9 @@
+VendURL http://myhost.mydomain.com/cgi-bin/ic/tutorial
+SecureURL http://myhost.mydomain.com/cgi-bin/ic/tutorial
+MailOrderTo myname@mydomain.com
+
+ErrorFile /var/log/interchange/tutorial-error.log
+TrackFile /var/log/interchange/tutorial-track.log
+
+Database products products.txt TAB
+ProductFiles products
5 files/tutorial-phase1/left
@@ -0,0 +1,5 @@
+ <tr>
+ <td align="center">
+ (left)
+ </td>
+ <td align="center">
6 files/tutorial-phase1/pages/index.html
@@ -0,0 +1,6 @@
+[include top]
+[include left]
+
+This is where your content goes.
+
+[include bottom]
25 files/tutorial-phase1/permissions.txt
@@ -0,0 +1,25 @@
+tutorial/:
+total 44
+drwxrwx--- 7 interch interch 4096 Jul 7 20:28 .
+drwxr-xr-x 4 interch interch 4096 Jul 7 20:27 ..
+-rw-r--r-- 1 interch interch 110 Jul 7 20:00 bottom
+-rw-r--r-- 1 interch interch 328 Jul 7 19:57 catalog.cfg
+drwxr-xr-x 2 interch interch 4096 Jul 7 20:27 etc
+-rw-r--r-- 1 interch interch 64 Jul 7 20:00 left
+drwxr-xr-x 2 interch interch 4096 Jul 7 20:00 pages
+drwxr-xr-x 2 interch interch 4096 Jul 7 19:59 products
+drwxr-xr-x 2 interch interch 4096 Jul 7 20:27 session
+drwxr-xr-x 2 interch interch 4096 Jul 7 20:27 tmp
+-rw-r--r-- 1 interch interch 230 Jul 7 19:59 top
+
+tutorial/pages:
+total 12
+drwxr-xr-x 2 interch interch 4096 Jul 7 20:00 .
+drwxrwx--- 7 interch interch 4096 Jul 7 20:28 ..
+-rw-r--r-- 1 interch interch 81 Jul 7 20:00 index.html
+
+tutorial/products:
+total 12
+drwxr-xr-x 2 interch interch 4096 Jul 7 19:59 .
+drwxrwx--- 7 interch interch 4096 Jul 7 20:28 ..
+-rw-r--r-- 1 interch interch 359 Jul 7 19:58 products.txt
5 files/tutorial-phase1/products/products.txt
@@ -0,0 +1,5 @@
+sku description price
+4595 Nice Bio Test 275.45
+2623 Stack of Econ Quizzes 1.24
+0198 Really Hard Physics Test 1589.34
+1299 Ubiquitous diff eq final 37.00
11 files/tutorial-phase1/top
@@ -0,0 +1,11 @@
+<html>
+<head>
+<title>The Interchange Test Catalog</title>
+</head>
+
+<body>
+ <div align=center>
+ <table width="80%" border cellpadding="15">
+ <tr><td colspan="2" align="center">
+ <h1> The Interchange Test Catalog </h1>
+ </td></tr>
10 files/tutorial-phase2/bottom
@@ -0,0 +1,10 @@
+ </td>
+ </tr>
+ <tr><td colspan="2" align="center">
+ (bottom)
+ </td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
9 files/tutorial-phase2/catalog.cfg
@@ -0,0 +1,9 @@
+VendURL http://myhost.mydomain.com/cgi-bin/ic/tutorial
+SecureURL http://myhost.mydomain.com/cgi-bin/ic/tutorial
+MailOrderTo myname@mydomain.com
+
+ErrorFile /var/log/interchange/tutorial-error.log
+TrackFile /var/log/interchange/tutorial-track.log
+
+Database products products.txt TAB
+ProductFiles products
5 files/tutorial-phase2/left
@@ -0,0 +1,5 @@
+ <tr>
+ <td align="center">
+ (left)
+ </td>
+ <td align="center">
9 files/tutorial-phase2/pages/flypage.html
@@ -0,0 +1,9 @@
+[include top]
+[include left]
+
+<h3>Test #[item-code]</h3>
+<p>[item-field description] . . . [item-field price]</p>
+
+<br>
+Return to the [page index]Index page</a>.
+[include bottom]
21 files/tutorial-phase2/pages/index.html
@@ -0,0 +1,21 @@
+[include top]
+[include left]
+<table cellpadding="5">
+ <tr>
+ <th>Test #</th>
+ <th>Description</th>
+ <th>Price</th>
+ </tr>
+ [loop search="ra=yes/fi=products"]
+ <tr>
+ <td>[loop-code]</td>
+ <td>
+ <a href="[loop-code].html">
+ [loop-field description]
+ </a>
+ </td>
+ <td align="right">[loop-field price]</td>
+ </tr>
+ [/loop]
+</table>
+[include bottom]
5 files/tutorial-phase2/products/products.txt
@@ -0,0 +1,5 @@
+sku description price
+4595 Nice Bio Test 275.45
+2623 Stack of Econ Quizzes 1.24
+0198 Really Hard Physics Test 1589.34
+1299 Ubiquitous diff eq final 37.00
6 files/tutorial-phase2/special_pages/missing.html
@@ -0,0 +1,6 @@
+[include top]
+[include left]
+<p>We're sorry, the page you requested has not been found.</p>
+
+<p>Try finding what you need on the [page index]welcome page</a>.</p>
+[include bottom]
11 files/tutorial-phase2/top
@@ -0,0 +1,11 @@
+<html>
+<head>
+<title>The Interchange Test Catalog</title>
+</head>
+
+<body>
+ <div align=center>
+ <table width="80%" border cellpadding="15">
+ <tr><td colspan="2" align="center">
+ <h1> The Interchange Test Catalog </h1>
+ </td></tr>
10 files/tutorial-phase3/bottom
@@ -0,0 +1,10 @@
+ </td>
+ </tr>
+ <tr><td colspan="2" align="center">
+ (bottom)
+ </td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
9 files/tutorial-phase3/catalog.cfg
@@ -0,0 +1,9 @@
+VendURL http://myhost.mydomain.com/cgi-bin/ic/tutorial
+SecureURL http://myhost.mydomain.com/cgi-bin/ic/tutorial
+MailOrderTo myname@mydomain.com
+
+ErrorFile /var/log/interchange/tutorial-error.log
+TrackFile /var/log/interchange/tutorial-track.log
+
+Database products products.txt TAB
+ProductFiles products
5 files/tutorial-phase3/left
@@ -0,0 +1,5 @@
+ <tr>
+ <td align="center">
+ (left)
+ </td>
+ <td align="center">
9 files/tutorial-phase3/pages/flypage.html
@@ -0,0 +1,9 @@
+[include top]
+[include left]
+
+<h3>Test #[item-code]</h3>
+<p>[item-field description] . . . [item-field price]</p>
+
+<br>
+Return to the [page index]Index page</a>.
+[include bottom]
24 files/tutorial-phase3/pages/index.html
@@ -0,0 +1,24 @@
+[include top]
+[include left]
+<table cellpadding="5">
+ <tr>
+ <th>Test #</th>
+ <th>Description</th>
+ <th>Price</th>
+ </tr>
+ [loop search="ra=yes/fi=products"]
+ <tr>
+ <td>[loop-code]</td>
+ <td>
+ <a href="[loop-code].html">
+ [loop-field description]
+ </a>
+ </td>
+ <td align="right">[loop-field price]</td>
+ <td>[order [loop-code]]Order Now</a></td>
+ </tr>
+ [/loop]
+</table>
+<hr>
+<p align=center>[page order]View shopping cart</a></p>
+[include bottom]
40 files/tutorial-phase3/pages/ord/basket.html
@@ -0,0 +1,40 @@
+[include top]
+[include left]
+
+<h2>This is your shopping cart!</h2>
+
+<table cellpadding="5">
+
+<tr>
+ <th>Qty.</th>
+ <th>Description</th>
+ <th>Cost</th>
+ <th>Subtotal</th>
+</tr>
+
+[item-list]
+<tr>
+ <td align="right">[item-quantity]</td>
+ <td>[item-field description]</td>
+ <td align="right">[item-price]</td>
+ <td align="right">[item-subtotal]</td>
+</tr>
+[/item-list]
+
+<tr><td colspan="4"></td></tr>
+
+<tr>
+ <td colspan="3" align="right"><strong>Total:</strong></td>
+ <td align="right">[subtotal]</td>
+</tr>
+
+</table>
+
+<hr>
+
+<p>
+[page checkout]Purchase now</a><br>
+[page index]Return to shopping</a>
+</p>
+
+[include bottom]
5 files/tutorial-phase3/products/products.txt
@@ -0,0 +1,5 @@
+sku description price
+4595 Nice Bio Test 275.45
+2623 Stack of Econ Quizzes 1.24
+0198 Really Hard Physics Test 1589.34
+1299 Ubiquitous diff eq final 37.00
6 files/tutorial-phase3/special_pages/missing.html
@@ -0,0 +1,6 @@
+[include top]
+[include left]
+<p>We're sorry, the page you requested has not been found.</p>
+
+<p>Try finding what you need on the [page index]welcome page</a>.</p>
+[include bottom]
11 files/tutorial-phase3/top
@@ -0,0 +1,11 @@
+<html>
+<head>
+<title>The Interchange Test Catalog</title>
+</head>
+
+<body>
+ <div align=center>
+ <table width="80%" border cellpadding="15">
+ <tr><td colspan="2" align="center">
+ <h1> The Interchange Test Catalog </h1>
+ </td></tr>
10 files/tutorial-phase4/bottom
@@ -0,0 +1,10 @@
+ </td>
+ </tr>
+ <tr><td colspan="2" align="center">
+ (bottom)
+ </td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
9 files/tutorial-phase4/catalog.cfg
@@ -0,0 +1,9 @@
+VendURL http://myhost.mydomain.com/cgi-bin/ic/tutorial
+SecureURL http://myhost.mydomain.com/cgi-bin/ic/tutorial
+MailOrderTo myname@mydomain.com
+
+ErrorFile /var/log/interchange/tutorial-error.log
+TrackFile /var/log/interchange/tutorial-track.log
+
+Database products products.txt TAB
+ProductFiles products
14 files/tutorial-phase4/etc/profiles.order
@@ -0,0 +1,14 @@
+__NAME__ order_profile
+
+fname=required
+lname=required
+address1=required
+city=required
+state=required
+zip=required
+
+&fatal=yes
+&final=yes
+&credit_card=standard keep
+
+__END__
14 files/tutorial-phase4/etc/report
@@ -0,0 +1,14 @@
+ Name: [value fname] [value lname]
+ Address: [value address1][if value address2]
+ [value address2][/if]
+ City, State, etc.: [value city], [value state] [value zip] [value country]
+
+ Credit Card #: [cgi mv_credit_card_number]
+ Expiration Date: [cgi mv_credit_card_exp_month]/[cgi mv_credit_card_exp_year]
+
+ ************ ORDER ************
+ [item-list]
+ [item-quantity] x [item-description] ([item-code]), [item-price] ea.
+ [/item-list]
+ Subtotal: [subtotal]
+ Total: [total-cost]
5 files/tutorial-phase4/left
@@ -0,0 +1,5 @@
+ <tr>
+ <td align="center">
+ (left)
+ </td>
+ <td align="center">
85 files/tutorial-phase4/pages/checkout.html
@@ -0,0 +1,85 @@
+[include top]
+[include left]
+<h1>Checkout Page</h1>
+
+<form method="post" action="[process]">
+<input type="hidden" name="mv_todo" value="submit">
+<input type="hidden" name="mv_order_profile" value="order_profile">
+<input type="hidden" name="mv_cyber_mode" value="minivend_test">
+
+<table cellpadding="3">
+
+<tr>
+<td align="right"><b>First name:</b></td>
+<td><input type="text" name="fname" value="[value fname]"></td>
+</tr>
+
+<tr>
+<td align="right"><b>Last name:</b></td>
+<td><input type="text" name="lname" value="[value lname]"></td>
+</tr>
+
+<tr>
+<td align="right" rowspan="2"><b>Address:</b></td>
+<td><input type="text" name="address1" value="[value address1]"></td>
+</tr>
+
+<tr>
+<td><input type="text" name="address2" value="[value address2]"></td>
+</tr>
+
+<tr>
+<td align="right"><b>City:</b></td>
+<td><input type=text name=city value="[value city]"></td>
+</tr>
+
+<tr>
+<td align="right"><b>State:</b></td>
+<td><input type="text" name="state" value="[value state]"></td>
+</tr>
+
+<tr>
+<td align="right"><b>Postal code:</b></td>
+<td><input type="text" name="zip" value="[value zip]"></td>
+</tr>
+
+<tr>
+<td align="right"><b>Country:</b></td>
+<td><input type="text" name="country" value="[value country]"></td>
+</tr>
+
+</table>
+
+<p>
+Note: We assume that your billing address is the same as your shipping address.
+</p>
+
+<table cellpadding="3">
+
+<tr>
+<td align="right"><b>Credit card number:</b></td>
+<td><input type="text" name="mv_credit_card_number" value="" size="20"></td>
+</tr>
+
+<tr>
+<td align="right"><b>Credit card expiration date:</b></td>
+<td>
+Month (number from 1-12):
+<input type="text" name="mv_credit_card_exp_month" value="" size="2" maxlength="2">
+<br>
+Year (last two digits only):
+<input type="text" name="mv_credit_card_exp_year" value="" size="2" maxlength="2">
+</td>
+</tr>
+
+</table>
+
+<p>
+<input type="submit" name="submit" value="Finalize!">
+<input type="reset" name="reset" value="Reset">
+</p>
+
+</form>
+
+<p>[page index]Return to shopping instead</a></p>
+[include bottom]
9 files/tutorial-phase4/pages/flypage.html
@@ -0,0 +1,9 @@
+[include top]
+[include left]
+
+<h3>Test #[item-code]</h3>
+<p>[item-field description] . . . [item-field price]</p>
+
+<br>
+Return to the [page index]Index page</a>.
+[include bottom]
24 files/tutorial-phase4/pages/index.html
@@ -0,0 +1,24 @@
+[include top]
+[include left]
+<table cellpadding="5">
+ <tr>
+ <th>Test #</th>
+ <th>Description</th>
+ <th>Price</th>
+ </tr>
+ [loop search="ra=yes/fi=products"]
+ <tr>
+ <td>[loop-code]</td>
+ <td>
+ <a href="[loop-code].html">
+ [loop-field description]
+ </a>
+ </td>
+ <td align="right">[loop-field price]</td>
+ <td>[order [loop-code]]Order Now</a></td>
+ </tr>
+ [/loop]
+</table>
+<hr>
+<p align=center>[page order]View shopping cart</a></p>
+[include bottom]
40 files/tutorial-phase4/pages/ord/basket.html
@@ -0,0 +1,40 @@
+[include top]
+[include left]
+
+<h2>This is your shopping cart!</h2>
+
+<table cellpadding="5">
+
+<tr>
+ <th>Qty.</th>
+ <th>Description</th>
+ <th>Cost</th>
+ <th>Subtotal</th>
+</tr>
+
+[item-list]
+<tr>
+ <td align="right">[item-quantity]</td>
+ <td>[item-field description]</td>
+ <td align="right">[item-price]</td>
+ <td align="right">[item-subtotal]</td>
+</tr>
+[/item-list]
+
+<tr><td colspan="4"></td></tr>
+
+<tr>
+ <td colspan="3" align="right"><strong>Total:</strong></td>
+ <td align="right">[subtotal]</td>
+</tr>
+
+</table>
+
+<hr>
+
+<p>
+[page checkout]Purchase now</a><br>
+[page index]Return to shopping</a>
+</p>
+
+[include bottom]
5 files/tutorial-phase4/products/products.txt
@@ -0,0 +1,5 @@
+sku description price
+4595 Nice Bio Test 275.45
+2623 Stack of Econ Quizzes 1.24
+0198 Really Hard Physics Test 1589.34
+1299 Ubiquitous diff eq final 37.00
6 files/tutorial-phase4/special_pages/missing.html
@@ -0,0 +1,6 @@
+[include top]
+[include left]
+<p>We're sorry, the page you requested has not been found.</p>
+
+<p>Try finding what you need on the [page index]welcome page</a>.</p>
+[include bottom]
10 files/tutorial-phase4/special_pages/needfield.html
@@ -0,0 +1,10 @@
+[include top]
+[include left]
+<p>The following information was not given:</p>
+
+<p><b>[error all=1 show_var=1 show_error=1 joiner='<br>']</b></p>
+
+<p>Please go back to the [page checkout]checkout page</a>
+and fill out the form properly.</p>
+
+[include bottom]
5 files/tutorial-phase4/special_pages/receipt.html
@@ -0,0 +1,5 @@
+[include top]
+[include left]
+<p>Thank you for ordering stuff from us.<br>Have a nice day!</p>
+<p>[page index]Return to our welcome page</a></p>
+[include bottom]
11 files/tutorial-phase4/top
@@ -0,0 +1,11 @@
+<html>
+<head>
+<title>The Interchange Test Catalog</title>
+</head>
+
+<body>
+ <div align=center>
+ <table width="80%" border cellpadding="15">
+ <tr><td colspan="2" align="center">
+ <h1> The Interchange Test Catalog </h1>
+ </td></tr>
10 files/tutorial-phase5/bottom
@@ -0,0 +1,10 @@
+ </td>
+ </tr>
+ <tr><td colspan="2" align="center">
+ <a href="mailto:__CONTACT_EMAIL__">Contact us</a> if you have any questions.
+ </td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
27 files/tutorial-phase5/catalog.cfg
@@ -0,0 +1,27 @@
+VendURL http://myhost.mydomain.com/cgi-bin/ic/tutorial
+SecureURL http://myhost.mydomain.com/cgi-bin/ic/tutorial
+MailOrderTo myname@mydomain.com
+
+ErrorFile /var/log/interchange/tutorial-error.log
+TrackFile /var/log/interchange/tutorial-track.log
+
+Database products products.txt TAB
+ProductFiles products
+
+OrderProfile etc/profiles.order
+
+DirectoryIndex index
+SpecialPage catalog index
+
+Locale en_US currency_symbol $
+Locale en_US p_cs_precedes 0
+Locale en_US mon_thousands_sep ,
+Locale en_US mon_decimal_point .
+
+Variable CONTACT_EMAIL myname.surname@mydomain.com
+Variable DISPLAYDATE [time]%A, %B %d, %Y[/time]
+
+Variable TOP [include top]
+Variable LEFT [include left]
+Variable BOTTOM [include bottom]
+
14 files/tutorial-phase5/etc/profiles.order
@@ -0,0 +1,14 @@
+__NAME__ order_profile
+
+fname=required
+lname=required
+address1=required
+city=required
+state=required
+zip=required
+
+&fatal=yes
+&final=yes
+&credit_card=standard keep
+
+__END__
14 files/tutorial-phase5/etc/report
@@ -0,0 +1,14 @@
+ Name: [value fname] [value lname]
+ Address: [value address1][if value address2]
+ [value address2][/if]
+ City, State, etc.: [value city], [value state] [value zip] [value country]
+
+ Credit Card #: [cgi mv_credit_card_number]
+ Expiration Date: [cgi mv_credit_card_exp_month]/[cgi mv_credit_card_exp_year]
+
+ ************ ORDER ************
+ [item-list]
+ [item-quantity] x [item-description] ([item-code]), [item-price] ea.
+ [/item-list]
+ Subtotal: [subtotal]
+ Total: [total-cost]
17 files/tutorial-phase5/left
@@ -0,0 +1,17 @@
+ <tr>
+ <td align="center">
+ <form action="[area search]" method="post">
+ Search:<br>
+ [set testname]
+ su=yes
+ fi=product
+ sf=sk
+ sf=description
+ [/set]
+ <input type="hidden" name="mv_profile" value="testname>"
+ <input type="text" name="mv_searchspec" size="15" value="">
+ </form>
+ <hr>
+ __DISPLAYDATE__
+ </td>
+ <td align="center">
123 files/tutorial-phase5/pages/checkout.html
@@ -0,0 +1,123 @@
+__TOP__
+__LEFT__
+<h1>Checkout Page</h1>
+
+<form method="post" action="[process]">
+<input type="hidden" name="mv_todo" value="submit">
+<input type="hidden" name="mv_order_profile" value="order_profile">
+<input type="hidden" name="mv_cyber_mode" value="minivend_test">
+
+<table cellpadding="3">
+
+<tr>
+<td align="right"><b>First name:</b></td>
+<td><input type="text" name="fname" value="[value fname]"></td>
+</tr>
+
+<tr>
+<td align="right"><b>Last name:</b></td>
+<td><input type="text" name="lname" value="[value lname]"></td>
+</tr>
+
+<tr>
+<td align="right" rowspan="2"><b>Address:</b></td>
+<td><input type="text" name="address1" value="[value address1]"></td>
+</tr>
+
+<tr>
+<td><input type="text" name="address2" value="[value address2]"></td>
+</tr>
+
+<tr>
+<td align="right"><b>City:</b></td>
+<td><input type=text name=city value="[value city]"></td>
+</tr>
+
+<tr>
+<td align="right"><b>State:</b></td>
+<td><input type="text" name="state" value="[value state]"></td>
+</tr>
+
+<tr>
+<td align="right"><b>Postal code:</b></td>
+<td><input type="text" name="zip" value="[value zip]"></td>
+</tr>
+
+<tr>
+<td align="right"><b>Country:</b></td>
+<td><input type="text" name="country" value="[value country]"></td>
+</tr>
+
+</table>
+
+<p>
+Note: We assume that your billing address is the same as your shipping address.
+</p>
+
+<table cellpadding="3">
+
+<tr>
+<td align="right"><b>Credit card number:</b></td>
+<td><input type="text" name="mv_credit_card_number" value="" size="20"></td>
+</tr>
+
+<tr>
+<td align="right"><b>Credit card expiration date:</b></td>
+<td>
+
+Month:
+<select name=mv_credit_card_exp_month>
+[loop
+ lr=1
+ option=mv_credit_card_exp_month
+ list="
+1 01 - January
+2 02 - February
+3 03 - March
+4 04 - April
+5 05 - May
+6 06 - June
+7 07 - July
+8 08 - August
+9 09 - September
+10 10 - October
+11 11 - November
+12 12 - December"]
+<option value="[loop-code]">[loop-pos 1]
+[/loop]
+</select>
+
+Year:
+<select name=mv_credit_card_exp_year>
+[comment]
+ This should always return the current year as the first, then
+ seven more years.
+[/comment]
+[loop option=mv_credit_card_exp_year lr=1 list=`
+ my $year = $Tag->time( '', { format => '%Y' }, '%Y' );
+ my $out = '';
+ for ($year .. $year + 7) {
+ /\d\d(\d\d)/;
+ $last_two = $1;
+ $out .= "$last_two\t$_\n";
+ }
+ return $out;
+`]
+ <option value="[loop-code]">[loop-pos 1]
+[/loop]
+</select>
+
+</td>
+</tr>
+
+</table>
+
+<p>
+<input type="submit" name="submit" value="Finalize!">
+<input type="reset" name="reset" value="Reset">
+</p>
+
+</form>
+
+<p>[page index]Return to shopping instead</a></p>
+__BOTTOM__
9 files/tutorial-phase5/pages/flypage.html
@@ -0,0 +1,9 @@
+__TOP__
+__LEFT__
+
+<h3>Test #[item-code]</h3>
+<p>[item-field description] . . . [currency][item-field price][/currency]</p>
+
+<br>
+Return to the [page index]Index page</a>.
+__BOTTOM__
24 files/tutorial-phase5/pages/index.html
@@ -0,0 +1,24 @@
+__TOP__
+__LEFT__
+<table cellpadding="5">
+ <tr>
+ <th>Test #</th>
+ <th>Description</th>
+ <th>Price</th>
+ </tr>
+ [loop search="ra=yes/fi=products/tf=description"]
+ <tr>
+ <td>[loop-code]</td>
+ <td>
+ <a href="[loop-code].html">
+ [loop-field description]
+ </a>
+ </td>
+ <td align="right">[currency][loop-field price][/currency]</td>
+ <td>[order [loop-code]]Order Now</a></td>
+ </tr>
+ [/loop]
+</table>
+<hr>
+<p align=center>[page order]View shopping cart</a></p>
+__BOTTOM__
40 files/tutorial-phase5/pages/ord/basket.html
@@ -0,0 +1,40 @@
+__TOP__
+__LEFT__
+
+<h2>This is your shopping cart!</h2>
+
+<table cellpadding="5">
+
+<tr>
+ <th>Qty.</th>
+ <th>Description</th>
+ <th>Cost</th>
+ <th>Subtotal</th>
+</tr>
+
+[item-list]
+<tr>
+ <td align="right">[item-quantity]</td>
+ <td>[item-field description]</td>
+ <td align="right">[item-price]</td>
+ <td align="right">[item-subtotal]</td>
+</tr>
+[/item-list]
+
+<tr><td colspan="4"></td></tr>
+
+<tr>