Re: File Search & Select PGM

new topic     » goto parent     » topic index » view thread      » older message » newer message

Lucien T. Elliott wrote:
> pls allow me to comment though; freds worked right out of the box,
> and your did not!  the problem seems to be that you have either
> modified graphics.e or you have a more recent version ( i may
> have missd some update of it).
> but, your use of bkcolor and textcolor as variables (i suppose
> to save the text & bkg colors) result in unresolved references.
> which brings us to the real problem; if this language is growing
> (rightly so IMHO) from the includes, then we must be careful to
> notify one another of any changes to these common functions,
> and make them commonly available (sounds like an admin
> headache to me too).  also, how do we avoid conflict and possible
> disagreement over changes to common function?  we could end
> up with a mess as bad as the many flavors available for C...

OOPS! Sorry about that! I just forgot that at the time wrote that File
Search I modified graphics.e.  Here are the modifications:

global integer TextColor -- text_color last value
global integer BkColor   -- bk_color last value

TextColor =3D 7 -- default value
BkColor =3D 0   -- default value

global procedure text_color(color c)
-- set the foreground text color to c - text or graphics modes
-- add 16 to get blinking
    TextColor =3D c
    machine_proc(M_SET_T_COLOR, c)
end procedure

global procedure bk_color(color c)
-- set the background color to c - text or graphics modes
    BkColor =3D c
    machine_proc(M_SET_B_COLOR, c)
end procedure

This was done to enables me  to reset the color context when leaving
file search function. I like functions that restore the original context
on leaving.  But to restore original colors we need a mean to know their
origal values.

Jacques Desch=EAnes

P.S. I will be more carefull to stick to originals includes next time.

new topic     » goto parent     » topic index » view thread      » older message » newer message


Quick Links

User menu

Not signed in.

Misc Menu