[comp.sys.next] New version of fsectbyname

lane@sumex-aim.stanford.edu (Christopher Lane) (08/30/89)

I've FTP'd a new version of the fsectbyname utility to the submissions
directory of the cs.orst.edu NeXT archive.

In addition to the 'r' (read) and 'w' (write) modes, this one adds a 'W'
(unsafe write) mode which is like 'w' but does not check sizes and can be used
in a pipe.  If you are replacing a section that is the last (or only) one in a
segment, and there is free space left over (there usually is) then this allows
you to expand the section into that free space.  This mode does not check the
numbers, that is up to you using 'size -m'.  I've been able to add buttons and
and what not to the __NIB sections of applications using the 'W' mode.

Ever notice that the SystemBeep that Preferences uses is louder than the
SystemBeep that everything else is supposed to use, thus setting it via
Preferences does not reflect accurately what you'll hear?  Well you can 'fix'
that by doing (after making a backup copy of Preferences): 

fsectbyname W Preferences __SOUND SystemBeep < /NextLibrary/Sounds/Bonk.snd

Note that you have to use 'W' here since the Bonk sound is a few bytes larger
(8130) than the SystemBeep sound (8124) Preferences comes with but is smaller
than the space available in the Segment (8192).

I'd be interested in hearing about uses of fsectbyname to 'fix' applications
(ala the Preferences example above or the Stealth example I posted earlier).

- Christopher