httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject Re: [PATCH] allow whitespace after comma in mod_imap (tr#106)
Date Sat, 25 Jan 1997 04:49:39 GMT
On Fri, 24 Jan 1997, Roy T. Fielding wrote:

> > The below patch allows for whitespace after the ',' in an imagemap file.
> > before:
> > 	rect	foo.html 	0,0	310,100
> > 
> > after, you could also use:
> > 	rect	foo.html	0, 0	310, 100
> > 
> > It is the subject of tr#106 and can be a little annoying to find.  If
> > people like it, I don't care if it goes in before b5 (why not?)  b6
> > (sure...) or even after 1.2 (no rush).
> > 
> > 
> > Index: mod_imap.c
> > ===================================================================
> > RCS file: /export/home/cvs/apache/src/mod_imap.c,v
> > retrieving revision 1.16
> > diff -c -r1.16 mod_imap.c
> > *** 1.16	1997/01/20 09:02:54
> > --- mod_imap.c	1997/01/25 01:16:40
> > ***************
> > *** 720,726 ****
> >   
> >       vertex = 0;
> >       while ( vertex < MAXVERTS &&  
> > !      sscanf(string_pos, "%lf,%lf",
> >        &pointarray[vertex][X], &pointarray[vertex][Y])   == 2)
> >       {
> >   	/* Now skip what we just read... we can't use ANSIism %n */
> > --- 720,726 ----
> >   
> >       vertex = 0;
> >       while ( vertex < MAXVERTS &&  
> > !      sscanf(string_pos, "%lf, %lf",
> >        &pointarray[vertex][X], &pointarray[vertex][Y])   == 2)
> >       {
> >   	/* Now skip what we just read... we can't use ANSIism %n */
> 
> Wouldn't that change break the normal form "0,0     310,100"?
> Geez, mod_imap is ugly.  There has got to be a better way.

No.  Whitespace in scanf format string means match 0 or more characters of
whitespace on every platform I know.  That means that:
	0,0
	0, 0
	0, 	  0

should all work.

Yea, it is a wee bit ugly.  <sigh>  Hey, you are good at writing pretty
code so rewrite it.  <g>


Mime
View raw message