コード例 #1
0
ファイル: iodjgpp.c プロジェクト: OrangeTide/fed
void term_reinit(int wait)             /* fixup after running other progs */
{
   struct text_info dat;

   gppconio_init();
   gettextinfo(&dat);

   if (dat.screenheight != screen_h) {
      _set_screen_lines(screen_h);
      gettextinfo(&dat);
      screen_h = dat.screenheight;
      screen_w = dat.screenwidth;
      mouse_init();
   }

   set_bright_backgrounds();

   if (wait) {
      clear_keybuf();
      gch();
   }

   __djgpp_set_ctrl_c(0);
   setcbrk(0);
}
コード例 #2
0
ファイル: unicon.cpp プロジェクト: bbonev/vslib
 int con_init()
 {
   gppconio_init();
   gettextinfo( &ti );
   original_ta = ti.attribute;
   return 0;
 }
コード例 #3
0
ファイル: gppconio.c プロジェクト: OS2World/APP-EDITOR-Vile
void textmode(int mode)
{
    union REGS regs;
    int mode_to_set = mode;
    if (mode == LASTMODE)
        mode = mode_to_set = txinfo.currmode;
    if (mode == C4350)
        /*
         * just set mode 3 and load 8x8 font, idea taken
         * (and code translated from Assembler to C)
         * form Csaba Biegels stdvga.asm
         */
        mode_to_set = 0x03;
    regs.h.ah = 0x00; /* set mode */
    regs.h.al = mode_to_set;
    int86(0x10, &regs, &regs);
    if (mode == C80 || mode == BW80 || mode == C4350)
    {
        if (isEGA())
        {
            /*
             * enable cursor size emulation, see Ralf Browns
             * interrupt list
             */
            regs.h.ah = 0x12;
            regs.h.bl = 0x34;
            regs.h.al = 0x00; /* 0: enable (1: disable) */
            int86(0x10, &regs, &regs);
	}
    }
    if (mode == C4350)
    {
        if (!isEGA())
            return;
        /* load 8x8 font */
        regs.x.ax = 0x1112;
        regs.x.bx = 0;
        int86(0x10, &regs, &regs);
    }
/*    _setcursortype(_NORMALCURSOR); */
    /* reinitialize txinfo structure to take into account new mode */
    gppconio_init();
#if 0
    /*
     * For mode C4350 the screen is not cleared on my OAK-VGA.
     * Should we clear it here? TURBOC doesn't so we don't bother either.
     */
    clrscr();
#endif
}