Moving image data to cgi.c rather than cgi.h
authorjongfoster <jongfoster@users.sourceforge.net>
Thu, 13 Sep 2001 23:32:40 +0000 (23:32 +0000)
committerjongfoster <jongfoster@users.sourceforge.net>
Thu, 13 Sep 2001 23:32:40 +0000 (23:32 +0000)
Fixing a GPF under Win32 (and any other OS that protects global
constants from being written to).

filters.c

index 9a07966..4851dff 100644 (file)
--- a/filters.c
+++ b/filters.c
@@ -1,4 +1,4 @@
-const char filters_rcs[] = "$Id: filters.c,v 1.27 2001/08/05 16:06:20 jongfoster Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.28 2001/09/10 10:18:51 oes Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/filters.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/filters.c,v $
@@ -38,6 +38,9 @@ const char filters_rcs[] = "$Id: filters.c,v 1.27 2001/08/05 16:06:20 jongfoster
  *
  * Revisions   :
  *    $Log: filters.c,v $
  *
  * Revisions   :
  *    $Log: filters.c,v $
+ *    Revision 1.28  2001/09/10 10:18:51  oes
+ *    Silenced compiler warnings
+ *
  *    Revision 1.27  2001/08/05 16:06:20  jongfoster
  *    Modifiying "struct map" so that there are now separate header and
  *    "map_entry" structures.  This means that functions which modify a
  *    Revision 1.27  2001/08/05 16:06:20  jongfoster
  *    Modifiying "struct map" so that there are now separate header and
  *    "map_entry" structures.  This means that functions which modify a
@@ -488,15 +491,15 @@ struct http_response *block_url(struct client_state *csp)
       /* and handle accordingly: */
       if ((p == NULL) || (0 == strcmpic(p, "logo")))
       {
       /* and handle accordingly: */
       if ((p == NULL) || (0 == strcmpic(p, "logo")))
       {
-         rsp->body = bindup(JBGIF, sizeof(JBGIF));
-         rsp->content_length = sizeof(JBGIF);
+         rsp->body = bindup(image_junkbuster_gif_data, image_junkbuster_gif_length);
+         rsp->content_length = image_junkbuster_gif_length;
          enlist_unique_header(rsp->headers, "Content-Type", "image/gif");
       }
 
       else if (0 == strcmpic(p, "blank"))
       {
          enlist_unique_header(rsp->headers, "Content-Type", "image/gif");
       }
 
       else if (0 == strcmpic(p, "blank"))
       {
-         rsp->body = bindup(BLANKGIF, sizeof(BLANKGIF));
-         rsp->content_length = sizeof(BLANKGIF);
+         rsp->body = bindup(image_blank_gif_data, image_blank_gif_length);
+         rsp->content_length = image_blank_gif_length;
          enlist_unique_header(rsp->headers, "Content-Type", "image/gif");
       }
 
          enlist_unique_header(rsp->headers, "Content-Type", "image/gif");
       }
 
@@ -1147,12 +1150,10 @@ void apply_url_actions(struct current_action_spec *action,
 const struct forward_spec * forward_url(struct http_request *http,
                                         struct client_state *csp)
 {
 const struct forward_spec * forward_url(struct http_request *http,
                                         struct client_state *csp)
 {
-   static const struct forward_spec fwd_default[1];
+   static const struct forward_spec fwd_default[1] = { FORWARD_SPEC_INITIALIZER };
    struct forward_spec *fwd = csp->config->forward;
    struct url_spec url[1];
 
    struct forward_spec *fwd = csp->config->forward;
    struct url_spec url[1];
 
-   memset(&fwd_default, '\0', sizeof(struct forward_spec));
-
    if (fwd == NULL)
    {
       return(fwd_default);
    if (fwd == NULL)
    {
       return(fwd_default);