2019-02-26 13:03:28 +08:00
|
|
|
#include "config.h"
|
2018-01-17 02:00:09 +08:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <sys/types.h>
|
2021-09-03 07:04:26 +08:00
|
|
|
#include "netcdf_filter_build.h"
|
2019-02-01 12:13:06 +08:00
|
|
|
#include "h5misc.h"
|
2018-01-17 02:00:09 +08:00
|
|
|
|
Fix memory problems when using HDF5 version 1.10.x and later.
re: issue https://github.com/Unidata/netcdf-c/issues/1156
Starting with HDF5 version 1.10.x, the plugin code MUST be
careful when using the standard *malloc()*, *realloc()*, and
*free()* function.
In the event that the code is allocating, reallocating, or
free'ing memory that either came from -- or will be exported to --
the calling HDF5 library, then one MUST use the corresponding
HDF5 functions *H5allocate_memory()*, *H5resize_memory()*,
*H5free_memory()* [5] to avoid memory failures.
Additionally, if your filter code leaks memory, then the HDF5 library
generates a failure something like this.
````
H5MM.c:232: H5MM_final_sanity_check: Assertion `0 == H5MM_curr_alloc_bytes_s' failed.
````
This PR modifies the code in the plugins directory to
conform to these new requirements.
This raises a question about the libhdf5 code where this
same problem may occur. We need to scan especially nc4hdf.c
to look for this problem.
2018-10-05 01:37:21 +08:00
|
|
|
/* WARNING:
|
|
|
|
Starting with HDF5 version 1.10.x, the plugin code MUST be
|
|
|
|
careful when using the standard *malloc()*, *realloc()*, and
|
|
|
|
*free()* function.
|
|
|
|
|
|
|
|
In the event that the code is allocating, reallocating, for
|
|
|
|
free'ing memory that either came from or will be exported to the
|
|
|
|
calling HDF5 library, then one MUST use the corresponding HDF5
|
|
|
|
functions *H5allocate_memory()*, *H5resize_memory()*,
|
|
|
|
*H5free_memory()* [5] to avoid memory failures.
|
|
|
|
|
|
|
|
Additionally, if your filter code leaks memory, then the HDF5 library
|
|
|
|
will generate an error.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2018-01-17 07:39:58 +08:00
|
|
|
#undef DEBUG
|
2018-01-17 02:00:09 +08:00
|
|
|
|
2018-01-26 10:33:23 +08:00
|
|
|
/* The C standard apparently defines all floating point constants as double;
|
|
|
|
we rely on that in this code.
|
|
|
|
*/
|
|
|
|
#define DBLVAL 12345678.12345678
|
|
|
|
|
2021-09-03 07:04:26 +08:00
|
|
|
static htri_t H5Z_test_can_apply(hid_t dcpl_id, hid_t type_id, hid_t space_id);
|
|
|
|
static size_t H5Z_filter_test(unsigned int flags, size_t cd_nelmts,
|
|
|
|
const unsigned int cd_values[], size_t nbytes,
|
|
|
|
size_t *buf_size, void **buf);
|
|
|
|
|
2018-01-17 02:00:09 +08:00
|
|
|
static int paramcheck(size_t nparams, const unsigned int* params);
|
|
|
|
static void mismatch(size_t i, const char* which);
|
|
|
|
|
|
|
|
const H5Z_class2_t H5Z_TEST[1] = {{
|
|
|
|
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
|
|
|
|
(H5Z_filter_t)(H5Z_FILTER_TEST), /* Filter id number */
|
|
|
|
1, /* encoder_present flag (set to true) */
|
|
|
|
1, /* decoder_present flag (set to true) */
|
|
|
|
"test", /* Filter name for debugging */
|
2018-01-20 09:45:56 +08:00
|
|
|
(H5Z_can_apply_func_t)H5Z_test_can_apply, /* The "can apply" callback */
|
|
|
|
NULL, /* The "set local" callback */
|
2018-01-17 02:00:09 +08:00
|
|
|
(H5Z_func_t)H5Z_filter_test, /* The actual filter function */
|
|
|
|
}};
|
|
|
|
|
|
|
|
/* External Discovery Functions */
|
2021-09-03 07:04:26 +08:00
|
|
|
DLLEXPORT
|
2018-01-17 02:00:09 +08:00
|
|
|
H5PL_type_t
|
|
|
|
H5PLget_plugin_type(void)
|
|
|
|
{
|
|
|
|
return H5PL_TYPE_FILTER;
|
|
|
|
}
|
|
|
|
|
2021-09-03 07:04:26 +08:00
|
|
|
DLLEXPORT
|
2018-01-17 02:00:09 +08:00
|
|
|
const void*
|
|
|
|
H5PLget_plugin_info(void)
|
|
|
|
{
|
|
|
|
return H5Z_TEST;
|
|
|
|
}
|
|
|
|
|
2018-01-20 09:45:56 +08:00
|
|
|
/* Make this explicit */
|
|
|
|
/*
|
|
|
|
* The "can_apply" callback returns positive a valid combination, zero for an
|
|
|
|
* invalid combination and negative for an error.
|
|
|
|
*/
|
2021-09-03 07:04:26 +08:00
|
|
|
static htri_t
|
2018-01-20 09:45:56 +08:00
|
|
|
H5Z_test_can_apply(hid_t dcpl_id, hid_t type_id, hid_t space_id)
|
|
|
|
{
|
|
|
|
return 1; /* Assume it can always apply */
|
|
|
|
}
|
|
|
|
|
2018-01-17 02:00:09 +08:00
|
|
|
/*
|
|
|
|
This filter does some verification
|
|
|
|
that the parameters passed to the filter
|
|
|
|
are correct. Specifically, that endian-ness
|
|
|
|
is correct. As a filter, it is the identify
|
|
|
|
function, passing input to output unchanged.
|
2019-03-22 01:33:27 +08:00
|
|
|
It also prints out the size of each chunk.
|
2018-01-17 02:00:09 +08:00
|
|
|
|
|
|
|
Test cases format:
|
|
|
|
1.The first param is the test index i.e. which test to execute.
|
|
|
|
2. The remaining parameters are those for the test chosen in #1
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2021-09-03 07:04:26 +08:00
|
|
|
static size_t
|
2018-01-17 02:00:09 +08:00
|
|
|
H5Z_filter_test(unsigned int flags, size_t cd_nelmts,
|
|
|
|
const unsigned int cd_values[], size_t nbytes,
|
|
|
|
size_t *buf_size, void **buf)
|
|
|
|
{
|
|
|
|
void* newbuf;
|
|
|
|
unsigned int testcase = 0;
|
Regularize the scoping of dimensions
This is a follow-on to pull request
````https://github.com/Unidata/netcdf-c/pull/1959````,
which fixed up type scoping.
The primary changes are to _nc\_inq\_dimid()_ and to ncdump.
The _nc\_inq\_dimid()_ function is supposed to allow the name to be
and FQN, but this apparently never got implemented. So if was modified
to support FQNs.
The ncdump program is supposed to output fully qualified dimension names
in its generated CDL file under certain conditions.
Suppose ncdump has a netcdf-4 file F with variable V, and V's parent group
is G. For each dimension id D referenced by V, ncdump needs to determine
whether to print its name as a simple name or as a fully qualified name (FQN).
The algorithm is as follows:
1. Search up the tree of ancestor groups.
2. If one of those ancestor groups contains the dimid, then call it dimgrp.
3. If one of those ancestor groups contains a dim with the same name as the dimid, but with a different dimid, then record that as duplicate=true.
4. If dimgrp is defined and duplicate == false, then we do not need an fqn.
5. If dimgrp is defined and duplicate == true, then we do need an fqn to avoid incorrectly using the duplicate.
6. If dimgrp is undefined, then do a preorder breadth-first search of all the groups looking for the dimid.
7. If found, then use the fqn of the first found such dimension location.
8. If not found, then fail.
Test case ncdump/test_scope.sh was modified to test the proper
operation of ncdump and _nc\_inq\_dimid()_.
Misc. Other Changes:
* Fix nc_inq_ncid (NC4_inq_ncid actually) to return root group id if the name argument is NULL.
* Modify _ncdump/printfqn_ to print out a dimid FQN; this supports verification that the resulting .nc files were properly created.
2021-06-01 05:51:12 +08:00
|
|
|
size_t size = 1024 * sizeof(float) * 2;
|
2018-01-17 02:00:09 +08:00
|
|
|
|
|
|
|
if(cd_nelmts == 0)
|
|
|
|
goto fail;
|
|
|
|
|
|
|
|
testcase = cd_values[0];
|
|
|
|
|
2019-03-22 01:33:27 +08:00
|
|
|
switch (testcase) {
|
|
|
|
case TC_ENDIAN:
|
2018-01-17 02:00:09 +08:00
|
|
|
if(!paramcheck(cd_nelmts,cd_values))
|
|
|
|
goto fail;
|
2019-03-22 01:33:27 +08:00
|
|
|
break;
|
|
|
|
case TC_ODDSIZE:
|
|
|
|
/* Print out the chunk size */
|
|
|
|
fprintf(stderr,"nbytes = %lld chunk size = %lld\n",(long long)nbytes,(long long)*buf_size);
|
|
|
|
fflush(stderr);
|
|
|
|
break;
|
|
|
|
default: break;
|
2018-01-17 02:00:09 +08:00
|
|
|
}
|
|
|
|
|
Regularize the scoping of dimensions
This is a follow-on to pull request
````https://github.com/Unidata/netcdf-c/pull/1959````,
which fixed up type scoping.
The primary changes are to _nc\_inq\_dimid()_ and to ncdump.
The _nc\_inq\_dimid()_ function is supposed to allow the name to be
and FQN, but this apparently never got implemented. So if was modified
to support FQNs.
The ncdump program is supposed to output fully qualified dimension names
in its generated CDL file under certain conditions.
Suppose ncdump has a netcdf-4 file F with variable V, and V's parent group
is G. For each dimension id D referenced by V, ncdump needs to determine
whether to print its name as a simple name or as a fully qualified name (FQN).
The algorithm is as follows:
1. Search up the tree of ancestor groups.
2. If one of those ancestor groups contains the dimid, then call it dimgrp.
3. If one of those ancestor groups contains a dim with the same name as the dimid, but with a different dimid, then record that as duplicate=true.
4. If dimgrp is defined and duplicate == false, then we do not need an fqn.
5. If dimgrp is defined and duplicate == true, then we do need an fqn to avoid incorrectly using the duplicate.
6. If dimgrp is undefined, then do a preorder breadth-first search of all the groups looking for the dimid.
7. If found, then use the fqn of the first found such dimension location.
8. If not found, then fail.
Test case ncdump/test_scope.sh was modified to test the proper
operation of ncdump and _nc\_inq\_dimid()_.
Misc. Other Changes:
* Fix nc_inq_ncid (NC4_inq_ncid actually) to return root group id if the name argument is NULL.
* Modify _ncdump/printfqn_ to print out a dimid FQN; this supports verification that the resulting .nc files were properly created.
2021-06-01 05:51:12 +08:00
|
|
|
if (flags & H5Z_FLAG_REVERSE) { /* Decompress */
|
|
|
|
|
|
|
|
if(testcase == TC_EXPANDED) {
|
|
|
|
int i;
|
|
|
|
float* b = (float*)*buf;
|
|
|
|
fprintf(stderr,"TC_EXPANDED: decompress: nbytes=%u buf_size=%u xdata[0..8]=|",(unsigned)nbytes,(unsigned)*buf_size);
|
|
|
|
for(i=0;i<8;i++) {
|
|
|
|
fprintf(stderr," %u",(int)(b[1024+i]));
|
|
|
|
}
|
|
|
|
fprintf(stderr,"|\n");
|
|
|
|
/* Replace buffer */
|
|
|
|
newbuf = H5allocate_memory(*buf_size,0);
|
|
|
|
if(newbuf == NULL) abort();
|
|
|
|
memcpy(newbuf,*buf,*buf_size);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
/* Replace buffer */
|
|
|
|
newbuf = H5allocate_memory(*buf_size,0);
|
|
|
|
if(newbuf == NULL) abort();
|
|
|
|
memcpy(newbuf,*buf,*buf_size);
|
|
|
|
}
|
|
|
|
|
2019-02-22 05:02:46 +08:00
|
|
|
/* reclaim old buffer */
|
|
|
|
H5free_memory(*buf);
|
2018-01-17 02:00:09 +08:00
|
|
|
*buf = newbuf;
|
|
|
|
|
Regularize the scoping of dimensions
This is a follow-on to pull request
````https://github.com/Unidata/netcdf-c/pull/1959````,
which fixed up type scoping.
The primary changes are to _nc\_inq\_dimid()_ and to ncdump.
The _nc\_inq\_dimid()_ function is supposed to allow the name to be
and FQN, but this apparently never got implemented. So if was modified
to support FQNs.
The ncdump program is supposed to output fully qualified dimension names
in its generated CDL file under certain conditions.
Suppose ncdump has a netcdf-4 file F with variable V, and V's parent group
is G. For each dimension id D referenced by V, ncdump needs to determine
whether to print its name as a simple name or as a fully qualified name (FQN).
The algorithm is as follows:
1. Search up the tree of ancestor groups.
2. If one of those ancestor groups contains the dimid, then call it dimgrp.
3. If one of those ancestor groups contains a dim with the same name as the dimid, but with a different dimid, then record that as duplicate=true.
4. If dimgrp is defined and duplicate == false, then we do not need an fqn.
5. If dimgrp is defined and duplicate == true, then we do need an fqn to avoid incorrectly using the duplicate.
6. If dimgrp is undefined, then do a preorder breadth-first search of all the groups looking for the dimid.
7. If found, then use the fqn of the first found such dimension location.
8. If not found, then fail.
Test case ncdump/test_scope.sh was modified to test the proper
operation of ncdump and _nc\_inq\_dimid()_.
Misc. Other Changes:
* Fix nc_inq_ncid (NC4_inq_ncid actually) to return root group id if the name argument is NULL.
* Modify _ncdump/printfqn_ to print out a dimid FQN; this supports verification that the resulting .nc files were properly created.
2021-06-01 05:51:12 +08:00
|
|
|
} else { /* Compress */
|
|
|
|
if(testcase == TC_EXPANDED) {
|
|
|
|
int i;
|
|
|
|
float* b;
|
|
|
|
#if 0
|
|
|
|
fprintf(stderr,"TC_EXPANDED: compress: nbytes=%u buf_size=%u size=%u\n",(unsigned)nbytes,(unsigned)*buf_size,(unsigned)size);
|
|
|
|
#endif
|
|
|
|
/* Replace buffer with one that is bigger than the chunk size */
|
|
|
|
newbuf = H5allocate_memory(size,0);
|
|
|
|
if(newbuf == NULL) abort();
|
|
|
|
b = (float*)newbuf;
|
|
|
|
for(i=0;i<1024*2;i++) {
|
|
|
|
b[i] = (float)(17+i);
|
|
|
|
}
|
|
|
|
memcpy(newbuf,*buf,*buf_size);
|
|
|
|
*buf_size = size;
|
|
|
|
} else {
|
|
|
|
/* Replace buffer */
|
|
|
|
newbuf = H5allocate_memory(*buf_size,0);
|
|
|
|
if(newbuf == NULL) abort();
|
|
|
|
memcpy(newbuf,*buf,*buf_size);
|
|
|
|
}
|
|
|
|
|
Fix memory problems when using HDF5 version 1.10.x and later.
re: issue https://github.com/Unidata/netcdf-c/issues/1156
Starting with HDF5 version 1.10.x, the plugin code MUST be
careful when using the standard *malloc()*, *realloc()*, and
*free()* function.
In the event that the code is allocating, reallocating, or
free'ing memory that either came from -- or will be exported to --
the calling HDF5 library, then one MUST use the corresponding
HDF5 functions *H5allocate_memory()*, *H5resize_memory()*,
*H5free_memory()* [5] to avoid memory failures.
Additionally, if your filter code leaks memory, then the HDF5 library
generates a failure something like this.
````
H5MM.c:232: H5MM_final_sanity_check: Assertion `0 == H5MM_curr_alloc_bytes_s' failed.
````
This PR modifies the code in the plugins directory to
conform to these new requirements.
This raises a question about the libhdf5 code where this
same problem may occur. We need to scan especially nc4hdf.c
to look for this problem.
2018-10-05 01:37:21 +08:00
|
|
|
/* reclaim old buffer */
|
2019-02-22 05:02:46 +08:00
|
|
|
H5free_memory(*buf);
|
2018-01-17 02:00:09 +08:00
|
|
|
*buf = newbuf;
|
|
|
|
}
|
|
|
|
|
|
|
|
return *buf_size;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
paramcheck(size_t nparams, const unsigned int* params)
|
|
|
|
{
|
|
|
|
size_t i;
|
2019-02-01 12:13:06 +08:00
|
|
|
unsigned char mem[8];
|
2018-01-17 02:00:09 +08:00
|
|
|
|
|
|
|
if(nparams != 14) {
|
2019-02-01 12:13:06 +08:00
|
|
|
fprintf(stderr,"Too few parameters: need=14 sent=%ld\n",(unsigned long)nparams);
|
2018-01-24 07:00:11 +08:00
|
|
|
goto fail;
|
2018-01-17 07:39:58 +08:00
|
|
|
}
|
2018-01-17 02:00:09 +08:00
|
|
|
|
|
|
|
for(i=0;i<nparams;i++) {
|
2018-01-24 07:00:11 +08:00
|
|
|
unsigned int ival;
|
|
|
|
unsigned long long lval;
|
|
|
|
float fval;
|
|
|
|
double dval;
|
2018-01-17 02:00:09 +08:00
|
|
|
switch (i) {
|
|
|
|
case 0: break; /* this is the testcase # */
|
2018-01-24 07:00:11 +08:00
|
|
|
case 1:
|
|
|
|
ival = (-17) & 0xff;
|
|
|
|
if(ival != (signed int)(params[i]))
|
|
|
|
{mismatch(i,"signed byte"); goto fail; };
|
2018-01-17 02:00:09 +08:00
|
|
|
break;
|
2018-01-24 07:00:11 +08:00
|
|
|
case 2:
|
|
|
|
ival = 23;
|
|
|
|
if(ival != (unsigned int)(params[i]))
|
|
|
|
{mismatch(i,"unsigned byte"); goto fail; };
|
2018-01-17 02:00:09 +08:00
|
|
|
break;
|
2018-01-24 07:00:11 +08:00
|
|
|
case 3:
|
|
|
|
ival = (-25) & 0xffff;
|
|
|
|
if(ival != (signed int)(params[i]))
|
|
|
|
{mismatch(i,"signed short"); goto fail; };
|
2018-01-17 02:00:09 +08:00
|
|
|
break;
|
2018-01-24 07:00:11 +08:00
|
|
|
case 4:
|
|
|
|
ival = 27;
|
|
|
|
if(ival != (unsigned int)(params[i]))
|
|
|
|
{mismatch(i,"unsigned short"); goto fail; };
|
2018-01-17 02:00:09 +08:00
|
|
|
break;
|
2018-01-24 07:00:11 +08:00
|
|
|
case 5:
|
|
|
|
ival = 77;
|
|
|
|
if(ival != (signed int)(params[i]))
|
|
|
|
{mismatch(i,"signed int"); goto fail; };
|
2018-01-17 02:00:09 +08:00
|
|
|
break;
|
2018-01-24 07:00:11 +08:00
|
|
|
case 6:
|
|
|
|
ival = 93u;
|
|
|
|
if(ival != (unsigned int)(params[i]))
|
|
|
|
{mismatch(i,"unsigned int"); goto fail; };
|
2018-01-17 02:00:09 +08:00
|
|
|
break;
|
2018-01-24 07:00:11 +08:00
|
|
|
case 7:
|
|
|
|
fval = 789.0f;
|
|
|
|
if(fval != *(float*)(¶ms[i]))
|
|
|
|
{mismatch(i,"float"); goto fail; };
|
2018-01-17 02:00:09 +08:00
|
|
|
break;
|
|
|
|
case 8: {/*double*/
|
2019-02-01 12:13:06 +08:00
|
|
|
double x;
|
|
|
|
memcpy(mem,¶ms[i],sizeof(mem));
|
2020-09-28 02:43:46 +08:00
|
|
|
NC_h5filterspec_fix8(mem,1); /* Fix up endianness */
|
2019-02-01 12:13:06 +08:00
|
|
|
x = *(double*)mem;
|
2018-01-24 07:00:11 +08:00
|
|
|
dval = DBLVAL;
|
2018-01-17 02:00:09 +08:00
|
|
|
i++; /* takes two parameters */
|
2018-01-24 07:00:11 +08:00
|
|
|
if(dval != x) {
|
2018-01-17 02:00:09 +08:00
|
|
|
mismatch(i,"double");
|
2018-01-24 07:00:11 +08:00
|
|
|
goto fail;
|
2018-01-17 02:00:09 +08:00
|
|
|
}
|
|
|
|
}; break;
|
|
|
|
case 10: {/*signed long long*/
|
2019-02-01 12:13:06 +08:00
|
|
|
signed long long x;
|
|
|
|
memcpy(mem,¶ms[i],sizeof(mem));
|
2020-09-28 02:43:46 +08:00
|
|
|
NC_h5filterspec_fix8(mem,1); /* Fix up endianness */
|
2019-02-01 12:13:06 +08:00
|
|
|
x = *(signed long long*)mem;
|
2020-09-28 02:43:46 +08:00
|
|
|
NC_h5filterspec_fix8(&x,1); /* Fix up endianness */
|
2018-01-24 07:00:11 +08:00
|
|
|
lval = -9223372036854775807L;
|
2018-01-17 02:00:09 +08:00
|
|
|
i++; /* takes two parameters */
|
2018-01-24 07:00:11 +08:00
|
|
|
if(lval != x) {
|
2018-01-17 02:00:09 +08:00
|
|
|
mismatch(i,"signed long long");
|
2018-01-24 07:00:11 +08:00
|
|
|
goto fail;
|
2018-01-17 02:00:09 +08:00
|
|
|
}
|
|
|
|
}; break;
|
|
|
|
case 12: {/*unsigned long long*/
|
2019-02-01 12:13:06 +08:00
|
|
|
unsigned long long x;
|
|
|
|
memcpy(mem,¶ms[i],sizeof(mem));
|
2020-09-28 02:43:46 +08:00
|
|
|
NC_h5filterspec_fix8(mem,1); /* Fix up endianness */
|
2019-02-01 12:13:06 +08:00
|
|
|
x = *(unsigned long long*)mem;
|
2018-01-24 07:00:11 +08:00
|
|
|
lval = 18446744073709551615UL;
|
2018-01-17 02:00:09 +08:00
|
|
|
i++; /* takes two parameters */
|
2018-01-24 07:00:11 +08:00
|
|
|
if(lval != x) {
|
2018-01-17 02:00:09 +08:00
|
|
|
mismatch(i,"unsigned long long");
|
2018-01-24 07:00:11 +08:00
|
|
|
goto fail;
|
2018-01-17 02:00:09 +08:00
|
|
|
}
|
|
|
|
}; break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
mismatch(i,"unexpected parameter");
|
2018-01-24 07:00:11 +08:00
|
|
|
goto fail;
|
2018-01-17 02:00:09 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
{
|
|
|
|
size_t i;
|
|
|
|
fprintf(stderr,"bigendian=%d nparams=%d params=\n",bigendian,nparams);
|
|
|
|
for(i=0;i<nparams;i++) {
|
|
|
|
fprintf(stderr,"[%d] %ud %d %f\n", (unsigned int)i, params[i],(signed int)params[i],*(float*)¶ms[i]);
|
|
|
|
}
|
|
|
|
fflush(stderr);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
return 1;
|
2018-01-24 07:00:11 +08:00
|
|
|
fail:
|
|
|
|
return 0;
|
2018-01-17 02:00:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
mismatch(size_t i, const char* which)
|
|
|
|
{
|
|
|
|
fprintf(stderr,"mismatch: [%ld] %s\n",(unsigned long)i,which);
|
|
|
|
fflush(stderr);
|
|
|
|
}
|