The term dignorary is made of the words ignore and dictionary and denotes a dictionary storing names to be ignored during vahunzation.
In this context, ignore means do not vahunz a name - just like if
it would have been marked with a blank (' '
). A name can be set to be
ignored by changing the first column of its line to a hyphen (-
).
Names marked to be ignored are not stored in the normal dictionary - by default called vahunz.names -, but in another file by default called vahunz.ignore. Still ignored names can be left in the normal dictionary at first, as Vahunz takes care of writing them to the dignorary when it is finished with scanning all names.
Vahunz is already distributed with some often needed dignoraries.
You can find them in the vahunz/dignorary directory. To
use one of them, simply copy it to vahunz.ignore. Assuming you did
not set --base-name
to something else.
<assert.h>
,
<ctype.h>
,
<errno.h>
,
<limits.h>
,
<locale.h>
,
<signal.h>
,
<stdarg.h>
,
<stddef.h>
,
<stdio.h>
,
<stdlib.h>
,
<string.h>
and
<time.h>
.
As these dignoraries where created scanning the include files of
Geek Gadget's gcc
for Amiga, they may also include some
names you would not expect to be there. For example,
_KERNEL
is not really an ANSI symbol. However, this
should normally not cause any problems.
If none of the included dignoraries can satisfy your needs, you will have to create your own ones. Fortunately this is quite easy. This is how the amiga.ignore was created:
First, a file list for all header files stored on the Developer-CD was created in the temporary t: directory:
list >t:amiga.files lformat=%p%n all pat=#?.h DeveloperCD:NDK_3.1/Includes&Libs/include_h/After that, Vahunz was told to scan them for names:
vahunz --base-name
t:amiga
As a result, all names are now stored in t:amiga.names
and the filenames of the standard libraries are already in
t:amiga.ignore.
Unfortunately, all the names in t:amiga.names have a
blank in the first column, and not a hyphen (-
) as we would like it.
However, this is no real problem, if you have filter capable of
replacing these blanks by a hyphen installed. Even the common
tr
command can do that:
tr " " "-" <t:amiga.names >t:amiga-1.ignore
If you do not have such a filter, load t:amiga.names into your favourite editor, use the global Search&Replace function and save the result as t:amiga-1.ignore.
All you have to do now is appending the just created file to the existing t:amiga.ignore, for example using:
type t:amiga-1.ignore >>t:amiga.ignoreNote that there are two greater-then signs (
>
) so the
file will be appended. After that, you should have a
t:amiga.ignore which is identical to the one already
included with Vahunz.
Sometimes it can be convenient to use all words stored in two separate dignoraries. For example, you could write an application which is both using Posix-compatible and Amiga-specific functions.
As dignoraries entirely consist of simple lines with ASCII-text, you
can easily concatenate them by means of the join
command,
for instance:
join amiga.ignore unix.ignore AS vahunz.ignore
A minor problem might be that several names are defined in both dignoraries, and Vahunz will come up with a warning for every duplicate name. This will only happen once, as such names are automatically removed from dictionaries.
Therefore you might want to specify the command line option
--no-warning
when creating the normal dictionary while your
dignorary already exists.
Of course Vahunz is smart enough to utilize a dignorary like vahunz.ignore even if no dictionary like vahunz.names exists yet. In such a case, it will only create vahunz.names, but vahunz.ignore will still exist afterwards - with duplicate entries removed.