Hi,

On Thu, Sep 18, 2003 at 12:52:41PM +0100, Bart Oldeman wrote:
> On Thu, 18 Sep 2003, Ryan Underwood wrote:
> 
> > On Tue, Sep 16, 2003 at 04:33:50AM -0500, Ryan Underwood wrote:
> > >
> > > While on the topic, is there a document that explains how to add a new
> > > configuration option?  I have modified, parser.y, config.c, global.conf,
> > > and lexer.l and having a little trouble getting the new variable to be
> > > "seen".  I grepped through the docs for "lexer" and "parser" but didn't
> > > see much useful right away.
> >
> > I take it from lack of response that nobody knows? :)
> >
> > Just kidding, but I really have some problems implementing a new
> > configuration option, so any hints would be helpful.
> 
> have a look at a small prepatch that does exactly that, eg. patch-1.1.5.5
> added a $_lfn_support option.

Here is the procedure I undertook, to hopefully shed some more light:

1. First I added a new variable to the config struct in
src/include/emu.h called delay_interval

2. in src/base/init/lexer.l.in:
delay_interval          RETURN(DELAY_INTERVAL);

3. in src/base/init/parser.y.in:
%token DELAY_INTERVAL

4. in src/base/init/parser.y.in also:
        | DELAY_INTERVAL expression
                {
                c_printf("Hello, this is delay_interval speaking\n");
                }

5. in global.conf, under checkuservar, I add $_delay_interval.
In the parser_version_3 scope, I add:
delay_interval $_delay_intervala

6. in dosemu.conf on my system, I add $_delay_interval = (1234)

7. I run the new dosemu.bin -D+C, and my c_printf is never displayed.

Any ideas?

-- 
Ryan Underwood, <nemesis at icequake.net>, icq=10317253
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to