[8192] in Athena Bugs

home help back first fref pref prev next nref lref last post

rt 7.2R: hc

daemon@ATHENA.MIT.EDU (web@ATHENA.MIT.EDU)
Fri Sep 13 21:08:07 1991

From: web@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Fri, 13 Sep 91 21:08:21 EDT

System name:		portnoy
Type and version:	RTPC-ROMPC 7.2R (1 update(s) to same version)
Display type:		apa16

What were you trying to do?
	Compile a program.  It's a C++ file.

What's wrong:
	the c file created by C++ is incorrectly compiled by hc.
	the c translated output is included below.  The error comes in
after the line:
#line 332 "../../InterViews/tiff.c"


the output assembly has a move register:

	mr	cc,r3


so the assembler complains because cc isn't a register.


Please describe any relevant documentation references:


c output source here:

#line 1 "../../InterViews/tiff.c"

/* <<AT&T C++ Translator 2.0 06/30/89>> */
/* < ../../InterViews/tiff.c > */

#line 1 "../../InterViews/tiff.c"
void *__vec_new (void *, int , int , void *);

#line 1 "../../InterViews/tiff.c"
void __vec_delete (void *, int , int , void *, int , int );
typedef int (*__vptp)();
struct __mptr {short d; short i; __vptp f; };

#line 1 "../../InterViews/tiff.c"

#line 36 "../../../.././src/include/InterViews/boolean.h"
typedef unsigned int boolean ;

#line 38 "../../../.././src/include/InterViews/boolean.h"

#line 39 "../../../.././src/include/InterViews/boolean.h"
struct ivResource;
#line 39 "../../../.././src/include/InterViews/resource.h"
void ref__10ivResourceCFv (struct ivResource *__0this );
void unref__10ivResourceCFv (struct ivResource *__0this );

#line 44 "../../../.././src/include/InterViews/resource.h"
void unref__10ivResourceSFPC10ivResource (struct ivResource *);
struct ivColorImpl;
struct ivColorRep;
struct ivDisplay;
struct osString;

#line 38 "../../../.././src/include/InterViews/color.h"
typedef float ivColorIntensity ;
typedef unsigned int ivColorOp ;

#line 34 "../../../.././src/include/InterViews/resource.h"
struct ivResource {	/* sizeof ivResource == 8 */

#line 56 "../../../.././src/include/InterViews/resource.h"
unsigned int refcount___10ivResource ;

#line 60 "../../../.././src/include/InterViews/resource.h"
struct __mptr *__vptr__10ivResource ;
};
struct ivColor;
#line 34 "../../../.././src/include/InterViews/coord.h"
typedef float ivCoord ;
typedef int ivIntCoord ;

#line 37 "../../../.././src/include/InterViews/coord.h"
static float fil = 10e12 ;

#line 42 "../../../.././src/include/InterViews/coord.h"
typedef int iv2_6_Coord ;

#line 44 "../../../.././src/include/InterViews/coord.h"
extern double inch ;

#line 44 "../../../.././src/include/InterViews/coord.h"
extern double inches ;

#line 44 "../../../.././src/include/InterViews/coord.h"
extern double cm ;

#line 44 "../../../.././src/include/InterViews/coord.h"
extern double mm ;

#line 44 "../../../.././src/include/InterViews/coord.h"
extern double point ;

#line 44 "../../../.././src/include/InterViews/coord.h"
extern double points ;
struct ivRasterRep;
struct ivRaster;
#line 40 "../../../.././src/include/InterViews/raster.h"
struct ivRaster {	/* sizeof ivRaster == 20 */

#line 75 "../../../.././src/include/InterViews/raster.h"
struct ivRasterRep *rep___8ivRaster ;

#line 81 "../../../.././src/include/InterViews/raster.h"
struct __mptr *__vptr__8ivRaster ;
struct ivResource *PivResource;
struct ivResource OivResource;
};

#line 49 "../../../.././src/include/InterViews/raster.h"
unsigned long pwidth__8ivRasterCFv (struct ivRaster *__0this );
unsigned long pheight__8ivRasterCFv (struct ivRaster *__0this );
struct ivRaster;
struct ivTIFFRaster;struct TIFFHeader;
#line 49 "../../../.././src/include/TIFF/tiff.h"
typedef struct TIFFHeader TIFFHeader ;
struct TIFFDirEntry;
#line 69 "../../../.././src/include/TIFF/tiff.h"
typedef struct TIFFDirEntry TIFFDirEntry ;
enum TIFFDataType { TIFF_BYTE, TIFF_ASCII, TIFF_SHORT, TIFF_LONG, TIFF_RATIONAL} ;

#line 77 "../../../.././src/include/TIFF/tiff.h"
typedef int TIFFDataType ;

#line 39 "../../../.././src/include/TIFF/tiffio.h"
typedef struct tiff TIFF ;

#line 59 "../../../.././src/include/TIFF/tiffio.h"
extern unsigned char TIFFBitRevTable [256];
extern unsigned char TIFFNoBitRevTable [256];

#line 129 "/mit/c++/2.0/vax/include//cc/sys/errno.h"
extern int errno ;
extern char *sys_errlist [];
extern int sys_nerr ;

#line 17 "/mit/c++/2.0/vax/include//errno.h"
extern int errno ;

#line 20 "/mit/c++/2.0/vax/include//errno.h"
extern int sys_nerr ;
extern char *sys_errlist [];
struct _iobuf;
#line 18 "/mit/c++/2.0/vax/include//cc/stdio.h"
extern struct _iobuf _iob [];

#line 46 "/mit/c++/2.0/vax/include//stdarg.h"
typedef char *va_list ;
struct ______complex;
#line 120 "/mit/c++/2.0/vax/include//math.h"
extern double fabs (double );
struct TIFFRasterImpl;
#line 31 "../../InterViews/tiff.c"
struct TIFFRasterImpl {	/* sizeof TIFFRasterImpl == 40 */

#line 35 "../../InterViews/tiff.c"
struct tiff *tif___14TIFFRasterImpl ;
unsigned short bytes_per_row___14TIFFRasterImpl ;
unsigned short bits_per_sample___14TIFFRasterImpl ;
unsigned short samples_per_pixel___14TIFFRasterImpl ;
unsigned short max_sample_value___14TIFFRasterImpl ;
unsigned long height___14TIFFRasterImpl ;
unsigned long width___14TIFFRasterImpl ;
unsigned int colormapsize___14TIFFRasterImpl ;
unsigned char *imagedata___14TIFFRasterImpl ;
double *dred___14TIFFRasterImpl ;
double *dgreen___14TIFFRasterImpl ;
double *dblue___14TIFFRasterImpl ;
};

#line 1 "../../InterViews/tiff.c"
extern void *__nw__FUi (unsigned int );

#line 48 "../../InterViews/tiff.c"
struct TIFFRasterImpl *__ct__14TIFFRasterImplFv (
#line 48 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this )
#line 65 "../../InterViews/tiff.c"
{ if (__0this || (__0this = (struct TIFFRasterImpl *)__nw__FUi ( sizeof (struct TIFFRasterImpl)) )){ 
#line 66 "../../InterViews/tiff.c"
__0this -> imagedata___14TIFFRasterImpl =
#line 66 "../../InterViews/tiff.c"
0 ;
__0this -> dred___14TIFFRasterImpl = 0 ;
__0this -> dgreen___14TIFFRasterImpl = 0 ;
__0this -> dblue___14TIFFRasterImpl = 0 ;
} return __0this ;
}

#line 1 "../../InterViews/tiff.c"
extern void __dl__FPv (void *);

#line 49 "../../InterViews/tiff.c"
void __dt__14TIFFRasterImplFv (
#line 49 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this , 
#line 49 "../../InterViews/tiff.c"
int __0__free )
#line 72 "../../InterViews/tiff.c"
{ if (__0this ){ 
#line 73 "../../InterViews/tiff.c"
__dl__FPv ( (void *)__0this -> imagedata___14TIFFRasterImpl ) ;
__dl__FPv ( (void *)__0this -> dred___14TIFFRasterImpl ) ;
__dl__FPv ( (void *)__0this -> dgreen___14TIFFRasterImpl ) ;
__dl__FPv ( (void *)__0this -> dblue___14TIFFRasterImpl ) ;
if (__0this )if (__0__free )__dl__FPv ( (void *)__0this ) ;
} }

#line 38 "../../../.././src/include/InterViews/tiff.h"
struct ivTIFFRaster {	/* sizeof ivTIFFRaster == 1 */

#line 41 "../../../.././src/include/InterViews/tiff.h"
char __W3__12ivTIFFRaster ;
};

#line 51 "../../InterViews/tiff.c"
struct ivRaster *load__14TIFFRasterImplFPCcUi (struct TIFFRasterImpl *__0this , char *__1filename , boolean __1make_gray );

#line 40 "../../../.././src/include/InterViews/tiff.h"
struct ivRaster *load__12ivTIFFRasterSFPCcUi (
#line 79 "../../InterViews/tiff.c"
char *__0filename , boolean __0make_gray ){ 
#line 80 "../../InterViews/tiff.c"
struct TIFFRasterImpl __1impl ;

#line 81 "../../InterViews/tiff.c"
struct ivRaster *__0_result ;

#line 80 "../../InterViews/tiff.c"
__ct__14TIFFRasterImplFv ( & __1impl ) ;
{ { __0_result = load__14TIFFRasterImplFPCcUi ( & __1impl , __0filename , __0make_gray ) ;
__dt__14TIFFRasterImplFv ( & __1impl , (int )0 ) ;
} 
#line 81 "../../InterViews/tiff.c"
return __0_result ;
} }

#line 90 "../../../.././src/include/TIFF/tiffio.h"
extern struct tiff *TIFFOpen (char *, char *);

#line 72 "../../../.././src/include/TIFF/tiffio.h"
extern int TIFFGetField (struct tiff *, int ,...);

#line 69 "../../../.././src/include/TIFF/tiffio.h"
extern void TIFFClose (struct tiff *);

#line 75 "../../../.././src/include/TIFF/tiffio.h"
extern int TIFFScanlineSize (struct tiff *);

#line 52 "../../InterViews/tiff.c"
unsigned short identify__14TIFFRasterImplFv (struct TIFFRasterImpl *__0this );
boolean build_colormap__14TIFFRasterImplFUs (struct TIFFRasterImpl *__0this , unsigned short __1tiftype );

#line 56 "../../InterViews/tiff.c"
boolean load_pallette__14TIFFRasterImplFv (struct TIFFRasterImpl *__0this );

#line 59 "../../InterViews/tiff.c"
void color_to_gray__14TIFFRasterImplFv (struct TIFFRasterImpl *__0this );

#line 61 "../../InterViews/tiff.c"
struct ivRaster *colormap_raster__14TIFFRasterImplFv (struct TIFFRasterImpl *__0this );

#line 60 "../../InterViews/tiff.c"
boolean load_rgb__14TIFFRasterImplFUs (struct TIFFRasterImpl *__0this , unsigned short __1planarconfig );

#line 62 "../../InterViews/tiff.c"
struct ivRaster *rgb_raster__14TIFFRasterImplFv (struct TIFFRasterImpl *__0this );

#line 51 "../../InterViews/tiff.c"
struct ivRaster *load__14TIFFRasterImplFPCcUi (
#line 51 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this , 
#line 84 "../../InterViews/tiff.c"
char *__0filename , boolean __0make_gray ){ 
#line 105 "../../InterViews/tiff.c"
unsigned short __1planarconfig ;

#line 116 "../../InterViews/tiff.c"
unsigned short __1tifinterpretation ;

#line 122 "../../InterViews/tiff.c"
struct ivRaster *__1r ;

#line 85 "../../InterViews/tiff.c"
__0this -> tif___14TIFFRasterImpl = TIFFOpen ( __0filename , (char *)"r") ;
if (__0this -> tif___14TIFFRasterImpl == 0 ){ 
#line 87 "../../InterViews/tiff.c"
return (struct ivRaster *)0 ;
}

#line 90 "../../InterViews/tiff.c"
TIFFGetField ( __0this -> tif___14TIFFRasterImpl , 256 , & __0this -> width___14TIFFRasterImpl ) ;
TIFFGetField ( __0this -> tif___14TIFFRasterImpl , 257 , & __0this -> height___14TIFFRasterImpl ) ;

#line 93 "../../InterViews/tiff.c"
if (! TIFFGetField ( __0this -> tif___14TIFFRasterImpl , 258 , & __0this -> bits_per_sample___14TIFFRasterImpl ) ){ 
#line 94 "../../InterViews/tiff.c"
__0this -> bits_per_sample___14TIFFRasterImpl = 1 ;
}
if (__0this -> bits_per_sample___14TIFFRasterImpl != 8 ){ 
#line 97 "../../InterViews/tiff.c"
TIFFClose ( __0this -> tif___14TIFFRasterImpl ) ;
return (struct ivRaster *)0 ;
}

#line 101 "../../InterViews/tiff.c"
if (! TIFFGetField ( __0this -> tif___14TIFFRasterImpl , 277 , & __0this -> samples_per_pixel___14TIFFRasterImpl ) ){ 
#line 102 "../../InterViews/tiff.c"
__0this -> samples_per_pixel___14TIFFRasterImpl = 1 ;
}

#line 105 "../../InterViews/tiff.c"
;
if (! TIFFGetField ( __0this -> tif___14TIFFRasterImpl , 284 , & __1planarconfig ) ){ 
#line 107 "../../InterViews/tiff.c"
__1planarconfig = 1 ;
}

#line 110 "../../InterViews/tiff.c"
if (! TIFFGetField ( __0this -> tif___14TIFFRasterImpl , 281 , & __0this -> max_sample_value___14TIFFRasterImpl ) ){ 
#line 111 "../../InterViews/tiff.c"
__0this -> max_sample_value___14TIFFRasterImpl = 0Xffff ;
}
__0this -> bytes_per_row___14TIFFRasterImpl = TIFFScanlineSize ( __0this -> tif___14TIFFRasterImpl ) ;
__0this -> colormapsize___14TIFFRasterImpl = (1 << __0this -> bits_per_sample___14TIFFRasterImpl );

#line 116 "../../InterViews/tiff.c"
__1tifinterpretation = identify__14TIFFRasterImplFv ( __0this ) ;
if (! build_colormap__14TIFFRasterImplFUs ( __0this , __1tifinterpretation ) ){ 
#line 118 "../../InterViews/tiff.c"
TIFFClose ( __0this -> tif___14TIFFRasterImpl ) ;
return (struct ivRaster *)0 ;
}

#line 122 "../../InterViews/tiff.c"
__1r = 0 ;
switch (__0this -> bits_per_sample___14TIFFRasterImpl * __0this -> samples_per_pixel___14TIFFRasterImpl ){ 
#line 124 "../../InterViews/tiff.c"
case 8 :
#line 125 "../../InterViews/tiff.c"
if (load_pallette__14TIFFRasterImplFv ( __0this ) ){ 
#line 126 "../../InterViews/tiff.c"
if (__0make_gray ){ 
#line 127 "../../InterViews/tiff.c"
color_to_gray__14TIFFRasterImplFv ( __0this )
#line 127 "../../InterViews/tiff.c"
;
}
__1r = colormap_raster__14TIFFRasterImplFv ( __0this ) ;
}
break ;
case 24 :
#line 133 "../../InterViews/tiff.c"
case 32 :
#line 134 "../../InterViews/tiff.c"
if (load_rgb__14TIFFRasterImplFUs ( __0this , __1planarconfig ) ){ 
#line 135 "../../InterViews/tiff.c"
__1r = rgb_raster__14TIFFRasterImplFv ( __0this ) ;
}
break ;
}
TIFFClose ( __0this -> tif___14TIFFRasterImpl ) ;
return __1r ;
}

#line 52 "../../InterViews/tiff.c"
unsigned short identify__14TIFFRasterImplFv (
#line 52 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this )
#line 143 "../../InterViews/tiff.c"
{ 
#line 144 "../../InterViews/tiff.c"
unsigned short __1s ;
unsigned short *__1redmap ;

#line 145 "../../InterViews/tiff.c"
unsigned short *__1greenmap ;

#line 145 "../../InterViews/tiff.c"
unsigned short *__1bluemap ;

#line 147 "../../InterViews/tiff.c"
if (! TIFFGetField ( __0this -> tif___14TIFFRasterImpl , 262 , & __1s ) ){ 
#line 148 "../../InterViews/tiff.c"
if (__0this -> samples_per_pixel___14TIFFRasterImpl != 1 ){ 
#line 149 "../../InterViews/tiff.c"
__1s =
#line 149 "../../InterViews/tiff.c"
2 ;
}
else 
#line 150 "../../InterViews/tiff.c"
if (__0this -> bits_per_sample___14TIFFRasterImpl == 1 ){ 
#line 151 "../../InterViews/tiff.c"
__1s = 1 ;
}
else 
#line 152 "../../InterViews/tiff.c"
if (TIFFGetField ( __0this -> tif___14TIFFRasterImpl , 320 , & __1redmap , & __1greenmap , & __1bluemap ) )
#line 154 "../../InterViews/tiff.c"
{ 
#line 155 "../../InterViews/tiff.c"
__1s =
#line 155 "../../InterViews/tiff.c"
3 ;
}
else 
#line 156 "../../InterViews/tiff.c"
{ 
#line 157 "../../InterViews/tiff.c"
__1s = 1 ;
}
}
return __1s ;
}

#line 54 "../../InterViews/tiff.c"
boolean photometric__14TIFFRasterImplFi (struct TIFFRasterImpl *__0this , int __1tifftag );
boolean gray_map__14TIFFRasterImplFUs (struct TIFFRasterImpl *__0this , unsigned short __1tiftype );

#line 53 "../../InterViews/tiff.c"
boolean build_colormap__14TIFFRasterImplFUs (
#line 53 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this , 
#line 163 "../../InterViews/tiff.c"
unsigned short __0tiftype ){ 
#line 164 "../../InterViews/tiff.c"
__0this -> dred___14TIFFRasterImpl = (double *)(((double *)__nw__FUi ( (sizeof (double ))*
#line 164 "../../InterViews/tiff.c"
__0this -> colormapsize___14TIFFRasterImpl ) ));
__0this -> dgreen___14TIFFRasterImpl = (double *)(((double *)__nw__FUi ( (sizeof (double ))* __0this -> colormapsize___14TIFFRasterImpl ) ));
__0this -> dblue___14TIFFRasterImpl = (double *)(((double *)__nw__FUi ( (sizeof (double ))* __0this -> colormapsize___14TIFFRasterImpl ) ));
switch (__0tiftype ){ 
#line 168 "../../InterViews/tiff.c"
case 3 :
#line 169 "../../InterViews/tiff.c"
if (! photometric__14TIFFRasterImplFi ( __0this , 320 ) )return (unsigned int )((unsigned int )0);
#line 169 "../../InterViews/tiff.c"

#line 170 "../../InterViews/tiff.c"
break ;
case 2 :
#line 173 "../../InterViews/tiff.c"
break ;
case 0 :
#line 175 "../../InterViews/tiff.c"
if (! gray_map__14TIFFRasterImplFUs ( __0this , (unsigned short )0 ) )return (unsigned int )((unsigned int )0);
#line 175 "../../InterViews/tiff.c"

#line 176 "../../InterViews/tiff.c"
break ;
case 1 :
#line 178 "../../InterViews/tiff.c"
if (! gray_map__14TIFFRasterImplFUs ( __0this , (unsigned short )1 ) )return (unsigned int )((unsigned int )0);
#line 178 "../../InterViews/tiff.c"

#line 179 "../../InterViews/tiff.c"
break ;
default :
#line 181 "../../InterViews/tiff.c"
return (unsigned int )((unsigned int )0);
}
return (unsigned int )((unsigned int )1);
}

#line 96 "../../../.././src/include/TIFF/tiffio.h"
extern int TIFFReadScanline (struct tiff *, unsigned char *, unsigned int , unsigned int );

#line 56 "../../InterViews/tiff.c"
boolean load_pallette__14TIFFRasterImplFv (
#line 56 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this )
#line 186 "../../InterViews/tiff.c"
{ 
#line 187 "../../InterViews/tiff.c"
unsigned char *__1c ;

#line 189 "../../InterViews/tiff.c"
unsigned int __1j ;

#line 187 "../../InterViews/tiff.c"
__1c = (((unsigned char *)__nw__FUi ( (sizeof (unsigned char ))* (__0this -> height___14TIFFRasterImpl * __0this -> bytes_per_row___14TIFFRasterImpl )) ));
__0this -> imagedata___14TIFFRasterImpl = __1c ;
for(__1j = 0 ;__1j < __0this -> height___14TIFFRasterImpl ;__1j ++ ) { 
#line 190 "../../InterViews/tiff.c"
if (TIFFReadScanline ( __0this -> tif___14TIFFRasterImpl , __1c , __1j , (unsigned int
#line 190 "../../InterViews/tiff.c"
)0 ) < 0 ){ 
#line 191 "../../InterViews/tiff.c"
return (unsigned int )((unsigned int )0);
}
__1c += __0this -> bytes_per_row___14TIFFRasterImpl ;
}
}

#line 60 "../../InterViews/tiff.c"
boolean load_rgb__14TIFFRasterImplFUs (
#line 60 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this , 
#line 197 "../../InterViews/tiff.c"
unsigned short __0planarconfig ){ 
#line 198 "../../InterViews/tiff.c"
unsigned char *__1line ;

#line 198 "../../InterViews/tiff.c"
__1line = (((unsigned char *)__nw__FUi ( (sizeof (unsigned char ))* ((__0this -> height___14TIFFRasterImpl * __0this -> width___14TIFFRasterImpl )* __0this -> samples_per_pixel___14TIFFRasterImpl ))
#line 198 "../../InterViews/tiff.c"
));

#line 200 "../../InterViews/tiff.c"
__0this -> imagedata___14TIFFRasterImpl = __1line ;
if (__0planarconfig == 1 ){ 
#line 202 "../../InterViews/tiff.c"
{ unsigned int __2i ;

#line 202 "../../InterViews/tiff.c"
__2i = 0 ;

#line 202 "../../InterViews/tiff.c"
for(;__2i < __0this -> height___14TIFFRasterImpl ;__2i ++ ) { 
#line 203 "../../InterViews/tiff.c"
if (TIFFReadScanline ( __0this -> tif___14TIFFRasterImpl , __1line , __2i , (unsigned int )0 )
#line 203 "../../InterViews/tiff.c"
< 0 ){ 
#line 204 "../../InterViews/tiff.c"
return (unsigned int )((unsigned int )0);
}
__1line += __0this -> bytes_per_row___14TIFFRasterImpl ;
}
}
}
else 
#line 208 "../../InterViews/tiff.c"
{ 
#line 209 "../../InterViews/tiff.c"
unsigned char *__2ptr ;

#line 209 "../../InterViews/tiff.c"
unsigned char *__2last ;
unsigned char *__2scanline ;

#line 212 "../../InterViews/tiff.c"
unsigned int __2j ;

#line 210 "../../InterViews/tiff.c"
__2scanline = (((unsigned char *)__nw__FUi ( (sizeof (unsigned char ))* __0this -> bytes_per_row___14TIFFRasterImpl ) ));

#line 212 "../../InterViews/tiff.c"
for(__2j = 0 ;__2j < 3 ;__2j ++ ) { 
#line 213 "../../InterViews/tiff.c"
{ unsigned int __3i ;

#line 213 "../../InterViews/tiff.c"
__3i = 0 ;

#line 213 "../../InterViews/tiff.c"
for(;__3i < __0this -> height___14TIFFRasterImpl ;__3i ++ ) { 
#line 214 "../../InterViews/tiff.c"
if (TIFFReadScanline ( __0this -> tif___14TIFFRasterImpl , __2scanline , __3i , __2j ) < 0 ){
#line 214 "../../InterViews/tiff.c"

#line 215 "../../InterViews/tiff.c"
__dl__FPv ( (void *)__2scanline ) ;
return (unsigned int )((unsigned int )0);
}
__2ptr = __2scanline ;
__1line = ((__0this -> imagedata___14TIFFRasterImpl + ((__0this -> samples_per_pixel___14TIFFRasterImpl * __0this -> width___14TIFFRasterImpl )* __3i ))+ __2j );
__2last = (__1line + (__0this -> samples_per_pixel___14TIFFRasterImpl * __0this -> width___14TIFFRasterImpl ));
while (__1line < __2last ){ 
#line 222 "../../InterViews/tiff.c"
((*__1line ))= ((*(__2ptr ++ )));
__1line += __0this -> samples_per_pixel___14TIFFRasterImpl ;
}
}
}
}

#line 227 "../../InterViews/tiff.c"
__dl__FPv ( (void *)__2scanline ) ;
}
}

#line 42 "../../../.././src/include/InterViews/raster.h"
struct ivRaster *__ct__8ivRasterFUlT1 (struct ivRaster *__0this , struct ivResource *__0ivResource , unsigned long __1width , unsigned long __1height );

#line 63 "../../../.././src/include/InterViews/raster.h"
void poke__8ivRasterFUlT1fN33 (struct ivRaster *__0this , unsigned long __1x , unsigned long __1y , ivColorIntensity __1red , ivColorIntensity __1green , ivColorIntensity __1blue , float __1alpha );
#line 63 "../../../.././src/include/InterViews/raster.h"

#line 61 "../../InterViews/tiff.c"
struct ivRaster *colormap_raster__14TIFFRasterImplFv (
#line 61 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this )
#line 231 "../../InterViews/tiff.c"
{ 
#line 232 "../../InterViews/tiff.c"
struct ivRaster *__1r ;
unsigned char *__1c ;
long __1i ;

#line 232 "../../InterViews/tiff.c"
__1r = __ct__8ivRasterFUlT1 ( (struct ivRaster *)0 , (struct ivResource *)0 , __0this -> width___14TIFFRasterImpl , __0this -> height___14TIFFRasterImpl ) ;
__1c = __0this -> imagedata___14TIFFRasterImpl ;
for(__1i = (__0this -> height___14TIFFRasterImpl - 1 );__1i >= 0 ;__1i -- ) { 
#line 235 "../../InterViews/tiff.c"
{ long __2j ;

#line 235 "../../InterViews/tiff.c"
__2j = 0 ;

#line 235 "../../InterViews/tiff.c"
for(;__2j < __0this -> width___14TIFFRasterImpl ;__2j ++ ) { 
#line 242 "../../InterViews/tiff.c"
((*(((void (*)(struct ivRaster *__0this , unsigned long __1x , unsigned long __1y ,
#line 242 "../../InterViews/tiff.c"
float __1red , float __1green , float __1blue , float __1alpha ))(__1r -> __vptr__8ivRaster [11]).f))))( ((struct ivRaster *)((((char *)__1r ))+ (__1r -> __vptr__8ivRaster [11]).d)),
#line 242 "../../InterViews/tiff.c"
(unsigned long )__2j , (unsigned long )__1i , ((float )((__0this -> dred___14TIFFRasterImpl [((*__1c ))])/ (((double )0Xffff )))), ((float )((__0this -> dgreen___14TIFFRasterImpl [((*__1c ))])/
#line 242 "../../InterViews/tiff.c"
(((double )0Xffff )))), ((float )((__0this -> dblue___14TIFFRasterImpl [((*__1c ))])/ (((double )0Xffff )))), (float )1.0 ) ;
__1c ++ ;
}
}
}

#line 246 "../../InterViews/tiff.c"
return __1r ;
}

#line 62 "../../InterViews/tiff.c"
struct ivRaster *rgb_raster__14TIFFRasterImplFv (
#line 62 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this )
#line 249 "../../InterViews/tiff.c"
{ 
#line 250 "../../InterViews/tiff.c"
struct ivRaster *__1r ;
unsigned char *__1c ;
long __1i ;

#line 250 "../../InterViews/tiff.c"
__1r = __ct__8ivRasterFUlT1 ( (struct ivRaster *)0 , (struct ivResource *)0 , __0this -> width___14TIFFRasterImpl , __0this -> height___14TIFFRasterImpl ) ;
__1c = __0this -> imagedata___14TIFFRasterImpl ;
for(__1i = (__0this -> height___14TIFFRasterImpl - 1 );__1i >= 0 ;__1i -- ) { 
#line 253 "../../InterViews/tiff.c"
{ long __2j ;

#line 253 "../../InterViews/tiff.c"
__2j = 0 ;

#line 253 "../../InterViews/tiff.c"
for(;__2j < __0this -> width___14TIFFRasterImpl ;__2j ++ ) { 
#line 260 "../../InterViews/tiff.c"
((*(((void (*)(struct ivRaster *__0this , unsigned long __1x , unsigned long __1y ,
#line 260 "../../InterViews/tiff.c"
float __1red , float __1green , float __1blue , float __1alpha ))(__1r -> __vptr__8ivRaster [11]).f))))( ((struct ivRaster *)((((char *)__1r ))+ (__1r -> __vptr__8ivRaster [11]).d)),
#line 260 "../../InterViews/tiff.c"
(unsigned long )__2j , (unsigned long )__1i , ((float )((((float )((*__1c ))))/ (((float )0Xff )))), ((float )((((float )((*(__1c +
#line 260 "../../InterViews/tiff.c"
1 )))))/ (((float )0Xff )))), ((float )((((float )((*(__1c + 2 )))))/ (((float )0Xff )))), (float )1.0 ) ;
__1c += __0this -> samples_per_pixel___14TIFFRasterImpl ;
}
}
}

#line 264 "../../InterViews/tiff.c"
return __1r ;
}

#line 59 "../../InterViews/tiff.c"
void color_to_gray__14TIFFRasterImplFv (
#line 59 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this )
#line 267 "../../InterViews/tiff.c"
{ 
#line 268 "../../InterViews/tiff.c"
double __1temp ;

#line 270 "../../InterViews/tiff.c"
int __1i ;

#line 270 "../../InterViews/tiff.c"
for(__1i = 0 ;__1i < __0this -> colormapsize___14TIFFRasterImpl ;__1i ++ ) { 
#line 271 "../../InterViews/tiff.c"
__1temp = (((.299 * (__0this -> dred___14TIFFRasterImpl [__1i ]))+ (.587 * (__0this -> dgreen___14TIFFRasterImpl [__1i ])))+ (.114 *
#line 271 "../../InterViews/tiff.c"
(__0this -> dblue___14TIFFRasterImpl [__1i ])));
(__0this -> dred___14TIFFRasterImpl [__1i ])= ((__0this -> dgreen___14TIFFRasterImpl [__1i ])= ((__0this -> dblue___14TIFFRasterImpl [__1i ])= __1temp ));
}
}

#line 276 "../../InterViews/tiff.c"
static float Scale__FfT1 (float __0x , float __0y ){ 
#line 277 "../../InterViews/tiff.c"
return ((__0x * 0Xffff )/ __0y );
}

#line 280 "../../InterViews/tiff.c"
static int Round__Ff (float __0x ){ 
#line 281 "../../InterViews/tiff.c"
return (((int )(__0x + .5 )));
}

#line 57 "../../InterViews/tiff.c"
boolean is_8bitmap__14TIFFRasterImplFv (
#line 57 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this )
#line 284 "../../InterViews/tiff.c"
{ 
#line 285 "../../InterViews/tiff.c"
int __1i ;

#line 285 "../../InterViews/tiff.c"
for(__1i = 0 ;__1i < __0this -> colormapsize___14TIFFRasterImpl ;__1i ++ ) { 
#line 286 "../../InterViews/tiff.c"
if ((((__0this -> dred___14TIFFRasterImpl [__1i ])> 255 )|| ((__0this -> dgreen___14TIFFRasterImpl [__1i ])> 255 ))|| ((__0this ->
#line 286 "../../InterViews/tiff.c"
dblue___14TIFFRasterImpl [__1i ])> 255 )){ 
#line 287 "../../InterViews/tiff.c"
return (unsigned int )((unsigned int )0);
}
}
return (unsigned int )((unsigned int )1);
}

#line 58 "../../InterViews/tiff.c"
void scale_map__14TIFFRasterImplFf (
#line 58 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this , 
#line 293 "../../InterViews/tiff.c"
float __0max ){ 
#line 294 "../../InterViews/tiff.c"
int __1i ;

#line 294 "../../InterViews/tiff.c"
for(__1i = 0 ;__1i < __0this -> colormapsize___14TIFFRasterImpl ;__1i ++ ) { 
#line 295 "../../InterViews/tiff.c"
(__0this -> dred___14TIFFRasterImpl [__1i ])= (((double )Scale__FfT1 ( (float )(__0this -> dred___14TIFFRasterImpl [__1i ]), __0max )
#line 295 "../../InterViews/tiff.c"
));
(__0this -> dgreen___14TIFFRasterImpl [__1i ])= (((double )Scale__FfT1 ( (float )(__0this -> dgreen___14TIFFRasterImpl [__1i ]), __0max ) ));
(__0this -> dblue___14TIFFRasterImpl [__1i ])= (((double )Scale__FfT1 ( (float )(__0this -> dblue___14TIFFRasterImpl [__1i ]), __0max ) ));
}
}

#line 54 "../../InterViews/tiff.c"
boolean photometric__14TIFFRasterImplFi (
#line 54 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this , 
#line 301 "../../InterViews/tiff.c"
int __0tifftag ){ 
#line 302 "../../InterViews/tiff.c"
unsigned short *__1redmap ;

#line 302 "../../InterViews/tiff.c"
unsigned short *__1greenmap ;

#line 302 "../../InterViews/tiff.c"
unsigned short *__1bluemap ;

#line 304 "../../InterViews/tiff.c"
if (! TIFFGetField ( __0this -> tif___14TIFFRasterImpl , __0tifftag , & __1redmap , & __1greenmap , & __1bluemap ) ){ 
#line 305 "../../InterViews/tiff.c"
{
#line 305 "../../InterViews/tiff.c"
int __2i ;

#line 305 "../../InterViews/tiff.c"
__2i = 0 ;

#line 305 "../../InterViews/tiff.c"
for(;__2i < __0this -> colormapsize___14TIFFRasterImpl ;__2i ++ ) { 
#line 307 "../../InterViews/tiff.c"
(__0this -> dred___14TIFFRasterImpl [__2i ])= ((__0this -> dblue___14TIFFRasterImpl [__2i ])= ((__0this -> dgreen___14TIFFRasterImpl [__2i ])= (((double )Scale__FfT1 ( (float
#line 307 "../../InterViews/tiff.c"
)__2i , (float )(__0this -> colormapsize___14TIFFRasterImpl - 1 )) ))));
}
}
}
else 
#line 309 "../../InterViews/tiff.c"
{ 
#line 310 "../../InterViews/tiff.c"
{ int __2i ;

#line 310 "../../InterViews/tiff.c"
__2i = 0 ;

#line 310 "../../InterViews/tiff.c"
for(;__2i < __0this -> colormapsize___14TIFFRasterImpl ;__2i ++ ) { 
#line 311 "../../InterViews/tiff.c"
(__0this -> dred___14TIFFRasterImpl [__2i ])= (((double )(__1redmap [__2i ])));
(__0this -> dgreen___14TIFFRasterImpl [__2i ])= (((double )(__1greenmap [__2i ])));
(__0this -> dblue___14TIFFRasterImpl [__2i ])= (((double )(__1bluemap [__2i ])));
}
if ((__0this -> max_sample_value___14TIFFRasterImpl <= 0Xff )|| is_8bitmap__14TIFFRasterImplFv ( __0this ) ){ 
#line 316 "../../InterViews/tiff.c"
scale_map__14TIFFRasterImplFf ( __0this , (float )0Xff ) ;
}
}
}

#line 319 "../../InterViews/tiff.c"
return (unsigned int )((unsigned int )1);
}

#line 132 "/mit/c++/2.0/vax/include//math.h"
extern double pow (double , double );

#line 55 "../../InterViews/tiff.c"
boolean gray_map__14TIFFRasterImplFUs (
#line 55 "../../InterViews/tiff.c"
register struct TIFFRasterImpl *__0this , 
#line 322 "../../InterViews/tiff.c"
unsigned short __0tiftype ){ 
#line 323 "../../InterViews/tiff.c"
double __1unitmap ;
unsigned short __1grayresponseunit ;

#line 324 "../../InterViews/tiff.c"
unsigned short *__1graymap ;

#line 324 "../../InterViews/tiff.c"
__1graymap = 0 ;

#line 326 "../../InterViews/tiff.c"
if (! TIFFGetField ( __0this -> tif___14TIFFRasterImpl , 291 , & __1graymap ) ){ 
#line 327 "../../InterViews/tiff.c"
if (__0tiftype == 1 ){ 
#line 328 "../../InterViews/tiff.c"
{ int
#line 328 "../../InterViews/tiff.c"
__3i ;

#line 328 "../../InterViews/tiff.c"
__3i = 0 ;

#line 328 "../../InterViews/tiff.c"
for(;__3i < __0this -> colormapsize___14TIFFRasterImpl ;__3i ++ ) { 
#line 332 "../../InterViews/tiff.c"
(__0this -> dred___14TIFFRasterImpl [__3i ])= ((__0this -> dgreen___14TIFFRasterImpl [__3i ])= ((__0this -> dblue___14TIFFRasterImpl [__3i ])= (((__3i % 4 )== 0 )?(((double
#line 332 "../../InterViews/tiff.c"
)(((unsigned short )Scale__FfT1 ( (float )__3i , (float )(__0this -> colormapsize___14TIFFRasterImpl - 1 )) )))):(__0this -> dred___14TIFFRasterImpl [(__3i - 1 )]))));
}
}
}
else 
#line 334 "../../InterViews/tiff.c"
{ 
#line 335 "../../InterViews/tiff.c"
{ int __3i ;

#line 335 "../../InterViews/tiff.c"
__3i = 0 ;

#line 335 "../../InterViews/tiff.c"
for(;__3i < __0this -> colormapsize___14TIFFRasterImpl ;__3i ++ ) { 
#line 338 "../../InterViews/tiff.c"
(__0this -> dred___14TIFFRasterImpl [__3i ])= ((__0this -> dgreen___14TIFFRasterImpl [__3i ])= ((__0this -> dblue___14TIFFRasterImpl [__3i ])= (((__3i % 4 )== 0 )?(((double
#line 338 "../../InterViews/tiff.c"
)Scale__FfT1 ( (float )((__0this -> colormapsize___14TIFFRasterImpl - 1 )- __3i ), (float )(__0this -> colormapsize___14TIFFRasterImpl - 1 )) )):(__0this -> dred___14TIFFRasterImpl [(__3i - 1 )]))));
}
}
}
}
else 
#line 341 "../../InterViews/tiff.c"
{ 
#line 342 "../../InterViews/tiff.c"
if (! TIFFGetField ( __0this -> tif___14TIFFRasterImpl , 290 , & __1grayresponseunit ) ){ 
#line 343 "../../InterViews/tiff.c"
__1grayresponseunit = 2 ;
}
__1unitmap = (-1* pow ( (double )10 , (double )__1grayresponseunit ) );
if (__0tiftype == 1 ){ 
#line 347 "../../InterViews/tiff.c"
(__0this -> dred___14TIFFRasterImpl [0 ])= ((__0this -> dgreen___14TIFFRasterImpl [0 ])= ((__0this -> dblue___14TIFFRasterImpl [0 ])= 0 ));
{ int __3i ;

#line 348 "../../InterViews/tiff.c"
__3i = 1 ;

#line 348 "../../InterViews/tiff.c"
for(;__3i < __0this -> colormapsize___14TIFFRasterImpl ;__3i ++ ) { 
#line 350 "../../InterViews/tiff.c"
(__0this -> dred___14TIFFRasterImpl [__3i ])= ((__0this -> dgreen___14TIFFRasterImpl [__3i ])= ((__0this -> dblue___14TIFFRasterImpl [__3i ])= (0Xffff * pow ( 10.0 ,
#line 350 "../../InterViews/tiff.c"
(((double )(__1graymap [__3i ])))/ __1unitmap ) )));
}
}
}
else 
#line 352 "../../InterViews/tiff.c"
{ 
#line 353 "../../InterViews/tiff.c"
int __3i ;

#line 353 "../../InterViews/tiff.c"
__3i = (__0this -> colormapsize___14TIFFRasterImpl - 1 );
(__0this -> dred___14TIFFRasterImpl [__3i ])= ((__0this -> dgreen___14TIFFRasterImpl [__3i ])= ((__0this -> dblue___14TIFFRasterImpl [__3i ])= 0 ));
for(__3i = 0 ;__3i < (__0this -> colormapsize___14TIFFRasterImpl - 1 );__3i ++ ) { 
#line 357 "../../InterViews/tiff.c"
(__0this -> dred___14TIFFRasterImpl [__3i ])= ((__0this -> dgreen___14TIFFRasterImpl [__3i ])= ((__0this -> dblue___14TIFFRasterImpl [__3i ])= (0Xffff *
#line 357 "../../InterViews/tiff.c"
(1 - pow ( 10.0 , (((double )(__1graymap [__3i ])))/ __1unitmap ) ))));
}
}
}
return (unsigned int )((unsigned int )1);
}

#line 362 "../../InterViews/tiff.c"

/* the end */


home help back first fref pref prev next nref lref last post