You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@liege.ICS.UCI.EDU> on 1997/01/25 05:39:49 UTC
Re: [PATCH] allow whitespace after comma in mod_imap (tr#106)
> 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.
.....Roy
Re: [PATCH] allow whitespace after comma in mod_imap (tr#106)
Posted by Marc Slemko <ma...@znep.com>.
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>