New lab note: Adding a new verb and verb category
- I added a new verb category, mysql, and the verb "test".
Once this was done, I did a full compile and build. I then dropped the
Frontier.root file into the release folder and launched Frontier
(which did not crash, I might add). I then opened Frontier, navigated
to system.compiler.kernel, and found a mysql table in there, with my
Here's the new lab note about this:
Next up is updating the branch to the CVS.
- At 11:50 Uhr +0000 01.04.2005, David Gewirtz wrote:
>Here's the new lab note about this:Regarding kernvelverbs.rc, you wrote in your note:
>I added a new resource with a single verb, test. The purpose of thisYou are right in so far as kernvelverbs.rc does not include
>is I'm going to want to be sure I can get in and out of my verb
>before I go and try to connect to the MySQL API. I did not put this
>inside an #ifdef because frontierdefs.h is not included, and I don't
>know what damage I'd cause if I tried to include it.
frontierdefs.h directly, but kernvelverbs.rc is only ever used by
inclusion from Winland.rc and that file includes frontierdefs.h
before kernvelverbs.rc, by design.
If you look at the block for the regexp kernel verbs in
kernvelverbs.rc, you'll see that it is only active if flregexpverbs
is defined, which happens in frontierdefs.h, too. It's safe to use
the same approach for your verbs.
It follows that any definitions added to frontierdefs.h must be
simple enough so that none of the various resource compilers we use
barf on them. That's why frontierdefs.h file only contains simple
definitions but no elaborate pre-processor macros.