www.pudn.com > sfalic-03-src.rar.rar > taskparams.c


#include "taskparams.h" 
#include "cdfpred.h" 
#include "cdfstat.h" 
#include "cfamily.h" 
#include "exitit.h" 
#include "str.h" 
#include "ceillog2.h" 
 
#include  
 
int	echo=0,				/* komentarz do zmiennych globalnych w taskparams.h */ 
	f_compress, 
	noheader=0, 
	decoronly=0, 
	generic8bpp=0;	 
 
char * infilename, 
	 * outfilename; 
 
int width,	 
	height,	 
	bpp;	 
 
int pred=DEFpred,	 
	evol=DEFevol, 
	trigger=DEFtrigger, 
	maxclen=DEFmaxclen, 
	wmistart=DEFwmistart, 
	wmimax=DEFwmimax, 
	wminext=DEFwminext; 
 
 
void printparams() 
{ 
	printf("\necho=%d", echo); 
	printf("\nf_compress=%d", f_compress); 
	printf("\nnoheader=%d", noheader); 
	printf("\ndecoronly=%d", decoronly); 
	printf("\ngeneric8bpp=%d", generic8bpp); 
	printf("\ninfilename=%s", infilename); 
	printf("\noutfilename=%s", outfilename); 
	printf("\nSFALICVERSION=%d", SFALICVERSION); 
	printf("\nwidth=%d", width); 
	printf("\nheight=%d", height); 
	printf("\nbpp=%d", bpp); 
	printf("\npred=%d", pred); 
	printf("\nevol=%d", evol); 
	printf("\ntrigger=%d", trigger); 
	printf("\nmaxclen=%d", maxclen); 
	printf("\nwmistart=%d", wmistart); 
	printf("\nwmimax=%d", wmimax); 
	printf("\nwminext=%d", wminext); 
} 
 
 
void testparams() 
{ 
	if ( width<0 || width>IMG_MAX_DIM ) 
		exitit("width<0 || width>" STR(IMG_MAX_DIM), 1); 
	if ( height<0 || height>IMG_MAX_DIM ) 
		exitit("height<0 || height>" STR(IMG_MAX_DIM), 1); 
	if ( bpp<0 || bpp>IMG_MAX_bpp ) 
		exitit("bpp<0 || bpp>" STR(IMG_MAX_bpp), 1); 
 
	if ( predMAXpred ) 
		exitit("predMAXpred", 1); 
	if ( evolMAXevol ) 
		exitit("evolMAXevol", 1); 
	if ( triggerMAXtrigger ) 
		exitit("triggerMAXtrigger", 1); 
	if ( trigger%10 )	/* ! */ 
		exitit("trigger%10", 1); 
	if ( maxclen<=bpp || maxclen>MAXmaxclen ) 
		exitit("maxclen<=bpp || maxclen>MAXmaxclen", 1); 
	if ( wmistartwmimax ) 
		exitit("wmistartwmimax", 1); 
	if ( wminextMAXwminext ) 
		exitit("wminextMAXwminext", 1); 
	if ( 1<