GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 09-Feb-2004, 08:51
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light

[LIBRARY]HTML Class & CGI handling


GID Forums C/C++ Forums
Code Submittal Form


Name/Brief Description:
HTML/CGI Handling
Date of Original Submission:
February 9, 2004
Submitted by:
dsmith
License:
GPL - http://www.opensource.org/licenses/gpl-license.php
Detailed Description:
This is a library that I developed last fall to help me implement a web page that employed CGI usage. There is basically two parts to this library. The first part is the CGI input handling portion. This will parse the input of CGI call and place it nicely into a linked list for use in your cgi program. The other part is an html_class. This may seem kind of silly to people that are extremely familiar with HTML. Basically to use a c program in CGI, all you have to do is send your html code through a printf statement, which is pretty straight forward. However, I am much more comfortable writing in C then in HTML, so I tried to implement all of the HTML that I knew (very little) into a class. In addition, this allows me to use fast C calls/routines intermingled with my html processing. The zip file contains several files:
  • web_util.h - The header file for the library
  • web_util.cpp - The implementation for the library
  • list1.h - My linked list implementation (see here for more information.)
  • web_poll.cpp - A sample file of how to use the library.
The included sample is really poor, but shows alot of the usage of the different elements. I have other samples, but they use a low-level database that I developed which I have not released yet (but I will...)
Problems/Limitations:
  • I have only compiled/ran this on linux with gcc (portability should be easy though)
  • My understanding/use of the HTML language is awful. I would really like someone to look at this and help me implement this better.
  • The HTML/web pages are pretty vanilla plain, because I have implemented so little.
  • Uses C++ class, so it is not portable to strictly c compilers
  • Code commenting could be better
Once again, I am really looking for feedback on this. I think this could be a very useful library, but it needs some help from someone more familiar with html than I. Not that it doesn't work. Everything I have done here works, but it is pretty basic right now.
Attached Files
File Type: zip html.zip (16.3 KB, 69 views)
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeping track of a private variable outside the class viperv80 C++ Forum 1 03-Dec-2003 17:25
Upgrade of BBCode class sometime today JdS GIDForums™ 4 03-Nov-2003 07:18
error handling code.. daveyp225 C++ Forum 0 26-Oct-2003 06:46
problem with creating class mohammed C++ Forum 1 11-Oct-2003 09:04
need help to define a class in C++ yannoush C++ Forum 7 09-Sep-2003 00:28

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:39.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.