Zooming in dotter broken

Tim Cutts timc at chiark.greenend.org.uk
Wed Aug 29 04:33:32 EST 2001


I'm currently preparing my site to upgrade to ACeDB 4.9, plus associated
stuff.   Consequently, I have installed all the binaries with names
ending in -4.9c, for people to test.  e.g.:

xace-4.9c

For the most part this works fine, but it causes problems for dotter's
zoom function, where it spawns a new copy of itself.  Firstly, this is
because the command name 'dotter' is hardwired, but installing a
symbolic link from dotter -> dotter-4.9c doesn't solve the problem.

Investigation of the source code revealed that this is because it relies
on csh to find the program, which in turn relies on you having a .cshrc
set up.  This seems silly to me, since it breaks the software for anyone
not using csh (which everyone knows is a horribly broken shell anyway,
and tcsh isn't much better).

It also seems silly since the location of the dotter binary is already
known; it was supplied as argc[0] in main()!  Why all this jumping
through hoops for no reason?  Using argc[0] would (a) solve the problem
with my using a non-standard name for the binary, and (b) stop the
reliance on csh.  For dotter, this is not a major problem, but could be
considered a security risk if ACeDB does the same thing.

Any chance this could be fixed?  I suppose the hacky way to do it is to
have a global variable with the path to the binary populated by main(),
and then have findCommand() use that rather than its current code.

Slightly less hacky but more work would be to make argc[0] a parameter
to dotterZoom().

Tim.

-- 
"It is the job of Sales and Marketing to insulate those who know what
they're talking about from each other"
  -- I know who said this, but I'm not telling.





More information about the Acedb mailing list