-const char cgi_rcs[] = "$Id: cgi.c,v 1.43 2002/03/05 21:33:45 david__schmidt Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.44 2002/03/05 22:43:45 david__schmidt Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgi.c,v $
*
* Revisions :
* $Log: cgi.c,v $
+ * Revision 1.44 2002/03/05 22:43:45 david__schmidt
+ * - Better error reporting on OS/2
+ * - Fix double-slash comment (oops)
+ *
* Revision 1.43 2002/03/05 21:33:45 david__schmidt
* - Re-enable OS/2 building after new parms were added
* - Fix false out of memory report when resolving CGI templates when no IP
* Returns a statically-allocated error response.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : template_name = Name of template that could not
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : template_name = Name of template that could not
* be loaded.
*
* Returns : JB_ERR_OK on success
* parameters.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : template_name = Name of template that could not
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : template_name = Name of template that could not
* be loaded.
*
* Returns : JB_ERR_OK on success
* (query string) for a CGI were wrong.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
*
* CGI Parameters : none
*
* lines.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : template_ptr = Destination for pointer to loaded
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : template_ptr = Destination for pointer to loaded
* template text.
- * 3 : template = name of the HTML template to be used
+ * 3 : template = name of the HTML template to be used
*
* Returns : JB_ERR_OK on success
* JB_ERR_MEMORY on out-of-memory error.
* interpretation.
*
* Parameters :
- * 1 : template_ptr = IN: Template to be filled out.
+ * 1 : template_ptr = IN: Template to be filled out.
* Will be free()d.
* OUT: Filled out template.
* Caller must free().
- * 2 : exports = map with fill in symbol -> name pairs
+ * 2 : exports = map with fill in symbol -> name pairs
*
* Returns : JB_ERR_OK on success
* JB_ERR_MEMORY on out-of-memory error
* this function also frees the passed "exports" map.
*
* Parameters :
- * 1 : csp = Client state
- * 2 : templatename = name of the HTML template to be used
- * 3 : exports = map with fill in symbol -> name pairs.
+ * 1 : csp = Client state
+ * 2 : templatename = name of the HTML template to be used
+ * 3 : exports = map with fill in symbol -> name pairs.
* Will be freed by this function.
*
* Returns : JB_ERR_OK on success
-const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.13 2002/03/04 02:07:59 david__schmidt Exp $";
+const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.14 2002/03/05 00:24:51 jongfoster Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgiedit.c,v $
*
* Revisions :
* $Log: cgiedit.c,v $
+ * Revision 1.14 2002/03/05 00:24:51 jongfoster
+ * Patch to always edit the current actions file.
+ *
* Revision 1.13 2002/03/04 02:07:59 david__schmidt
* Enable web editing of actions file on OS/2 (it had been broken all this time!)
*
* encoding it.
*
* Parameters :
- * 1 : out = target map
- * 2 : in = source map
- * 3 : name = name of cgi parameter to copy
+ * 1 : out = target map
+ * 2 : in = source map
+ * 3 : name = name of cgi parameter to copy
*
* Returns : JB_ERR_OK on success
* JB_ERR_MEMORY on out-of-memory
* encoding it.
*
* Parameters :
- * 1 : out = target map
- * 2 : in = source map
- * 3 : name = name of cgi parameter to copy
+ * 1 : out = target map
+ * 2 : in = source map
+ * 3 : name = name of cgi parameter to copy
*
* Returns : JB_ERR_OK on success
* JB_ERR_MEMORY on out-of-memory
* edit-actions-url
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters
* f : (filename) Identifies the file to edit
* edit-actions-url
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* f : (filename) Identifies the file to edit
* edit-actions-url
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* f : (filename) Identifies the file to edit
* Description : Match an actions file {{header}} line
*
* Parameters :
- * 1 : line - String from file
- * 2 : name - Header to match against
+ * 1 : line = String from file
+ * 2 : name = Header to match against
*
* Returns : 0 iff they match.
*
* Description : Match an actions file {{header}} line
*
* Parameters :
- * 1 : line - String from file. Must not start with
+ * 1 : line = String from file. Must not start with
* whitespace (else infinite loop!)
- * 2 : name - Destination for name
- * 2 : name - Destination for value
+ * 2 : name = Destination for name
+ * 2 : name = Destination for value
*
* Returns : JB_ERR_OK on success
* JB_ERR_MEMORY on out-of-memory
* secure.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : parameters = map of cgi parameters
- * 3 : param_name = The name of the parameter to read
- * 4 : suffix = File extension, e.g. ".actions"
- * 5 : pfilename = destination for full filename. Caller
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : parameters = map of cgi parameters
+ * 3 : param_name = The name of the parameter to read
+ * 4 : suffix = File extension, e.g. ".actions"
+ * 5 : pfilename = destination for full filename. Caller
* free()s. Set to NULL on error.
- * 6 : pparam = destination for partial filename,
+ * 6 : pparam = destination for partial filename,
* suitable for use in another URL. Allocated as part
* of the map "parameters", so don't free it.
* Set to NULL if not specified.
* passed to a CGI function.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : parameters = map of cgi parameters
- * 3 : name = Name of CGI parameter to read
- * 4 : pvalue = destination for value.
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : parameters = map of cgi parameters
+ * 3 : name = Name of CGI parameter to read
+ * 4 : pvalue = destination for value.
* Set to -1 on error.
*
* Returns : JB_ERR_OK on success
* spaces and validates it.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : parameters = map of cgi parameters
- * 3 : name = Name of CGI parameter to read
- * 4 : pvalue = destination for value. Will be malloc()'d.
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : parameters = map of cgi parameters
+ * 3 : name = Name of CGI parameter to read
+ * 4 : pvalue = destination for value. Will be malloc()'d.
* Set to NULL on error.
*
* Returns : JB_ERR_OK on success
* Where 'sel' is 'a', 'b', or 'c'.
*
* Parameters :
- * 1 : exports = Exports map to modify.
- * 2 : optionname = name for map
- * 3 : values = null-terminated list of values;
- * 4 : value = Selected value.
+ * 1 : exports = Exports map to modify.
+ * 2 : optionname = name for map
+ * 3 : values = null-terminated list of values;
+ * 4 : value = Selected value.
*
* CGI Parameters : None
*
* outside the CGI editor.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : filename = The file that was modified.
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : filename = The file that was modified.
*
* CGI Parameters : none
*
* be parsed by the CGI editor.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : file = The file that was modified.
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : file = The file that was modified.
*
* CGI Parameters : none
*
* opened by the CGI editor.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : filename = The file that was modified.
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : filename = The file that was modified.
*
* CGI Parameters : none
*
* (query string) for a CGI were wrong.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
*
* CGI Parameters : none
*
* actions file to edit.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters : None
*
* FIXME: This function shouldn't FATAL ever.
* FIXME: This function doesn't check the retval of map()
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters : filename
*
* Description : CGI function that edits the Actions list.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters : None
*
* Description : CGI function that actually edits the Actions list.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters : None
*
* an actions file.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* filename : Identifies the file to edit
* an actions file.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* filename : Identifies the file to edit
* the actions file.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* f : (filename) Identifies the file to edit
* (else JB_ERR_CGI_PARAMS).
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* f : (filename) Identifies the file to edit
* an actions file.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* f : (filename) Identifies the file to edit
* specified.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* f : (filename) Identifies the file to edit
* an actions file.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* set : If present, how to change toggle setting:
-const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.13 2002/02/21 00:10:37 jongfoster Exp $";
+const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.14 2002/03/02 04:14:50 david__schmidt Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
*
* Revisions :
* $Log: cgisimple.c,v $
+ * Revision 1.14 2002/03/02 04:14:50 david__schmidt
+ * Clean up a little CRLF unpleasantness that suddenly appeared
+ *
* Revision 1.13 2002/02/21 00:10:37 jongfoster
* Adding send-banner?type=auto option
*
* Lists menu of available unhidden CGIs.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters : none
*
* given.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters : none
*
* made of it.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters : none
*
* Description : CGI function that returns a banner.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* type : Selects the type of banner between "trans", "logo",
* Description : CGI function that sends a 1x1 transparent GIF.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters : None
*
* file versions of IJB.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters : none
*
* current status of IJB.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* file : Which file to show. Only first letter is checked,
* matches starting from the defaults have lead to that.
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters :
* url : The url whose actions are to be determined.
* Description : CGI function to return "/robots.txt".
*
* Parameters :
- * 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : rsp = http_response data structure for output
- * 3 : parameters = map of cgi parameters
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ * 2 : rsp = http_response data structure for output
+ * 3 : parameters = map of cgi parameters
*
* CGI Parameters : None
*
* used when building
*
* Parameters :
- * 1 : exports = map to extend
+ * 1 : exports = map to extend
*
* Returns : JB_ERR_OK on success
* JB_ERR_MEMORY on out-of-memory error.