Antony Courtney <[EMAIL PROTECTED]> writes:
> This isn't a bug report per se, more of an observation / criticism on
> the mechanism for setting the hugs path.  The mechanism for permanently
> setting the hugs path seems inconsistent with other command line
> applications, and is somewhat error prone.

John Peterson thought it was a mistake when I implemented things this
way.  Since I rarely used Win32, I didn't see the problem but the
steady flow of complaints and pleas from users who've hosed their
registries suggest that John was right.  (I imagine this feature is
particularily irritating if you're administering a lab of NT boxes
used for teaching purposes.)

If someone cares to tackle this, it looks like all registry
manipulations are guarded by #ifdef USE_REGISTRY.  The offending lines
are in hugs.c::set:

  #if USE_REGISTRY
          writeRegString("Options", optionsToStr());
  #endif

All the other code protected by USE_REGISTRY should be checked as well.
I notice this code in hugs.c::setHeapSize:
  
  #if USE_REGISTRY
              FPrintf(stderr,"Change to heap size will not take effect until you rerun 
Hugs\n");
  #else
              FPrintf(stderr,"Cannot change heap size\n");
  #endif

This may be the only other piece of code that would have to change.


I'm not sure whether the write to registry should be:

o excised completely
  this is the simplest
o made an option (configure or runtime)
  (there's an obvious circularity here...)
o turned into a command (:saveOptions or the like)
  also easy to do

Alastair

Reply via email to