You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2008/09/16 23:19:17 UTC

Re: svn commit: r696047 - in /httpd/flood/trunk: flood_subst_file.c flood_subst_file.h


On 09/16/2008 10:41 PM, jerenkrantz@apache.org wrote:
> Author: jerenkrantz
> Date: Tue Sep 16 13:41:45 2008
> New Revision: 696047
> 
> URL: http://svn.apache.org/viewvc?rev=696047&view=rev
> Log:
> Fix up flood_subst_file implementation so that we compile again on Mac OS X.
> 
> Also fix up various nits, add licensing blocks, and reformat to better follow
> coding standards.
> 
> * flood_subst_file.c, flood_subst_file.h: Misc. fixes.
> 
> Modified:
>     httpd/flood/trunk/flood_subst_file.c
>     httpd/flood/trunk/flood_subst_file.h
> 
> Modified: httpd/flood/trunk/flood_subst_file.c
> URL: http://svn.apache.org/viewvc/httpd/flood/trunk/flood_subst_file.c?rev=696047&r1=696046&r2=696047&view=diff
> ==============================================================================


> @@ -192,8 +172,41 @@
>  }
>  
>  #ifdef SUBST_MAIN
> +subst_rec_t subst_list[SUBST_FILE_ARR_MAX];
> +
> +void subst_list_make(subst_rec_t *subst_list) {
> +  int i2 = 0;
> +
> +  subst_list[0].subst_var = "name";
> +  subst_list[0].subst_file_name = "/pmalab1/temphome/guyf/work/replace_mc5/flood_stuff/build/flood-0.4/test";
> +  subst_list[0].subst_mode = 0;
> +  subst_list[0].valid = 1;
> +  i2++;
> +
> +  subst_list[i2].subst_var = "foot";
> +  subst_list[i2].subst_file_name = "/pmalab1/temphome/guyf/work/replace_mc5/flood_stuff/build/flood-0.4/blort";
> +  subst_list[i2].subst_mode = 0;
> +  subst_list[i2].valid = 1;
> +
> +  i2++;
> +  subst_list[i2].subst_var = "nerve";
> +  subst_list[i2].subst_file_name = "/pmalab1/temphome/guyf/work/replace_mc5/flood_stuff/build/flood-0.4/cavort";
> +  subst_list[i2].subst_mode = 0;
> +  subst_list[i2].valid = 1;
> +}
> +
> +int close_subst_file(apr_file_t* subst_file) {
> +  apr_status_t rc = 0;
> +
> +  if (subst_file) {
> +    rc = apr_file_close(subst_file);
> +  }
> +  return rc;
> +}
> +
>  int main(int argc, char** argv) {
> -  char line[SUBST_FILE_MAX_URL_SIZE];    # why mess around, therefore static
> +  //# why mess around, therefore static

C++ style comments are not liked by all C compilers.

Regards

Rüdiger

Re: svn commit: r696047 - in /httpd/flood/trunk: flood_subst_file.c flood_subst_file.h

Posted by Guy Ferraiolo <gu...@cbs.com>.
I'll fix that!  And the stub code.  WRT to gcc-4.2.3-2ubuntu7 of Sept
3, 2008, I don't have access to that environment but it looks correct to
me.  I'll be able to get gcc-4.2.3 but only on Mandriva.

sorry,

Guy

On Tue, 2008-09-16 at 14:41 -0700, Justin Erenkrantz wrote:
> On Tue, Sep 16, 2008 at 2:36 PM, William A. Rowe, Jr.
> <wr...@rowe-clan.net> wrote:
> > I suppose the proper answer then is
> >
> > /* //# why mess around, therefore static */
> >
> > ? ;-)  Justin, I think you could have dropped the #
> 
> Hey, bub, you're the one who committed this code - not me.  =)  -- justin
-- 
Guy Ferraiolo                                   mailto:guy.ferraiolo@cbs.com
Monitoring and Performance Management           http://CNET.com
CBS Interactive                                 tel: 1.908.541.3739
1200 Route 22 East                              fax: 1.908.575.7474
Bridgewater, NJ 08807                           cel: 1.732.618.0250

Re: svn commit: r696047 - in /httpd/flood/trunk: flood_subst_file.c flood_subst_file.h

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Tue, Sep 16, 2008 at 2:36 PM, William A. Rowe, Jr.
<wr...@rowe-clan.net> wrote:
> I suppose the proper answer then is
>
> /* //# why mess around, therefore static */
>
> ? ;-)  Justin, I think you could have dropped the #

Hey, bub, you're the one who committed this code - not me.  =)  -- justin

Re: svn commit: r696047 - in /httpd/flood/trunk: flood_subst_file.c flood_subst_file.h

Posted by Guy Ferraiolo <gu...@cnet.com>.
Sorry, that's called 'too much Perl'.

Guy

On Tue, 2008-09-16 at 16:36 -0500, William A. Rowe, Jr. wrote:
> Ruediger Pluem wrote:
> > 
> > C++ style comments are not liked by all C compilers.
> 
> I suppose the proper answer then is
> 
> /* //# why mess around, therefore static */
> 
> ? ;-)  Justin, I think you could have dropped the #
-- 
Guy Ferraiolo                                   mailto:guy.ferraiolo@cbs.com
Monitoring and Performance Management           http://CNET.com
CBS Interactive                                 tel: 1.908.541.3739
1200 Route 22 East                              fax: 1.908.575.7474
Bridgewater, NJ 08807                           cel: 1.732.618.0250

Re: svn commit: r696047 - in /httpd/flood/trunk: flood_subst_file.c flood_subst_file.h

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Ruediger Pluem wrote:
> 
> C++ style comments are not liked by all C compilers.

I suppose the proper answer then is

/* //# why mess around, therefore static */

? ;-)  Justin, I think you could have dropped the #

Re: svn commit: r696047 - in /httpd/flood/trunk: flood_subst_file.c flood_subst_file.h

Posted by Guy Ferraiolo <gu...@cnet.com>.
I'll fix that.

Guy


On Tue, 2008-09-16 at 14:40 -0700, Justin Erenkrantz wrote:
> On Tue, Sep 16, 2008 at 2:19 PM, Ruediger Pluem <rp...@apache.org> wrote:
> >> +  //# why mess around, therefore static
> >
> > C++ style comments are not liked by all C compilers.
> 
> True, but if you look at the hardcoded paths a few lines up, well, ya,
> there's a lot of work that would need to be done to make this stub
> code even run.
> 
> Anyway, I removed the comment in r696077.  =)  -- justin
-- 
Guy Ferraiolo                                   mailto:guy.ferraiolo@cbs.com
Monitoring and Performance Management           http://CNET.com
CBS Interactive                                 tel: 1.908.541.3739
1200 Route 22 East                              fax: 1.908.575.7474
Bridgewater, NJ 08807                           cel: 1.732.618.0250

Re: svn commit: r696047 - in /httpd/flood/trunk: flood_subst_file.c flood_subst_file.h

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Tue, Sep 16, 2008 at 2:19 PM, Ruediger Pluem <rp...@apache.org> wrote:
>> +  //# why mess around, therefore static
>
> C++ style comments are not liked by all C compilers.

True, but if you look at the hardcoded paths a few lines up, well, ya,
there's a lot of work that would need to be done to make this stub
code even run.

Anyway, I removed the comment in r696077.  =)  -- justin