Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - fg_term http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                                 fg_term

   Usage
   #include <fg.h>
   void far fg_term(void);

   Description
   Close  display device. Display is returned to state it was  in  before
   the  call  to  fg_init. Do nothing if fg_init  was  never  called,  or
   fg_term  was already called without another intervening fg_init.  This
   is  so  that  panic-and-abort routines can reset back  to  text  mode,
   without regard to whether the display is in graphics mode or not.

   Example

   fg_term();
   /* Back to text mode. */

   Note
   Exit  from  the program automatically calls fg_term as  does  'control
   break'.  If this is not desired it is possible to bypass this  feature
   by  creating your own function and assigning it to fg_term_p  (fg_term
   function  pointer) AFTER fg_init has been called. Your  function  must
   return (not exit) but need not call the previous function assigned  to
   fg_term_p.

   Example

   #include <fg.h>

   int stay_in_graphics = 1;
   void (far *old_fg_term) (void);

   void far alt_fg_term(void)
   {
   if(stay_in_graphics)
   return;
   (*old_fg_term)();
   }

   int main(int argc, char *argv[])
   {
   fg_init();
   old_fg_term = fg_term_p;
   fg_term_p = alt_fg_term;


   return 0;
   }


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson