Browse Source

Test

etomic
jl777 8 years ago
parent
commit
2cb9e4e81a
  1. 4
      basilisk/tradebots_liquidity.c
  2. 4
      iguana/iguana777.h

4
basilisk/tradebots_liquidity.c

@ -110,7 +110,7 @@ int32_t tradebots_calcrawfeatures(struct tradebot_arbpair *pair)
} }
if ( n > sizeof(pair->rawfeatures)/sizeof(*pair->rawfeatures) ) if ( n > sizeof(pair->rawfeatures)/sizeof(*pair->rawfeatures) )
{ {
printf("n.%d too many for rawfeatures %ld\n",n,sizeof(pair->rawfeatures)/sizeof(*pair->rawfeatures)); printf("n.%d too many for rawfeatures %d\n",n,(int32_t)(sizeof(pair->rawfeatures)/sizeof(*pair->rawfeatures)));
exit(-1); exit(-1);
} }
return(n); return(n);
@ -160,7 +160,7 @@ struct tradebot_arbpair *tradebots_arbpair_create(char *base,char *rel)
pair->fp = OS_appendfile(fname); pair->fp = OS_appendfile(fname);
if ( (ftell(pair->fp) % sizeof(pair->rawfeatures)) != 0 ) if ( (ftell(pair->fp) % sizeof(pair->rawfeatures)) != 0 )
{ {
printf("misalinged rawfeatures %ld %ld\n",ftell(pair->fp),(ftell(pair->fp) % sizeof(pair->rawfeatures))); printf("misalinged rawfeatures %d %d\n",(uint32_t)ftell(pair->fp),(uint32_t)(ftell(pair->fp) % sizeof(pair->rawfeatures)));
} }
fseek(pair->fp,(ftell(pair->fp) / sizeof(pair->rawfeatures)) * sizeof(pair->rawfeatures) - sizeof(pair->rawfeatures),SEEK_SET); fseek(pair->fp,(ftell(pair->fp) / sizeof(pair->rawfeatures)) * sizeof(pair->rawfeatures) - sizeof(pair->rawfeatures),SEEK_SET);
if ( fread(pair->rawfeatures,1,sizeof(pair->rawfeatures),pair->fp) == sizeof(pair->rawfeatures) ) if ( fread(pair->rawfeatures,1,sizeof(pair->rawfeatures),pair->fp) == sizeof(pair->rawfeatures) )

4
iguana/iguana777.h

@ -21,13 +21,17 @@
#define iguana777_net_h #define iguana777_net_h
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)
#ifndef WIN32
#define WIN32 #define WIN32
#endif #endif
#endif
#if (defined(_WIN32) || defined(__WIN32__)) && \ #if (defined(_WIN32) || defined(__WIN32__)) && \
!defined(WIN32) && !defined(__SYMBIAN32__) !defined(WIN32) && !defined(__SYMBIAN32__)
#ifndef WIN32
#define WIN32 #define WIN32
#endif #endif
#endif
#ifdef WIN32 #ifdef WIN32
#define __MINGW #define __MINGW

Loading…
Cancel
Save