diff -ur PDL-2.4.3.orig/Basic/Core/Core.xs.PL PDL-2.4.3/Basic/Core/Core.xs.PL
--- PDL-2.4.3.orig/Basic/Core/Core.xs.PL 2006-07-10 17:46:24.000000000 -0400
+++ PDL-2.4.3/Basic/Core/Core.xs.PL 2006-12-02 22:06:41.000000000 -0500
@@ -373,7 +373,7 @@
1; /* Do nothing */
else {
self = SvPDLV(sv);
- PDLDEBUG_f(printf("DESTROYING %d\n",self);)
+ PDLDEBUG_f(printf("DESTROYING %p\n",self);)
if (self != NULL)
pdl_destroy(self);
}
@@ -514,11 +514,11 @@
CODE:
setflag(self->state,PDL_INPLACE,val);
-int
+long
address(self)
pdl *self;
CODE:
- RETVAL = (int) self;
+ RETVAL = (long) self;
OUTPUT:
RETVAL
@@ -572,7 +572,7 @@
/* Special case: zero-length file */
it->data = NULL;
}
- PDLDEBUG_f(printf("PDL::MMap: mapped to %d\n",it->data);)
+ PDLDEBUG_f(printf("PDL::MMap: mapped to %p\n",it->data);)
it->state |= PDL_DONTTOUCHDATA | PDL_ALLOCATED;
pdl_add_deletedata_magic(it, pdl_delete_mmapped_data, len);
close(fd);
@@ -618,7 +618,7 @@
# RETVAL = pdl_copy(a,""); /* Init value to return */
# b = SvPDLV(RETVAL); /* Map */
# pdl_converttype( &b, datatype, PDL_PERM );
-# PDLDEBUG_f(printf("converted %d, %d, %d, %d\n",a, b, a->datatype, b->datatype));
+# PDLDEBUG_f(printf("converted %lu, %lu, %d, %d\n",a, b, a->datatype, b->datatype));
# OUTPUT:
# RETVAL
@@ -1441,7 +1441,7 @@
}
PUTBACK;
perl_call_sv(code,G_DISCARD);
- } while(sd = pdl_iterthreadloop(&pdl_thr,0));
+ } while((sd = pdl_iterthreadloop(&pdl_thr,0))!=0L);
pdl_freethreadloop(&pdl_thr);
free(pdls);
free(realdims);
diff -ur PDL-2.4.3.orig/Basic/Core/pdlapi.c PDL-2.4.3/Basic/Core/pdlapi.c
--- PDL-2.4.3.orig/Basic/Core/pdlapi.c 2006-03-17 16:12:52.000000000 -0500
+++ PDL-2.4.3/Basic/Core/pdlapi.c 2006-12-02 22:06:41.000000000 -0500
@@ -8,6 +8,7 @@
#define PDL_CORE /* For certain ifdefs */
#include "pdl.h" /* Data structure declarations */
#include "pdlcore.h" /* Core declarations */
+pdl_magic *pdl__print_magic(pdl *it);
/* Uncomment the following if you have core dumps or strange
* behaviour - it may reveal the cause by croaking because of
@@ -83,7 +84,7 @@
nvals *= it->dims[i];
}
it->nvals = nvals;
- PDLDEBUG_f(printf("pdl_allocdata 0x%x, %d, %d\n",it, it->nvals,
+ PDLDEBUG_f(printf("pdl_allocdata %p, %d, %d\n",it, it->nvals,
it->datatype));
pdl_grow(it,nvals);
@@ -147,7 +148,7 @@
it->magic = 0;
it->hdrsv = 0;
- PDLDEBUG_f(printf("CREATE 0x%x\n",it));
+ PDLDEBUG_f(printf("CREATE %p\n",it));
return it;
}
@@ -159,12 +160,12 @@
/* now check if magic is still there */
if (pdl__ismagic(it)) {
- PDLDEBUG_f(printf("0x%x is still magic\n",it));
+ PDLDEBUG_f(printf("%p is still magic\n",it));
PDLDEBUG_f(pdl__print_magic(it));
}
it->magicno = 0x42424245;
- PDLDEBUG_f(printf("FREE 0x%x\n",it));
+ PDLDEBUG_f(printf("FREE %p\n",it));
#ifndef DONT_REALLY_FREE
if(it->dims != it->def_dims) free((void*)it->dims);
if(it->dimincs != it->def_dimincs) free((void*)it->dimincs);
@@ -202,7 +203,7 @@
}
free(it);
#endif
- PDLDEBUG_f(printf("ENDFREE 0x%x\n",it));
+ PDLDEBUG_f(printf("ENDFREE %p\n",it));
}
void pdl__destroy_childtranses(pdl *it,int ensure) {
@@ -248,9 +249,9 @@
pdl_trans *curt;
PDL_DECL_CHILDLOOP(it);
PDL_CHKMAGIC(it);
- PDLDEBUG_f(printf("Destr. 0x%x\n",it);)
+ PDLDEBUG_f(printf("Destr. %p\n",it);)
if(it->state & PDL_DESTROYING) {
- PDLDEBUG_f(printf("Already Destr. 0x%x\n",it);)
+ PDLDEBUG_f(printf("Already Destr. %p\n",it);)
return;
}
it->state |= PDL_DESTROYING;
@@ -269,7 +270,7 @@
/* XXXXXXXXX Shouldn't do this! BAD MEMLEAK */
/*
if(it->progenitor || it->living_for || it->future_me) {
- PDLDEBUG_f(printf("Family, not Destr. 0x%x\n",it);)
+ PDLDEBUG_f(printf("Family, not Destr. %p\n",it);)
goto soft_destroy;
}
*/
@@ -317,14 +318,14 @@
*/
if(nafn) goto soft_destroy;
if(pdl__magic_isundestroyable(it)) {
- PDLDEBUG_f(printf("Magic, not Destr. 0x%x\n",it);)
+ PDLDEBUG_f(printf("Magic, not Destr. %p\n",it);)
goto soft_destroy;
}
pdl__destroy_childtranses(it,1);
if(it->trans) {
- PDLDEBUG_f(printf("Destr_trans. 0x%x %d\n",it->trans, it->trans->flags);)
+ PDLDEBUG_f(printf("Destr_trans. %p %d\n",it->trans, it->trans->flags);)
/* Ensure only if there are other children! */
/* XXX Bad: tmp! */
if (it->trans->flags & PDL_ITRANS_NONMUTUAL)
@@ -354,12 +355,12 @@
/* ... and now we drink */
pdl__free(it);
- PDLDEBUG_f(printf("End destroy 0x%x\n",it);)
+ PDLDEBUG_f(printf("End destroy %p\n",it);)
return;
soft_destroy:
- PDLDEBUG_f(printf("May have dependencies, not destr. %d, nu(%d, %d), nba(%d, %d), nforw(%d), tra(0x%x), nafn(%d)\n",it,
+ PDLDEBUG_f(printf("May have dependencies, not destr. %d, nu(%d, %d), nba(%d, %d), nforw(%d), tra(%p), nafn(%d)\n",it,
nundest, nundestp, nback, nback2, nforw, it->trans, nafn);)
it->state &= ~PDL_DESTROYING;
}
@@ -482,7 +483,7 @@
}
for(i=0; i<nspac; i++) spaces[i]=' ';
spaces[i] = '\0';
- printf("%sDUMPTRANS 0x%x (%s)\n",spaces,it,it->vtable->name);
+ printf("%sDUMPTRANS %p (%s)\n",spaces,it,it->vtable->name);
pdl_dump_flags_fixspace(it->flags,nspac+3,PDL_FLAGS_TRANS);
if(it->flags & PDL_ITRANS_ISAFFINE) {
pdl_trans_affine *foo = (pdl_trans_affine *)it;
@@ -503,10 +504,10 @@
/* if(it->vtable->dump) {it->vtable->dump(it);} */
printf("%s INPUTS: (",spaces);
for(i=0; i<it->vtable->nparents; i++)
- printf("%s0x%x",(i?" ":""),it->pdls[i]);
+ printf("%s%p",(i?" ":""),it->pdls[i]);
printf(") OUTPUTS: (");
for(;i<it->vtable->npdls; i++)
- printf("%s0x%x",(i?" ":""),it->pdls[i]);
+ printf("%s%p",(i?" ":""),it->pdls[i]);
printf(")\n");
}
@@ -522,24 +523,24 @@
}
for(i=0; i<nspac; i++) spaces[i]=' ';
spaces[i] = '\0';
- printf("%sDUMPING 0x%x datatype: %d\n",spaces,it,it->datatype);
+ printf("%sDUMPING %p datatype: %d\n",spaces,it,it->datatype);
pdl_dump_flags_fixspace(it->state,nspac+3,PDL_FLAGS_PDL);
- printf("%s transvtable: 0x%x, trans: 0x%x, sv: 0x%x\n",spaces,
+ printf("%s transvtable: %p, trans: %p, sv: %p\n",spaces,
(it->trans?it->trans->vtable:0), it->trans, it->sv);
if(it->datasv) {
- printf("%s Data SV: 0x%x, Svlen: %d, data: 0x%x, nvals: %d\n", spaces,
+ printf("%s Data SV: %p, Svlen: %d, data: %p, nvals: %d\n", spaces,
it->datasv, SvCUR((SV*)it->datasv), it->data, it->nvals);
}
- printf("%s Dims: 0x%x (",spaces,it->dims);
+ printf("%s Dims: %p (",spaces,it->dims);
for(i=0; i<it->ndims; i++) {
printf("%s%d",(i?" ":""),it->dims[i]);
};
- printf(")\n%s ThreadIds: 0x%x (",spaces,it->threadids);
+ printf(")\n%s ThreadIds: %p (",spaces,it->threadids);
for(i=0; i<it->nthreadids+1; i++) {
printf("%s%d",(i?" ":""),it->threadids[i]);
}
if(PDL_VAFFOK(it)) {
- printf(")\n%s Vaffine ok: 0x%x (parent), o:%d, i:(",
+ printf(")\n%s Vaffine ok: %p (parent), o:%d, i:(",
spaces,it->vafftrans->from,it->vafftrans->offs);
for(i=0; i<it->ndims; i++) {
printf("%s%d",(i?" ":""),it->vafftrans->incs[i]);
@@ -755,10 +756,10 @@
void pdl_make_physdims(pdl *it) {
int i;
int c = (it->state & (PDL_PARENTDIMSCHANGED | PDL_PARENTREPRCHANGED)) ;
- PDLDEBUG_f(printf("Make_physdims 0x%x\n",it));
+ PDLDEBUG_f(printf("Make_physdims %p\n",it));
PDL_CHKMAGIC(it);
if(!(it->state & (PDL_PARENTDIMSCHANGED | PDL_PARENTREPRCHANGED))) {
- PDLDEBUG_f(printf("Make_physdims_exit (NOP) 0x%x\n",it));
+ PDLDEBUG_f(printf("Make_physdims_exit (NOP) %p\n",it));
return;
}
it->state &= ~(PDL_PARENTDIMSCHANGED | PDL_PARENTREPRCHANGED);
@@ -770,14 +771,14 @@
/* doesn't this mean that all children of this trans have
now their dims set and accordingly all those flags should
be reset? Otherwise redodims will be called for them again? */
- PDLDEBUG_f(printf("Make_physdims: calling redodims 0x%x on 0x%x\n",
+ PDLDEBUG_f(printf("Make_physdims: calling redodims %p on %p\n",
it->trans,it));
it->trans->vtable->redodims(it->trans);
/* why this one? will the old allocated data be freed correctly? */
if((c & PDL_PARENTDIMSCHANGED) && (it->state & PDL_ALLOCATED)) {
it->state &= ~PDL_ALLOCATED;
}
- PDLDEBUG_f(printf("Make_physdims_exit 0x%x\n",it));
+ PDLDEBUG_f(printf("Make_physdims_exit %p\n",it));
}
void pdl_writeover(pdl *it) {
@@ -845,7 +846,7 @@
* a parent, and whether they need to be updated. If this is
* the case, we need to do some thinking. */
- PDLDEBUG_f(printf("make_trans_mutual 0x%x\n",trans));
+ PDLDEBUG_f(printf("make_trans_mutual %p\n",trans));
for(i=trans->vtable->nparents; i<trans->vtable->npdls; i++) {
if(trans->pdls[i]->trans) fflag ++;
if(trans->pdls[i]->state & PDL_DATAFLOW_ANY) cfflag++;
@@ -938,7 +939,7 @@
}
#endif
- PDLDEBUG_f(printf("make_trans_mutual_exit 0x%x\n",trans));
+ PDLDEBUG_f(printf("make_trans_mutual_exit %p\n",trans));
} /* pdl_make_trans_mutual() */
@@ -957,7 +958,7 @@
int i, vaffinepar=0;
DECL_RECURSE_GUARD;
- PDLDEBUG_f(printf("Make_physical 0x%x\n",it));
+ PDLDEBUG_f(printf("Make_physical %p\n",it));
PDL_CHKMAGIC(it);
START_RECURSE_GUARD;
@@ -1049,7 +1050,7 @@
it->state &= (~PDL_ANYCHANGED) & (~PDL_OPT_ANY_OK);
mkphys_end:
- PDLDEBUG_f(printf("Make_physical_exit 0x%x\n",it));
+ PDLDEBUG_f(printf("Make_physical_exit %p\n",it));
END_RECURSE_GUARD;
}
@@ -1098,7 +1099,7 @@
if(!PDL_VAFFOK(it)) {
croak("Vaffine not ok!, trying to use vaffinechanged");
}
- PDLDEBUG_f(printf("pdl_vaffinechanged: writing back data, triggered by pdl 0x%x, using parent 0x%x\n",it,it->vafftrans->from));
+ PDLDEBUG_f(printf("pdl_vaffinechanged: writing back data, triggered by pdl %p, using parent %p\n",it,it->vafftrans->from));
pdl_changed(it->vafftrans->from,what,0);
}
@@ -1109,7 +1110,7 @@
pdl_children *c; int i; int j;
PDLDEBUG_f(
- printf("pdl_changed: entry for pdl 0x%x, what %d, recursing: %d\n",
+ printf("pdl_changed: entry for pdl %p, what %d, recursing: %d\n",
it,what,recursing);
if (it->state & PDL_TRACEDEBUG)
pdl_dump(it);
@@ -1146,14 +1147,14 @@
if(it->trans && !recursing && (it->trans->flags & PDL_ITRANS_DO_DATAFLOW_B)) {
if((it->trans->flags & PDL_ITRANS_ISAFFINE) &&
(PDL_VAFFOK(it))) {
- PDLDEBUG_f(printf("pdl_changed: calling writebackdata_vaffine (pdl 0x%x)\n",it));
+ PDLDEBUG_f(printf("pdl_changed: calling writebackdata_vaffine (pdl %p)\n",it));
pdl_writebackdata_vaffine(it);
pdl_changed(it->vafftrans->from,what,0);
} else {
if(!it->trans->vtable->writebackdata) {
die("Internal error: got so close to reversing irrev.");
}
- PDLDEBUG_f(printf("pdl_changed: calling writebackdata from vtable, triggered by pdl 0x%x, using trans 0x%x\n",it,it->trans));
+ PDLDEBUG_f(printf("pdl_changed: calling writebackdata from vtable, triggered by pdl %p, using trans %p\n",it,it->trans));
it->trans->vtable->writebackdata(it->trans);
for(i=0; i<it->trans->vtable->nparents; i++) {
if((it->trans->vtable->per_pdl_flags[i] &
@@ -1183,7 +1184,7 @@
c=c->next;
} while(c);
}
- PDLDEBUG_f(printf("pdl_changed: exiting for pdl 0x%x\n",it));
+ PDLDEBUG_f(printf("pdl_changed: exiting for pdl %p\n",it));
}
/* This transformation changes soon, so make sure the children
@@ -1265,7 +1266,7 @@
PDL_ENSURE_ALLOCATED(trans->pdls[j]);
}
- if(flag & PDL_PARENTDATACHANGED | flag & PDL_PARENTDIMSCHANGED) {
+ if((flag & PDL_PARENTDATACHANGED) | (flag & PDL_PARENTDIMSCHANGED)) {
int i;
if(par_pvaf && (trans->flags & PDL_ITRANS_ISAFFINE)) {
@@ -1318,7 +1319,7 @@
pdl *destbuffer[100];
int ndest = 0;
- PDLDEBUG_f(printf("entering pdl_destroytransform 0x%x (ensure %d)\n",
+ PDLDEBUG_f(printf("entering pdl_destroytransform %p (ensure %d)\n",
trans,ensure));
if(100 < trans->vtable->npdls) {
die("Huge trans");
@@ -1326,7 +1327,7 @@
PDL_TR_CHKMAGIC(trans);
if(!trans->vtable) {
- die("ZERO VTABLE DESTTRAN 0x%x %d\n",trans,ensure);
+ die("ZERO VTABLE DESTTRAN %p %d\n",trans,ensure);
}
if(ensure) {
PDLDEBUG_f(printf("pdl_destroytransform: ensure\n"));
@@ -1336,7 +1337,7 @@
foo = trans->pdls[j];
if(!foo) continue;
PDL_CHKMAGIC(foo);
- PDLDEBUG_f(printf("pdl_removectransform(0x%x): 0x%x %d\n",
+ PDLDEBUG_f(printf("pdl_removectransform(%p): %p %d\n",
trans, trans->pdls[j], j));
pdl__removechildtrans(trans->pdls[j],trans,j,1);
if(!(foo->state & PDL_DESTROYING) && !foo->sv) {
@@ -1346,11 +1347,11 @@
for(; j<trans->vtable->npdls; j++) {
foo = trans->pdls[j];
PDL_CHKMAGIC(foo);
- PDLDEBUG_f(printf("pdl_removeptransform(0x%x): 0x%x %d\n",
+ PDLDEBUG_f(printf("pdl_removeptransform(%p): %p %d\n",
trans, trans->pdls[j], j));
pdl__removeparenttrans(trans->pdls[j],trans,j);
if(foo->vafftrans) {
- PDLDEBUG_f(printf("pdl_removevafft: 0x%x\n", foo));
+ PDLDEBUG_f(printf("pdl_removevafft: %p\n", foo));
pdl_vafftrans_remove(foo);
}
if(!(foo->state & PDL_DESTROYING) && !foo->sv) {
@@ -1376,7 +1377,7 @@
pdl_destroy(destbuffer[j]);
}
- PDLDEBUG_f(printf("leaving pdl_destroytransform 0x%x\n", trans));
+ PDLDEBUG_f(printf("leaving pdl_destroytransform %p\n", trans));
}
@@ -1471,7 +1472,7 @@
int flag;
int incsign;
- PDLDEBUG_f(printf("Make_physvaffine 0x%x\n",it));
+ PDLDEBUG_f(printf("Make_physvaffine %p\n",it));
pdl_make_physdims(it);
@@ -1487,7 +1488,7 @@
PDL_ENSURE_VAFFTRANS(it);
incsleft = malloc(sizeof(*incsleft)*it->ndims);
- PDLDEBUG_f(printf("vaff_malloc: got 0x%x\n",incsleft));
+ PDLDEBUG_f(printf("vaff_malloc: got %p\n",incsleft));
for(i=0; i<it->ndims; i++) {
it->vafftrans->incs[i] = it->dimincs[i];
}
@@ -1576,9 +1577,9 @@
pdl_make_physical(current);
mkphys_vaff_end:
- PDLDEBUG_f(printf("vaff_malloc: 0x%x\n",incsleft));
+ PDLDEBUG_f(printf("vaff_malloc: %p\n",incsleft));
if (incsleft != NULL) free(incsleft);
- PDLDEBUG_f(printf("Make_physvaffine_exit 0x%x\n",it));
+ PDLDEBUG_f(printf("Make_physvaffine_exit %p\n",it));
}
diff -ur PDL-2.4.3.orig/Basic/Core/pdlcore.c.PL PDL-2.4.3/Basic/Core/pdlcore.c.PL
--- PDL-2.4.3.orig/Basic/Core/pdlcore.c.PL 2006-07-22 17:44:14.000000000 -0400
+++ PDL-2.4.3/Basic/Core/pdlcore.c.PL 2006-12-02 22:06:41.000000000 -0500
@@ -513,6 +513,7 @@
if (at >= 0 && at < dsz) return at;
pdl_barf("access [%d] out of range [0..%d] (inclusive) at %s line %d",
at, dsz-1, file?file:"?", lineno);
+ return 0L;
}
/*
@@ -669,7 +670,7 @@
/* Recurse to find depth inside the array reference */
newdepth = 1 + av_ndcheck((AV *) SvRV(el), dims, level+1, datalevel);
- } else if ( pdl = SvPDLV(el) ) {
+ } else if ( (pdl = SvPDLV(el)) != 0L ) {
int j;
/* It is a PDL - walk down its dimension list, exactly as if it
@@ -986,7 +987,7 @@
undef_count += pdl_setav_$type(pdata, (AV *) SvRV(el), pdims, ndims, level+1);
else if( SvROK(el) ) {
pdl *pdl;
- if( pdl = SvPDLV(el) ) {
+ if( (pdl = SvPDLV(el)) != 0 ) {
pdl_make_physical(pdl);
@@ -1031,7 +1032,7 @@
}
if(level==0 && debug_flag && undefval && undef_count) {
- fprintf(stderr,"Warning: pdl_setav_$type converted undef to $PDL::undefval (%g) %d time%s\\n",undefval,undef_count,undef_count==1?"":"s");
+ fprintf(stderr,"Warning: pdl_setav_$type converted undef to $PDL::undefval (%g) %ld time%s\\n",undefval,undef_count,undef_count==1?"":"s");
}
return undef_count;
diff -ur PDL-2.4.3.orig/Basic/Core/pdlmagic.c PDL-2.4.3/Basic/Core/pdlmagic.c
--- PDL-2.4.3.orig/Basic/Core/pdlmagic.c 2006-07-10 17:46:24.000000000 -0400
+++ PDL-2.4.3/Basic/Core/pdlmagic.c 2006-12-02 22:06:41.000000000 -0500
@@ -96,7 +96,7 @@
{
pdl_magic **foo = &(it->magic);
while(*foo) {
- printf("Magic %d\ttype: ",*foo);
+ printf("Magic %lu\ttype: ",(unsigned long)*foo);
if((*foo)->what & PDL_MAGIC_MARKCHANGED)
printf("PDL_MAGIC_MARKCHANGED");
else if ((*foo)->what & PDL_MAGIC_MUTATEDPARENT)
@@ -237,10 +237,10 @@
static void *pthread_perform(void *vp) {
struct ptarg *p = (ptarg *)vp;
- if(TVERB) printf("STARTING THREAD %d (%d)\n",p->no, pthread_self());
+ if(TVERB) printf("STARTING THREAD %d (%lu)\n",p->no, (unsigned long)pthread_self());
pthread_setspecific(p->mag->key,(void *)&(p->no));
(p->func)(p->t);
- if(TVERB) printf("ENDING THREAD %d (%d)\n",p->no, pthread_self());
+ if(TVERB) printf("ENDING THREAD %d (%lu)\n",p->no, (unsigned long)pthread_self());
return NULL;
}
@@ -274,8 +274,8 @@
tp = malloc(sizeof(pthread_t) * ptr->nthreads);
tparg = malloc(sizeof(*tparg) * ptr->nthreads);
pthread_key_create(&(ptr->key),NULL);
- if(TVERB) printf("CREATING THREADS, ME: %d, key: %d\n",pthread_self(),
- ptr->key);
+ if(TVERB) printf("CREATING THREADS, ME: %lu, key: %lu\n",(unsigned long)pthread_self(),
+ (unsigned long)ptr->key);
for(i=0; i<ptr->nthreads; i++) {
tparg[i].mag = ptr;
tparg[i].func = func;
@@ -283,13 +283,13 @@
tparg[i].no = i;
pthread_create(tp+i, NULL, pthread_perform, tparg+i);
}
- if(TVERB) printf("JOINING THREADS, ME: %d, key: %d\n",pthread_self(),
- ptr->key);
+ if(TVERB) printf("JOINING THREADS, ME: %lu, key: %lu\n",(unsigned long)pthread_self(),
+ (unsigned long)ptr->key);
for(i=0; i<ptr->nthreads; i++) {
pthread_join(tp[i], NULL);
}
- if(TVERB) printf("FINISHED THREADS, ME: %d, key: %d\n",pthread_self(),
- ptr->key);
+ if(TVERB) printf("FINISHED THREADS, ME: %lu, key: %lu\n",(unsigned long)pthread_self(),
+ (unsigned long)ptr->key);
pthread_key_delete((ptr->key));
}
diff -ur PDL-2.4.3.orig/Basic/Core/pdlthread.c PDL-2.4.3/Basic/Core/pdlthread.c
--- PDL-2.4.3.orig/Basic/Core/pdlthread.c 2003-04-19 06:55:41.000000000 -0400
+++ PDL-2.4.3/Basic/Core/pdlthread.c 2006-12-02 22:06:41.000000000 -0500
@@ -32,7 +32,7 @@
void dump_thread(pdl_thread *thread) {
int i;
char spaces[] = " ";
- printf("DUMPTHREAD 0x%x \n",thread);
+ printf("DUMPTHREAD %p \n",thread);
if (0&& thread->einfo) {
psp; printf("Funcname: %s\n",thread->einfo->funcname);
psp; printf("Paramaters: ");
@@ -50,7 +50,7 @@
psp; printf("Realdims: "); print_iarr(thread->realdims,thread->npdls); printf("\n");
psp; printf("Pdls: (");
for (i=0;i<thread->npdls;i++)
- printf("%s0x%x",(i?" ":""),thread->pdls[i]);
+ printf("%s%p",(i?" ":""),thread->pdls[i]);
printf(")\n");
psp; printf("Per pdl flags: (");
for (i=0;i<thread->npdls;i++)
@@ -101,7 +101,7 @@
}
void pdl_freethreadloop(pdl_thread *thread) {
- PDLDEBUG_f(printf("Freethreadloop(0x%x, 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x)\n",
+ PDLDEBUG_f(printf("Freethreadloop(%p, %p %p %p %p %p %p)\n",
thread,
thread->inds, thread->dims, thread->offs, thread->incs,
thread->flags, thread->pdls);)
@@ -117,7 +117,7 @@
}
void pdl_clearthreadstruct(pdl_thread *it) {
- PDLDEBUG_f(printf("Clearthreadloop(0x%x)\n", it);)
+ PDLDEBUG_f(printf("Clearthreadloop(%p)\n", it);)
it->einfo = 0;it->inds = 0;it->dims = 0;
it->ndims = it->nimpl = it->npdls = 0; it->offs = 0;
it->pdls = 0;it->incs = 0; it->realdims=0; it->flags=0;
@@ -151,7 +151,7 @@
int *nthreadids;
int nthr = 0; int nthrd;
- PDLDEBUG_f(printf("Initthreadloop(0x%x)\n", thread);)
+ PDLDEBUG_f(printf("Initthreadloop(%p)\n", thread);)
#ifdef PDL_THREAD_DEBUG
/* the following is a fix for a problem in the current core logic
* see comments in pdl_make_physical in pdlapi.c
diff -ur PDL-2.4.3.orig/Basic/MatrixOps/blas.c PDL-2.4.3/Basic/MatrixOps/blas.c
--- PDL-2.4.3.orig/Basic/MatrixOps/blas.c 2002-11-19 19:16:16.000000000 -0500
+++ PDL-2.4.3/Basic/MatrixOps/blas.c 2006-12-02 22:06:41.000000000 -0500
@@ -6,6 +6,7 @@
* by column vector V of dimension c on the right
* to produce a (column) vector Y output of dimension r.
*/
+void
mvmpy( r, c, A, V, Y )
int r, c;
double *A, *V, *Y;
@@ -33,6 +34,7 @@
* by a c (rows) by r (columns) matrix B on the right
* to produce an r by r matrix Y.
*/
+void
mmmpy( r, c, A, B, Y )
int r, c;
double *A, *B, *Y;
@@ -65,6 +67,7 @@
/* Transpose the n by n square matrix A and put the result in T.
* T may occupy the same storage as A.
*/
+void
mtransp( n, A, T )
int n;
double *A, *T;
@@ -132,6 +135,7 @@
/* Unpack symmetric matrix T stored in lower triangular form
* into a symmetric n by n square matrix S.
*/
+void
tritosquare( n, T, S )
int n;
double T[], S[];
diff -ur PDL-2.4.3.orig/Basic/Primitive/primitive.pd PDL-2.4.3/Basic/Primitive/primitive.pd
--- PDL-2.4.3.orig/Basic/Primitive/primitive.pd 2006-07-10 17:46:24.000000000 -0400
+++ PDL-2.4.3/Basic/Primitive/primitive.pd 2006-12-02 22:06:41.000000000 -0500
@@ -1719,7 +1719,7 @@
while (jh-jl > 1) /* binary search */
{
m = (jh+jl) >> 1;
- if ($i() > $x(n => m) == up)
+ if (($i() > $x(n => m)) == up)
jl = m;
else
jh = m;
@@ -1784,7 +1784,7 @@
while (jh-jl > 1) /* binary search */
{
m = (jh+jl) >> 1;
- if ($xi() > $x(n => m) == up)
+ if (($xi() > $x(n => m)) == up)
jl = m;
else
jh = m;
diff -ur PDL-2.4.3.orig/Basic/Slices/slices.pd PDL-2.4.3/Basic/Slices/slices.pd
--- PDL-2.4.3.orig/Basic/Slices/slices.pd 2006-03-10 14:26:14.000000000 -0500
+++ PDL-2.4.3/Basic/Slices/slices.pd 2006-12-02 22:06:41.000000000 -0500
@@ -116,9 +116,9 @@
$EQUIVCPOFFS(i,poffs);
for(nd=0; nd<$CHILD_P(ndims); nd++) {
poffs += $PRIV(incs[nd]);
- if(nd<$CHILD_P(ndims)-1 &&
- (i+1)%$CHILD_P(dimincs[nd+1]) ||
- nd == $CHILD_P(ndims)-1)
+ if(((nd<$CHILD_P(ndims)-1 &&
+ (i+1)%$CHILD_P(dimincs[nd+1]))) ||
+ (nd == $CHILD_P(ndims)-1))
break;
poffs -= $PRIV(incs[nd]) *
$CHILD_P(dims[nd]);