Re: WWW, Mosiac, and Access for People with Disabilities

John Labovitz (johnl@ora.com)
Fri, 7 Oct 1994 03:44:24 +0100

[hoesel@chem.rug.nl]
> Unfortunalty NCSA's version of the daemon cannot handle this very well
> (or something must have changed recently). The ISMAP handling program on
> EXPO is a special purpose daemon which does detect browsers
> incapable of ISMAP

Several months ago, I made a small patch to NCSA's `imagemap'
program (from the 1.3 distribution) to allow this. The change
was relatively simple, consisting of a check to see if coordinates
were specified in the URL, and if not, to fake out the rest of
the program to think the user `clicked' outside of a defined
region. It seems to work well. I'll include the context diff
here (and even brashly put a new version number on `imagemap')
if anyone else is interested. Please let me know if it doesn't
work for you!

*** imagemap.c.old Sat May 7 19:46:47 1994
--- imagemap.c Thu Oct 6 19:31:44 1994
***************
*** 1,5 ****
/*
! ** mapper 1.2
** 7/26/93 Kevin Hughes, kevinh@pulua.hcc.hawaii.edu
** "macmartinized" polygon code copyright 1992 by Eric Haines, erich@eye.com
** All suggestions, help, etc. gratefully accepted!
--- 1,5 ----
/*
! ** mapper 1.3
** 7/26/93 Kevin Hughes, kevinh@pulua.hcc.hawaii.edu
** "macmartinized" polygon code copyright 1992 by Eric Haines, erich@eye.com
** All suggestions, help, etc. gratefully accepted!
***************
*** 14,19 ****
--- 14,26 ----
** 12/05/93: Rob McCool, robm@ncsa.uiuc.edu
**
** Made CGI/1.0 compliant.
+ **
+ ** 10/6/94: John Labovitz, johnl@ora.com
+ **
+ ** If called without any coordinates, the `default' line
+ ** in the map file is used. This allows non-graphic
+ ** browsers to access a directory or menu of possible
+ ** choices.
*/

#include <stdio.h>
***************
*** 41,60 ****
FILE *fp;
char *t;

- if (argc != 2)
- servererr("Wrong number of arguments, client may not support ISMAP.");
mapname=getenv("PATH_INFO");
-
if((!mapname) || (!mapname[0]))
servererr("No map name given. Please read the <A HREF=\"http://hoohoo.ncsa.uiuc.edu/docs/setup/admin/Imagemap.html\">instructions</A>.<P>");

-
mapname++;
! if(!(t = strchr(argv[1],',')))
! servererr("Your client doesn't support image mapping properly.");
! *t++ = '\0';
! testpoint[X] = (double) atoi(argv[1]);
! testpoint[Y] = (double) atoi(t);

if ((fp = fopen(CONF_FILE, "r")) == NULL)
servererr("Couldn't open configuration file.");
--- 48,68 ----
FILE *fp;
char *t;

mapname=getenv("PATH_INFO");
if((!mapname) || (!mapname[0]))
servererr("No map name given. Please read the <A HREF=\"http://hoohoo.ncsa.uiuc.edu/docs/setup/admin/Imagemap.html\">instructions</A>.<P>");

mapname++;
!
! if (argc == 2) {
! if(!(t = strchr(argv[1],',')))
! servererr("Your client doesn't support image mapping properly.");
! *t++ = '\0';
! testpoint[X] = (double) atoi(argv[1]);
! testpoint[Y] = (double) atoi(t);
! } else {
! testpoint[X] = testpoint[Y] = -1;
! }

if ((fp = fopen(CONF_FILE, "r")) == NULL)
servererr("Couldn't open configuration file.");

--
John Labovitz
Global Network Navigator <http://gnn.com/>
O'Reilly & Associates, Sebastopol, California, USA (+1 707 829 0515)