- Centralize duplicated static function fgetns in a separate object file.

- Rename _VERBOSE_ static variables to avoid clashes in compile-all-files-at-once mode.
This commit is contained in:
Sylvain Pion 2007-05-19 22:03:08 +00:00
parent 2a4a98155c
commit 9baef3bcac
9 changed files with 98 additions and 120 deletions

View File

@ -15,7 +15,7 @@
static int _VERBOSE_ = 1;
static int _VERBOSE_BMP_ = 1;
@ -80,7 +80,7 @@ void *_readBmpImage( const char *name,
fp = fopen(name, "rb");
if (fp == NULL) {
if ( _VERBOSE_ )
if ( _VERBOSE_BMP_ )
fprintf( stderr, "%s: error in opening %s\n", proc, name );
return( (void*)NULL );
}
@ -93,7 +93,7 @@ void *_readBmpImage( const char *name,
filePos = ftell(fp);
rc = readUINT16little(fp, &fileType);
if (rc != 0) {
if ( _VERBOSE_ )
if ( _VERBOSE_BMP_ )
fprintf( stderr, "%s: error in getting file type %s\n", proc, name );
return( (void*)NULL );
}
@ -198,29 +198,29 @@ void *_readBmpImage( const char *name,
switch (rc) {
case 1000:
case 1006:
if ( _VERBOSE_ )
if ( _VERBOSE_BMP_ )
fprintf( stderr, "%s: File is not a valid bitmap file\n", proc );
break;
case 1001:
if ( _VERBOSE_ )
if ( _VERBOSE_BMP_ )
fprintf( stderr, "%s: Illegal information in an image\n", proc );
break;
case 1002:
if ( _VERBOSE_ )
if ( _VERBOSE_BMP_ )
fprintf( stderr, "%s: Legal information that I can't handle yet in an image\n", proc );
break;
case 1003:
case 1004:
case 1005:
if ( _VERBOSE_ )
if ( _VERBOSE_BMP_ )
fprintf( stderr, "%s: Ran out of memory\n", proc );
break;
case 0:
if ( _VERBOSE_ > 1 )
if ( _VERBOSE_BMP_ > 1 )
fprintf( stderr, "%s: Got good data from file, writing results\n", proc );
break;
default:
if ( _VERBOSE_ )
if ( _VERBOSE_BMP_ )
fprintf( stderr, "%s: Error reading file rc=%d\n", proc,rc );
break;
}
@ -254,7 +254,7 @@ void *_readBmpImage( const char *name,
/*
* Dump the images.
*/
if ( _VERBOSE_ > 1 )
if ( _VERBOSE_BMP_ > 1 )
fprintf (stderr, "%s: There are %d images in the file\n", proc, numImages);
if ( numImages >= 2 )
@ -269,7 +269,7 @@ void *_readBmpImage( const char *name,
buf = (void*)malloc( widths[0]*heights[0]*3 * sizeof( unsigned char ) );
if ( buf == (void*)NULL ) {
if ( _VERBOSE_ )
if ( _VERBOSE_BMP_ )
fprintf( stderr, "%s: error in allocating data buffer for %s\n", proc, name );
for (i=0; i<numImages; i++) {
@ -303,7 +303,7 @@ void *_readBmpImage( const char *name,
*dimz = 3;
} else {
if ( _VERBOSE_ )
if ( _VERBOSE_BMP_ )
fprintf( stderr, "%s: no image or null image\n", proc );
for (i=0; i<numImages; i++) {
@ -355,7 +355,7 @@ void *_readBmpImage( const char *name,
/*
* Loop through all the images that were returned.
*/
if ( _VERBOSE_ ) {
if ( _VERBOSE_BMP_ ) {
fprintf (stderr, "%s: Doing image number %d\n\n", proc, i+1);
fprintf (stderr, "%s: Image dimensions: (%ld,%ld)\n", proc, widths[i], heights[i]);
}
@ -469,15 +469,15 @@ void *_readBmpImage( const char *name,
void IoBmp_verbose ( )
{
if ( _VERBOSE_ <= 0 )
_VERBOSE_ = 1;
if ( _VERBOSE_BMP_ <= 0 )
_VERBOSE_BMP_ = 1;
else
_VERBOSE_ += 1;
_VERBOSE_BMP_ += 1;
}
void IoBmp_noverbose ( )
{
_VERBOSE_ = 0;
_VERBOSE_BMP_ = 0;
}

View File

@ -0,0 +1,20 @@
#include <string.h>
#include "gis.h"
#include "inr.h"
/* get a string from a file and discard the ending newline character
if any */
char *fgetns(char *str, int n, _image *im ) {
char *ret;
int l;
memset( str, 0, n );
ret = ImageIO_gets( im, str, n );
if(!ret) return NULL;
l = strlen(str);
if(l > 0 && str[l-1] == '\n') str[l-1] = '\0';
return ret;
}

View File

@ -0,0 +1,8 @@
#include <string.h>
#include "gis.h"
#include "inr.h"
/* get a string from a file and discard the ending newline character
if any */
char *fgetns(char *str, int n, _image *im );

View File

@ -2,6 +2,7 @@
#include "gis.h"
#include "inr.h"
#include "fgetns.h"
#define _LGTH_STRING_ 1024
@ -213,27 +214,6 @@ int testGisHeader(char *,const char *name) {
/* get a string from a file and discard the ending newline character
if any */
static char *fgetns(char *str, int n, _image *im ) {
char *ret;
int l;
memset( str, 0, n );
ret = ImageIO_gets( im, str, n );
if(!ret) return NULL;
l = strlen(str);
if(l > 0 && str[l-1] == '\n') str[l-1] = '\0';
return ret;
}
int readGisHeader( const char* name,_image* im)
{
char *s, *str = NULL;

View File

@ -1,4 +1,5 @@
#include "inr.h"
#include "fgetns.h"
#include <string.h>
@ -21,10 +22,6 @@ typedef struct {
/* string list descriptor */
static char *fgetns(char *str, int n, _image *im );
/* get a string from a file and discard the ending newline character
if any */
static void addStringElement(stringListHead *strhead,
const char *str);
@ -378,20 +375,6 @@ static void addStringElement(stringListHead *strhead, const char *str) {
}
}
/* get a string from a file and discard the ending newline character
if any */
static char *fgetns(char *str, int n, _image *im ) {
char *ret = NULL;
int l;
ret = ImageIO_gets( im, str, n );
if(!ret) return NULL;
l = strlen(str);
if(l > 0 && str[l-1] == '\n') str[l-1] = '\0';
return ret;
}
/* concat given string at the last element of given list */
static void concatStringElement(const stringListHead *strhead,

View File

@ -37,7 +37,8 @@ OBJECTS = \
pnm$(OBJ_EXT) \
recbuffer$(OBJ_EXT) \
recline$(OBJ_EXT) \
reech4x4$(OBJ_EXT)
reech4x4$(OBJ_EXT) \
fgetns$(OBJ_EXT)
#---------------------------------------------------------------------#
# libCGALimageIO settings

View File

@ -5,6 +5,7 @@
#include <string.h>
#include "pnm.h"
#include "fgetns.h"
@ -75,21 +76,6 @@ PTRIMAGE_FORMAT createPpmFormat() {
return f;
}
/* get a string from a file and discard the ending newline character
if any */
static char *fgetns(char *str, int n, _image *im )
{
char *ret;
int l;
ret = ImageIO_gets( im, str, n );
if(!ret) return NULL;
l = strlen(str);
if(l > 0 && str[l-1] == '\n') str[l-1] = '\0';
return ret;
}
/*
The portable pixmap format is a lowest common denominator

View File

@ -33,7 +33,7 @@
#include <recline.h>
static int _VERBOSE_ = 0;
static int _VERBOSE_RECLINE_ = 0;
#define EXIT_ON_FAILURE 0
#define EXIT_ON_SUCCESS 1
@ -65,7 +65,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
RFcoefficientType *RFC = NULL;
RFC = (RFcoefficientType *)malloc( sizeof(RFcoefficientType) );
if ( RFC == NULL ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_RECLINE_ != 0 )
fprintf( stderr, "%s: allocation failed\n", proc );
return( NULL );
}
@ -90,7 +90,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
case GAUSSIAN_FIDRICH :
if ( x < 0.1 ) {
if ( _VERBOSE_ != 0 ) {
if ( _VERBOSE_RECLINE_ != 0 ) {
fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1).\n", proc );
}
free( RFC );
@ -99,7 +99,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
switch ( derivative ) {
default :
if ( _VERBOSE_ != 0 ) {
if ( _VERBOSE_RECLINE_ != 0 ) {
fprintf( stderr, "%s: improper value of derivative order.\n", proc );
}
free( RFC );
@ -170,7 +170,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
switch ( derivative ) {
default :
if ( _VERBOSE_ != 0 ) {
if ( _VERBOSE_RECLINE_ != 0 ) {
fprintf( stderr, "%s: improper value of derivative order.\n", proc );
}
free( RFC );
@ -198,7 +198,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
case GAUSSIAN_DERICHE :
if ( x < 0.1 ) {
if ( _VERBOSE_ != 0 ) {
if ( _VERBOSE_RECLINE_ != 0 ) {
fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1).\n", proc );
}
free( RFC );
@ -207,7 +207,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
switch ( derivative ) {
default :
if ( _VERBOSE_ != 0 ) {
if ( _VERBOSE_RECLINE_ != 0 ) {
fprintf( stderr, "%s: switch to default coefficients (smoothing).\n", proc );
}
derivative = DERIVATIVE_0;
@ -382,14 +382,14 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
default :
if ( _VERBOSE_ != 0 ) {
if ( _VERBOSE_RECLINE_ != 0 ) {
fprintf( stderr, "%s: switch to default recursive filter (Deriche's filters).\n", proc );
}
type_filter = ALPHA_DERICHE;
case ALPHA_DERICHE :
if ( (x < 0.1) || (x > 1.9) ) {
if ( _VERBOSE_ != 0 ) {
if ( _VERBOSE_RECLINE_ != 0 ) {
fprintf( stderr, "%s: improper value of coefficient (should be >= 0.1 and <= 1.9).\n", proc );
}
free( RFC );
@ -399,7 +399,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x,
switch ( derivative ) {
default :
if ( _VERBOSE_ != 0 ) {
if ( _VERBOSE_RECLINE_ != 0 ) {
fprintf( stderr, "%s: switch to default coefficients (smoothing).\n", proc );
}
derivative = DERIVATIVE_0;
@ -472,12 +472,12 @@ int RecursiveFilter1D( RFcoefficientType *RFC,
register double *d0, *d1, *d2, *d3, *d4;
if ( RFC->type_filter == UNKNOWN_FILTER ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_RECLINE_ != 0 )
fprintf( stderr, "%s: unknown type of recursive filter.\n", proc );
return( EXIT_ON_FAILURE );
}
if ( RFC->derivative == NODERIVATIVE ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_RECLINE_ != 0 )
fprintf( stderr, "%s: unknown type of derivative.\n", proc );
return( EXIT_ON_FAILURE );
}
@ -488,7 +488,7 @@ int RecursiveFilter1D( RFcoefficientType *RFC,
switch( RFC->type_filter ) {
default :
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_RECLINE_ != 0 )
fprintf( stderr, "%s: unknown type of recursive filter.\n", proc );
return( EXIT_ON_FAILURE );
case GAUSSIAN_FIDRICH :
@ -646,9 +646,9 @@ int RecursiveFilter1D( RFcoefficientType *RFC,
void Recline_verbose ( )
{
_VERBOSE_ = 1;
_VERBOSE_RECLINE_ = 1;
}
void Recline_noverbose ( )
{
_VERBOSE_ = 0;
_VERBOSE_RECLINE_ = 0;
}

View File

@ -30,7 +30,7 @@
#define _CONVERTR_(R) ( R )
#define _CONVERTI_(R) ( (R) >= 0.0 ? ((int)((R)+0.5)) : ((int)((R)-0.5)) )
static int _VERBOSE_ = 0;
static int _VERBOSE_REECH_ = 0;
@ -80,7 +80,7 @@ void Reech3DTriLin4x4_u8 ( void* theBuf, /* buffer to be resampled */
register u8 *rbuf = (u8*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -243,7 +243,7 @@ void Reech3DTriLin4x4gb_u8 ( void* theBuf, /* buffer to be resampled */
register double g=gain;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -405,7 +405,7 @@ void Reech3DNearest4x4_u8 ( void* theBuf, /* buffer to be resampled */
register u8 *rbuf = (u8*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -445,7 +445,7 @@ void Reech2DTriLin4x4_u8 ( void* theBuf, /* buffer to be resampled */
register u8 *rbuf = (u8*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (u8*)theBuf;
@ -536,7 +536,7 @@ void Reech2DTriLin4x4gb_u8 ( void* theBuf, /* buffer to be resampled */
register double g=gain;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (u8*)theBuf;
@ -624,7 +624,7 @@ void Reech2DNearest4x4_u8 ( void* theBuf, /* buffer to be resampled */
register u8 *rbuf = (u8*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (u8*)theBuf;
@ -691,7 +691,7 @@ void Reech3DTriLin4x4_s8 ( void* theBuf, /* buffer to be resampled */
register s8 *rbuf = (s8*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -854,7 +854,7 @@ void Reech3DTriLin4x4gb_s8 ( void* theBuf, /* buffer to be resampled */
register double g=gain;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -1016,7 +1016,7 @@ void Reech3DNearest4x4_s8 ( void* theBuf, /* buffer to be resampled */
register s8 *rbuf = (s8*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -1056,7 +1056,7 @@ void Reech2DTriLin4x4_s8 ( void* theBuf, /* buffer to be resampled */
register s8 *rbuf = (s8*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (s8*)theBuf;
@ -1147,7 +1147,7 @@ void Reech2DTriLin4x4gb_s8 ( void* theBuf, /* buffer to be resampled */
register double g=gain;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (s8*)theBuf;
@ -1235,7 +1235,7 @@ void Reech2DNearest4x4_s8 ( void* theBuf, /* buffer to be resampled */
register s8 *rbuf = (s8*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (s8*)theBuf;
@ -1302,7 +1302,7 @@ void Reech3DTriLin4x4_u16 ( void* theBuf, /* buffer to be resampled */
register u16 *rbuf = (u16*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -1465,7 +1465,7 @@ void Reech3DTriLin4x4gb_u16 ( void* theBuf, /* buffer to be resampled */
register double g=gain;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -1627,7 +1627,7 @@ void Reech3DNearest4x4_u16 ( void* theBuf, /* buffer to be resampled */
register u16 *rbuf = (u16*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -1667,7 +1667,7 @@ void Reech2DTriLin4x4_u16 ( void* theBuf, /* buffer to be resampled */
register u16 *rbuf = (u16*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (u16*)theBuf;
@ -1758,7 +1758,7 @@ void Reech2DTriLin4x4gb_u16 ( void* theBuf, /* buffer to be resampled */
register double g=gain;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (u16*)theBuf;
@ -1846,7 +1846,7 @@ void Reech2DNearest4x4_u16 ( void* theBuf, /* buffer to be resampled */
register u16 *rbuf = (u16*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (u16*)theBuf;
@ -1913,7 +1913,7 @@ void Reech3DTriLin4x4_s16 ( void* theBuf, /* buffer to be resampled */
register s16 *rbuf = (s16*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -2076,7 +2076,7 @@ void Reech3DTriLin4x4gb_s16 ( void* theBuf, /* buffer to be resampled */
register double g=gain;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -2238,7 +2238,7 @@ void Reech3DNearest4x4_s16 ( void* theBuf, /* buffer to be resampled */
register s16 *rbuf = (s16*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -2278,7 +2278,7 @@ void Reech2DTriLin4x4_s16 ( void* theBuf, /* buffer to be resampled */
register s16 *rbuf = (s16*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (s16*)theBuf;
@ -2369,7 +2369,7 @@ void Reech2DTriLin4x4gb_s16 ( void* theBuf, /* buffer to be resampled */
register double g=gain;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (s16*)theBuf;
@ -2457,7 +2457,7 @@ void Reech2DNearest4x4_s16 ( void* theBuf, /* buffer to be resampled */
register s16 *rbuf = (s16*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (s16*)theBuf;
@ -2524,7 +2524,7 @@ void Reech3DTriLin4x4_r32 ( void* theBuf, /* buffer to be resampled */
register r32 *rbuf = (r32*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -2687,7 +2687,7 @@ void Reech3DTriLin4x4gb_r32 ( void* theBuf, /* buffer to be resampled */
register double g=gain;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -2849,7 +2849,7 @@ void Reech3DNearest4x4_r32 ( void* theBuf, /* buffer to be resampled */
register r32 *rbuf = (r32*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
for ( j = 0; j < rdimy; j ++ )
for ( i = 0; i < rdimx; i ++, rbuf ++ ) {
@ -2889,7 +2889,7 @@ void Reech2DTriLin4x4_r32 ( void* theBuf, /* buffer to be resampled */
register r32 *rbuf = (r32*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (r32*)theBuf;
@ -2980,7 +2980,7 @@ void Reech2DTriLin4x4gb_r32 ( void* theBuf, /* buffer to be resampled */
register double g=gain;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (r32*)theBuf;
@ -3068,7 +3068,7 @@ void Reech2DNearest4x4_r32 ( void* theBuf, /* buffer to be resampled */
register r32 *rbuf = (r32*)resBuf;
for ( k = 0; k < rdimz; k ++ ) {
if ( _VERBOSE_ != 0 )
if ( _VERBOSE_REECH_ != 0 )
fprintf( stderr, "Processing slice %d\r", k );
/* tbuf represente le premier point du plan */
tbuf = (r32*)theBuf;
@ -3095,11 +3095,11 @@ void Reech2DNearest4x4_r32 ( void* theBuf, /* buffer to be resampled */
void Reech4x4_verbose ( )
{
_VERBOSE_ = 1;
_VERBOSE_REECH_ = 1;
}
void Reech4x4_noverbose ( )
{
_VERBOSE_ = 0;
_VERBOSE_REECH_ = 0;
}