httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [apreq-2] order of declarations
Date Mon, 21 Apr 2003 03:37:48 GMT
Randy Kobes wrote:
> For apreq-2, VC++ on Win32 (but I think also some other
> compilers) is picky about the order of declaring
> variables in relation to assignments. This diff:
> ================================================================
> Index: apreq_parsers.c
> ===================================================================
> RCS file: /home/cvspublic/httpd-apreq-2/src/apreq_parsers.c,v
> retrieving revision 1.15
> diff -u -r1.15 apreq_parsers.c
> --- apreq_parsers.c	18 Apr 2003 20:15:50 -0000	1.15
> +++ apreq_parsers.c	19 Apr 2003 19:25:16 -0000
> @@ -751,10 +751,11 @@
>  #define MFD_ERROR   -1
>  
>      if (parser->v.size == 0) {
> -        const char *bdry, *ct = apreq_env_content_type(req->env);
> +        const char *bdry, *ct;
>          apr_size_t blen;
>          apr_status_t s;
>  
> +        ct = apreq_env_content_type(req->env);
>          memcpy(ctx->bdry, CRLF "--", 4);
>  
>          s = nextval(&ct, "boundary", &bdry, &blen);
> ==================================================================
> is needed to compile apreq_parsers.c.

Hmm, that's an unusual one. There are no declarations and standalone code 
mixes here.

This, is indeed invalid:

int foo;
foo = 1;
int bar;

However this is absolutely valid:

int foo = 1;
int bar;

So does this:

int tar, foo = 1;
int bar;

Is there something special about the last one?


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message