/*-------------------------------------------------------------*/ /* File: cgi-lib.h * * Header file for CGI query processing routines. * * Author: Naba Barkakati */ /*--------------------------------------------------------------- * Copyright (c) 1996 Naba Barkakati (LNB Software, Inc.) * * Permission to use, copy, modify, and distribute this software * for any purpose and without any fee is hereby granted, * provided his notice is included in its entirety in the * documentation and in the source files. * * For more information about this software, consult: * * - "UNIX Webmaster Bible" published by IDG Books Worldwide * (Fall 1996) * * - LNB Software, Inc. Web site at http://www.lnbsoft.com/ * * This software and any related documentation is provided "as is" * without any warranty of any kind, either express or implied, * including, without limitation, the implied warranties of * merchantibility or fitness for a particular purpose. The entire * risk arising out of use or performance of the software remains * with you. * * In no event shall Naba Barkakati, LNB Software, or their agents * be liable for any cost, loss, or damage incurred due to the * use, malfunction, or misuse of the software or the inaccuracy * of the documentation associated with the software. *--------------------------------------------------------------- */ #ifndef __CGI_LIB_H #define __CGI_LIB_H typedef struct Field { char *name; /* Pointer to the name */ char *value; /* Pointer to value */ }Field; typedef struct FieldArray { int count; /* Number of fields in query */ Field *fields; /* Array of Field structures */ char *query; /* The query string */ } FieldArray; /* Function prototypes */ int ReadParse(FieldArray *fa); int ParseQuery(FieldArray *fa); int MethGet(void); int MethPost(void); const char *GetValue(const FieldArray *fa, const char *name); void PrintVariables(const FieldArray *fa); void PrintHeader(void); void HtmlTop(const char *title); void HtmlBot(void); void Cleanup(FieldArray *fa); #endif