This thesis contains program coding module for generation logics test by Boolean gap

Delphi & Pascal (česká wiki)
Přejít na: navigace, hledání
Category: Programs in C, C++

Program: Prac_ndf.cBooldif.zip
File exe: Booldif.exe
need: Adresar.cColor.cDerivac.cError.cFunkcie.cHelp.cKey.cLine_edi.cMain.cMenu.cObsluha.cOkno.cPrac_ndf.cSlovnik.cSlov_fon.cStatist.cUtil.cVideo.cVystupy.cAdresar.hColor.hDefine.hError.hFunkcie.hGlob.hKey.hLine_edi.hMbooldif.hMenu.hOkno.hSlov_fon.hUtil.hVideo.h
Example: Example.zipBin_10_o.ndfBin_10_o.ndfBin_1and.ndfBin_2rad.ndfBin_3rad.ndfBin_4rad.ndfHard.ndfI_reg_lo.ndfReg_jk.ndfScitac_s.ndfScp_1rad.ndfScp_2rad.ndfScp_2r_1.ndfScp_3rad.ndfScp_4r_2.ndfScp_6r_3.ndfScp_8r_4.ndfSc_1r_pj.ndfSc_1r_sj.ndfSc_1_aoi.ndfSc_2r_4.ndfSc_3r_6.ndfSc_7400n.ndfSc_aon.ndfSimp3_a.ndfSimp3_b.ndfSimp4_a.ndfSimp4_b.ndfSimp4_c.ndfSimp6_a.ndfTest_vod.ndfZle.ndf
Manual: Prirucky.zip

This thesis contains program coding module for generation logics test by Boolean gap. Compile vector of fault for existent circuit, forth about all boughs herself chauffeur. Results is absolute gauge. Program application enables four modes It is implemented in the C programming language for the operating system MS-DOS, or another compatible with it. The program is suitable for an interactive way to communicate with the user, allowing a comfortable working environment are similar to Turbo Vision.
/*****************************************************************************
*								             *
*                             Subor HELP.C                                   *
*									     *
*****************************************************************************/
 
#include <stdlib.h>
 
#include "glob.h"
#include "key.h"
#include "menu.h"
#include "video.h"
#include "okno.h"
 
//************************************************************************//
// HELP                                                                   //
//                                                            30.10.1997  //
//************************************************************************//
 
void help(char *help)
{
 register int i,j;
 char ret1[]={' ',24,' ',' ','\0'};
 char ret2[]={' ',24,25,' ','\0'};
 char ret3[]={' ',' ',25,' ','\0'};
 char *p;
 int rx,ry;
 int zx,zy;
 int koniec=0;
 int zaciatok=0;
 int pocet_riadkov=0;
 int max;
 
 if(help==NULL)
	return;
 p=help;
 rx=0;
 while(1)
	{
	max=0;
	while(*p!='\n' && *p!='\0')
		{
		p++;
		max++;
		}
	if(rx<max)
		rx=max;
	pocet_riadkov++;
	if(*p=='\0')
		break;
	else
		p++;
	}
 pocet_riadkov++;
 rx+=2;
 if(rx>=_stlpcov-3)
	rx=_stlpcov-3;
 if(pocet_riadkov>=_riadkov-5)
	ry=_riadkov-5;
 else
	ry=pocet_riadkov;
 zx=(_stlpcov-rx)/2;
 zy=(_riadkov-ry)/2;
 vypni_kurzor();
 if(otvor_okno(zx,zy,zx+rx,zy+ry,atributy[20],atributy[21],1)!=TRUE)
	return;
 tlac_retazec(_stlpcov/2-4,zy,atributy[21]," POMOC ");
 rx-=2;
 ry-=2;
 pocet_riadkov-=2;
 tlac_riadok_help(" ~PgUp strana hore  ~PgDn strana dole  ~ posun  ~ESC,ENTER n vrat",atributy[4],atributy[5]);
 while(!koniec)
	{
	if(ry<pocet_riadkov)
		{
		if(zaciatok==0)
			tlac_retazec(zx+rx-6,zy+ry+1,atributy[21],ret3);
 
		else
			{
			if(zaciatok+ry>=pocet_riadkov)
				tlac_retazec(zx+rx-6,zy+ry+1,atributy[21],ret1);
			else
				tlac_retazec(zx+rx-6,zy+ry+1,atributy[21],ret2);
			}
		}
	i=0;
	p=help;
	for(i=0;i<zaciatok;i++)
		while(*p++!='\n');
	i=0;
	while(i<ry)
		{
		if(zaciatok+i>=pocet_riadkov)
			break;
		j=0;
		while(*p!='\n' && *p!='\0')
			if(j>=rx)
				break;
			else
				{
				tlac_znak(zx+1+j,zy+1+i,atributy[20],*p);
				p++;
				j++;
				}
		while(j<rx)tlac_znak(zx+1+j++,zy+1+i,atributy[20],' ');
		i++;
		p++;
		}
	while(i<ry)
		{
		j=0;
		while(j<rx)tlac_znak(zx+1+j++,zy+1+i,atributy[20],' ');
		i++;
		}
	switch(key())
		{
		case ESC:
		case ENTER:
			zatvor_okno1();
			return;
		case UP:
			if(zaciatok>0)
				zaciatok--;
			break;
		case DOWN:
			if(zaciatok+ry<pocet_riadkov)
				zaciatok++;
			break;
		case PGUP:
			if(zaciatok>ry)
				zaciatok-=ry;
			else
				zaciatok=0;
			break;
		case PGDOWN:
			if(zaciatok+ry<pocet_riadkov)
				zaciatok+=ry;
			break;
		case HOME:
			zaciatok=0;
			break;
		case END:
			zaciatok=pocet_riadkov-ry;
			break;
		}
	}
}
 
 
/*---------------------------------END--------------------------------------*/