Exemple #1
0
int main( int argc, char *argv[] )
//================================

//  Initialize graphics library and presentation graphics
//  system and then display several sample charts.

{
    int                 mode;

    if( argc == 2 ) {
        mode = atoi( argv[ 1 ] );
    } else {
        mode = _MAXRESMODE;
    }
    if( _setvideomode( mode ) == 0 ) {
        puts( "Cannot initialize video mode" );
        return( 1 );
    }
    _getvideoconfig( &vconfig );
    xmax = vconfig.numxpixels;
    ymax = vconfig.numypixels;
    xmid = xmax / 2;
    ymid = ymax / 2;
    _pg_initchart();
    simple_chart();
    press_key();
    _clearscreen( _GCLEARSCREEN );
    more_charts();
    press_key();
    _clearscreen( _GCLEARSCREEN );
    scatter_charts();
    press_key();
    _setvideomode( _DEFAULTMODE );
    return( 0 );
}
Exemple #2
0
void cwindow::onpagedown()
{       
	int		i, nmoverows = m_nmaxrows - m_nactiverow + m_nmaxrows;
	
	for(i = 0; i < nmoverows; i ++) //move to next page'end            
	{
		if(m_pitemactive->pnext == NULL) break;
		m_pitemactive = m_pitemactive->pnext;
	}   
	if(m_nactiverow + i <= m_nmaxrows)//this is last a page
	{          
		modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, TEXTCOLOR, BKCOLOR, m_nmaxcols);
		m_nactiverow += i;
		modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, SELCOLOR, WHITE, m_nmaxcols);
		return;
	}
	_settextwindow(m_nrow1 + 1, m_ncol1 + 1, m_nrow2 - 1, m_ncol2 - 1);
	_clearscreen(_GWINDOW);
	for(i = m_nmaxrows; i > 0; i --)//from next page'end to head outtext
	{   
		_settextposition(i, 2);
		_outtext(m_pitemactive->szitemtext);
		if(m_pitemactive->ppre != NULL) m_pitemactive = m_pitemactive->ppre;
	}                                 
	for(i = 0; i < m_nactiverow; i++) //modify pointer 
		m_pitemactive = m_pitemactive->pnext;
	modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, SELCOLOR, WHITE, m_nmaxcols);
	_settextwindow(1, 1, g_SysInfo.nmaxrows, g_SysInfo.nmaxcols);
}
Exemple #3
0
int main(int argc,char** argv) {
    int old_apage;
    int old_vpage;
    int new_apage;
    int new_vpage;
    struct videoconfig vc;
    int ret;
    if(argc==1) {
        cputs("用法:\n\tcread 文件名\n");
        return 0;
    }

//    set_video_mode(&vc);

//    ROWS=_setvideomoderows(_TEXTC80,_MAXTEXTROWS);
    _getvideoconfig(&vc);
    ROWS = vc.numtextrows;
    COLS = vc.numtextcols;

    old_apage = _getactivepage();
    old_vpage = _getvisualpage();
    if(vc.numvideopages>1) {
        if(old_apage >=1) {
            new_apage = 0;
        }
        else {
            new_apage = 1;
        }
    }
    else {
        new_apage = old_apage;
    }

    if(old_apage != new_apage) {
        _setvisualpage(new_apage);
        _setactivepage(new_apage);
        _clearscreen(_GCLEARSCREEN);
    }

    print_videoconfig(&vc);
    OUT_PRINTF_BEGIN
        "old_visualpage=%d\nold_active_page=%d\n",
        old_vpage,
        old_apage
    OUT_PRINTF_END
    new_vpage = _getvisualpage();
    new_apage = _getactivepage();
    OUT_PRINTF_BEGIN
        "new_visualpage=%d\nnew_active_page=%d\n",
        new_vpage,
        new_apage
    OUT_PRINTF_END

    ret = process(argc,argv); 

    _setactivepage(old_apage);
    _setvisualpage(old_vpage);
//  _setvideomode( _DEFAULTMODE );
    return ret;
}
Exemple #4
0
void cwindow::onpageup()
{       
	int		i, nmoverows = m_nactiverow - 1 + m_nmaxrows;
	 
	for(i = 0; i < nmoverows; i ++) //move to pre page'head            
	{
		if(m_pitemactive->ppre == NULL) break;
		m_pitemactive = m_pitemactive->ppre;
	}   
	if(m_nactiverow - i == 1)//this is first page 
	{          
		modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, TEXTCOLOR, BKCOLOR, m_nmaxcols);
		m_nactiverow = 1;
		modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, SELCOLOR, WHITE, m_nmaxcols);
		return;
	}
	_settextwindow(m_nrow1 + 1, m_ncol1 + 1, m_nrow2 - 1, m_ncol2 - 1);
	_clearscreen(_GWINDOW);
	for(i = 1; i <= m_nmaxrows; i ++)//from pre page'head to end outtext 
	{   
		_settextposition(i, 2);
		_outtext(m_pitemactive->szitemtext);
		if(m_pitemactive->pnext != NULL) 
			m_pitemactive = m_pitemactive->pnext;
	}                                 
	for(i = 0; i <= m_nmaxrows - m_nactiverow; i++) //modify pointer 
		m_pitemactive = m_pitemactive->ppre;
	modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, SELCOLOR, WHITE, m_nmaxcols);
	_settextwindow(1, 1, g_SysInfo.nmaxrows, g_SysInfo.nmaxcols);
}
Exemple #5
0
void displayEditRoomCheckMenu(void)
{
  char strn[4096];


  _clearscreen(7, 0);

  _settextposition(1, 1);
  _settextcolor(7);
  _setbkcolor(0);

  sprintf(strn,
"&+gEditing room checking options\n"
"\n"
"   &+YA&+L.&n &+wCheck for 'stranded' rooms/rooms with no exits in/out?    %s&n\n"
"   &+YB&+L.&n &+wCheck for missing/extraneous keys?                        %s&n\n"
"   &+YC&+L.&n &+wCheck for rooms with illegal values/no descs?             %s&n\n"
"   &+YD&+L.&n &+wCheck for exits with illegal values?                      %s&n\n"
"   &+YE&+L.&n &+wCheck for exits with no descriptions?                     %s&n\n"
"\n"
" &+YY/Z&+L.&n &+wTurn all room check options off/on\n"
"\n"
MENU_COMMON
"\n"
"%s",
             getYesNoStrn(getCheckLoneRoomVal()),
             getYesNoStrn(getCheckMissingKeysVal()),
             getYesNoStrn(getCheckRoomVal()),
             getYesNoStrn(getCheckExitVal()),
             getYesNoStrn(getCheckExitDescVal()),

             getMenuPromptName());

  displayColorString(strn);
}
Exemple #6
0
void main()
{   // initialize an organism, and then begin evolution
    // initialize video mode
    _setvideomode(_MAXRESMODE);
    _getvideoconfig(&vc);

    // set the special memory handler
    _set_new_handler(free_memory);

    // seed random number generator
    srand((unsigned)time(NULL));

    //CFile treeFile;
    //if (treeFile.Open("TREE.DAT", CFile::modeRead))
    //{   // file exists, so deserialize
    //CArchive treeArc(&treeFile, CArchive::load);
    //FoundingFather.Serialize(treeArc);
    //treeArc.Close();
    //treeFile.Close();
    //};  // if

    //FoundingFather.Dump(afxDump);
    FoundingFather.evolve();

    //if (treeFile.Open("TREE.DAT", CFile::modeCreate | CFile::modeWrite))
    //{   // now serialize the family tree
    //CArchive treeArc(&treeFile, CArchive::store);
    //FoundingFather.Serialize(treeArc);
    //treeArc.Close();
    //treeFile.Close();
    //};  // if

    _clearscreen(_GCLEARSCREEN);
    _setvideomode(_TEXTC80);
};  // void main()
Exemple #7
0
void show()
{
  _clearscreen(0);
  for (i=von; i<bis; i++)
    if(strchr(zeile[i],0x09)!=NULL) printf("<tab> %s",zeile[i]);
      else printf("%s",zeile[i]);
}
/* do list of questions for forward chaining */
void do_quest_menu(void)
{
	int choice, q, ctr;

	do
		{
		ctr = 0;
		_clearscreen(_GCLEARSCREEN);
		printf("\tQuestion Menu\n\n\n");
		for (q = 0; q < MAX_QUESTIONS; q++)
			{
			if (!its_empty(get_qb_id(q)))
				{
				printf("\t\t%d) %s   current value is %s\n",
					  q+1, get_qb_id(q), get_value(get_qb_id(q)));
				ctr++;
				}
			}
		printf("\t\t%d) Return to main menu\n\n", ctr+1);
		printf("\tSelect a question : ");
		scanf("%d", &choice);
		}
	while (choice <= 0 || choice > ctr+1);
	if (choice == ctr+1)
		return; /* return to main question menu */
	else
		do_question_forward(--choice); /* otherwise ask the question */
}
/* display options for the reset menu and do validation on the input */
void do_reset_menu(void)
{
	int choice;

	_clearscreen(_GCLEARSCREEN);
	printf("\tReset options\n\n");
	printf("\t\t1) Reset database and agenda\n");
	printf("\t\t2) Reset agenda\n");
	printf("\t\t3) Reset database\n");
	printf("\t\t4) Return to main menu\n\n");
	printf("\tEnter an option : ");
	scanf("%d", &choice);

	switch(choice)
		{
		case 1:
			reset_agenda_and_database();
			break;
		case 2:
			reset_agenda();
			break;
		case 3:
			reset_database();
			break;
		case 4:
			return;
		}
}
Exemple #10
0
void browse()
{
  status();
  while (c!=0x1B) {
    c=getch();
    switch(c)
    {
      case PGDOWN :{
		     von=bis; bis=bis+24;
		     if(bis>=ges) { von=ges-24; bis=ges; }
		     show();
		   } break;
      case PGUP   :{
		     if(bis==ges) { bis=ges-24; von=bis-24; }
		       else von=von-24; bis=bis-24;
		     if(von<1) { von=1; bis=24; }
		     show();
		   } break;
      case DOWN   :{
		     von++; bis++;
		     if (bis>=ges) { bis=ges; von=ges-25; }
		     show();
		   } break;
      case UP     :{
		     von--; bis--;
		     if (von<=1) { von=1; bis=25; }
		     show();
		   }  break;
      case ESC    :{ _clearscreen(0); quit(); }
    }
    status();
  }
}
Exemple #11
0
void draw_color_table() {
	_clearscreen(_GCLEARSCREEN);

	for (unsigned int c = 0; c < 256; ++c) {
		_setcolor(c);
		int x = (c % 16) * 10;
		int y = (c >> 4) * 10;
		_rectangle(_GFILLINTERIOR, x, y, x+10, y+10);
	}
}
Exemple #12
0
void displayEditDisplayMenu(void)
{
  char strn[4096];


  _clearscreen(7, 0);

  _settextposition(1, 1);
  _settextcolor(7);
  _setbkcolor(0);

  sprintf(strn,
"&+gEditing display options\n"
"\n"
"   &+YA&+L.&n &+wInterpret Diku color codes?                               %s&n\n"
"   &+YB&+L.&n &+wDisplay Diku color codes?                                 %s&n\n"
"\n"
"   &+YC&+L.&n &+wShow room 'extra info' (sector type and flags)?           %s&n\n"
"   &+YD&+L.&n &+wShow room vnum after room name?                           %s&n\n"
"   &+YE&+L.&n &+wShow exit flags after exit name?                          %s&n\n"
"   &+YF&+L.&n &+wShow exit room vnum dest after exit name?                 %s&n\n"
"\n"
"   &+YG&+L.&n &+wShow object flags info before name?                       %s&n\n"
"   &+YH&+L.&n &+wShow object vnum after object name?                       %s&n\n"
"\n"
"   &+YI&+L.&n &+wShow mob flags info before name?                          %s&n\n"
"   &+YJ&+L.&n &+wShow mob default pos after name?                          %s&n\n"
"   &+YK&+L.&n &+wShow mob vnum after mob name?                             %s&n\n"
"   &+YL&+L.&n &+wShow mobs following/riding/ridden by others?              %s&n\n"
"\n"
" &+YY/Z&+L.&n &+wTurn all vnum/extra info display options off/on\n"
"\n"
MENU_COMMON
"\n"
"%s",
             getYesNoStrn(getInterpColorVal()),
             getYesNoStrn(getShowColorVal()),

             getYesNoStrn(getShowRoomExtraVal()),
             getYesNoStrn(getShowRoomVnumVal()),
             getYesNoStrn(getShowExitFlagsVal()),
             getYesNoStrn(getShowExitDestVal()),

             getYesNoStrn(getShowObjFlagsVal()),
             getYesNoStrn(getShowObjVnumVal()),

             getYesNoStrn(getShowMobFlagsVal()),
             getYesNoStrn(getShowMobPosVal()),
             getYesNoStrn(getShowMobVnumVal()),
             getYesNoStrn(getShowMobRideFollowVal()),

             getMenuPromptName());

  displayColorString(strn);
}
Exemple #13
0
void displayEditConfigMenu(void)
{
  char strn[2048];


  _clearscreen(7,0);

  _settextposition(1, 1);

  sprintf(strn,
"&n&+gEditing miscellaneous config options\n"
"\n"
"   &+YA&+L.&n &+wCheck all vnums and vnum input to make sure they exist?   %s&n\n"
"   &+YB&+L.&n &+wUpon loading, check all .WLD zone flags vs. .ZON numb?    %s&n\n"
"\n"
"   &+YC&+L.&n &+wShow extra info about entity being edited on menus?       %s&n\n"
"   &+YD&+L.&n &+wEnable 'create room as you walk' creation?                %s&n\n"
"   &+YE&+L.&n &+wSave vnum of current room for reentrance when reloading?  %s&n\n"
"   &+YF&+L.&n &+wConsider exits with destinations of -1 out of zone?       %s&n\n"
"   &+YG&+L.&n &+wShow shop prices adjusted for mob's sell percentage?      %s&n\n"
"   &+YH&+L.&n &+wAutomatically save zone based on 'save when' below?       %s&n\n"
"   &+YI&+L.&n &+wIf autosave is on, save every X commands ...              %u&n\n"
"\n"
"   &+YJ&+L.&n &+wScreen height                                             %u&n\n"
"   &+YK&+L.&n &+wScreen width                                              %u&n\n"
"\n"
"   &+YL&+L.&n &+wExternal desc editor - '%s'&n\n"
"   &+YM&+L.&n &+wMenu prompt - '%s'&n\n"
"   &+YN&+L.&n &+wMain prompt - '%s'&n\n"
"\n"
MENU_COMMON
"\n"
"%s",
             getYesNoStrn(getVnumCheckVal()),
             getYesNoStrn(getCheckZoneFlagsVal()),

             getYesNoStrn(getShowMenuInfoVal()),
             getYesNoStrn(getWalkCreateVal()),
             getYesNoStrn(getStartRoomActiveVal()),
             getYesNoStrn(getNegDestOutofZoneVal()),
             getYesNoStrn(getShowPricesAdjustedVal()),
             getYesNoStrn(getSaveEveryXCommandsVal()),
             getSaveHowOftenVal(),

             getScreenHeight(),
             getScreenWidth(),

             getEditorName(),
             getMenuPromptName(),
             getMainPromptStrn(),

             getMenuPromptName());

  displayColorString(strn);
}
Exemple #14
0
void
main (void)
{
  /* reset colors, and exit */

  _settextcolor (_WHITE_);
  _setbkcolor (_BLACK_);
  _clearscreen (_GCLEARSCREEN);

  exit (0);
}
/* Print consequences of all fired rules */
void print_results(void)
{
	register int i;
	char c;

	_clearscreen(_GCLEARSCREEN);
	for (i = 0; i < RULE_NUM; i++)
		if (get_rb_fire_flag(i))
			print_cons(i);
	printf("\n\t============Press a key to continue===============");
	c = getch();
}
Exemple #16
0
void main()
{
  _clearscreen(0);
  code();
  prg="\\stoma\\sprg.exe"; cfgprg="\\stoma\\stcfg.exe";
  err=spawnl(P_WAIT, prg, prg, "n",NULL);
  if (err!=0)
  {
    error("Datenbank-Manager \"sprg.exe\" kann nicht ausgef�hrt\
 werden!",1);
    exit(errno);
  }
Exemple #17
0
char showprogresswin()
{
	char	str[256];
	char	*szMethod[] = {"overwrite with 00","overwrite with FF",
						"random data","NSA method",
						"Old NSA method","DoD STD method",
						"NATO method","Gutmann method"};
	
	_setvisualpage(PAGE_PROGRESS);  
	_setactivepage(PAGE_PROGRESS);
    
    drawbox(1, 1, g_SysInfo.nmaxrows, g_SysInfo.nmaxcols);

	_settextposition(7, 4);
	sprintf(str,"Delete Method : %s",szMethod[g_nMethod]);
	_outtext(str);

	_settextposition(7, 6+strlen(str)); 
	if (g_bBeepOff)
		sprintf(str,"Beep Status : Off");
	else
		sprintf(str,"Beep Status : On");
	_outtext(str);
	
    drawbox(11, 4, 13, g_SysInfo.nmaxcols - 3);
	              
	_settextposition(12,6 );     
	charstostr(str,PROGRESS_CHAR,g_SysInfo.nmaxcols - 10);
	_outtext(str); 
	if(deletecontent())
	{
		_clearscreen(_GCLEARSCREEN);
	    return 's';
	}
	else
	{
		_clearscreen(_GCLEARSCREEN);
		return 'e';
	}
}
/* print out the options for the main menu */
void main_menu(void)
{
	_clearscreen(_GCLEARSCREEN);
	printf("\tMain Menu\n\n\n");
	printf("\t\t1) Questions\n");
	printf("\t\t2) Forward chain\n");
	printf("\t\t3) Backward chain\n");
	printf("\t\t4) Examine rule base\n");
	printf("\t\t5) Examine data base\n");
	printf("\t\t6) Examine inferred data\n");
	printf("\t\t7) Reset options\n");
	printf("\t\t8) Quit\n\n");
	printf("\tEnter your choice : ");
}
Exemple #19
0
void main()
{
   short i, len;
   char tmp[10];

   _clearscreen( _GCLEARSCREEN );
   for( i = 0; i < 256; i++ )
   {
      _settextposition( (short)((i % 24) + 1), (short)((i / 24) * 7) );
      len = (short)sprintf( tmp, "%3d %c", i, i );
      _outmem( tmp, len );
   }
   _settextposition( 24, 1 );
}
Exemple #20
0
void displayEditObjTrapInfoMenu(const dikuObject *obj)
{
  char strn[256], newName[256], *outStrn = new char[2048];


  _clearscreen(7, 0);

  if (!outStrn)
  {
    _outtext("\n\nError allocating outStrn in displayblah()...\n\n");

    return;
  }

  _settextposition(1, 1);
  _settextcolor(7);
  _setbkcolor(0);

  fixObjName(obj->objShortName, newName);

  sprintf(strn, "&+gEditing trap info for obj #&+c%u&+w, &+L\"&n%s&+L\"&n\n\n",
          obj->objNumber, newName);

  displayColorString(strn);

  sprintf(outStrn,
"   &+YA&+L.&n &+wTrap affect flag (0 = no trap)    %u (%s)&n\n"
"\n"
"   &+YB&+L.&n &+wTrap damage type/effect           %d (%s)&n\n"
"   &+YC&+L.&n &+wNumber of charges (-1 = infinite) %d&n\n"
"\n"
"   &+YD&+L.&n &+wTrap level                        %u&n\n"
"   &+YE&+L.&n &+wPercentage chance of setting off  %d&n\n"
"\n"
MENU_COMMON
"\n"
"%s",
                   obj->trapAff, getObjTrapAffStrn(obj->trapAff, newName),
                   obj->trapDam, getObjTrapDamStrn(obj->trapDam),
                   obj->trapCharge,
                   obj->trapLevel,
                   obj->trapPercent,

                   getMenuPromptName());

  displayColorString(outStrn);

  delete[] outStrn;
}
Exemple #21
0
void main()
{
  _clearscreen(0);
  for (i=0; i<8; i++)
  {
    _settextcolor(i);
    _outtext("FARBTEST!\n");
  }
  _settextwindow(1,10,25,80);
  for (i=8; i<16; i++)
  {
    _settextcolor(i);
    _outtext("FARBTEST!\n");
  }
}
Exemple #22
0
short _SetRows( short rows )
/*==========================

    This function has no effect on Windows.  It only re-initializes
    the variable states. */
{
    _ErrorStatus = _GROK;
    _InitState();           // read the current machine state
    rows = rows;
    _clearscreen( _GCLEARSCREEN );
    _Tx_Row_Min = 0;                            // text window is now
    _Tx_Col_Min = 0;                            // the full screen
    _Tx_Row_Max = _CurrState->vc.numtextrows - 1;
    _Tx_Col_Max = _CurrState->vc.numtextcols - 1;
    _TextPos.row = 0;                           // set mode function
    _TextPos.col = 0;                           // sets position to 0,0
    return( 0 );
}
Exemple #23
0
void displayEditShopBooleansMenu(shop *shp, const char *mobName,
                                 const long mobNumb)
{
  char newName[256], *strn;


  strn = new char[4096];
  if (!strn)
  {
    _outtext("\n\nout of memory - cannot alloc strn in displayEditShopBooleansMenu\n\n");
    return;
  }

  _clearscreen(7, 0);

  _settextposition(1, 1);
  _settextcolor(7);
  _setbkcolor(0);

  fixMobName(mobName, newName);

  sprintf(strn, "&+gEditing shop toggles for mob #&+c%d&+w, &+L\"&n%s&+L\"&n\n\n",
          mobNumb, newName);

  displayColorString(strn);

  sprintf(strn,
  "   &+YA&+L.&n &+wDoes shop roam?                            %s\n"
  "   &+YB&+L.&n &+wIs shop's room NO_MAGIC?                   %s\n"
  "   &+YC&+L.&n &+wAllow shopkeeper to be killed?             %s\n"
  "\n"
  MENU_COMMON
  "\n"
  "%s", getYesNoStrn(shp->roaming),
        getYesNoStrn(shp->noMagic),
        getYesNoStrn(shp->killable),

        getMenuPromptName());

  displayColorString(strn);

  delete[] strn;
}
Exemple #24
0
void cwindow::onctrl_home()
{           
	int	i;
	
	_settextwindow(m_nrow1 + 1, m_ncol1 + 1, m_nrow2 - 1, m_ncol2 - 1);
	_clearscreen(_GWINDOW);   
	m_pitemactive = m_pitemhead;
	for(i = 1; i <= m_nmaxrows; i ++)
	{                
		if(i > m_nitemcount) break;
		_settextposition(i, 2);
		_outtext(m_pitemactive->szitemtext);
		if(m_pitemactive->pnext != NULL) 
			m_pitemactive = m_pitemactive->pnext;
	}                                 
	m_pitemactive = m_pitemhead;
	m_nactiverow = 1;
	modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, SELCOLOR, WHITE, m_nmaxcols);
	_settextwindow(1, 1, g_SysInfo.nmaxrows, g_SysInfo.nmaxcols);
}
Exemple #25
0
void build_popup_menu()
{
  mpkt[1]=" Neuen Patienten aufnehmen               ";
  mpkt[2]=" Alle Patientendaten vollst�ndig anzigen ";
  mpkt[3]=" Alle Namen anzeigen                     ";
  mpkt[4]=" Suchen von Daten                        ";
  mpkt[5]=" �ndern von Eintr�gen                    ";
  mpkt[6]=" Patient aus Datei l�schen               ";
  mpkt[7]=" Gel�schten Patienten wieder zur�ckrufen ";
  mpkt[8]=" Besuchsdaten eingeben                   ";
  mpkt[9]=" Besuchsdaten ansehen                    ";
  mpkt[10]=" Besuchsdaten �ndern                    ";
  mpkt[11]=" Bericht �ber Patient verfassen         ";
  mpkt[12]=" Bericht ansehen                        ";
  mpkt[13]=" Drucken                                ";
  mpkt[14]=" Konfiguration �ndern                   ";
  mpkt[15]=" Ende                                   ";
  PAINT=1;
  _clearscreen(0);
}
/* print out the data base */
void examine_d_base(void)
{
	register int i;
	char c;

	_clearscreen(_GCLEARSCREEN);
	for (i = 0; i < SIZE_OF_DB; i++)
		{
		if (!its_empty(get_db_id(i)))
			{
			printf("data base item %d ", i+1);
			printf("%s %s", get_db_id(i), get_db_val(i));
			if (get_db_question_flag(i))
				printf("     User supplied\n");
			else
				printf("     Inferred data\n");
			}
		}
	printf("\n\t============Press a key to continue================");
	c = getch();
}
Exemple #27
0
void drawTree(int leftBranch, int midBranch, int rightBranch)
{   // draws a tree on the screen
    _clearscreen(_GCLEARSCREEN);
    _setcolor(15);
    _setlinestyle(0xAAAA);
    _moveto(vc.numxpixels/2, vc.numypixels);
    _lineto(vc.numxpixels/2, vc.numypixels*3/4);
    _lineto(vc.numxpixels/6, vc.numypixels/3);
    _moveto(vc.numxpixels/2, vc.numypixels*3/4);
    _lineto(vc.numxpixels/2, vc.numypixels/4);
    _moveto(vc.numxpixels/2, vc.numypixels*3/4);
    _lineto(vc.numxpixels*5/6, vc.numypixels/3);
    if (leftBranch)
    {   _moveto(vc.numxpixels/6, vc.numypixels/3);
        _lineto(vc.numxpixels/18, 0);
        _moveto(vc.numxpixels/6, vc.numypixels/3);
        _lineto(vc.numxpixels*3/18, 0);
        _moveto(vc.numxpixels/6, vc.numypixels/3);
        _lineto(vc.numxpixels*5/18, 0);
    };  // if
    if (midBranch)
    {   _moveto(vc.numxpixels/2, vc.numypixels/4);
        _lineto(vc.numxpixels*7/18, 0);
        _moveto(vc.numxpixels/2, vc.numypixels/4);
        _lineto(vc.numxpixels*9/18, 0);
        _moveto(vc.numxpixels/2, vc.numypixels/4);
        _lineto(vc.numxpixels*11/18, 0);
    };  // if
    if (rightBranch)
    {   _moveto(vc.numxpixels*5/6, vc.numypixels/3);
        _lineto(vc.numxpixels*13/18, 0);
        _moveto(vc.numxpixels*5/6, vc.numypixels/3);
        _lineto(vc.numxpixels*15/18, 0);
        _moveto(vc.numxpixels*5/6, vc.numypixels/3);
        _lineto(vc.numxpixels*17/18, 0);
    };  // if
};  // drawTree
Exemple #28
0
void cwindow::onctrl_end()
{
	int	i, j;
	
	_settextwindow(m_nrow1 + 1, m_ncol1 + 1, m_nrow2 - 1, m_ncol2 - 1);
	_clearscreen(_GWINDOW);   
	m_pitemactive = m_pitemend;
	for(i = 1; i < m_nmaxrows; i ++)
	{
		if(m_pitemactive->ppre == NULL) break;
		m_pitemactive = m_pitemactive->ppre;   
	}
	for(j = 1; j <= i; j ++)//from next page'end to head outtext
	{   
		_settextposition(j, 2);
		_outtext(m_pitemactive->szitemtext);
		if(m_pitemactive->pnext != NULL) 
			m_pitemactive = m_pitemactive->pnext;
	}                                 
	m_pitemactive = m_pitemend;
	m_nactiverow = i;
	modifyattrib(m_npage, m_nactiverow + m_nrow1, 1 + m_ncol1, SELCOLOR, WHITE, m_nmaxcols);
	_settextwindow(1, 1, g_SysInfo.nmaxrows, g_SysInfo.nmaxcols);
}
Exemple #29
0
void bild()
{
char datum[9], zeit[9], s[80];
  MFORE=WHITE; MBACK=BLUE;
  _clearscreen(0);
  for(i=0;i<80;i++) printf("-");
  colored(); _settextposition(2,1);
  for(i=0;i<14;i++)
  {
    sprintf(s,"%c",0xf9);
    _outtext(s);
  }
  sprintf(s,"STOMA%cVersion%c%1.1f%c-%cCopyright%c(C)%c1993,94%cRalf%cBensmann\
",0xf9,0xf9,stoma_ver,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9);
  _outtext(s);
  for(i=0;i<11;i++) { sprintf(s,"%c",0xf9); _outtext(s); }
  uncolored();
  for(i=0;i<80;i++) printf("-");
  _strdate(datum); _strtime(zeit);
  _settextposition(6,1); printf("Datum: %s",datum);
  _settextposition(6,67); printf("Zeit: %s",zeit);
  _settextposition(7,1); printf("MS-DOS: %s",dosversion());
  MFORE=WHITE; MBACK=RED;
}
Exemple #30
0
void LT_GraphicsClearScreen (void)
{
    _clearscreen (_GCLEARSCREEN);
}