
- Home
- Magazine
- Conference & Seminars
- News
- Archives
- Forums
- Store
- Directory
- Editorial
- Advertising
- User/Login
- Contact



Volume Number: 14 (1998)
Issue Number: 5
Column Tag: Tips & Tidbits
by Steve Sisak
Codewarrior is a product of many thousands of tiny files.
On a 2GB disk, each individual file will take up a minimum of 62k (even if it only contains a few bytes) because of the way HFS breaks up a disk. (HFS+ solves this problem, but until then...)
You could reformat your hard drive and create a smaller partition just for Codewarrior, but there is an easier way: Use Disk Copy 6.1.3 to make a 200 MB read/write disk image of an empty folder. (Actual size will need to be varied depending on what features you are installing.)
Mount the image to the desktop, install Codewarrior to the virtual volume, and then put the resulting image (or an alias to it) in your startup items folder. Because you are working with a smaller 'virtual volume' your block size will be reduced to around 6k per file, saving you tonnes of disk space.
Colin Foster,
cfoster@pobox.com
Many people don't seem to realize that you can't pass nil arguments to ParamText. Here's a wrapper routine that lets you forget about this inconvenience, as well as about having to convert between Pascal- and C-string formats:
void ParamCText
(
char *Param0,
char *Param1,
char *Param2,
char *Param3
)
{
static Str255 Param[4];
#define CopyArg(n) \
if (Param##n != nil) \
{ \
strncpy((char *) Param[n], Param##n, 255); \
Param[n][255] = 0; \
c2pstr((char *) Param[n]); \
} \
else \
{ \
Param[n][0] = 0; \
} /*if*/
CopyArg(0)
CopyArg(1)
CopyArg(2)
CopyArg(3)
ParamText(Param[0], Param[1], Param[2], Param[3]);
} /*ParamCText*/
Just a couple of notes about the code:
Lawrence D'Oliveiro,
ldo@geek-central.gen.nz
Because of an obscure gotcha in the MenuManager routine SetItem, TCL users implementing 'Other Size..." support must beware. The traditional approach reserves one item on the size menu to dynamically display the 'other' size, but this item has no logical initial value, so the temptation is to leave it empty. In a TCL application one uses "#-1" as the text, and the #-1 is stripped by the CBartender before it calls SetItem to install the text, which in that case would be void, with dire 'unpredictable' results. Instead you can use a blank as a placeholder, ie " #-1".
Dana S Emery,
demery@ieaccess.net




