I see the variable filetype initialized to 0 in loadfile.c and there's a comment there saying that when 0 its for GIF files. Later in framain2.c, there's a comparison suggesting that values >= 1 are "old .tga format input file", where outline is assigned to outline16. Later, there's another check on this variable changing the argument to funny_glasses_call, with either gifview (filetype = 0) or tgaview (filetype != 0). However, there is nowhere in the code (.c or .asm) where filetype is assigned a value larger than 1. Is this dead code? This is the only place that tgaview appears to be refenced.
find "filetype" common\*.c dos\*.c dos\*.asm headers\*.h
---------- COMMON\3D.C ---------- COMMON\ANT.C ---------- COMMON\BIGFLT.C ---------- COMMON\BIGINIT.C ---------- COMMON\BIGNUM.C ---------- COMMON\BIGNUMC.C ---------- COMMON\CALCFRAC.C ---------- COMMON\CMDFILES.C ---------- COMMON\DECODER.C ---------- COMMON\DISKVID.C ---------- COMMON\EDITPAL.C ---------- COMMON\ENCODER.C char openfile[FILE_MAX_PATH], openfiletype[10]; strcpy(openfiletype, DEFAULTFRACTALTYPE); /* determine the file strcpy(openfiletype, ".pot"); strcpy(openfiletype, period); strcat(openfile, openfiletype); ---------- COMMON\EVOLVE.C ---------- COMMON\F16.C ---------- COMMON\FRACSUBR.C ---------- COMMON\FRACTALB.C ---------- COMMON\FRACTALP.C ---------- COMMON\FRACTALS.C ---------- COMMON\FRACTINT.C ---------- COMMON\FRAMAIN2.C else if(filetype >= 1) /* old .tga format input file */ if(filetype == 0) ---------- COMMON\FRASETUP.C ---------- COMMON\GIFVIEW.C ---------- COMMON\HCMPLX.C ---------- COMMON\HELP.C ---------- COMMON\HISTORY.C ---------- COMMON\INTRO.C ---------- COMMON\JB.C ---------- COMMON\JIIM.C ---------- COMMON\LINE3D.C if (filetype || pot16bit) /* don't truncate fractional ---------- COMMON\LOADFDOS.C ---------- COMMON\LOADFILE.C int filetype; filetype = 0; /* GIF */ ---------- COMMON\LOADMAP.C ---------- COMMON\LORENZ.C ---------- COMMON\LSYS.C ---------- COMMON\LSYSF.C ---------- COMMON\MEMORY.C ---------- COMMON\MISCFRAC.C ---------- COMMON\MISCOVL.C ---------- COMMON\MISCRES.C ---------- COMMON\MPMATH_C.C ---------- COMMON\PARSER.C ---------- COMMON\PARSERFP.C ---------- COMMON\PLOT3D.C ---------- COMMON\PRINTER.C ---------- COMMON\PROMPTS1.C ---------- COMMON\PROMPTS2.C ---------- COMMON\REALDOS.C ---------- COMMON\ROTATE.C ---------- COMMON\SLIDESHW.C ---------- COMMON\SOI.C ---------- COMMON\SOI1.C ---------- COMMON\STEREO.C ---------- COMMON\TARGA.C ---------- COMMON\TESTPT.C ---------- COMMON\TGAVIEW.C ---------- COMMON\YOURVID.C ---------- COMMON\ZOOM.C ---------- DOS\SOUND.C ---------- DOS\TPLUS.C ---------- DOS\UCLOCK.C ---------- DOS\BIGNUMA.ASM ---------- DOS\CALCMAND.ASM ---------- DOS\CALMANFP.ASM ---------- DOS\CALMANP5.ASM ---------- DOS\FPU087.ASM ---------- DOS\FPU387.ASM ---------- DOS\FR8514A.ASM ---------- DOS\FRACSUBA.ASM ---------- DOS\GENERAL.ASM ---------- DOS\HGCFRA.ASM ---------- DOS\LSYSA.ASM ---------- DOS\LSYSAF.ASM ---------- DOS\LYAPUNOV.ASM ---------- DOS\MPMATH_A.ASM ---------- DOS\NEWTON.ASM ---------- DOS\PARSERA.ASM ---------- DOS\TPLUS_A.ASM ---------- DOS\VIDEO.ASM ---------- HEADERS\BIG.H ---------- HEADERS\BIGINIT.H ---------- HEADERS\CMPLX.H ---------- HEADERS\DIALOG.H ---------- HEADERS\DOSPROT.H ---------- HEADERS\EXTERNS.H extern int filetype; ---------- HEADERS\FMATH.H ---------- HEADERS\FRACTINT.H ---------- HEADERS\FRACTYPE.H ---------- HEADERS\HELPCOM.H ---------- HEADERS\HELPDEFS.H ---------- HEADERS\LSYS.H ---------- HEADERS\MATHTOOL.H ---------- HEADERS\MPMATH.H ---------- HEADERS\PORT.H ---------- HEADERS\PROFILE.H ---------- HEADERS\PROTOTYP.H ---------- HEADERS\SELECT.H ---------- HEADERS\TARGA.H ---------- HEADERS\TARGA_LC.H ---------- HEADERS\TPLUS.H ---------- HEADERS\UCLOCK.H ---------- HEADERS\UNIX.H ---------- HEADERS\UNIXPROT.H ---------- HEADERS\WINFRACT.H ---------- HEADERS\WINPROT.H -- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download <http://www.xmission.com/~legalize/book/download/index.html> Legalize Adulthood! <http://blogs.xmission.com/legalize/>
Ha! I find in tgaview.c: /* 16 bit .tga files were generated for continuous potential "potfile"s from version 9.? thru version 14. Replaced by double row gif type file (.pot) in version 15. Delete this code after a few more revs. */ So yes, it appears that this is dead code. I will remove it. -- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download <http://www.xmission.com/~legalize/book/download/index.html> Legalize Adulthood! <http://blogs.xmission.com/legalize/>
participants (1)
-
Richard