Index: cgicc/ChangeLog
diff -c cgicc/ChangeLog:1.60 cgicc/ChangeLog:1.65
*** cgicc/ChangeLog:1.60 Sun Oct 15 09:09:36 2000
--- cgicc/ChangeLog Wed Nov 15 09:13:28 2000
***************
*** 1,3 ****
--- 1,59 ----
+ 2000-11-15 Stephen F. Booth <
[email protected]>
+
+ * configure.in: DEBUG should be off by default
+ * README: Modified for mailing list info
+ * support/cgicc-config.in: Quote shell variables in echo
+ * info/support.texinfo: Modified mailing list info
+ * info/reporting-bugs.texinfo: Modified mailing list info
+ * NEWS: Added blurb about FDL
+
+ 2000-11-14 Stephen F. Booth <
[email protected]>
+
+ * accconfig.h: Add DEBUG macro
+ * configure.in: Add --enable-debug-logging flag
+ * example/: Directory completely reworked (see example/ChangeLog)
+ * support/cgicc-config.in: Added --includedir, --libdir options,
+ removed --ldflags, --cxxflags, --libs options
+ * demo/testform.html: Renamed to test.html
+ * demo/test.html: New name
+ * demo/README: Completely rewritten
+
+ 2000-11-13 Stephen F. Booth <
[email protected]>
+
+ * configure.in: Don't generate example/Makefile
+ * Makefile.am: Distribute new files in example/
+
+ 2000-11-06 Stephen F. Booth <
[email protected]>
+
+ * Makefile.am: Added support/ to SUBDIRS, removed dist-hook support/
+ stuff
+ * support/cgicc-config.in: Removed --cflags option
+ * info/fdl.texinfo: Added file
+ * info/cgicc.texinfo: Modified for FDL
+ * info/gpl.texinfo: Node links modified
+ * info/concept-index.texinfo: Node links modified
+ * info/reporting-bugs.texinfo: Modified for mailman
+ * info/support.texinfo: Added file
+ * README: Updated for mailman
+
+ 2000-11-02 Stephen F. Booth <
[email protected]>
+
+ * support/cgicc-config.in: Added
+ * support/Makefile.am: Added
+ * configure.in: Modified for cgicc-config
+
+ 2000-10-26 Stephen F. Booth <
[email protected]>
+
+ * example/README: 'Cgicc' -> 'cgicc'
+
+ 2000-10-16 Stephen F. Booth <
[email protected]>
+
+ * demo/upload.html: New file upload demo
+ * demo/upload.cpp: New file upload demo
+ * demo/Makefile.am: Added file upload demo
+ * demo/testform.html: Removed file upload support
+ * demo/test.cpp: Removed file upload support
+
2000-10-15 Stephen F. Booth <
[email protected]>
* example/yourSource.cpp: Changed instances of 'Cgicc' to 'cgicc'
Index: cgicc/Makefile.am
diff -c cgicc/Makefile.am:1.22 cgicc/Makefile.am:1.24
*** cgicc/Makefile.am:1.22 Sun Oct 15 09:08:04 2000
--- cgicc/Makefile.am Tue Nov 14 22:47:01 2000
***************
*** 1,6 ****
! ## $Id: Makefile.am,v 1.22 2000/10/15 16:08:04 sbooth Exp $
! AUTOMAKE_OPTIONS = check-news dist-zip dist-bzip2
if DEMOS
DEMO = demo
--- 1,6 ----
! ## $Id: Makefile.am,v 1.24 2000/11/15 06:47:01 sbooth Exp $
! AUTOMAKE_OPTIONS = check-news dist-zip #dist-bzip2
if DEMOS
DEMO = demo
***************
*** 8,14 ****
DEMO =
endif
! SUBDIRS = cgicc info $(DEMO)
CLEANFILES = *~
--- 8,14 ----
DEMO =
endif
! SUBDIRS = cgicc info support $(DEMO)
CLEANFILES = *~
***************
*** 16,33 ****
dist-hook:
test -d $(distdir)/example || mkdir $(distdir)/example || exit 1
! cp -p $(srcdir)/example/README $(distdir)/example
cp -p $(srcdir)/example/Makefile.in $(distdir)/example
! cp -p $(srcdir)/example/yourSource.cpp $(distdir)/example
! test -d $(distdir)/support || mkdir $(distdir)/support || exit 1
! cp -p $(srcdir)/support/config.guess $(distdir)/support
! cp -p $(srcdir)/support/config.sub $(distdir)/support
! cp -p $(srcdir)/support/install-sh $(distdir)/support
! cp -p $(srcdir)/support/ltconfig $(distdir)/support
! cp -p $(srcdir)/support/ltmain.sh $(distdir)/support
! cp -p $(srcdir)/support/mdate-sh $(distdir)/support
! cp -p $(srcdir)/support/missing $(distdir)/support
! cp -p $(srcdir)/support/mkinstalldirs $(distdir)/support
test -d $(distdir)/win || mkdir $(distdir)/win || exit 1
cp -p $(srcdir)/win/cgicc.dsw $(distdir)/win
cp -p $(srcdir)/win/cgicc.dsp $(distdir)/win
--- 16,42 ----
dist-hook:
test -d $(distdir)/example || mkdir $(distdir)/example || exit 1
! cp -p $(srcdir)/example/AUTHORS $(distdir)/example
! cp -p $(srcdir)/example/COPYING $(distdir)/example
! cp -p $(srcdir)/example/ChangeLog $(distdir)/example
! cp -p $(srcdir)/example/INSTALL $(distdir)/example
! cp -p $(srcdir)/example/Makefile.am $(distdir)/example
cp -p $(srcdir)/example/Makefile.in $(distdir)/example
! cp -p $(srcdir)/example/NEWS $(distdir)/example
! cp -p $(srcdir)/example/README $(distdir)/example
! cp -p $(srcdir)/example/acinclude.m4 $(distdir)/example
! cp -p $(srcdir)/example/aclocal.m4 $(distdir)/example
! cp -p $(srcdir)/example/autogen $(distdir)/example
! cp -p $(srcdir)/example/config.guess $(distdir)/example
! cp -p $(srcdir)/example/config.sub $(distdir)/example
! cp -p $(srcdir)/example/configure $(distdir)/example
! cp -p $(srcdir)/example/configure.in $(distdir)/example
! cp -p $(srcdir)/example/example.cpp $(distdir)/example
! cp -p $(srcdir)/example/install-sh $(distdir)/example
! cp -p $(srcdir)/example/ltconfig $(distdir)/example
! cp -p $(srcdir)/example/ltmain.sh $(distdir)/example
! cp -p $(srcdir)/example/missing $(distdir)/example
! cp -p $(srcdir)/example/mkinstalldirs $(distdir)/example
test -d $(distdir)/win || mkdir $(distdir)/win || exit 1
cp -p $(srcdir)/win/cgicc.dsw $(distdir)/win
cp -p $(srcdir)/win/cgicc.dsp $(distdir)/win
Index: cgicc/NEWS
diff -c cgicc/NEWS:1.19 cgicc/NEWS:1.21
*** cgicc/NEWS:1.19 Sun Oct 15 09:09:29 2000
--- cgicc/NEWS Wed Nov 15 09:13:14 2000
***************
*** 5,10 ****
--- 5,23 ----
<
[email protected]>
======================================================================
+ Major changes between versions 3.1.4 and 3.1.5
+ ----------------------------------------------
+
+ * example/ directory completely reworked to be a real-world example
+ that uses autoconf/automake/libtool
+
+ * New script 'cgicc-config' installed to help users of installed library
+
+ * New configure option --enable-debug-logging
+
+ * Documentation now released under the GNU Free Documentation License
+
+
Major changes between versions 3.1.3 and 3.1.4
----------------------------------------------
Index: cgicc/README
diff -c cgicc/README:1.10 cgicc/README:1.12
*** cgicc/README:1.10 Sun Oct 15 09:04:34 2000
--- cgicc/README Wed Nov 15 09:11:37 2000
***************
*** 14,24 ****
for cookies.
- Supports HTTP file upload.
! Please send bug reports, suggestions, and comments to
! <
[email protected]>
To subscribe, send a message to <
[email protected]> with the
! word "subscribe" in the subject field.
This package should contain the following directories:
--- 14,24 ----
for cookies.
- Supports HTTP file upload.
! Please send bug reports, suggestions, and comments to <
[email protected]>
To subscribe, send a message to <
[email protected]> with the
! word 'subscribe' in the subject line. A web interface to the list is
! available at
http://mail.gnu.org/mailman/listinfo/bug-cgicc.
This package should contain the following directories:
***************
*** 26,29 ****
--- 26,30 ----
info/ Complete documentation for cgicc in texinfo format
demo/ Two demonstration applications using cgicc
example/ A skeleton CGI application using cgicc
+ support/ Installation/configuration support files
Index: cgicc/acconfig.h
diff -c cgicc/acconfig.h:1.5 cgicc/acconfig.h:1.6
*** cgicc/acconfig.h:1.5 Mon Aug 9 16:38:12 1999
--- cgicc/acconfig.h Tue Nov 14 22:31:40 2000
***************
*** 1,7 ****
/*
! * $Id: acconfig.h,v 1.5 1999/08/09 23:38:12 sbooth Exp $
*
! * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- 1,7 ----
/*
! * $Id: acconfig.h,v 1.6 2000/11/15 06:31:40 sbooth Exp $
*
! * Copyright (C) 1996, 1997, 1998, 1999, 2000 Stephen F. Booth
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
***************
*** 28,30 ****
--- 28,33 ----
/* System cgicc was configured for */
#define HOST ""
+
+ /* Whether to enable debug logging */
+ #undef DEBUG
Index: cgicc/configure.in
diff -c cgicc/configure.in:1.25 cgicc/configure.in:1.29
*** cgicc/configure.in:1.25 Sat Oct 7 11:38:01 2000
--- cgicc/configure.in Sat Mar 3 09:50:15 2001
***************
*** 1,11 ****
dnl -*-m4-*-
! dnl $Id: configure.in,v 1.25 2000/10/07 18:38:01 sbooth Exp $
dnl Process this file with autoconf to produce a configure script.
! AC_REVISION($Revision: 1.25 $)
AC_INIT(cgicc/Cgicc.cpp)
AC_CONFIG_AUX_DIR(support)
! AM_INIT_AUTOMAKE(cgicc, 3.1.4)
AM_CONFIG_HEADER(cgicc/config.h)
AM_MAINTAINER_MODE
--- 1,11 ----
dnl -*-m4-*-
! dnl $Id: configure.in,v 1.29 2001/03/03 17:50:15 sbooth Exp $
dnl Process this file with autoconf to produce a configure script.
! AC_REVISION([$Revision: 1.29 $])
AC_INIT(cgicc/Cgicc.cpp)
AC_CONFIG_AUX_DIR(support)
! AM_INIT_AUTOMAKE(cgicc, 3.1.5)
AM_CONFIG_HEADER(cgicc/config.h)
AM_MAINTAINER_MODE
***************
*** 48,91 ****
dnl enable/disable compiler warnings (using gcc), if specified
AC_ARG_ENABLE(warnings,
! [ --disable-warnings disable compiler warnings [default=no]],
! [case "${enableval}" in
! yes) warnings=true ;;
! no) warnings=false ;;
! *) AC_MSG_ERROR(bad value ${enableval} for --enable-warnings) ;;
! esac],
! warnings=true)
if (test "$warnings" = true && test "$ac_cv_prog_gcc" = yes); then
! CXXFLAGS="-Wall -W -pedantic $CXXFLAGS"
fi
dnl enable/disable namespaces, if specified
AC_ARG_ENABLE(namespaces,
! [ --enable-namespaces enable namespace support [default=yes]],
! [case "${enableval}" in
! yes) namespaces=true ;;
! no) namespaces=false ;;
! *) AC_MSG_ERROR(bad value ${enableval} for --enable-namespaces) ;;
! esac],
! namespaces=true)
! if (test "$namespaces" = true && test "$cgicc_cv_cpp_namespaces" = yes); then
! CGICC_USE_NAMESPACES=1
else
! CGICC_USE_NAMESPACES=0
fi
AC_SUBST(CGICC_USE_NAMESPACES)
dnl enable/disable the demos, if specified
AC_ARG_ENABLE(demos,
! [ --enable-demos build demos [default=yes]],
! [case "${enableval}" in
! yes) demos=true ;;
! no) demos=false ;;
! *) AC_MSG_ERROR(bad value ${enableval} for --enable-demos) ;;
! esac],
! demos=true)
! AM_CONDITIONAL(DEMOS, test "$demos" = true)
AC_OUTPUT([Makefile cgicc/Makefile cgicc/CgiDefs.h info/Makefile demo/Makefile
! example/Makefile])
--- 48,110 ----
dnl enable/disable compiler warnings (using gcc), if specified
AC_ARG_ENABLE(warnings,
! [ --disable-warnings disable gcc warnings [default=no]],
! [case "${enableval}" in
! yes) warnings=yes ;;
! no) warnings=no ;;
! *) AC_MSG_ERROR(bad value ${enableval} for --enable-warnings) ;;
! esac], warnings=yes)
! AC_MSG_CHECKING(whether to use gcc verbose warnings)
! AC_MSG_RESULT($warnings)
if (test "$warnings" = true && test "$ac_cv_prog_gcc" = yes); then
! CXXFLAGS="-Wall -W -pedantic $CXXFLAGS"
fi
dnl enable/disable namespaces, if specified
AC_ARG_ENABLE(namespaces,
! [ --enable-namespaces enable namespace support [default=yes]],
! [case "${enableval}" in
! yes) namespaces=yes ;;
! no) namespaces=no ;;
! *) AC_MSG_ERROR(bad value ${enableval} for --enable-namespaces) ;;
! esac], namespaces=yes)
! AC_MSG_CHECKING(whether to use the cgicc namespace)
! AC_MSG_RESULT($namespaces)
! if (test "$namespaces" = yes && test "$cgicc_cv_cpp_namespaces" = yes); then
! CGICC_USE_NAMESPACES=1
else
! CGICC_USE_NAMESPACES=0
fi
AC_SUBST(CGICC_USE_NAMESPACES)
+ dnl enable/disable debug logging, if specified
+ AC_ARG_ENABLE(debug-logging,
+ [ --enable-debug-logging enable debug logging [default=no]],
+ [case "${enableval}" in
+ yes) debug=yes ;;
+ no) debug=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-logging) ;;
+ esac], debug=no)
+ AC_MSG_CHECKING(whether to enable debug logging)
+ AC_MSG_RESULT($debug)
+ if test "$debug" = yes; then
+ AC_DEFINE(DEBUG,1)
+ else
+ AC_DEFINE(DEBUG,0)
+ fi
+
dnl enable/disable the demos, if specified
AC_ARG_ENABLE(demos,
! [ --enable-demos build demos [default=yes]],
! [case "${enableval}" in
! yes) demos=yes ;;
! no) demos=no ;;
! *) AC_MSG_ERROR(bad value ${enableval} for --enable-demos) ;;
! esac], demos=yes)
! AC_MSG_CHECKING(whether to build the cgicc demos)
! AC_MSG_RESULT("$demos")
! AM_CONDITIONAL(DEMOS, test "$demos" = yes)
AC_OUTPUT([Makefile cgicc/Makefile cgicc/CgiDefs.h info/Makefile demo/Makefile
! support/Makefile support/cgicc-config])
Index: cgicc/demo/Makefile.am
diff -c cgicc/demo/Makefile.am:1.6 cgicc/demo/Makefile.am:1.8
*** cgicc/demo/Makefile.am:1.6 Tue Aug 17 11:33:04 1999
--- cgicc/demo/Makefile.am Sat Mar 3 09:47:43 2001
***************
*** 1,10 ****
! ## $Id: Makefile.am,v 1.6 1999/08/17 18:33:04 sbooth Exp $
CLEANFILES = *~
! EXTRA_DIST = testform.html
! noinst_PROGRAMS = test.cgi dns.cgi
INCLUDES = -I$(top_srcdir) -I$(top_builddir)
--- 1,10 ----
! ## $Id: Makefile.am,v 1.8 2001/03/03 17:47:43 sbooth Exp $
CLEANFILES = *~
! EXTRA_DIST = test.html upload.html
! noinst_PROGRAMS = test.cgi dns.cgi upload.cgi
INCLUDES = -I$(top_srcdir) -I$(top_builddir)
***************
*** 13,15 ****
--- 13,18 ----
dns_cgi_SOURCES = dns.cpp
dns_cgi_LDADD = ../cgicc/libcgicc.la @LIB_NET@
+
+ upload_cgi_SOURCES = upload.cpp
+ upload_cgi_LDADD = ../cgicc/libcgicc.la
Index: cgicc/demo/README
diff -c cgicc/demo/README:1.2 cgicc/demo/README:1.4
*** cgicc/demo/README:1.2 Wed May 5 11:31:06 1999
--- cgicc/demo/README Sat Mar 3 09:47:01 2001
***************
*** 1,30 ****
! GNU Cgicc Demo Programs
=======================
! To run the demo application 'test.cgi', the file 'testform.html' must
! be configured for your particular web server. Scroll down until you
! see the following line (line 47):
! <FORM METHOD="POST" ACTION="
http://change_this_path/cgi-bin/test.cgi">
! Change the path to match your cgi-bin directory. To run the test,
! first copy the 'test.cgi' and 'dns.cgi' applications to the cgi-bin
! directory. Finally, copy 'testform.html' to your HTML directory.
! This form will call the demo 'test.cgi', and will serve as a test of
! the installation.
!
! Incidentally, to see how transparently Cgicc handles the difference
between 'POST' and 'GET' type forms, try changing the request method
! in 'testform.html' and see what happens. You won't notice a
! difference except in the call to the application.
A Note about debug logging
==========================
! If you want to use Cgicc's debug logging feature in the demos, you'll
! need to change the declaration of 'gLogFile' to contain a path to the
! log file (in addition to defining the macro 'DEBUG' during library
! compilation). The log file must be writable by whichever user your web
! server runs cgi applications under.
--- 1,67 ----
! GNU cgicc Demo Programs
=======================
! There are three demo applications in this directory:
! 'test.cgi', a demo of how to access various kinds of submitted form
! information using cgicc. Use the file 'test.html' to submit data
! to this application.
!
! 'upload.cgi', a demo of how to use cgicc to process uploaded
! files. Use the file 'upload.html' to submit data to this
! application.
!
! 'dns.cgi', a demo of a web dns gateway. There is no html file
! associated with this application; it is run directly.
!
! To run the demo applications 'test.cgi' or 'upload.cgi', the associated
! html file ('test.html' or 'upload.html') must be configured for your
! particular web server. Scroll down to line 56, which should look like
! <FORM METHOD="POST" ACTION="
http://change_this_path/cgi-bin/test.cgi">
! in 'test.html', or
! <FORM METHOD="POST" ACTION="
http://change_this_path/cgi-bin/upload.cgi">
! in 'upload.html'.
!
! Change the path to match your cgi-bin directory. For example, if you
! were running the applications from the /cgi-bin directory on the
! server www.gnu.org, the line would contain
! ACTION="
http://www.gnu.org/cgi-bin/test.cgi".
!
! To run the tests, first copy the 'test.cgi', 'upload.cgi', and
! 'dns.cgi' applications to the cgi-bin directory (See note on libtool
! if this doesn't seem to work). Ensure that the file permissions are
! at least readable and executable by all (-rwxr-xr-w). Next, copy the
! files 'test.html' and 'upload.html' to your HTML directory. Ensure
! that these files are readable by everyone (-rw-r--r--).
! To run the applications, point your browser at the 'dns.cgi'
! application, or at 'test.html' or 'upload.html'.
! Incidentally, to see how transparently cgicc handles the difference
between 'POST' and 'GET' type forms, try changing the request method
! in 'test.html' and see what happens. You won't notice a difference
! except in the call to the application.
!
! A Note on libtool
! =================
+ Since cgicc uses libtool to generate the libraries and link against
+ them, depending on your configuration you may need to use libtool to
+ copy the applications due to the way runtime search paths are
+ embedded. If you are unable to run the applications from the /cgi-bin
+ directory, use libtool to re-copy them. From the cgicc/demo
+ directory, run
+ % sh ../libtool --mode=install cp *.cgi cgi-bin/
+ replacing cgi-bin/ with your webservers cgi-bin directory.
A Note about debug logging
==========================
! If you want to use cgicc's debug logging feature in the demos, you'll
! need to change the declaration of 'gLogFile' in the source files to
! contain a path to the log file. In addition, you need to define the
! macro 'DEBUG' during library compilation. This is accomplished at
! configure time, by passing the --enable-debug-logging flag:
! % ./configure --enable-debug-logging [args]
! Finally, the log file must be writable by whichever user your
! webserver runs cgi applications under.
Index: cgicc/demo/test.cpp
diff -c cgicc/demo/test.cpp:1.13 cgicc/demo/test.cpp:1.14
*** cgicc/demo/test.cpp:1.13 Sun Oct 15 08:59:53 2000
--- cgicc/demo/test.cpp Mon Oct 16 17:22:54 2000
***************
*** 1,5 ****
/*
! * $Id: test.cpp,v 1.13 2000/10/15 15:59:53 sbooth Exp $
*
* Copyright (C) 1996, 1997, 1998, 1999, 2000 Stephen F. Booth
*
--- 1,5 ----
/*
! * $Id: test.cpp,v 1.14 2000/10/17 00:22:54 sbooth Exp $
*
* Copyright (C) 1996, 1997, 1998, 1999, 2000 Stephen F. Booth
*
***************
*** 56,62 ****
void dumpEnvironment(const CgiEnvironment& env);
void dumpList(const Cgicc& formData);
void showForm(const Cgicc& formData);
- void showFile(const Cgicc& formData);
// Main Street, USA
int
--- 56,61 ----
***************
*** 176,187 ****
if(cgi.queryCheckbox("showForm"))
showForm(cgi);
- // If the user requested information on the uploaded file,
- // create a simple table showing the information
- // Disabled for demo
- if(cgi.queryCheckbox("showFile"))
- showFile(cgi);
-
// Now print out a footer with some fun info
cout << p() << CGICCNS div().set("align","center");
cout << a("Back to form").set("href", cgi.getEnvironment().getReferrer())
--- 175,180 ----
***************
*** 268,274 ****
cout << body() << endl;
! cout << h1() << "GNU Cgi" << span("cc", set("class","red"))
<< " caught an exception" << h1() << endl;
cout << CGICCNS div().set("align","center").set("class","notice") << endl;
--- 261,267 ----
cout << body() << endl;
! cout << h1() << "GNU cgi" << span("cc", set("class","red"))
<< " caught an exception" << h1() << endl;
cout << CGICCNS div().set("align","center").set("class","notice") << endl;
***************
*** 490,541 ****
cout << "You don't watch Friends!?" << br() << endl;
cout << CGICCNS div() << endl;
- }
-
- // Show the uploaded file
- // This will work if you uncomment the appropriate lines in testform.html
- void
- showFile(const Cgicc& formData)
- {
- cout << h2("File Uploaded via FormFile") << endl;
-
- const_file_iterator file;
- file = formData.getFile("userfile");
-
- if(file != formData.getFiles().end()) {
- cout << CGICCNS div().set("align","center") << endl;
-
- cout << table().set("border","0").set("rules","none").set("frame","void")
- .set("cellspacing","2").set("cellpadding","2")
- .set("class","cgi") << endl;
- cout << colgroup().set("span","2") << endl;
- cout << col().set("align","center").set("class","title").set("span","1")
- << endl;
- cout << col().set("align","left").set("class","data").set("span","1")
- << endl;
- cout << colgroup() << endl;
-
- cout << tr() << td("Name").set("class","title")
- << td((*file).getName()).set("class","data") << tr() << endl;
-
- cout << tr() << td("Data Type").set("class","title")
- << td((*file).getDataType()).set("class","data") << tr() << endl;
-
- cout << tr() << td("Filename").set("class","title")
- << td((*file).getFilename()).set("class","data") << tr() << endl;
- cout << tr() << td("Data Length").set("class","title")
- << td().set("class","data") << (*file).getDataLength()
- << td() << tr() << endl;
-
- cout << tr() << td("File Data").set("class","title")
- << td().set("class","data") << pre();
- (*file).writeToStream(cout);
- cout << pre() << td() << tr() << endl;
-
- cout << table() << CGICCNS div() << endl;
- }
- else {
- cout << p() << CGICCNS div().set("class", "notice") << endl;
- cout << "No file was uploaded." << endl << CGICCNS div() << p() << endl;
- }
}
--- 483,486 ----
Index: cgicc/demo/test.html
diff -c /dev/null cgicc/demo/test.html:1.1
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/demo/test.html Tue Nov 14 22:29:20 2000
***************
*** 0 ****
--- 1,183 ----
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "
http://www.w3.org/TR/REC-html40/loose.dtd">
+
+ <HTML LANG="en" DIR="LTR">
+
+ <HEAD>
+ <!-- $Id: test.html,v 1.1 2000/11/15 06:29:20 sbooth Exp $ -->
+
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <TITLE>GNU cgicc Test Form</TITLE>
+ <LINK REV="made" HREF="mailto:
[email protected]">
+ <STYLE TYPE="text/css"><!--
+
+ BODY { color: black; background: white; }
+
+ A:link { color: #1F00FF }
+ A:visited { color: #9900DD }
+ A:active { color: #FF0000 }
+ A:hover { color: #FF0000 }
+
+ HR.half { width: 60%; align: center; }
+
+ SPAN.red, STRONG.red { color: red; }
+ SPAN.green { color: green; }
+ SPAN.blue { color: blue; }
+
+ P.legal { font-size: small }
+ P.red { text-align: center; color: red; }
+ P.center { text-align: center; }
+
+ DIV.notice { border: solid thin; padding: 1em;
+ margin: 1em 0; background: #DDD;}
+
+ TABLE.form { left-margin: auto; right-margin: auto; width: 90%; }
+
+ COL.black, TD.black, TD.title, TR.title { color: white;
+ background: black; font-weight: bold; text-align: center; }
+
+ COL.gray, TD.gray { background: #DDD; text-align: center; }
+
+ TD.data, TR.data { background: #DDD; text-align: left; }
+ TD.grayspecial { background: #DDD; text-align: left; }
+ TD.ltgray, TR.ltgray { background: #DDD; }
+ TD.dkgray, TR.dkgray { background: #BBB; }
+
+ DIV.smaller { font-size: small; }
+
+ --></STYLE>
+ </HEAD>
+
+ <BODY>
+
+ <H1>GNU cgi<SPAN CLASS="red">cc</SPAN> Test Form</H1>
+
+ <!-- Change this to match your web site's address -->
+ <FORM METHOD="POST" ACTION="
http://change_this_path/cgi-bin/test.cgi" >
+
+ <DIV ALIGN="center">
+
+ <P>
+ <TABLE BORDER="0"
+ RULES="none"
+ FRAME="void"
+ CELLSPACING="2"
+ CELLPADDING="2"
+ CLASS="form">
+
+ <COLGROUP SPAN="2">
+ <COL ALIGN="center" SPAN="2">
+ </COLGROUP>
+
+ <TR>
+ <TD CLASS="black">Your Name</TD>
+ <TD CLASS="gray"><INPUT TYPE="text" NAME="name"></TD>
+ </TR>
+
+ <TR>
+ <TD CLASS="black">Your salary in millions<BR>(80-120)</TD>
+ <TD CLASS="gray"><INPUT TYPE="text" NAME="bucks" VALUE="93"></TD>
+ </TR>
+
+ <TR>
+ <TD CLASS="black">Hours you've wasted on the web</TD>
+ <TD CLASS="gray"><INPUT TYPE="text" NAME="time" VALUE="100"></TD>
+ </TR>
+
+ <TR>
+ <TD CLASS="black">Your thoughts on cloned sheep</TD>
+ <TD CLASS="gray">
+ <TEXTAREA NAME="sheep" ROWS="4" COLS="40">They're so cute!</TEXTAREA>
+ </TD>
+ </TR>
+
+ <TR>
+ <TD CLASS="black">Are you hungry?</TD>
+ <TD CLASS="gray"><INPUT TYPE="checkbox" NAME="hungry" CHECKED>Yes</TD>
+ </TR>
+
+ <TR>
+ <TD CLASS="black">Your favorite ice cream flavors</TD>
+ <TD CLASS="gray"><SELECT NAME="flavors" MULTIPLE>
+ <OPTION VALUE="cookie dough">Cookie Dough
+ <OPTION VALUE="rocky road">Rocky Road
+ <OPTION VALUE="strawberry">Strawberry
+ <OPTION VALUE="chocolate">Chocolate
+ <OPTION VALUE="vanilla">Vanilla</SELECT>
+ </TD>
+ </TR>
+
+ <TR>
+ <TD CLASS="black">Your hair color</TD>
+ <TD CLASS="gray"><SELECT NAME="hair">
+ <OPTION VALUE="blond">Blond
+ <OPTION VALUE="brown">Brown
+ <OPTION VALUE="red">Red
+ <OPTION VALUE="black">Black
+ <OPTION VALUE="white">White
+ <OPTION VALUE="green">Green
+ <OPTION VALUE="multicolored">Multicolored</SELECT>
+ </TD>
+ </TR>
+
+ <TR>
+ <TD CLASS="black">You voted for</TD>
+ <TD CLASS="gray">
+ <INPUT TYPE="radio" NAME="vote" VALUE="Clinton" checked>Clinton
+ <INPUT TYPE="radio" NAME="vote" VALUE="Dole">Dole
+ <INPUT TYPE="radio" NAME="vote" VALUE="the Libertarian">the Libertarian
+ <INPUT TYPE="radio" NAME="vote" VALUE="nobody">No one
+ </TD>
+ </TR>
+
+ <TR>
+ <TD CLASS="black">Your favorite character(s) on Friends</TD>
+ <TD CLASS="gray">
+ <INPUT TYPE="checkbox" NAME="friends" VALUE="Joey">Joey
+ <INPUT TYPE="checkbox" NAME="friends" VALUE="Chandler">Chandler
+ <INPUT TYPE="checkbox" NAME="friends" VALUE="Ross">Ross<BR>
+ <INPUT TYPE="checkbox" NAME="friends" VALUE="Phoebe">Phoebe
+ <INPUT TYPE="checkbox" NAME="friends" VALUE="Rachel">Rachel
+ <INPUT TYPE="checkbox" NAME="friends" VALUE="Monica">Monica
+ </TD>
+ </TR>
+
+ <TR>
+ <TD CLASS="black">In the output, show</TD>
+ <TD CLASS="grayspecial">
+ <INPUT TYPE="checkbox" NAME="showEnv" CHECKED>Data from CgiEnvironment<BR>
+ <INPUT TYPE="checkbox" NAME="showFE" CHECKED>All FormEntries from vector<BR>
+ <INPUT TYPE="checkbox" NAME="showForm" CHECKED>Data from Cgicc
+
+ </TD>
+ </TR>
+
+ <TR>
+ <TD CLASS="black">Exception Handling</TD>
+ <TD CLASS="grayspecial">
+ <INPUT TYPE="checkbox" NAME="throw">Throw an exception to test error
+ handling</TD>
+ </TR>
+
+ <TR>
+ <TD CLASS="black">Save and Restore</TD>
+ <TD CLASS="grayspecial">
+ <INPUT TYPE="checkbox" NAME="save">Save submission to a file<BR>
+ <INPUT TYPE="checkbox" NAME="restore">Restore data from the last saved
+ submission</TD>
+ </TR>
+
+ </TABLE>
+ <!-- </P> -->
+
+ <P>
+ <INPUT TYPE="submit" NAME="submit" VALUE="Submit My Preferences">
+ <INPUT TYPE="reset" VALUE="Nuke 'em">
+ </P>
+
+ </DIV>
+ </FORM>
+
+ </BODY>
+ </HTML>
+
Index: cgicc/demo/testform.html
diff -c cgicc/demo/testform.html:1.4 cgicc/demo/testform.html:removed
*** cgicc/demo/testform.html:1.4 Sun Oct 15 09:00:42 2000
--- cgicc/demo/testform.html Sat Mar 3 10:02:22 2001
***************
*** 1,196 ****
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
- "
http://www.w3.org/TR/REC-html40/loose.dtd">
-
- <HTML LANG="en" DIR="LTR">
-
- <HEAD>
- <!-- $Id: testform.html,v 1.4 2000/10/15 16:00:42 sbooth Exp $ -->
-
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- <TITLE>GNU cgicc Test Form</TITLE>
- <LINK REV="made" HREF="mailto:
[email protected]">
- <STYLE TYPE="text/css"><!--
-
- BODY { color: black; background: white; }
-
- A:link { color: #1F00FF }
- A:visited { color: #9900DD }
- A:active { color: #FF0000 }
-
- HR.half { width: 60%; align: center; }
-
- SPAN.red, STRONG.red { color: red; }
- SPAN.green { color: green; }
- SPAN.blue { color: blue; }
-
- P.legal { font-size: small }
- P.red { text-align: center; color: red; }
- P.center { text-align: center; }
-
- DIV.notice { border: solid thin; padding: 1em;
- margin: 1em 0; background: #DDD;}
-
- TABLE.form { left-margin: auto; right-margin: auto; width: 90%; }
-
- COL.black, TD.black, TD.title, TR.title { color: white;
- background: black; font-weight: bold; text-align: center; }
-
- COL.gray, TD.gray { background: #DDD; text-align: center; }
-
- TD.data, TR.data { background: #DDD; text-align: left; }
- TD.grayspecial { background: #DDD; text-align: left; }
- TD.ltgray, TR.ltgray { background: #DDD; }
- TD.dkgray, TR.dkgray { background: #BBB; }
-
- DIV.smaller { font-size: small; }
-
- --></STYLE>
- </HEAD>
-
- <BODY>
-
- <H1>GNU cgi<SPAN CLASS="red">cc</SPAN> Test Form</H1>
-
- <!-- Change this to match your web site's address -->
- <FORM METHOD="POST" ACTION="
http://change_this_path/cgi-bin/test.cgi" >
-
- <DIV ALIGN="center">
-
- <P>
- <TABLE BORDER="0"
- RULES="none"
- FRAME="void"
- CELLSPACING="2"
- CELLPADDING="2"
- CLASS="form">
-
- <COLGROUP SPAN="2">
- <COL ALIGN="center" SPAN="2">
- </COLGROUP>
-
- <TR>
- <TD CLASS="black">Your Name</TD>
- <TD CLASS="gray"><INPUT TYPE="text" NAME="name"></TD>
- </TR>
-
- <TR>
- <TD CLASS="black">Your salary in millions<BR>(80-120)</TD>
- <TD CLASS="gray"><INPUT TYPE="text" NAME="bucks" VALUE="93"></TD>
- </TR>
-
- <TR>
- <TD CLASS="black">Hours you've wasted on the web</TD>
- <TD CLASS="gray"><INPUT TYPE="text" NAME="time" VALUE="100"></TD>
- </TR>
-
- <TR>
- <TD CLASS="black">Your thoughts on cloned sheep</TD>
- <TD CLASS="gray">
- <TEXTAREA NAME="sheep" ROWS="4" COLS="40">They're so cute!</TEXTAREA>
- </TD>
- </TR>
-
- <TR>
- <TD CLASS="black">Are you hungry?</TD>
- <TD CLASS="gray"><INPUT TYPE="checkbox" NAME="hungry" CHECKED>Yes</TD>
- </TR>
-
- <TR>
- <TD CLASS="black">Your favorite ice cream flavors</TD>
- <TD CLASS="gray"><SELECT NAME="flavors" MULTIPLE>
- <OPTION VALUE="cookie dough">Cookie Dough
- <OPTION VALUE="rocky road">Rocky Road
- <OPTION VALUE="strawberry">Strawberry
- <OPTION VALUE="chocolate">Chocolate
- <OPTION VALUE="vanilla">Vanilla</SELECT>
- </TD>
- </TR>
-
- <TR>
- <TD CLASS="black">Your hair color</TD>
- <TD CLASS="gray"><SELECT NAME="hair">
- <OPTION VALUE="blond">Blond
- <OPTION VALUE="brown">Brown
- <OPTION VALUE="red">Red
- <OPTION VALUE="black">Black
- <OPTION VALUE="white">White
- <OPTION VALUE="green">Green
- <OPTION VALUE="multicolored">Multicolored</SELECT>
- </TD>
- </TR>
-
- <TR>
- <TD CLASS="black">You voted for</TD>
- <TD CLASS="gray">
- <INPUT TYPE="radio" NAME="vote" VALUE="Clinton" checked>Clinton
- <INPUT TYPE="radio" NAME="vote" VALUE="Dole">Dole
- <INPUT TYPE="radio" NAME="vote" VALUE="the Libertarian">the Libertarian
- <INPUT TYPE="radio" NAME="vote" VALUE="nobody">No one
- </TD>
- </TR>
-
- <TR>
- <TD CLASS="black">Your favorite character(s) on Friends</TD>
- <TD CLASS="gray">
- <INPUT TYPE="checkbox" NAME="friends" VALUE="Joey">Joey
- <INPUT TYPE="checkbox" NAME="friends" VALUE="Chandler">Chandler
- <INPUT TYPE="checkbox" NAME="friends" VALUE="Ross">Ross<BR>
- <INPUT TYPE="checkbox" NAME="friends" VALUE="Phoebe">Phoebe
- <INPUT TYPE="checkbox" NAME="friends" VALUE="Rachel">Rachel
- <INPUT TYPE="checkbox" NAME="friends" VALUE="Monica">Monica
- </TD>
- </TR>
-
- <!-- Uncomment the lines below to test file upload -->
- <!--
- <TR>
- <TD CLASS="black">Send a file</TD>
- <TD CLASS="gray"><INPUT TYPE="file" NAME="userfile" ACCEPT="text/plain"></TD>
- </TR>
- -->
-
- <TR>
- <TD CLASS="black">In the output, show</TD>
- <TD CLASS="grayspecial">
- <INPUT TYPE="checkbox" NAME="showEnv" CHECKED>Data from CgiEnvironment<BR>
- <INPUT TYPE="checkbox" NAME="showFE" CHECKED>All FormEntries from vector<BR>
- <INPUT TYPE="checkbox" NAME="showForm" CHECKED>Data from Cgicc
-
- <!-- Uncomment the lines below to test file upload -->
- <!--
- <BR>
- <INPUT TYPE="checkbox" NAME="showFile" CHECKED>Data from FormFile
- -->
-
- </TD>
- </TR>
-
- <TR>
- <TD CLASS="black">Exception Handling</TD>
- <TD CLASS="grayspecial">
- <INPUT TYPE="checkbox" NAME="throw">Throw an exception to test error
- handling</TD>
- </TR>
-
- <TR>
- <TD CLASS="black">Save and Restore</TD>
- <TD CLASS="grayspecial">
- <INPUT TYPE="checkbox" NAME="save">Save submission to a file<BR>
- <INPUT TYPE="checkbox" NAME="restore">Restore data from the last saved
- submission</TD>
- </TR>
-
- </TABLE>
- <!-- </P> -->
-
- <P>
- <INPUT TYPE="submit" NAME="submit" VALUE="Submit My Preferences">
- <INPUT TYPE="reset" VALUE="Nuke 'em">
- </P>
-
- </DIV>
- </FORM>
-
- </BODY>
- </HTML>
-
--- 0 ----
Index: cgicc/demo/upload.cpp
diff -c /dev/null cgicc/demo/upload.cpp:1.1
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/demo/upload.cpp Mon Oct 16 17:22:22 2000
***************
*** 0 ****
--- 1,281 ----
+ /*
+ * $Id: upload.cpp,v 1.1 2000/10/17 00:22:22 sbooth Exp $
+ *
+ * Copyright (C) 2000 Stephen F. Booth
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+ #include <new>
+ #include <string>
+ #include <vector>
+ #include <stdexcept>
+ #include <iostream>
+ #include <cstdlib>
+
+ #include "cgicc/CgiDefs.h"
+ #include "cgicc/Cgicc.h"
+ #include "cgicc/HTMLClasses.h"
+
+ #if HAVE_UNAME
+ # include <sys/utsname.h>
+ #endif
+
+ #if HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+
+ // To use logging, the variable gLogFile MUST be defined, and it _must_
+ // be an ofstream
+ #if DEBUG
+ STDNS ofstream gLogFile( "/change_this_path/cgicc.log", STDNS ios::app );
+ #endif
+
+ #if CGICC_USE_NAMESPACES
+ using namespace std;
+ using namespace cgicc;
+ #else
+ # define div div_
+ # define link link_
+ # define select select_
+ #endif
+
+ // Main Street, USA
+ int
+ main(int /*argc*/,
+ char ** /*argv*/)
+ {
+ try {
+ #if HAVE_GETTIMEOFDAY
+ timeval start;
+ gettimeofday(&start, NULL);
+ #endif
+
+ // Create a new Cgicc object containing all the CGI data
+ Cgicc cgi;
+
+ // Output the HTTP headers for an HTML document, and the HTML 4.0 DTD info
+ cout << HTTPHTMLHeader() << HTMLDoctype(HTMLDoctype::eStrict) << endl;
+ cout << html().set("lang", "EN").set("dir", "LTR") << endl;
+
+ // Set up the page's header and title.
+ // I will put in lfs to ease reading of the produced HTML.
+ cout << head() << endl;
+
+ // Output the style sheet portion of the header
+ cout << style() << comment() << endl;
+ cout << "BODY { color: black; background-color: white; }" << endl;
+ cout << "HR.half { width: 60%; align: center; }" << endl;
+ cout << "SPAN.red, STRONG.red { color: red; }" << endl;
+ cout << "DIV.smaller { font-size: small; }" << endl;
+ cout << "DIV.notice { border: solid thin; padding: 1em; margin: 1em 0; "
+ << "background: #DDD; }" << endl;
+ cout << "SPAN.blue { color: blue; }" << endl;
+ cout << "COL.title { color: white; background-color: black; ";
+ cout << "font-weight: bold; text-align: center; }" << endl;
+ cout << "COL.data { background-color: #DDD; text-align: left; }" << endl;
+ cout << "TD.data, TR.data { background-color: #DDD; text-align: left; }"
+ << endl;
+ cout << "TD.grayspecial { background-color: #DDD; text-align: left; }"
+ << endl;
+ cout << "TD.ltgray, TR.ltgray { background-color: #DDD; }" << endl;
+ cout << "TD.dkgray, TR.dkgray { background-color: #BBB; }" << endl;
+ cout << "COL.black, TD.black, TD.title, TR.title { color: white; "
+ << "background-color: black; font-weight: bold; text-align: center; }"
+ << endl;
+ cout << "COL.gray, TD.gray { background-color: #DDD; text-align: center; }"
+ << endl;
+ cout << "TABLE.cgi { left-margin: auto; right-margin: auto; width: 90%; }"
+ << endl;
+
+ cout << comment() << style() << endl;
+
+ cout << title() << "GNU cgicc v" << cgi.getVersion()
+ << " File Upload Test Results" << title() << endl;
+ cout << meta().set("name", "author").set("content", "Stephen F. Booth")
+ << endl;
+
+ cout << head() << endl;
+
+ // Start the HTML body
+ cout << body() << endl;
+
+ cout << h1() << "GNU cgi" << span("cc").set("class","red")
+ << " v"<< cgi.getVersion() << " File Upload Test Results"
+ << h1() << endl;
+
+ // Get a pointer to the environment
+ const CgiEnvironment& env = cgi.getEnvironment();
+
+ // Generic thank you message
+ cout << comment() << "This page generated by cgicc for "
+ << env.getRemoteHost() << comment() << endl;
+ cout << h4() << "Thanks for using cgi" << span("cc").set("class", "red")
+ << ", " << env.getRemoteHost()
+ << '(' << env.getRemoteAddr() << ")!" << h4() << endl;
+
+
+ // Show the uploaded file
+ cout << h2("File Uploaded via FormFile") << endl;
+
+ const_file_iterator file;
+ file = cgi.getFile("userfile");
+
+ if(file != cgi.getFiles().end()) {
+ cout << CGICCNS div().set("align","center") << endl;
+
+ cout << table().set("border","0").set("rules","none").set("frame","void")
+ .set("cellspacing","2").set("cellpadding","2")
+ .set("class","cgi") << endl;
+ cout << colgroup().set("span","2") << endl;
+ cout << col().set("align","center").set("class","title").set("span","1")
+ << endl;
+ cout << col().set("align","left").set("class","data").set("span","1")
+ << endl;
+ cout << colgroup() << endl;
+
+ cout << tr() << td("Name").set("class","title")
+ << td((*file).getName()).set("class","data") << tr() << endl;
+
+ cout << tr() << td("Data Type").set("class","title")
+ << td((*file).getDataType()).set("class","data") << tr() << endl;
+
+ cout << tr() << td("Filename").set("class","title")
+ << td((*file).getFilename()).set("class","data") << tr() << endl;
+ cout << tr() << td("Data Length").set("class","title")
+ << td().set("class","data") << (*file).getDataLength()
+ << td() << tr() << endl;
+
+ cout << tr() << td("File Data").set("class","title")
+ << td().set("class","data") << pre();
+ (*file).writeToStream(cout);
+
+ /*
+ To write the contents of the file to a file "foo" on disk:
+
+ ofstream foo("foo");
+ (*file).writeToStream(foo);
+ */
+
+ cout << pre() << td() << tr() << endl;
+
+ cout << table() << CGICCNS div() << endl;
+ }
+ else {
+ cout << p() << CGICCNS div().set("class", "notice") << endl;
+ cout << "No file was uploaded." << endl << CGICCNS div() << p() << endl;
+ }
+
+ // Now print out a footer with some fun info
+ cout << p() << CGICCNS div().set("align","center");
+ cout << a("Back to form").set("href", cgi.getEnvironment().getReferrer())
+ << endl;
+ cout << CGICCNS div() << br() << hr(set("class","half")) << endl;
+
+ // Information on cgicc
+ cout << CGICCNS div().set("align","center").set("class","smaller") << endl;
+ cout << "GNU cgi" << span("cc").set("class","red") << " v";
+ cout << cgi.getVersion();
+ cout << " by " << a("Stephen F. Booth")
+ .set("href", "
http://home.earthlink.net/~sfbooth/")
+ << br() << endl;
+ cout << "Compiled at " << cgi.getCompileTime();
+ cout << " on " << cgi.getCompileDate() << br() << endl;
+
+ cout << "Configured for " << cgi.getHost();
+ #if HAVE_UNAME
+ struct utsname info;
+ if(uname(&info) != -1) {
+ cout << ". Running on " << info.sysname;
+ cout << ' ' << info.release << " (";
+ cout << info.nodename << ")." << endl;
+ }
+ #else
+ cout << "." << endl;
+ #endif
+
+ #if HAVE_GETTIMEOFDAY
+ // Information on this query
+ timeval end;
+ gettimeofday(&end, NULL);
+ long us = ((end.tv_sec - start.tv_sec) * 1000000)
+ + (end.tv_usec - start.tv_usec);
+
+ cout << br() << "Total time for request = " << us << " us";
+ cout << " (" << (double) (us/1000000.0) << " s)";
+ #endif
+
+ // End of document
+ cout << CGICCNS div() << endl;
+ cout << body() << html() << endl;
+
+ // No chance for failure in this example
+ return EXIT_SUCCESS;
+ }
+
+ // Did any errors occur?
+ catch(const STDNS exception& e) {
+
+ // This is a dummy exception handler, as it doesn't really do
+ // anything except print out information.
+
+ // Reset all the HTML elements that might have been used to
+ // their initial state so we get valid output
+ html::reset(); head::reset(); body::reset();
+ title::reset(); h1::reset(); h4::reset();
+ comment::reset(); td::reset(); tr::reset();
+ table::reset(); CGICCNS div::reset(); p::reset();
+ a::reset(); h2::reset(); colgroup::reset();
+
+ // Output the HTTP headers for an HTML document, and the HTML 4.0 DTD info
+ cout << HTTPHTMLHeader() << HTMLDoctype(HTMLDoctype::eStrict) << endl;
+ cout << html().set("lang","EN").set("dir","LTR") << endl;
+
+ // Set up the page's header and title.
+ // I will put in lfs to ease reading of the produced HTML.
+ cout << head() << endl;
+
+ // Output the style sheet portion of the header
+ cout << style() << comment() << endl;
+ cout << "BODY { color: black; background-color: white; }" << endl;
+ cout << "HR.half { width: 60%; align: center; }" << endl;
+ cout << "SPAN.red, STRONG.red { color: red; }" << endl;
+ cout << "DIV.notice { border: solid thin; padding: 1em; margin: 1em 0; "
+ << "background: #DDD; }" << endl;
+
+ cout << comment() << style() << endl;
+
+ cout << title("GNU cgicc exception") << endl;
+ cout << meta().set("name", "author")
+ .set("content", "Stephen F. Booth") << endl;
+ cout << head() << endl;
+
+ cout << body() << endl;
+
+ cout << h1() << "GNU cgi" << span("cc", set("class","red"))
+ << " caught an exception" << h1() << endl;
+
+ cout << CGICCNS div().set("align","center").set("class","notice") << endl;
+
+ cout << h2(e.what()) << endl;
+
+ // End of document
+ cout << CGICCNS div() << endl;
+ cout << hr().set("class","half") << endl;
+ cout << body() << html() << endl;
+
+ return EXIT_SUCCESS;
+ }
+ }
Index: cgicc/demo/upload.html
diff -c /dev/null cgicc/demo/upload.html:1.1
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/demo/upload.html Mon Oct 16 17:22:22 2000
***************
*** 0 ****
--- 1,94 ----
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "
http://www.w3.org/TR/REC-html40/loose.dtd">
+
+ <HTML LANG="en" DIR="LTR">
+
+ <HEAD>
+ <!-- $Id: upload.html,v 1.1 2000/10/17 00:22:22 sbooth Exp $ -->
+
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <TITLE>GNU cgicc File Upload Test</TITLE>
+ <LINK REV="made" HREF="mailto:
[email protected]">
+ <STYLE TYPE="text/css"><!--
+
+ BODY { color: black; background: white; }
+
+ A:link { color: #1F00FF }
+ A:visited { color: #9900DD }
+ A:active { color: #FF0000 }
+ A:hover { color: #FF0000 }
+
+ HR.half { width: 60%; align: center; }
+
+ SPAN.red, STRONG.red { color: red; }
+ SPAN.green { color: green; }
+ SPAN.blue { color: blue; }
+
+ P.legal { font-size: small }
+ P.red { text-align: center; color: red; }
+ P.center { text-align: center; }
+
+ DIV.notice { border: solid thin; padding: 1em;
+ margin: 1em 0; background: #DDD;}
+
+ TABLE.form { left-margin: auto; right-margin: auto; width: 90%; }
+
+ COL.black, TD.black, TD.title, TR.title { color: white;
+ background: black; font-weight: bold; text-align: center; }
+
+ COL.gray, TD.gray { background: #DDD; text-align: center; }
+
+ TD.data, TR.data { background: #DDD; text-align: left; }
+ TD.grayspecial { background: #DDD; text-align: left; }
+ TD.ltgray, TR.ltgray { background: #DDD; }
+ TD.dkgray, TR.dkgray { background: #BBB; }
+
+ DIV.smaller { font-size: small; }
+
+ --></STYLE>
+ </HEAD>
+
+ <BODY>
+
+ <H1>GNU cgi<SPAN CLASS="red">cc</SPAN> File Upload Test</H1>
+
+ <!-- Change this to match your web site's address -->
+ <FORM METHOD="POST" ACTION="
http://change_this_path/cgi-bin/upload.cgi"
+ ENCTYPE="multipart/form-data">
+
+ <DIV ALIGN="center">
+
+ <P>
+ <TABLE BORDER="0"
+ RULES="none"
+ FRAME="void"
+ CELLSPACING="2"
+ CELLPADDING="2"
+ CLASS="form">
+
+ <COLGROUP SPAN="2">
+ <COL ALIGN="center" SPAN="2">
+ </COLGROUP>
+
+ <TR>
+ <TD CLASS="black">Send a file</TD>
+ <TD CLASS="gray"><INPUT TYPE="file" NAME="userfile" ACCEPT="text/plain"></TD>
+ </TR>
+
+ </TD>
+ </TR>
+
+ </TABLE>
+ <!-- </P> -->
+
+ <P>
+ <INPUT TYPE="submit" NAME="submit" VALUE="Send the File">
+ <INPUT TYPE="reset" VALUE="Nevermind">
+ </P>
+
+ </DIV>
+ </FORM>
+
+ </BODY>
+ </HTML>
+
Index: cgicc/example/AUTHORS
diff -c /dev/null cgicc/example/AUTHORS:1.1
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/example/AUTHORS Mon Nov 13 21:42:03 2000
***************
*** 0 ****
--- 1,5 ----
+ Authors of cgicc-example
+ ========================
+
+ Stephen F. Booth. Designed and implemented cgicc-example.
+
Index: cgicc/example/ChangeLog
diff -c /dev/null cgicc/example/ChangeLog:1.4
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/example/ChangeLog Wed Nov 15 13:54:17 2000
***************
*** 0 ****
--- 1,26 ----
+ 2000-11-15 Stephen F. Booth <
[email protected]>
+
+ * Makefile.am: Added cgicc.m4 to EXTRA_DIST
+
+ 2000-11-14 Stephen F. Booth <
[email protected]>
+
+ * cgicc.m4: New file
+ * acinclude.m4: Moved cgicc macros to cgicc.m4, include(cgicc.m4)
+ * cgicc.m4: Use cgicc_{libdir,includedir} instead of
+ CGICC_{LIBDIR,INCLUDEDIR}
+ * Makefile.am: Use cgicc_{libdir,includedir} instead of
+ CGICC_{LIBDIR,INCLUDEDIR}
+ * configure.in: Check validity of --with-cgicc
+
+ 2000-11-13 Stephen F. Booth <
[email protected]>
+
+ * AUTHORS: New file for cgicc-example package
+ * ChangeLog: New file for cgicc-example package
+ * Makefile.am: New file for cgicc-example package
+ * NEWS: New file for cgicc-example package
+ * README: Updated for cgicc-example package
+ * acinclude.m4: New file for cgicc-example package
+ * autogen: New file for cgicc-example package
+ * configure.in: New file for cgicc-example package
+ * example.cpp: New file for cgicc-example package
+
Index: cgicc/example/Makefile.am
diff -c /dev/null cgicc/example/Makefile.am:1.4
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/example/Makefile.am Wed Nov 15 13:54:17 2000
***************
*** 0 ****
--- 1,15 ----
+ ## $Id: Makefile.am,v 1.4 2000/11/15 21:54:17 sbooth Exp $
+
+ CLEANFILES = *~
+
+ EXTRA_DIST = cgicc.m4
+
+ cgicc_libdir=@cgicc_libdir@
+ cgicc_includedir=@cgicc_includedir@
+
+ bin_PROGRAMS = example.cgi
+
+ INCLUDES = -I$(cgicc_includedir)
+
+ example_cgi_SOURCES = example.cpp
+ example_cgi_LDADD = $(cgicc_libdir)/libcgicc.la
Index: cgicc/example/Makefile.in
diff -c cgicc/example/Makefile.in:1.14 cgicc/example/Makefile.in:removed
*** cgicc/example/Makefile.in:1.14 Thu Sep 21 08:23:43 2000
--- cgicc/example/Makefile.in Sat Mar 3 10:02:22 2001
***************
*** 1,81 ****
- ##
- ## $Id: Makefile.in,v 1.14 2000/09/21 15:23:43 sbooth Exp $
- ##
- ## Copyright (C) 1996, 1997, 1998, 1999, 2000 Stephen F. Booth
- ##
- ## This program is free software; you can redistribute it and/or modify
- ## it under the terms of the GNU General Public License as published by
- ## the Free Software Foundation; either version 2 of the License, or
- ## (at your option) any later version.
- ##
- ## This program is distributed in the hope that it will be useful,
- ## but WITHOUT ANY WARRANTY; without even the implied warranty of
- ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ## GNU General Public License for more details.
- ##
- ## You should have received a copy of the GNU General Public License
- ## along with this program; if not, write to the Free Software
- ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- ##
-
- ##
- ## Sample Makefile for a cgi application written using GNU Cgicc
- ##
-
- ##
- ## The name of the cgi target
- TARGET= hello.cgi
-
- ##
- ## The name(s) of the object file(s)
- OBJECTS= yourSource.o
-
- ##
- ## Don't change anything below this point unless you know what you're doing
- ##
-
- ##
- ## Directory info
- prefix= @prefix@
- exec_prefix= @exec_prefix@
- libdir= @libdir@
- includedir= @includedir@
-
- ##
- ## Compiler setup
- CXX= @CXX@
- LIBS= @LIBS@ -L$(libdir) -lcgicc
- ## Comment out so we don't pick up -DHAVE_CONFIG_H
- #DEFS= @DEFS@
- DEFS=
-
- INCLUDES= -I$(includedir)
-
- ## On Linux use -rpath
- LD_FLAGS= @LDFLAGS@ -Wl,--rpath=$(libdir)
-
- ## On Solaris (probably SVR4 systems), use -R
- #LD_FLAGS= @LDFLAGS@ -R$(libdir)
-
- CXXFLAGS= @CXXFLAGS@
- CPPFLAGS= @CPPFLAGS@
-
- COMPILE= $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)
-
- ##
- ## Target information
- all: $(TARGET)
-
- $(TARGET): $(OBJECTS)
- $(CXX) $(LD_FLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
-
- clean:
- -rm -f $(OBJECTS) $(TARGET)
-
- ##
- ## Compilation rules
- .SUFFIXES:
- .SUFFIXES: .cpp .o
- .cpp.o:
- $(COMPILE) -c $<
-
--- 0 ----
Index: cgicc/example/NEWS
diff -c /dev/null cgicc/example/NEWS:1.1
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/example/NEWS Mon Nov 13 21:42:03 2000
***************
*** 0 ****
--- 1,7 ----
+ NEWS about cgicc-example
+
+ ======================================================================
+ Please send bug reports, suggestions, and comments to
+ <
[email protected]>
+ ======================================================================
+
Index: cgicc/example/README
diff -c cgicc/example/README:1.4 cgicc/example/README:1.5
*** cgicc/example/README:1.4 Mon Apr 10 18:37:34 2000
--- cgicc/example/README Mon Nov 13 21:42:03 2000
***************
*** 1,11 ****
! README for skeleton CGI using GNU Cgicc
! =======================================
! This directory contains skeleton code and a supporting Makefile for a
! CGI application using Cgicc, tailored to the installation environment.
! If you are using Solaris or an SVR4-style Unix, you'll need to uncomment
! line 59 in the Makefile, and comment out (using '#') line 56. This is
! due to the different methods of embedding a runtime search path on
! different flavors of Unix.
--- 1,25 ----
! README for cgicc-example
! ========================
! This directory contains skeleton code and supporting
! autoconf/automake/libtool infrastructure for a CGI application using
! cgicc.
! Assuming that you did a
! % ./configure
! % make
! % make install
! in the top-level cgicc directory and got a working library, you should
! be able to do the same here and get a working executable:
! % ./configure
! % make
!
! If you installed cgicc in a non-default place (by specifying the
! --prefix option), you'll need to tell configure where the library is
! using the --with-cgicc option, passing the same value:
! % ./configure --with-cgicc=PREFIX
! % make
!
! The 'make install' target is available, but isn't necessary since this
! example doesn't do anything.
Index: cgicc/example/acinclude.m4
diff -c /dev/null cgicc/example/acinclude.m4:1.2
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/example/acinclude.m4 Tue Nov 14 22:33:16 2000
***************
*** 0 ****
--- 1,6 ----
+ dnl $Id: acinclude.m4,v 1.2 2000/11/15 06:33:16 sbooth Exp $
+
+ dnl @TOP@
+
+ dnl Include cgicc-specific macros
+ builtin(include, cgicc.m4)dnl
\ No newline at end of file
Index: cgicc/example/autogen
diff -c /dev/null cgicc/example/autogen:1.1
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/example/autogen Mon Nov 13 21:42:03 2000
***************
*** 0 ****
--- 1,15 ----
+ #! /bin/sh
+
+ ## Simple script to automate common automake-related tasks
+
+ echo "== Running aclocal =="
+ aclocal
+
+ echo "== Running libtoolize =="
+ libtoolize
+
+ echo "== Running automake =="
+ automake --add-missing
+
+ echo "== Running autoconf =="
+ autoconf
Index: cgicc/example/cgicc.m4
diff -c /dev/null cgicc/example/cgicc.m4:1.1
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/example/cgicc.m4 Tue Nov 14 22:33:16 2000
***************
*** 0 ****
--- 1,111 ----
+ dnl
+ dnl $Id: cgicc.m4,v 1.1 2000/11/15 06:33:16 sbooth Exp $
+ dnl
+ dnl Copyright (C) 2000 Stephen F. Booth
+ dnl
+ dnl This program is free software; you can redistribute it and/or modify
+ dnl it under the terms of the GNU General Public License as published by
+ dnl the Free Software Foundation; either version 2 of the License, or
+ dnl (at your option) any later version.
+ dnl
+ dnl This program is distributed in the hope that it will be useful,
+ dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ dnl GNU General Public License for more details.
+ dnl
+ dnl You should have received a copy of the GNU General Public License
+ dnl along with this program; if not, write to the Free Software
+ dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ dnl
+
+
+ dnl
+ dnl CGICC_CHECK_CONFIG([PREFIX])
+ dnl
+ dnl Check for the configuration script 'cgicc-config' in PATH. Define
+ dnl the macros cgicc_libdir and cgicc_includedir to the values
+ dnl obtained from 'cgicc-config'.
+ dnl
+ AC_DEFUN(CGICC_CHECK_CONFIG, [
+ AC_PATH_PROG(CGICC_CONFIG, cgicc-config, no, [$PATH:$1/bin])
+ if test "$CGICC_CONFIG" = no; then
+ AC_MSG_ERROR(cgicc-config not found in $PATH:$1/bin)
+ fi
+
+ cgicc_libdir=`$CGICC_CONFIG --libdir`
+ cgicc_includedir=`$CGICC_CONFIG --includedir`
+
+ AC_SUBST(cgicc_libdir)
+ AC_SUBST(cgicc_includedir)
+ ])
+
+ dnl
+ dnl CGICC_CHECK_HEADERS([INCLUDEDIR])
+ dnl
+ dnl Perform a sanity check on the cgicc installation, making sure all
+ dnl headers are present.
+ dnl
+ AC_DEFUN(CGICC_CHECK_HEADERS, [
+ AC_REQUIRE([CGICC_CHECK_CONFIG])
+ missing=
+ AC_MSG_CHECKING(whether cgicc headers look good)
+ cgicc_headers_found=yes
+
+ cgicc_include_dir=ifelse([$1], ,$cgicc_includedir,$1)
+
+ list="CgiDefs.h CgiEnvironment.h CgiUtils.h Cgicc.h FormEntry.h FormFile.h HTMLAttributes.h HTMLClasses.h HTMLElements.h HTMLGeneric.h HTTPHeaders.h MStreamable.h CgiEnvironment.h"
+ for file in $list; do
+ if ! test -e "$cgicc_include_dir/cgicc/$file"; then
+ cgicc_headers_found=no
+ missing="$missing $file"
+ fi
+ done
+
+ AC_MSG_RESULT($cgicc_headers_found)
+
+ if test "$cgicc_headers_found" = no; then
+ AC_MSG_ERROR(missing cgicc header(s): $missing)
+ fi
+ ])
+
+ dnl
+ dnl CGICC_CHECK_VERSION([MINIMUM-VERSION])
+ dnl
+ dnl Verify that the installed version of cgicc is at least
+ dnl MINIMUM-VERSION, if specified, otherwise 3.1
+ dnl
+ AC_DEFUN(CGICC_CHECK_VERSION, [
+ AC_REQUIRE([CGICC_CHECK_CONFIG])
+ cgicc_min_version=ifelse([$1], ,3.1,$1)
+ AC_MSG_CHECKING(for cgicc version >= $cgicc_min_version)
+ cgicc_version=
+ cgicc_major_version=
+ cgicc_minor_version=
+
+ cgicc_req_major_version=`echo $cgicc_min_version | cut -d '.' -f 1`
+ cgicc_req_minor_version=`echo $cgicc_min_version | cut -d '.' -f 2`
+
+ cgicc_version=`$CGICC_CONFIG --version`
+
+ cgicc_major_version=`echo $cgicc_version | cut -d '.' -f 1`
+ cgicc_minor_version=`echo $cgicc_version | cut -d '.' -f 2`
+
+ AC_MSG_RESULT($cgicc_version)
+
+ if (test $cgicc_major_version -lt $cgicc_req_major_version || test $cgicc_minor_version -lt $cgicc_req_minor_version); then
+ AC_MSG_ERROR(cgicc version >= $cgicc_min_version required)
+ fi
+ ])
+
+ dnl
+ dnl CGICC_CHECK_INSTALLATION([PREFIX[,INCLUDEDIR[,MINIMUM-VERSION]]])
+ dnl
+ dnl Check the cgicc installation for:
+ dnl - Presence of the 'cgicc-config' script [in PREFIX]
+ dnl - Presence of all headers [in INCLUDEDIR]
+ dnl - Installed version >= 3.1 [or MINIMUM-VERSION if specified]
+ AC_DEFUN(CGICC_CHECK_INSTALLATION,[
+ CGICC_CHECK_CONFIG($1)
+ CGICC_CHECK_HEADERS($2)
+ CGICC_CHECK_VERSION($3)
+ ])
Index: cgicc/example/configure.in
diff -c /dev/null cgicc/example/configure.in:1.3
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/example/configure.in Tue Nov 14 22:45:51 2000
***************
*** 0 ****
--- 1,36 ----
+ dnl -*-m4-*-
+ dnl $Id: configure.in,v 1.3 2000/11/15 06:45:51 sbooth Exp $
+
+ dnl Process this file with autoconf to produce a configure script.
+ AC_REVISION($Revision: 1.3 $)
+ AC_INIT(example.cpp)
+ AM_INIT_AUTOMAKE(cgicc-example, 0.1)
+
+ AC_LANG_CPLUSPLUS
+
+ dnl Checks for programs.
+ AC_PROG_CXX
+ AC_PROG_INSTALL
+ AM_PROG_LIBTOOL
+
+ dnl Checks for libraries.
+
+ dnl Checks for header files.
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+
+ dnl Checks for library functions.
+
+ dnl Info on installed cgicc
+ AC_ARG_WITH(cgicc,
+ [ --with-cgicc=DIR use cgicc installation in DIR],
+ [if ! test -d "${withval}"; then
+ AC_MSG_ERROR(bad value '${withval}' for --with-cgicc: not a directory)
+ fi
+ cgicc_prefix=${withval}])
+
+ dnl Perform some sanity checks on the cgicc installation
+ CGICC_CHECK_INSTALLATION($cgicc_prefix)
+
+ dnl Output files
+ AC_OUTPUT(Makefile)
Index: cgicc/example/example.cpp
diff -c /dev/null cgicc/example/example.cpp:1.1
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/example/example.cpp Mon Nov 13 21:42:03 2000
***************
*** 0 ****
--- 1,72 ----
+ /*
+ * $Id: example.cpp,v 1.1 2000/11/14 05:42:03 sbooth Exp $
+ *
+ * Copyright (C) 1996, 1997, 1998, 1999, 2000 Stephen F. Booth
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+ #include <exception>
+ #include <iostream>
+
+ #include "cgicc/Cgicc.h"
+ #include "cgicc/HTMLClasses.h"
+
+ // To use the debug logging feature, the variable gLogFile MUST be
+ // defined, and it _must_ be an ofstream
+ #if DEBUG
+ ofstream gLogFile( "/change_this_path/cgicc.log", ios::app );
+ #endif
+
+ #if CGICC_USE_NAMESPACES
+ using namespace std;
+ using namespace cgicc;
+ #else
+ # define div div_
+ # define select select_
+ #endif
+
+ int
+ main(int argc,
+ char **argv)
+ {
+ try {
+ Cgicc cgi;
+
+ // Output the HTTP headers for an HTML document, and the HTML 4.0 DTD info
+ cout << HTTPHTMLHeader() << HTMLDoctype(HTMLDoctype::eStrict) << endl;
+ cout << html().set("lang", "EN").set("dir", "LTR") << endl;
+
+ // Set up the page's header and title.
+ cout << head() << endl;
+ cout << title() << "GNU cgicc v" << cgi.getVersion() << title() << endl;
+ cout << head() << endl;
+
+ // Start the HTML body
+ cout << body() << endl;
+
+ // Print out a message
+ cout << h1("Hello, world from GNU cgicc") << endl;
+
+ // Close the document
+ cout << body() << html();
+ }
+
+ catch(const exception& e) {
+ // handle error condition
+ }
+
+ return 0;
+ }
Index: cgicc/example/yourSource.cpp
diff -c cgicc/example/yourSource.cpp:1.4 cgicc/example/yourSource.cpp:removed
*** cgicc/example/yourSource.cpp:1.4 Sun Oct 15 08:52:27 2000
--- cgicc/example/yourSource.cpp Sat Mar 3 10:02:22 2001
***************
*** 1,72 ****
- /*
- * $Id: yourSource.cpp,v 1.4 2000/10/15 15:52:27 sbooth Exp $
- *
- * Copyright (C) 1996, 1997, 1998, 1999, 2000 Stephen F. Booth
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
- #include <exception>
- #include <iostream>
-
- #include "cgicc/Cgicc.h"
- #include "cgicc/HTMLClasses.h"
-
- // To use the debug logging feature, the variable gLogFile MUST be
- // defined, and it _must_ be an ofstream
- #if DEBUG
- ofstream gLogFile( "/change_this_path/cgicc.log", ios::app );
- #endif
-
- #if CGICC_USE_NAMESPACES
- using namespace std;
- using namespace cgicc;
- #else
- # define div div_
- # define select select_
- #endif
-
- int
- main(int argc,
- char **argv)
- {
- try {
- Cgicc cgi;
-
- // Output the HTTP headers for an HTML document, and the HTML 4.0 DTD info
- cout << HTTPHTMLHeader() << HTMLDoctype(HTMLDoctype::eStrict) << endl;
- cout << html().set("lang", "EN").set("dir", "LTR") << endl;
-
- // Set up the page's header and title.
- cout << head() << endl;
- cout << title() << "GNU cgicc v" << cgi.getVersion() << title() << endl;
- cout << head() << endl;
-
- // Start the HTML body
- cout << body() << endl;
-
- // Print out a message
- cout << h1("Hello, world from GNU cgicc") << endl;
-
- // Close the document
- cout << body() << html();
- }
-
- catch(const exception& e) {
- // handle error condition
- }
-
- return 0;
- }
--- 0 ----
Index: cgicc/info/Makefile.am
diff -c cgicc/info/Makefile.am:1.4 cgicc/info/Makefile.am:1.5
*** cgicc/info/Makefile.am:1.4 Thu Sep 30 10:11:39 1999
--- cgicc/info/Makefile.am Mon Nov 6 22:00:05 2000
***************
*** 1,4 ****
! ## $Id: Makefile.am,v 1.4 1999/09/30 17:11:39 sbooth Exp $
CLEANFILES = $(HTMLS) *~
MAINTAINERCLEANFILES = cgicc-doc-texi.tar.gz cgicc-doc-info.tar.gz \
--- 1,4 ----
! ## $Id: Makefile.am,v 1.5 2000/11/07 06:00:05 sbooth Exp $
CLEANFILES = $(HTMLS) *~
MAINTAINERCLEANFILES = cgicc-doc-texi.tar.gz cgicc-doc-info.tar.gz \
***************
*** 10,16 ****
html-classes.texinfo class-cgicc.texinfo class-cgienv.texinfo \
class-formentry.texinfo class-formfile.texinfo classes-http.texinfo \
classes-html.texinfo reporting-bugs.texinfo concept-index.texinfo \
! function-index.texinfo datatype-index.texinfo
##
## HTML documentation
--- 10,17 ----
html-classes.texinfo class-cgicc.texinfo class-cgienv.texinfo \
class-formentry.texinfo class-formfile.texinfo classes-http.texinfo \
classes-html.texinfo reporting-bugs.texinfo concept-index.texinfo \
! function-index.texinfo datatype-index.texinfo fdl.texinfo \
! support.texinfo
##
## HTML documentation
Index: cgicc/info/cgicc.texinfo
diff -c cgicc/info/cgicc.texinfo:1.8 cgicc/info/cgicc.texinfo:1.9
*** cgicc/info/cgicc.texinfo:1.8 Sat Oct 7 11:32:20 2000
--- cgicc/info/cgicc.texinfo Mon Nov 6 22:00:05 2000
***************
*** 15,27 ****
@end direntry
@ifinfo
- GNU cgicc is a C++ library for developing CGI applications.
-
Copyright @copyright{} 1996, 1997, 1998, 1999, 2000 Stephen F. Booth
! Permission is granted to make and distribute verbatim copies of this
! manual provided the copyright notice and this permission notice are
! preserved on all copies.
@ignore
Permission is granted to process this file through TeX and print the
--- 15,28 ----
@end direntry
@ifinfo
Copyright @copyright{} 1996, 1997, 1998, 1999, 2000 Stephen F. Booth
! Permission is granted to copy, distribute and/or modify this document
! under the terms of the GNU Free Documentation License, Version 1.1 or
! any later version published by the Free Software Foundation; with no
! Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
! Texts. A copy of the license is included in the section entitled ``GNU
! Free Documentation License''.
@ignore
Permission is granted to process this file through TeX and print the
***************
*** 30,47 ****
(this paragraph not being relevant to the printed manual).
@end ignore
- Permission is granted to copy and distribute modified versions of this
- manual under the conditions for verbatim copying, provided also that the
- sections entitled ``Copying'' and ``GNU General Public License'' are
- included exactly as in the original, and provided that the entire
- resulting derived work is distributed under the terms of a permission
- notice identical to this one.
-
- Permission is granted to copy and distribute translations of this manual
- into another language, under the above conditions for modified versions,
- except that this permission notice may be stated in a translation
- approved by the Free Software Foundation.
-
@end ifinfo
@titlepage
@sp 10
--- 31,36 ----
***************
*** 50,72 ****
@author Stephen F. Booth
@page
@vskip 0pt plus 1filll
! Copyright @copyright{} 1996, 1997, 1998, 1999 Stephen F. Booth
! Permission is granted to make and distribute verbatim copies of this
! manual provided the copyright notice and this permission notice are
! preserved on all copies.
!
! Permission is granted to copy and distribute modified versions of this
! manual under the conditions for verbatim copying, provided also that the
! sections entitled ``Copying'' and ``GNU General Public License'' are
! included exactly as in the original, and provided that the entire
! resulting derived work is distributed under the terms of a permission
! notice identical to this one.
!
! Permission is granted to copy and distribute translations of this manual
! into another language, under the above conditions for modified versions,
! except that this permission notice may be stated in a translation
! approved by the Free Software Foundation.
@end titlepage
@ifnottex
--- 39,52 ----
@author Stephen F. Booth
@page
@vskip 0pt plus 1filll
! Copyright @copyright{} 1996, 1997, 1998, 1999, 2000 Stephen F. Booth
! Permission is granted to copy, distribute and/or modify this document
! under the terms of the GNU Free Documentation License, Version 1.1 or
! any later version published by the Free Software Foundation; with no
! Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
! Texts. A copy of the license is included in the section entitled ``GNU
! Free Documentation License''.
@end titlepage
@ifnottex
***************
*** 96,102 ****
--- 76,84 ----
* classes for HTTP headers:: Used for generating response information
* classes for HTML output:: Used for generating a client response
* Reporting Bugs:: How to report a bug in cgicc
+ * Support:: Where to get support for cgicc
* Copying:: Your rights to distribute cgicc
+ * Documentation:: Your rights to distribute this manual
* Concept Index:: Index of concepts introduced in the manual
* Function Index:: Index of member functions
* Data Type Index:: Index of classes
***************
*** 120,126 ****
--- 102,110 ----
@include classes-http.texinfo
@include classes-html.texinfo
@include reporting-bugs.texinfo
+ @include support.texinfo
@include gpl.texinfo
+ @include fdl.texinfo
@include concept-index.texinfo
@include function-index.texinfo
@include datatype-index.texinfo
Index: cgicc/info/concept-index.texinfo
diff -c cgicc/info/concept-index.texinfo:1.1 cgicc/info/concept-index.texinfo:1.2
*** cgicc/info/concept-index.texinfo:1.1 Mon Apr 26 15:48:13 1999
--- cgicc/info/concept-index.texinfo Mon Nov 6 22:00:05 2000
***************
*** 1,5 ****
@comment -*-texinfo-*-
! @node Concept Index, Function Index, Copying, Top
@unnumbered Concept Index
@printindex cp
--- 1,5 ----
@comment -*-texinfo-*-
! @node Concept Index, Function Index, Documentation, Top
@unnumbered Concept Index
@printindex cp
Index: cgicc/info/fdl.texinfo
diff -c /dev/null cgicc/info/fdl.texinfo:1.1
*** /dev/null Sat Mar 3 10:02:22 2001
--- cgicc/info/fdl.texinfo Mon Nov 6 22:00:05 2000
***************
*** 0 ****
--- 1,384 ----
+ @comment -*-texinfo-*-
+ @node Documentation, Concept Index, Copying, Top
+ @appendix GNU Free Documentation License
+
+ @center Version 1.1, March 2000
+
+ @display
+ Copyright @copyright{} 2000 Free Software Foundation, Inc. 59 Temple
+ Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Everyone is permitted to copy and distribute verbatim copies of this
+ license document, but changing it is not allowed.
+ @end display
+
+ @c @unnumberedsec Preamble
+ @appendixsection Preamble
+
+ The purpose of this License is to make a manual, textbook, or other
+ written document ``free'' in the sense of freedom: to assure everyone
+ the effective freedom to copy and redistribute it, with or without
+ modifying it, either commercially or noncommercially. Secondarily,
+ this License preserves for the author and publisher a way to get
+ credit for their work, while not being considered responsible for
+ modifications made by others.
+
+ This License is a kind of ``copyleft'', which means that derivative
+ works of the document must themselves be free in the same sense. It
+ complements the GNU General Public License, which is a copyleft
+ license designed for free software.
+
+ We have designed this License in order to use it for manuals for free
+ software, because free software needs free documentation: a free
+ program should come with manuals providing the same freedoms that the
+ software does. But this License is not limited to software manuals;
+ it can be used for any textual work, regardless of subject matter or
+ whether it is published as a printed book. We recommend this License
+ principally for works whose purpose is instruction or reference.
+
+ @unnumberedsec Applicability and Definitions
+
+ This License applies to any manual or other work that contains a
+ notice placed by the copyright holder saying it can be distributed
+ under the terms of this License. The ``Document'', below, refers to any
+ such manual or work. Any member of the public is a licensee, and is
+ addressed as ``you''.
+
+ A ``Modified Version'' of the Document means any work containing the
+ Document or a portion of it, either copied verbatim, or with
+ modifications and/or translated into another language.
+
+ A ``Secondary Section'' is a named appendix or a front-matter section of
+ the Document that deals exclusively with the relationship of the
+ publishers or authors of the Document to the Document's overall subject
+ (or to related matters) and contains nothing that could fall directly
+ within that overall subject. (For example, if the Document is in part a
+ textbook of mathematics, a Secondary Section may not explain any
+ mathematics.) The relationship could be a matter of historical
+ connection with the subject or with related matters, or of legal,
+ commercial, philosophical, ethical or political position regarding
+ them.
+
+ The ``Invariant Sections'' are certain Secondary Sections whose titles
+ are designated, as being those of Invariant Sections, in the notice
+ that says that the Document is released under this License.
+
+ The ``Cover Texts'' are certain short passages of text that are listed,
+ as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+ the Document is released under this License.
+
+ A ``Transparent'' copy of the Document means a machine-readable copy,
+ represented in a format whose specification is available to the
+ general public, whose contents can be viewed and edited directly and
+ straightforwardly with generic text editors or (for images composed of
+ pixels) generic paint programs or (for drawings) some widely available
+ drawing editor, and that is suitable for input to text formatters or
+ for automatic translation to a variety of formats suitable for input
+ to text formatters. A copy made in an otherwise Transparent file
+ format whose markup has been designed to thwart or discourage
+ subsequent modification by readers is not Transparent. A copy that is
+ not ``Transparent" is called "Opaque''.
+
+ Examples of suitable formats for Transparent copies include plain
+ ASCII without markup, Texinfo input format, LaTeX input format, SGML
+ or XML using a publicly available DTD, and standard-conforming simple
+ HTML designed for human modification. Opaque formats include
+ PostScript, PDF, proprietary formats that can be read and edited only
+ by proprietary word processors, SGML or XML for which the DTD and/or
+ processing tools are not generally available, and the
+ machine-generated HTML produced by some word processors for output
+ purposes only.
+
+ The ``Title Page'' means, for a printed book, the title page itself,
+ plus such following pages as are needed to hold, legibly, the material
+ this License requires to appear in the title page. For works in
+ formats which do not have any title page as such, ``Title Page'' means
+ the text near the most prominent appearance of the work's title,
+ preceding the beginning of the body of the text.
+
+ @unnumberedsec Verbatim Copying
+
+ You may copy and distribute the Document in any medium, either
+ commercially or noncommercially, provided that this License, the
+ copyright notices, and the license notice saying this License applies
+ to the Document are reproduced in all copies, and that you add no other
+ conditions whatsoever to those of this License. You may not use
+ technical measures to obstruct or control the reading or further
+ copying of the copies you make or distribute. However, you may accept
+ compensation in exchange for copies. If you distribute a large enough
+ number of copies you must also follow the conditions in section 3.
+
+ You may also lend copies, under the same conditions stated above, and
+ you may publicly display copies.
+
+ @unnumberedsec Copying in Quantity
+
+ If you publish printed copies of the Document numbering more than 100,
+ and the Document's license notice requires Cover Texts, you must enclose
+ the copies in covers that carry, clearly and legibly, all these Cover
+ Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+ the back cover. Both covers must also clearly and legibly identify
+ you as the publisher of these copies. The front cover must present
+ the full title with all words of the title equally prominent and
+ visible. You may add other material on the covers in addition.
+ Copying with changes limited to the covers, as long as they preserve
+ the title of the Document and satisfy these conditions, can be treated
+ as verbatim copying in other respects.
+
+ If the required texts for either cover are too voluminous to fit
+ legibly, you should put the first ones listed (as many as fit
+ reasonably) on the actual cover, and continue the rest onto adjacent
+ pages.
+
+ If you publish or distribute Opaque copies of the Document numbering
+ more than 100, you must either include a machine-readable Transparent
+ copy along with each Opaque copy, or state in or with each Opaque copy
+ a publicly-accessible computer-network location containing a complete
+ Transparent copy of the Document, free of added material, which the
+ general network-using public has access to download anonymously at no
+ charge using public-standard network protocols. If you use the latter
+ option, you must take reasonably prudent steps, when you begin
+ distribution of Opaque copies in quantity, to ensure that this
+ Transparent copy will remain thus accessible at the stated location
+ until at least one year after the last time you distribute an Opaque
+ copy (directly or through your agents or retailers) of that edition to
+ the public.
+
+ It is requested, but not required, that you contact the authors of the
+ Document well before redistributing any large number of copies, to give
+ them a chance to provide you with an updated version of the Document.
+
+ @unnumberedsec Modifications
+
+ You may copy and distribute a Modified Version of the Document under
+ the conditions of sections 2 and 3 above, provided that you release
+ the Modified Version under precisely this License, with the Modified
+ Version filling the role of the Document, thus licensing distribution
+ and modification of the Modified Version to whoever possesses a copy
+ of it. In addition, you must do these things in the Modified Version:
+
+ @enumerate A
+ @item
+ Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+
+ @item
+ List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+
+ @item
+ State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+
+ @item
+ Preserve all the copyright notices of the Document.
+
+ @item
+ Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+
+ @item
+ Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+
+ @item
+ Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+
+ @item
+ Include an unaltered copy of this License.
+
+ @item
+ Preserve the section entitled ``History'', and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled ``History'' in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+
+ @item
+ Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the ``History'' section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+
+ @item
+ In any section entitled ``Acknowledgements" or "Dedications'',
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+
+ @item
+ Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+
+ @item
+ Delete any section entitled ``Endorsements''. Such a section
+ may not be included in the Modified Version.
+
+ @item
+ Do not retitle any existing section as ``Endorsements''
+ or to conflict in title with any Invariant Section.
+ @end enumerate
+
+ If the Modified Version includes new front-matter sections or
+ appendices that qualify as Secondary Sections and contain no material
+ copied from the Document, you may at your option designate some or all
+ of these sections as invariant. To do this, add their titles to the
+ list of Invariant Sections in the Modified Version's license notice.
+ These titles must be distinct from any other section titles.
+
+ You may add a section entitled ``Endorsements'', provided it contains
+ nothing but endorsements of your Modified Version by various
+ parties--for example, statements of peer review or that the text has
+ been approved by an organization as the authoritative definition of a
+ standard.
+
+ You may add a passage of up to five words as a Front-Cover Text, and a
+ passage of up to 25 words as a Back-Cover Text, to the end of the list
+ of Cover Texts in the Modified Version. Only one passage of
+ Front-Cover Text and one of Back-Cover Text may be added by (or
+ through arrangements made by) any one entity. If the Document already
+ includes a cover text for the same cover, previously added by you or
+ by arrangement made by the same entity you are acting on behalf of,
+ you may not add another; but you may replace the old one, on explicit
+ permission from the previous publisher that added the old one.
+
+ The author(s) and publisher(s) of the Document do not by this License
+ give permission to use their names for publicity for or to assert or
+ imply endorsement of any Modified Version.
+
+ @unnumberedsec Combining Documents
+
+ You may combine the Document with other documents released under this
+ License, under the terms defined in section 4 above for modified
+ versions, provided that you include in the combination all of the
+ Invariant Sections of all of the original documents, unmodified, and
+ list them all as Invariant Sections of your combined work in its
+ license notice.
+
+ The combined work need only contain one copy of this License, and
+ multiple identical Invariant Sections may be replaced with a single
+ copy. If there are multiple Invariant Sections with the same name but
+ different contents, make the title of each such section unique by
+ adding at the end of it, in parentheses, the name of the original
+ author or publisher of that section if known, or else a unique number.
+ Make the same adjustment to the section titles in the list of
+ Invariant Sections in the license notice of the combined work.
+
+ In the combination, you must combine any sections entitled ``History''
+ in the various original documents, forming one section entitled
+ ``History"; likewise combine any sections entitled "Acknowledgements'',
+ and any sections entitled ``Dedications''. You must delete all sections
+ entitled ``Endorsements.''
+
+ @unnumberedsec Collections of Documents
+
+ You may make a collection consisting of the Document and other documents
+ released under this License, and replace the individual copies of this
+ License in the various documents with a single copy that is included in
+ the collection, provided that you follow the rules of this License for
+ verbatim copying of each of the documents in all other respects.
+
+ You may extract a single document from such a collection, and distribute
+ it individually under this License, provided you insert a copy of this
+ License into the extracted document, and follow this License in all
+ other respects regarding verbatim copying of that document.
+
+ @unnumberedsec Aggregation with Independent Works
+
+ A compilation of the Document or its derivatives with other separate
+ and independent documents or works, in or on a volume of a storage or
+ distribution medium, does not as a whole count as a Modified Version
+ of the Document, provided no compilation copyright is claimed for the
+ compilation. Such a compilation is called an ``aggregate'', and this
+ License does not apply to the other self-contained works thus compiled
+ with the Document, on account of their being thus compiled, if they
+ are not themselves derivative works of the Document.
+
+ If the Cover Text requirement of section 3 is applicable to these
+ copies of the Document, then if the Document is less than one quarter
+ of the entire aggregate, the Document's Cover Texts may be placed on
+ covers that surround only the Document within the aggregate.
+ Otherwise they must appear on covers around the whole aggregate.
+
+ @unnumberedsec Translation
+
+ Translation is considered a kind of modification, so you may
+ distribute translations of the Document under the terms of section 4.
+ Replacing Invariant Sections with translations requires special
+ permission from their copyright holders, but you may include
+ translations of some or all Invariant Sections in addition to the
+ original versions of these Invariant Sections. You may include a
+ translation of this License provided that you also include the
+ original English version of this License. In case of a disagreement
+ between the translation and the original English version of this
+ License, the original English version will prevail.
+
+ @unnumberedsec Termination
+
+ You may not copy, modify, sublicense, or distribute the Document except
+ as expressly provided for under this License. Any other attempt to
+ copy, modify, sublicense or distribute the Document is void, and will
+ automatically terminate your rights under this License. However,
+ parties who have received copies, or rights, from you under this
+ License will not have their licenses terminated so long as such
+ parties remain in full compliance.
+
+ @unnumberedsec Future Revisions of this License
+
+ The Free Software Foundation may publish new, revised versions
+ of the GNU Free Documentation License from time to time. Such new
+ versions will be similar in spirit to the present version, but may
+ differ in detail to address new problems or concerns. See
+ @url{
http://www.gnu.org/copyleft/}.
+
+ Each version of the License is given a distinguishing version number.
+ If the Document specifies that a particular numbered version of this
+ License ``or any later version'' applies to it, you have the option of
+ following the terms and conditions either of that specified version or
+ of any later version that has been published (not as a draft) by the
+ Free Software Foundation. If the Document does not specify a version
+ number of this License, you may choose any version ever published (not
+ as a draft) by the Free Software Foundation.
+
+
+
+ @unnumberedsec Addendum: How to use this License for your documents
+
+ To use this License in a document you have written, include a copy of
+ the License in the document and put the following copyright and
+ license notices just after the title page:
+
+ @display
+ Copyright (c) <YEAR> @emph{YOUR NAME}.
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+ @end display
+
+ If you have no Invariant Sections, write ``with no Invariant Sections''
+ instead of saying which ones are invariant. If you have no
+ Front-Cover Texts, write ``no Front-Cover Texts'' instead of
+ ``Front-Cover Texts being LIST''; likewise for Back-Cover Texts.
+
+ If your document contains nontrivial examples of program code, we
+ recommend releasing these examples in parallel under your choice of
+ free software license, such as the GNU General Public License,
+ to permit their use in free software.
Index: cgicc/info/gpl.texinfo
diff -c cgicc/info/gpl.texinfo:1.2 cgicc/info/gpl.texinfo:1.3
*** cgicc/info/gpl.texinfo:1.2 Tue Jun 1 14:19:34 1999
--- cgicc/info/gpl.texinfo Mon Nov 6 22:00:05 2000
***************
*** 1,5 ****
@comment -*-texinfo-*-
! @node Copying, Concept Index, Reporting Bugs, Top
@appendix GNU General Public License
@center Version 2, June 1991
--- 1,5 ----
@comment -*-texinfo-*-
! @node Copying, Documentation, Support, Top
@appendix GNU General Public License
@center Version 2, June 1991
Index: cgicc/info/reporting-bugs.texinfo
diff -c cgicc/info/reporting-bugs.texinfo:1.1 cgicc/info/reporting-bugs.texinfo:1.3
*** cgicc/info/reporting-bugs.texinfo:1.1 Tue Jun 1 14:19:34 1999
--- cgicc/info/reporting-bugs.texinfo Wed Nov 15 09:10:56 2000
***************
*** 1,16 ****
@comment -*-texinfo-*-
! @node Reporting Bugs, Copying, classes for HTML output, Top
@unnumbered Reporting Bugs
There is a mailing list for reporting bugs, @email{bug-cgicc@@gnu.org},
to enable the developers to track submitted bug reports.
! If you think you have found a bug in Cgicc, then you should send as
complete a report as possible to this list. Ideally, you should include
the text you get by running @code{config.guess}, the text you see when
you run @code{configure}, and if you can, a patch made with @code{diff
-u5} which fixes the problem.
! If you wish to subscribe to this list, send empty mail with a
! @code{Subject:} line of @code{subscribe} to
! @email{bug-cgicc-request@@gnu.org}.
--- 1,14 ----
@comment -*-texinfo-*-
! @node Reporting Bugs, Support, classes for HTML output, Top
@unnumbered Reporting Bugs
There is a mailing list for reporting bugs, @email{bug-cgicc@@gnu.org},
to enable the developers to track submitted bug reports.
! If you think you have found a bug in cgicc, then you should send as
complete a report as possible to this list. Ideally, you should include
the text you get by running @code{config.guess}, the text you see when
you run @code{configure}, and if you can, a patch made with @code{diff
-u5} which fixes the problem.
! @xref{Support}, for more information on cgicc mailing lists.
Index: cgicc/info/support.texinfo
diff -c /dev/null cgicc/info/support.texinfo:1.3
*** /dev/null Sat Mar 3 10:02:23 2001
--- cgicc/info/support.texinfo Wed Nov 15 14:00:09 2000
***************
*** 0 ****
--- 1,31 ----
+ @comment -*-texinfo-*-
+ @node Support, Copying, Reporting Bugs, Top
+ @unnumbered Support
+
+ The cgicc library has three mailing lists: @email{help-cgicc@@gnu.org},
+ @email{info-cgicc@@gnu.org}, and @email{bug-cgicc@@gnu.org}:
+
+ @itemize @bullet
+ @item
+ @email{help-cgicc@@gnu.org} is the main discussion list and is used to
+ discuss all aspects of cgicc, including development and porting.
+
+ @item
+ @email{info-cgicc@@gnu.org} is a read-only list where announcements
+ about cgicc are made.
+
+ @item
+ @email{bug-cgicc@@gnu.org} is a special list used for reporting bugs.
+ @xref{Reporting Bugs}, for details on submitting a bug report.
+ @end itemize
+
+ To subscribe to any of these lists, send a message to the appropriate
+ @email{-request} list with the word @kbd{subscribe} in the subject line.
+ For example, to subscribe to @email{info-cgicc@@gnu.org}, send a message
+ to @email{info-cgicc-request@@gnu.org} with a subject of
+ @kbd{subscribe}.
+
+ Web interfaces to the lists are available at
+ @url{
http://mail.gnu.org/mailman/listinfo/help-cgicc},
+ @url{
http://mail.gnu.org/mailman/listinfo/info-cgicc}, or
+ @url{
http://mail.gnu.org/mailman/listinfo/bug-cgicc}.
Index: cgicc/info/version.texi
diff -c cgicc/info/version.texi:1.17 cgicc/info/version.texi:1.19
*** cgicc/info/version.texi:1.17 Sun Oct 15 09:01:14 2000
--- cgicc/info/version.texi Tue Nov 14 22:47:01 2000
***************
*** 1,3 ****
! @set UPDATED 7 October 2000
! @set EDITION 3.1.4
! @set VERSION 3.1.4
--- 1,3 ----
! @set UPDATED 7 November 2000
! @set EDITION 3.1.5
! @set VERSION 3.1.5
Index: cgicc/support/Makefile.am
diff -c /dev/null cgicc/support/Makefile.am:1.2
*** /dev/null Sat Mar 3 10:02:23 2001
--- cgicc/support/Makefile.am Mon Nov 6 22:01:21 2000
***************
*** 0 ****
--- 1,9 ----
+ ## $Id: Makefile.am,v 1.2 2000/11/07 06:01:21 sbooth Exp $
+
+ CLEANFILES = *~
+
+ EXTRA_DIST = config.guess config.sub install-sh ltconfig ltmain.sh \
+ mdate-sh missing mkinstalldirs
+
+ bin_SCRIPTS = cgicc-config
+
Index: cgicc/support/cgicc-config.in
diff -c /dev/null cgicc/support/cgicc-config.in:1.4
*** /dev/null Sat Mar 3 10:02:23 2001
--- cgicc/support/cgicc-config.in Wed Nov 15 09:11:14 2000
***************
*** 0 ****
--- 1,80 ----
+ #! /bin/sh
+
+ ##
+ ## $Id: cgicc-config.in,v 1.4 2000/11/15 17:11:14 sbooth Exp $
+ ##
+ ## Copyright (C) 2000 Stephen F. Booth
+ ##
+ ## This program is free software; you can redistribute it and/or modify
+ ## it under the terms of the GNU General Public License as published by
+ ## the Free Software Foundation; either version 2 of the License, or
+ ## (at your option) any later version.
+ ##
+ ## This program is distributed in the hope that it will be useful,
+ ## but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ## GNU General Public License for more details.
+ ##
+ ## You should have received a copy of the GNU General Public License
+ ## along with this program; if not, write to the Free Software
+ ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ ##
+
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ includedir=@includedir@
+ libdir=@libdir@
+
+ ## Usage info
+ usage()
+ {
+ cat <<EOF
+ Usage: cgicc-config [OPTIONS]
+ Options:
+ --prefix Display architecture-independent installation dir
+ --exec-prefix Display architecture-dependent installation dir
+ --includedir Display header file installation dir
+ --libdir Display object-code installation dir
+ --host Display host information
+ --version Display version information
+ --help Display this message
+ EOF
+ exit $1
+ }
+
+ ## If no arguments, print usage info
+ if test $# -eq 0; then
+ usage 1 1>&2
+ fi
+
+ ## Parse command line
+ while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ ## Architecture-independent dir
+ --prefix) echo "$prefix" && exit 0 ;;
+
+ ## Architecture-dependent dir
+ --exec-prefix) echo "$exec_prefix" && exit 0 ;;
+
+ ## Object code dir
+ --libdir) echo "$libdir" && exit 0 ;;
+
+ ## Header file dir
+ --includedir) echo "$includedir" && exit 0 ;;
+
+ ## Host information
+ --host) echo "@host@" && exit 0 ;;
+
+ ## Version information
+ --version) echo "@VERSION@" && exit 0 ;;
+
+ ## Everything else
+ *) usage 1 1>&2 ;;
+ esac
+ shift
+ done