Index: cgicc/ChangeLog diff -c cgicc/ChangeLog:1.35 cgicc/ChangeLog:1.44 *** cgicc/ChangeLog:1.35 Tue Aug 17 11:11:12 1999 --- cgicc/ChangeLog Thu Sep 30 11:18:53 1999 *************** *** 1,3 **** --- 1,51 ---- + 1999-09-30 Stephen F. Booth + + * info/Makefile.am: Added rules to generate HTML (texinfo-4.0) + * cgicc/Cgicc.h: Added typedefs for iterators + ([const_]form_iterator, [const_]file_iterator) + * cgicc/Cgicc.cpp: Use above typedefs + * demo/test.cpp: Use typedefs, as above + * demo/dns.cpp: Use typedefs, as above + * info/class-cgicc.texinfo: Added documentation for iterator typedefs. + * info/tutorial.texinfo: Updated example to use iterator typedefs. + * info/cgicc.texinfo: Use @ifnottex instead of @ifinfo + * NEWS: Added item on iterators + + 1999-09-27 Stephen F. Booth + + * demo/test.cpp: Changed "Remote Setdress" -> "Remote Address" in + HTML output. + + 1999-09-22 Stephen F. Booth + + * cgicc/HTMLClasses.h: Added definition of link_, to be used + when namespaces are not in use (reported by flavpol@tin.it) + * demo/test.cpp: Add #define link link_ when namespaces not in use + * demo/dns.cpp: Add #define link link_ when namespaces not in use + + 1999-08-31 Stephen F. Booth + + * configure.in: Automatically enable warnings for gcc + * cgicc/CgiEnvironment.h: Added usingHTTPS() method + * demo/test.cpp(dumpEnvironment): Added display for usingHTTPS() + * info/class-cgienv.texinfo: Added doc for usingHTTPS + * cgicc/Makefile.am: Up libtool version to 2:0:1 + + 1999-08-20 Stephen F. Booth + + * cgicc/MStreamable.h: Added empty ctor and dtor + * cgicc/HTMLAttributes.cpp(HTMLAttribute::HTMLAttribute): Explicitly + initialize MStreamable + * cgicc/HTTPHeaders.cpp:(HTTPCookie::HTTPCookie): Explicitly + initialize MStreamable + * cgicc/HTTPHeaders.cpp(HTTPHeader::HTTPHeader): Explicitly + initialize MStreamable + * cgicc/HTMLElements.cpp(HTMLElement::HTMLElement): Explicitly + initialize MStreamable + * cgicc/CgiEnvironment.h: Added method usingHTTPS() + * demo/test.cpp(main): Comment out argc, argv + * demo/dns.cpp(main): Comment out argc, argv + 1999-08-17 Stephen F. Booth * configure.in: Renamed USE_NAMESPACES to CGICC_USE_NAMESPACES Index: cgicc/NEWS diff -c cgicc/NEWS:1.12 cgicc/NEWS:1.15 *** cgicc/NEWS:1.12 Tue Aug 17 11:06:49 1999 --- cgicc/NEWS Thu Sep 30 11:18:20 1999 *************** *** 1,13 **** NEWS about GNU Cgicc ====================================================================== - Please send bug reports, suggestions, and comments to - ====================================================================== Major changes between versions 3.0.2 and 3.1 * HTML generation classes reworked, thanks to Christof Danzl. --- 1,20 ---- NEWS about GNU Cgicc ====================================================================== Please send bug reports, suggestions, and comments to ====================================================================== + Major changes between versions 3.1 and 3.1.1 + -------------------------------------------- + + * Added new method, usingHTTPS(), to CgiEnvironment + + * Added typedefs for standard template library iterators, to ease typing + + Major changes between versions 3.0.2 and 3.1 + -------------------------------------------- * HTML generation classes reworked, thanks to Christof Danzl. *************** *** 20,37 **** --- 27,50 ---- * Visual C++ 6.0 project files added, in win/ subdirectory. * All .cc files renamed to .cpp, and .hh files to .h (for Win32 support). + Major changes between versions 3.0.1 and 3.0.2 + ---------------------------------------------- * Renamed the src/ directory to cgicc/. + Major changes between versions 3.0 and 3.0.1 + -------------------------------------------- * Various fixes for namespace support, submitted by Bob Kline. * Updated documentation regarding Cgicc mailing lists. + Major changes between versions 2.2.3 and 3.0 + -------------------------------------------- * Reworked to use the C++ standard template library. In most places, the STL class string is used where bare char* was Index: cgicc/autogen diff -c cgicc/autogen:1.3 cgicc/autogen:1.4 *** cgicc/autogen:1.3 Tue Aug 17 10:45:05 1999 --- cgicc/autogen Thu Sep 30 11:25:29 1999 *************** *** 1,21 **** ! #! /usr/local/bin/bash ## Simple script to automate common automake-related tasks echo "== Creating support dir ==" ! test -d support || /usr/bin/mkdir support echo "== Running aclocal ==" ! /usr/local/bin/aclocal echo "== Running autoheader ==" ! /usr/local/bin/autoheader echo "== Running libtoolize ==" ! /usr/local/bin/libtoolize echo "== Running automake ==" ! /usr/local/bin/automake --add-missing echo "== Running autoconf ==" ! /usr/local/bin/autoconf --- 1,21 ---- ! #! /bin/sh ## Simple script to automate common automake-related tasks echo "== Creating support dir ==" ! test -d support || mkdir support echo "== Running aclocal ==" ! aclocal echo "== Running autoheader ==" ! autoheader echo "== Running libtoolize ==" ! libtoolize echo "== Running automake ==" ! automake --add-missing echo "== Running autoconf ==" ! autoconf Index: cgicc/configure.in diff -c cgicc/configure.in:1.21 cgicc/configure.in:1.22 *** cgicc/configure.in:1.21 Tue Aug 17 10:16:04 1999 --- cgicc/configure.in Tue Aug 31 10:38:11 1999 *************** *** 1,11 **** dnl -*-m4-*- ! dnl $Id: configure.in,v 1.21 1999/08/17 17:16:04 sbooth Exp $ dnl Process this file with autoconf to produce a configure script. ! AC_REVISION($Revision: 1.21 $) AC_INIT(cgicc/Cgicc.cpp) AC_CONFIG_AUX_DIR(support) ! AM_INIT_AUTOMAKE(cgicc, 3.1) AM_CONFIG_HEADER(cgicc/config.h) AM_MAINTAINER_MODE --- 1,11 ---- dnl -*-m4-*- ! dnl $Id: configure.in,v 1.22 1999/08/31 17:38:11 sbooth Exp $ dnl Process this file with autoconf to produce a configure script. ! AC_REVISION($Revision: 1.22 $) AC_INIT(cgicc/Cgicc.cpp) AC_CONFIG_AUX_DIR(support) ! AM_INIT_AUTOMAKE(cgicc, 3.1.1) AM_CONFIG_HEADER(cgicc/config.h) AM_MAINTAINER_MODE *************** *** 45,50 **** --- 45,63 ---- AC_HEADER_STDC AC_HEADER_TIME AC_CHECK_FUNCS(strftime gettimeofday uname) + + 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, Index: cgicc/cgicc/CgiEnvironment.h diff -c cgicc/cgicc/CgiEnvironment.h:1.3 cgicc/cgicc/CgiEnvironment.h:1.4 *** cgicc/cgicc/CgiEnvironment.h:1.3 Mon Aug 16 10:40:04 1999 --- cgicc/cgicc/CgiEnvironment.h Fri Aug 20 13:51:43 1999 *************** *** 1,6 **** /* -*-c++-*- */ /* ! * $Id: CgiEnvironment.h,v 1.3 1999/08/16 17:40:04 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * --- 1,6 ---- /* -*-c++-*- */ /* ! * $Id: CgiEnvironment.h,v 1.4 1999/08/20 20:51:43 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * *************** *** 28,33 **** --- 28,34 ---- #include #include + #include #include "cgicc/CgiDefs.h" #include "cgicc/CgiUtils.h" *************** *** 267,273 **** --- 268,283 ---- getUserAgent() const { return fUserAgent; } + + /** + * Determine whether this is a secure request (using https). + * @return true if this connection is via https + */ + inline bool + usingHTTPS() const + { return (getenv("HTTPS") != 0); } + /** * Get the redirect request. * This will only be valid if you are using this script as a script Index: cgicc/cgicc/Cgicc.cpp diff -c cgicc/cgicc/Cgicc.cpp:1.3 cgicc/cgicc/Cgicc.cpp:1.4 *** cgicc/cgicc/Cgicc.cpp:1.3 Mon Aug 16 11:02:39 1999 --- cgicc/cgicc/Cgicc.cpp Thu Sep 30 10:38:19 1999 *************** *** 1,5 **** /* ! * $Id: Cgicc.cpp,v 1.3 1999/08/16 18:02:39 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * --- 1,5 ---- /* ! * $Id: Cgicc.cpp,v 1.4 1999/09/30 17:38:19 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * *************** *** 264,282 **** bool CGICCNS Cgicc::queryCheckbox(const STDNS string& elementName) const { ! STDNS vector::const_iterator iter = getElement(elementName); return ((iter != fFormData.end()) && stringsAreEqual( (*iter).getValue(), "on")); } ! STDNS vector::iterator CGICCNS Cgicc::getElement(const STDNS string& name) { return STDNS find_if(fFormData.begin(), fFormData.end(), FE_nameCompare(name)); } ! STDNS vector::const_iterator CGICCNS Cgicc::getElement(const STDNS string& name) const { return STDNS find_if(fFormData.begin(), fFormData.end(), --- 264,282 ---- bool CGICCNS Cgicc::queryCheckbox(const STDNS string& elementName) const { ! const_form_iterator iter = getElement(elementName); return ((iter != fFormData.end()) && stringsAreEqual( (*iter).getValue(), "on")); } ! CGICCNS form_iterator CGICCNS Cgicc::getElement(const STDNS string& name) { return STDNS find_if(fFormData.begin(), fFormData.end(), FE_nameCompare(name)); } ! CGICCNS const_form_iterator CGICCNS Cgicc::getElement(const STDNS string& name) const { return STDNS find_if(fFormData.begin(), fFormData.end(), *************** *** 290,303 **** return findEntries(name, true, result); } ! STDNS vector::iterator CGICCNS Cgicc::getElementByValue(const STDNS string& value) { return STDNS find_if(fFormData.begin(), fFormData.end(), FE_valueCompare(value)); } ! STDNS vector::const_iterator CGICCNS Cgicc::getElementByValue(const STDNS string& value) const { return STDNS find_if(fFormData.begin(), fFormData.end(), --- 290,303 ---- return findEntries(name, true, result); } ! CGICCNS form_iterator CGICCNS Cgicc::getElementByValue(const STDNS string& value) { return STDNS find_if(fFormData.begin(), fFormData.end(), FE_valueCompare(value)); } ! CGICCNS const_form_iterator CGICCNS Cgicc::getElementByValue(const STDNS string& value) const { return STDNS find_if(fFormData.begin(), fFormData.end(), *************** *** 311,324 **** return findEntries(value, false, result); } ! STDNS vector::iterator CGICCNS Cgicc::getFile(const STDNS string& name) { return STDNS find_if(fFormFiles.begin(), fFormFiles.end(), FF_compare(name)); } ! STDNS vector::const_iterator CGICCNS Cgicc::getFile(const STDNS string& name) const { return STDNS find_if(fFormFiles.begin(), fFormFiles.end(), --- 311,324 ---- return findEntries(value, false, result); } ! CGICCNS file_iterator CGICCNS Cgicc::getFile(const STDNS string& name) { return STDNS find_if(fFormFiles.begin(), fFormFiles.end(), FF_compare(name)); } ! CGICCNS const_file_iterator CGICCNS Cgicc::getFile(const STDNS string& name) const { return STDNS find_if(fFormFiles.begin(), fFormFiles.end(), Index: cgicc/cgicc/Cgicc.h diff -c cgicc/cgicc/Cgicc.h:1.4 cgicc/cgicc/Cgicc.h:1.5 *** cgicc/cgicc/Cgicc.h:1.4 Mon Aug 16 11:02:40 1999 --- cgicc/cgicc/Cgicc.h Thu Sep 30 10:38:19 1999 *************** *** 1,6 **** /* -*-c++-*- */ /* ! * $Id: Cgicc.h,v 1.4 1999/08/16 18:02:40 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * --- 1,6 ---- /* -*-c++-*- */ /* ! * $Id: Cgicc.h,v 1.5 1999/09/30 17:38:19 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * *************** *** 60,65 **** --- 60,74 ---- class MultipartHeader; // ============================================================ + // Iterator typedefs + // ============================================================ + typedef STDNS vector::iterator form_iterator; + typedef STDNS vector::const_iterator const_form_iterator; + + typedef STDNS vector::iterator file_iterator; + typedef STDNS vector::const_iterator const_file_iterator; + + // ============================================================ // Class Cgicc // ============================================================ /** *************** *** 136,142 **** * @param name The name of the radio button or list item to find. * @return An iterator referring to the desired element, if found. */ ! inline STDNS vector::iterator operator[] (const STDNS string& name) { return getElement(name); } --- 145,151 ---- * @param name The name of the radio button or list item to find. * @return An iterator referring to the desired element, if found. */ ! inline form_iterator operator[] (const STDNS string& name) { return getElement(name); } *************** *** 145,151 **** * @param name The name of the radio button or list item to find. * @return An iterator referring to the desired element, if found. */ ! inline STDNS vector::const_iterator operator[] (const STDNS string& name) const { return getElement(name); } --- 154,160 ---- * @param name The name of the radio button or list item to find. * @return An iterator referring to the desired element, if found. */ ! inline const_form_iterator operator[] (const STDNS string& name) const { return getElement(name); } *************** *** 154,160 **** * @param name The name of the radio button or list item to find. * @return An iterator referring to the desired element, if found. */ ! STDNS vector::iterator getElement(const STDNS string& name); /** --- 163,169 ---- * @param name The name of the radio button or list item to find. * @return An iterator referring to the desired element, if found. */ ! form_iterator getElement(const STDNS string& name); /** *************** *** 162,168 **** * @param name The name of the radio button or list item to find. * @return A const_iterator referring to the desired element, if found. */ ! STDNS vector::const_iterator getElement(const STDNS string& name) const; /** --- 171,177 ---- * @param name The name of the radio button or list item to find. * @return A const_iterator referring to the desired element, if found. */ ! const_form_iterator getElement(const STDNS string& name) const; /** *************** *** 180,186 **** * @param value The value of the radio button or list item to find. * @return An iterator referring to the desired element, if found. */ ! STDNS vector::iterator getElementByValue(const STDNS string& value); /** --- 189,195 ---- * @param value The value of the radio button or list item to find. * @return An iterator referring to the desired element, if found. */ ! form_iterator getElementByValue(const STDNS string& value); /** *************** *** 188,194 **** * @param value The value of the radio button or list item to find. * @return A const_iterator referring to the desired element, if found. */ ! STDNS vector::const_iterator getElementByValue(const STDNS string& value) const; /** --- 197,203 ---- * @param value The value of the radio button or list item to find. * @return A const_iterator referring to the desired element, if found. */ ! const_form_iterator getElementByValue(const STDNS string& value) const; /** *************** *** 223,229 **** * @param name The name of the file. * @return An iterator referring to the desired file, if found. */ ! STDNS vector::iterator getFile(const STDNS string& name); /** --- 232,238 ---- * @param name The name of the file. * @return An iterator referring to the desired file, if found. */ ! file_iterator getFile(const STDNS string& name); /** *************** *** 231,237 **** * @param name The name of the file. * @return An iterator referring to the desired file, if found. */ ! STDNS vector::const_iterator getFile(const STDNS string& name) const; /** --- 240,246 ---- * @param name The name of the file. * @return An iterator referring to the desired file, if found. */ ! const_file_iterator getFile(const STDNS string& name) const; /** Index: cgicc/cgicc/HTMLAttributes.cpp diff -c cgicc/cgicc/HTMLAttributes.cpp:1.1 cgicc/cgicc/HTMLAttributes.cpp:1.2 *** cgicc/cgicc/HTMLAttributes.cpp:1.1 Mon Aug 9 11:25:38 1999 --- cgicc/cgicc/HTMLAttributes.cpp Fri Aug 20 13:51:31 1999 *************** *** 1,5 **** /* ! * $Id: HTMLAttributes.cpp,v 1.1 1999/08/09 18:25:38 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * --- 1,5 ---- /* ! * $Id: HTMLAttributes.cpp,v 1.2 1999/08/20 20:51:31 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * *************** *** 45,51 **** {} CGICCNS HTMLAttribute::HTMLAttribute(const HTMLAttribute& attribute) ! : fName(attribute.fName), fValue(attribute.fValue), fAtomic(attribute.fAtomic) {} --- 45,52 ---- {} CGICCNS HTMLAttribute::HTMLAttribute(const HTMLAttribute& attribute) ! : MStreamable(), ! fName(attribute.fName), fValue(attribute.fValue), fAtomic(attribute.fAtomic) {} Index: cgicc/cgicc/HTMLClasses.h diff -c cgicc/cgicc/HTMLClasses.h:1.5 cgicc/cgicc/HTMLClasses.h:1.6 *** cgicc/cgicc/HTMLClasses.h:1.5 Tue Aug 17 10:16:07 1999 --- cgicc/cgicc/HTMLClasses.h Wed Sep 22 15:30:11 1999 *************** *** 1,6 **** /* -*-c++-*- */ /* ! * $Id: HTMLClasses.h,v 1.5 1999/08/17 17:16:07 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * --- 1,6 ---- /* -*-c++-*- */ /* ! * $Id: HTMLClasses.h,v 1.6 1999/09/22 22:30:11 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * *************** *** 119,125 **** --- 119,129 ---- // links BOOLEAN_ELEMENT (a, "A"); // anchor + #if CGICC_USE_NAMESPACES ATOMIC_ELEMENT (link, "LINK"); // document link + #else + ATOMIC_ELEMENT (link_, "LINK"); // document link + #endif ATOMIC_ELEMENT (base, "BASE"); // path information // objects Index: cgicc/cgicc/HTMLElements.cpp diff -c cgicc/cgicc/HTMLElements.cpp:1.3 cgicc/cgicc/HTMLElements.cpp:1.4 *** cgicc/cgicc/HTMLElements.cpp:1.3 Tue Aug 17 10:29:31 1999 --- cgicc/cgicc/HTMLElements.cpp Fri Aug 20 13:51:31 1999 *************** *** 1,5 **** /* ! * $Id: HTMLElements.cpp,v 1.3 1999/08/17 17:29:31 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * --- 1,5 ---- /* ! * $Id: HTMLElements.cpp,v 1.4 1999/08/20 20:51:31 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * *************** *** 30,35 **** --- 30,36 ---- // Class HTMLElement // ============================================================ CGICCNS HTMLElement::HTMLElement(const HTMLElement& element) + : MStreamable() { this->operator= (element); } Index: cgicc/cgicc/HTTPHeaders.cpp diff -c cgicc/cgicc/HTTPHeaders.cpp:1.2 cgicc/cgicc/HTTPHeaders.cpp:1.3 *** cgicc/cgicc/HTTPHeaders.cpp:1.2 Mon Aug 16 10:40:05 1999 --- cgicc/cgicc/HTTPHeaders.cpp Fri Aug 20 13:51:31 1999 *************** *** 1,5 **** /* ! * $Id: HTTPHeaders.cpp,v 1.2 1999/08/16 17:40:05 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * --- 1,5 ---- /* ! * $Id: HTTPHeaders.cpp,v 1.3 1999/08/20 20:51:31 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * *************** *** 104,110 **** {} CGICCNS HTTPCookie::HTTPCookie(const HTTPCookie& cookie) ! : fName(cookie.getName()), fValue(cookie.getValue()), fComment(cookie.getComment()), fDomain(cookie.getDomain()), --- 104,111 ---- {} CGICCNS HTTPCookie::HTTPCookie(const HTTPCookie& cookie) ! : MStreamable(), ! fName(cookie.getName()), fValue(cookie.getValue()), fComment(cookie.getComment()), fDomain(cookie.getDomain()), *************** *** 157,163 **** {} CGICCNS HTTPHeader::HTTPHeader(const HTTPHeader& header) ! : fData(header.getData()) {} CGICCNS HTTPHeader::~HTTPHeader() --- 158,165 ---- {} CGICCNS HTTPHeader::HTTPHeader(const HTTPHeader& header) ! : MStreamable(), ! fData(header.getData()) {} CGICCNS HTTPHeader::~HTTPHeader() Index: cgicc/cgicc/MStreamable.h diff -c cgicc/cgicc/MStreamable.h:1.3 cgicc/cgicc/MStreamable.h:1.4 *** cgicc/cgicc/MStreamable.h:1.3 Tue Aug 17 10:34:19 1999 --- cgicc/cgicc/MStreamable.h Fri Aug 20 13:51:32 1999 *************** *** 1,6 **** /* -*-c++-*- */ /* ! * $Id: MStreamable.h,v 1.3 1999/08/17 17:34:19 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * --- 1,6 ---- /* -*-c++-*- */ /* ! * $Id: MStreamable.h,v 1.4 1999/08/20 20:51:32 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * *************** *** 53,58 **** --- 53,67 ---- operator<<(STDNS ostream& out, const MStreamable& obj); public: + /** Contructor. Empty */ + inline MStreamable() + {} + + /** Destructor. Empty */ + inline virtual ~MStreamable() + {} + + /** * Write this object to a stream. Subclasses must implement this function. * @param out The ostream to which to write. Index: cgicc/cgicc/Makefile.am diff -c cgicc/cgicc/Makefile.am:1.7 cgicc/cgicc/Makefile.am:1.8 *** cgicc/cgicc/Makefile.am:1.7 Tue Aug 17 11:10:39 1999 --- cgicc/cgicc/Makefile.am Tue Aug 31 10:40:47 1999 *************** *** 1,4 **** ! ## $Id: Makefile.am,v 1.7 1999/08/17 18:10:39 sbooth Exp $ CLEANFILES = *~ --- 1,4 ---- ! ## $Id: Makefile.am,v 1.8 1999/08/31 17:40:47 sbooth Exp $ CLEANFILES = *~ *************** *** 8,14 **** libcgicc_la_SOURCES = CgiEnvironment.cpp CgiUtils.cpp Cgicc.cpp \ FormEntry.cpp FormFile.cpp HTMLAttributes.cpp HTMLElements.cpp \ HTTPHeaders.cpp MStreamable.cpp ! libcgicc_la_LDFLAGS = -version-info 1:0:0 pkginclude_HEADERS = CgiDefs.h CgiEnvironment.h CgiUtils.h Cgicc.h \ FormEntry.h FormFile.h HTMLAttributes.h HTMLClasses.h HTMLElements.h \ --- 8,14 ---- libcgicc_la_SOURCES = CgiEnvironment.cpp CgiUtils.cpp Cgicc.cpp \ FormEntry.cpp FormFile.cpp HTMLAttributes.cpp HTMLElements.cpp \ HTTPHeaders.cpp MStreamable.cpp ! libcgicc_la_LDFLAGS = -version-info 2:0:1 pkginclude_HEADERS = CgiDefs.h CgiEnvironment.h CgiUtils.h Cgicc.h \ FormEntry.h FormFile.h HTMLAttributes.h HTMLClasses.h HTMLElements.h \ Index: cgicc/demo/dns.cpp diff -c cgicc/demo/dns.cpp:1.6 cgicc/demo/dns.cpp:1.10 *** cgicc/demo/dns.cpp:1.6 Tue Aug 17 10:16:11 1999 --- cgicc/demo/dns.cpp Thu Sep 30 10:40:45 1999 *************** *** 1,5 **** /* ! * $Id: dns.cpp,v 1.6 1999/08/17 17:16:11 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * --- 1,5 ---- /* ! * $Id: dns.cpp,v 1.10 1999/09/30 17:40:45 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * *************** *** 57,69 **** using namespace cgicc; #else # define div div_ # define select select_ #endif // DNS gateway cgi int ! main(int argc, ! char **argv) { try { --- 57,70 ---- using namespace cgicc; #else # define div div_ + # define link link_ # define select select_ #endif // DNS gateway cgi int ! main(int /*argc*/, ! char ** /*argv*/) { try { *************** *** 104,111 **** cout << h1() << "Cgi" << span("cc").set("class","red") << " DNS Gateway" << h1() << endl; ! STDNS vector::iterator ip = cgi.getElement("ip"); ! STDNS vector::iterator name = cgi.getElement("hostname"); if(ip != (*cgi).end()) { cout << h3() << "Query results for " << **ip << h3() << endl; --- 105,112 ---- cout << h1() << "Cgi" << span("cc").set("class","red") << " DNS Gateway" << h1() << endl; ! form_iterator ip = cgi.getElement("ip"); ! form_iterator name = cgi.getElement("hostname"); if(ip != (*cgi).end()) { cout << h3() << "Query results for " << **ip << h3() << endl; Index: cgicc/demo/test.cpp diff -c cgicc/demo/test.cpp:1.5 cgicc/demo/test.cpp:1.10 *** cgicc/demo/test.cpp:1.5 Tue Aug 17 10:16:11 1999 --- cgicc/demo/test.cpp Thu Sep 30 10:40:45 1999 *************** *** 1,5 **** /* ! * $Id: test.cpp,v 1.5 1999/08/17 17:16:11 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * --- 1,5 ---- /* ! * $Id: test.cpp,v 1.10 1999/09/30 17:40:45 sbooth Exp $ * * Copyright (C) 1996, 1997, 1998, 1999 Stephen F. Booth * *************** *** 48,53 **** --- 48,54 ---- using namespace cgicc; #else # define div div_ + # define link link_ # define select select_ #endif *************** *** 59,66 **** // Main Street, USA int ! main(int argc, ! char **argv) { try { #if HAVE_GETTIMEOFDAY --- 60,67 ---- // Main Street, USA int ! main(int /*argc*/, ! char ** /*argv*/) { try { #if HAVE_GETTIMEOFDAY *************** *** 326,332 **** << tr() << endl; cout << tr() << td("Remote Host").set("class","title") << td(env.getRemoteHost()).set("class","data") << tr() << endl; ! cout << tr() << td("Remote Setress").set("class","title") << td(env.getRemoteAddr()).set("class","data") << tr() << endl; cout << tr() << td("Authorization Type").set("class","title") << td(env.getAuthType()).set("class","data") << tr() << endl; --- 327,333 ---- << tr() << endl; cout << tr() << td("Remote Host").set("class","title") << td(env.getRemoteHost()).set("class","data") << tr() << endl; ! cout << tr() << td("Remote Address").set("class","title") << td(env.getRemoteAddr()).set("class","data") << tr() << endl; cout << tr() << td("Authorization Type").set("class","title") << td(env.getAuthType()).set("class","data") << tr() << endl; *************** *** 351,356 **** --- 352,360 ---- cout << tr() << td("Server Port").set("class","title") << td().set("class","data") << env.getServerPort() << td() << tr() << endl; + cout << tr() << td("HTTPS").set("class","title") + << td().set("class","data") << (env.usingHTTPS() ? "true" : "false") + << td() << tr() << endl; cout << tr() << td("Redirect Request").set("class","title") << td(env.getRedirectRequest()).set("class","data") << tr() << endl; cout << tr() << td("Redirect URL").set("class","title") *************** *** 380,386 **** << td("Element Value") << tr() << endl; // Iterate through the vector, and print out each value ! STDNS vector::const_iterator iter; for(iter = formData.getElements().begin(); iter != formData.getElements().end(); ++iter) { --- 384,390 ---- << td("Element Value") << tr() << endl; // Iterate through the vector, and print out each value ! const_form_iterator iter; for(iter = formData.getElements().begin(); iter != formData.getElements().end(); ++iter) { *************** *** 401,414 **** cout << CGICCNS div().set("class","notice") << endl; //getElement ! STDNS vector::const_iterator name = formData.getElement("name"); if(name != (*formData).end() && ! name->isEmpty()) cout << "Your name is " << **name << '.' << br() << endl; else cout << "You don't have a name." << br() << endl; // getElement and getDoubleValue ! STDNS vector::const_iterator salary = formData.getElement("bucks"); if(salary != (*formData).end() && ! salary->isEmpty()) cout << "You make " << (*salary).getDoubleValue(80, 120) << " million dollars." << br() << endl; --- 405,418 ---- cout << CGICCNS div().set("class","notice") << endl; //getElement ! const_form_iterator name = formData.getElement("name"); if(name != (*formData).end() && ! name->isEmpty()) cout << "Your name is " << **name << '.' << br() << endl; else cout << "You don't have a name." << br() << endl; // getElement and getDoubleValue ! const_form_iterator salary = formData.getElement("bucks"); if(salary != (*formData).end() && ! salary->isEmpty()) cout << "You make " << (*salary).getDoubleValue(80, 120) << " million dollars." << br() << endl; *************** *** 416,422 **** cout << "You don't have a salary." << br() << endl; // getElement and getIntegerValue ! STDNS vector::const_iterator hours = formData.getElement("time"); if(hours != (*formData).end() && ! (*hours).isEmpty()) cout << "You've wasted " << (*hours).getIntegerValue() << " hours on the web." << br() << endl; --- 420,426 ---- cout << "You don't have a salary." << br() << endl; // getElement and getIntegerValue ! const_form_iterator hours = formData.getElement("time"); if(hours != (*formData).end() && ! (*hours).isEmpty()) cout << "You've wasted " << (*hours).getIntegerValue() << " hours on the web." << br() << endl; *************** *** 424,430 **** cout << "You haven't wasted any time on the web." << br() << endl; // getElement and getStrippedValue ! STDNS vector::const_iterator sheep = formData.getElement("sheep"); if(sheep != (*formData).end() && ! (*sheep).isEmpty()) { STDNS string temp = (*sheep).getStrippedValue(); cout << "Your thoughts about sheep cloning: " << temp << br() << endl; --- 428,434 ---- cout << "You haven't wasted any time on the web." << br() << endl; // getElement and getStrippedValue ! const_form_iterator sheep = formData.getElement("sheep"); if(sheep != (*formData).end() && ! (*sheep).isEmpty()) { STDNS string temp = (*sheep).getStrippedValue(); cout << "Your thoughts about sheep cloning: " << temp << br() << endl; *************** *** 456,468 **** cout << "You don't like ice cream!?" << br() << endl; // getElement ! STDNS vector::const_iterator hair = formData.getElement("hair"); if(hair != (*formData).end()) cout << "Your hair is " << **hair << '.' << br() << endl; else cout << "You don't have any hair." << br() << endl; ! STDNS vector::const_iterator vote = formData.getElement("vote"); if(vote != (*formData).end()) cout << "You voted for " << **vote << '.' << br() << endl; else --- 460,472 ---- cout << "You don't like ice cream!?" << br() << endl; // getElement ! const_form_iterator hair = formData.getElement("hair"); if(hair != (*formData).end()) cout << "Your hair is " << **hair << '.' << br() << endl; else cout << "You don't have any hair." << br() << endl; ! const_form_iterator vote = formData.getElement("vote"); if(vote != (*formData).end()) cout << "You voted for " << **vote << '.' << br() << endl; else *************** *** 495,501 **** { cout << h2("File Uploaded via FormFile") << endl; ! STDNS vector::const_iterator file; file = formData.getFile("userfile"); if(file != formData.getFiles().end()) { --- 499,505 ---- { cout << h2("File Uploaded via FormFile") << endl; ! const_file_iterator file; file = formData.getFile("userfile"); if(file != formData.getFiles().end()) { Index: cgicc/info/Makefile.am diff -c cgicc/info/Makefile.am:1.3 cgicc/info/Makefile.am:1.4 *** cgicc/info/Makefile.am:1.3 Wed Jun 2 15:07:34 1999 --- cgicc/info/Makefile.am Thu Sep 30 10:11:39 1999 *************** *** 1,8 **** ! ## $Id: Makefile.am,v 1.3 1999/06/02 22:07:34 sbooth Exp $ ! CLEANFILES = *~ MAINTAINERCLEANFILES = cgicc-doc-texi.tar.gz cgicc-doc-info.tar.gz \ ! cgicc-doc-dvi.tar.gz info_TEXINFOS = cgicc.texinfo cgicc_TEXINFOS = gpl.texinfo cgi-overview.texinfo tutorial.texinfo \ --- 1,8 ---- ! ## $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 \ ! cgicc-doc-dvi.tar.gz cgicc-doc-html.tar.gz info_TEXINFOS = cgicc.texinfo cgicc_TEXINFOS = gpl.texinfo cgi-overview.texinfo tutorial.texinfo \ *************** *** 12,17 **** --- 12,34 ---- classes-html.texinfo reporting-bugs.texinfo concept-index.texinfo \ function-index.texinfo datatype-index.texinfo + ## + ## HTML documentation + ## + HTMLS = cgicc.html + html: $(HTMLS) + + ## + ## New rules to handle HTML file generation (texinfo-4.0 and up) + ## + SUFFIXES = .html + + .texi.html: + cd $(srcdir) && $(MAKEINFO) --html $< + + .texinfo.html: + cd $(srcdir) && $(MAKEINFO) --html $< + if MAINTAINER_MODE ################################################################ ## *************** *** 19,25 **** ## to anybody else. ## ! doc-gz: doc-texi-gz doc-info-gz doc-dvi-gz doc-texi-gz: -rm -f cgicc-doc-texi.tar.gz --- 36,42 ---- ## to anybody else. ## ! doc-gz: doc-texi-gz doc-info-gz doc-dvi-gz doc-html-gz doc-texi-gz: -rm -f cgicc-doc-texi.tar.gz *************** *** 33,36 **** --- 50,56 ---- -rm -f cgicc-doc-dvi.tar.gz GZIP=$(GZIP_ENV) $(TAR) chozf cgicc-doc-dvi.tar.gz $(DVIS) + doc-html-gz: html + -rm -f cgicc-doc-html.tar.gz + GZIP=$(GZIP_ENV) $(TAR) chozf cgicc-doc-html.tar.gz $(HTMLS) endif Index: cgicc/info/cgicc.texinfo diff -c cgicc/info/cgicc.texinfo:1.6 cgicc/info/cgicc.texinfo:1.7 *** cgicc/info/cgicc.texinfo:1.6 Mon Jun 7 12:28:07 1999 --- cgicc/info/cgicc.texinfo Thu Sep 30 11:05:24 1999 *************** *** 69,76 **** approved by the Free Software Foundation. @end titlepage ! @c @ifnottex ! @ifinfo @node Top, Overview of CGI, (dir), (dir) @top GNU Cgicc --- 69,75 ---- approved by the Free Software Foundation. @end titlepage ! @ifnottex @node Top, Overview of CGI, (dir), (dir) @top GNU Cgicc *************** *** 81,88 **** applications for the World Wide Web (WWW). This is edition @value{EDITION} of the Cgicc documentation, @value{UPDATED}. ! @c @end ifnottex ! @end ifinfo @menu * Overview of CGI:: An overview of the Common Gateway Interface --- 80,86 ---- applications for the World Wide Web (WWW). This is edition @value{EDITION} of the Cgicc documentation, @value{UPDATED}. ! @end ifnottex @menu * Overview of CGI:: An overview of the Common Gateway Interface Index: cgicc/info/class-cgicc.texinfo diff -c cgicc/info/class-cgicc.texinfo:1.3 cgicc/info/class-cgicc.texinfo:1.4 *** cgicc/info/class-cgicc.texinfo:1.3 Mon Aug 9 17:43:40 1999 --- cgicc/info/class-cgicc.texinfo Thu Sep 30 11:00:12 1999 *************** *** 38,70 **** @unnumberedsec Form Element Access @deftypemethod Cgicc bool queryCheckbox (const string& @var{elementName}) const Returns @code{true} if a checkbox with name @var{elementName} is checked, @code{false} otherwise. @end deftypemethod ! @deftypemethod Cgicc vector::iterator operator[] (const string& @var{name}) Find a radio button in a radio group, or a selected list item with element name @var{name}. If an element with name @var{name} is not found, the returned iterator will be set to the value returned by @code{getElements().end()}. @end deftypemethod ! @deftypemethod Cgicc vector::const_iterator operator[] (const string& @var{name}) const Find a radio button in a radio group, or a selected list item with element name @var{name}. If an element with name @var{name} is not found, the returned iterator will be set to the value returned by @code{getElements().end()}. @end deftypemethod ! @deftypemethod Cgicc vector::iterator getElement (const string& @var{name}) Find a radio button in a radio group, or a selected list item with element name @var{name}. If an element with name @var{name} is not found, the returned iterator will be set to the value returned by @code{getElements().end()}. @end deftypemethod ! @deftypemethod Cgicc vector::const_iterator getElement (const string& @var{name}) const Find a radio button in a radio group, or a selected list item with element name @var{name}. If an element with name @var{name} is not found, the returned iterator will be set to the value returned by --- 38,86 ---- @unnumberedsec Form Element Access + @deftp {Data Type} form_iterator vector::iterator + A standard template library iterator referring to a FormEntry object. + @end deftp + + @deftp {Data Type} const_form_iterator vector::const_iterator + A standard template library iterator referring to a constant FormEntry object. + @end deftp + + @deftp {Data Type} file_iterator vector::iterator + A standard template library iterator referring to a FormFile object. + @end deftp + + @deftp {Data Type} const_file_iterator vector::const_iterator + A standard template library iterator referring to a constant FormFile object. + @end deftp + @deftypemethod Cgicc bool queryCheckbox (const string& @var{elementName}) const Returns @code{true} if a checkbox with name @var{elementName} is checked, @code{false} otherwise. @end deftypemethod ! @deftypemethod Cgicc form_iterator operator[] (const string& @var{name}) Find a radio button in a radio group, or a selected list item with element name @var{name}. If an element with name @var{name} is not found, the returned iterator will be set to the value returned by @code{getElements().end()}. @end deftypemethod ! @deftypemethod Cgicc const_form_iterator operator[] (const string& @var{name}) const Find a radio button in a radio group, or a selected list item with element name @var{name}. If an element with name @var{name} is not found, the returned iterator will be set to the value returned by @code{getElements().end()}. @end deftypemethod ! @deftypemethod Cgicc form_iterator getElement (const string& @var{name}) Find a radio button in a radio group, or a selected list item with element name @var{name}. If an element with name @var{name} is not found, the returned iterator will be set to the value returned by @code{getElements().end()}. @end deftypemethod ! @deftypemethod Cgicc const_form_iterator getElement (const string& @var{name}) const Find a radio button in a radio group, or a selected list item with element name @var{name}. If an element with name @var{name} is not found, the returned iterator will be set to the value returned by *************** *** 77,90 **** @var{name} were found, @code{false} otherwise. @end deftypemethod ! @deftypemethod Cgicc vector::iterator getElementByValue (const string& @var{value}) Find a radio button in a radio group, or a selected list item with element value @var{value}. If an element with value @var{value} is not found, the returned iterator will be set to the value returned by @code{getElements().end()}. @end deftypemethod ! @deftypemethod Cgicc vector::const_iterator getElementByValue (const string& @var{name}) const Find a radio button in a radio group, or a selected list item with element value @var{value}. If an element with value @var{value} is not found, the returned iterator will be set to the value returned by --- 93,106 ---- @var{name} were found, @code{false} otherwise. @end deftypemethod ! @deftypemethod Cgicc form_iterator getElementByValue (const string& @var{value}) Find a radio button in a radio group, or a selected list item with element value @var{value}. If an element with value @var{value} is not found, the returned iterator will be set to the value returned by @code{getElements().end()}. @end deftypemethod ! @deftypemethod Cgicc const_form_iterator getElementByValue (const string& @var{name}) const Find a radio button in a radio group, or a selected list item with element value @var{value}. If an element with value @var{value} is not found, the returned iterator will be set to the value returned by *************** *** 107,119 **** @unnumberedsec Uploaded File Access ! @deftypemethod Cgicc vector::iterator getFile (const string& @var{name}) Find an uploaded file with element name @var{name}. If a file belonging to element name @var{name} is not found, the returned iterator will be set to the value returned by @code{getFiles().end()}. @end deftypemethod ! @deftypemethod Cgicc vector::const_iterator getFile (const string& @var{name}) const Find an uploaded file with element name @var{name}. If a file belonging to element name @var{name} is not found, the returned iterator will be set to the value returned by @code{getFiles().end()}. --- 123,135 ---- @unnumberedsec Uploaded File Access ! @deftypemethod Cgicc file_iterator getFile (const string& @var{name}) Find an uploaded file with element name @var{name}. If a file belonging to element name @var{name} is not found, the returned iterator will be set to the value returned by @code{getFiles().end()}. @end deftypemethod ! @deftypemethod Cgicc const_file_iterator getFile (const string& @var{name}) const Find an uploaded file with element name @var{name}. If a file belonging to element name @var{name} is not found, the returned iterator will be set to the value returned by @code{getFiles().end()}. Index: cgicc/info/class-cgienv.texinfo diff -c cgicc/info/class-cgienv.texinfo:1.4 cgicc/info/class-cgienv.texinfo:1.5 *** cgicc/info/class-cgienv.texinfo:1.4 Fri May 14 10:57:41 1999 --- cgicc/info/class-cgienv.texinfo Tue Aug 31 10:37:06 1999 *************** *** 41,46 **** --- 41,51 ---- will usually be 80. @end deftypemethod + @deftypemethod CgiEnvironment bool usingHTTPS () const + Returns @code{true} if this is a secure request using the HTTPS + protocol, @code{false} otherwise. + @end deftypemethod + @unnumberedsec CGI Query Information @deftypemethod CgiEnvironment string getCookies () const Index: cgicc/info/tutorial.texinfo diff -c cgicc/info/tutorial.texinfo:1.9 cgicc/info/tutorial.texinfo:1.10 *** cgicc/info/tutorial.texinfo:1.9 Mon Aug 16 10:48:53 1999 --- cgicc/info/tutorial.texinfo Thu Sep 30 11:00:12 1999 *************** *** 80,89 **** @code{FormEntry}@footnote{This is not entirely true. For uploaded files, the data is accessed via the class @code{FormFile}.}. You obtain @code{FormEntry} objects via @code{Cgicc}'s @code{getElement} methods, ! all of which return standard-library iterators: @lisp ! vector::iterator name = cgi.getElement("name"); @end lisp @noindent --- 80,89 ---- @code{FormEntry}@footnote{This is not entirely true. For uploaded files, the data is accessed via the class @code{FormFile}.}. You obtain @code{FormEntry} objects via @code{Cgicc}'s @code{getElement} methods, ! all of which return typedefs of standard-library iterators: @lisp ! form_iterator name = cgi.getElement("name"); @end lisp @noindent *************** *** 268,274 **** cout << body() << endl; // Print out the submitted element ! vector::iterator name = cgi.getElement("name"); if(name != cgi.getElements().end()) @{ cout << "Your name: " << **name << endl; @} --- 268,274 ---- cout << body() << endl; // Print out the submitted element ! form_iterator name = cgi.getElement("name"); if(name != cgi.getElements().end()) @{ cout << "Your name: " << **name << endl; @} Index: cgicc/info/version.texi diff -c cgicc/info/version.texi:1.11 cgicc/info/version.texi:1.13 *** cgicc/info/version.texi:1.11 Fri Aug 6 17:24:56 1999 --- cgicc/info/version.texi Thu Sep 30 11:19:25 1999 *************** *** 1,3 **** ! @set UPDATED 7 June 1999 ! @set EDITION 3.1 ! @set VERSION 3.1 --- 1,3 ---- ! @set UPDATED 30 September 1999 ! @set EDITION 3.1.1 ! @set VERSION 3.1.1