diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-05-01 16:24:15 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-05-01 16:24:15 +0200 |
commit | a30ba67504ffd12c4db499adbb5ce47a7d1f6036 (patch) | |
tree | 9ae1a7e3849dda6bbb5c578232f6f2fa5b2e7e7e /numlib/numsup.c | |
parent | 89e99e8a827859729729dfc92d74be4a8f96f1a4 (diff) | |
parent | 094535c010320967639e8e86f974d878e80baa72 (diff) |
New release 1.7.0
Diffstat (limited to 'numlib/numsup.c')
-rw-r--r-- | numlib/numsup.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/numlib/numsup.c b/numlib/numsup.c index a28dcd2..bfa144b 100644 --- a/numlib/numsup.c +++ b/numlib/numsup.c @@ -27,6 +27,7 @@ #include <pthread.h> #endif +#define NUMSUP_C #include "numsup.h" /* @@ -239,6 +240,7 @@ void check_if_not_interactive() { #endif + /* Default verbose logging function - print to stdtout */ static void a1_default_v_log(void *cntx, a1log *p, char *fmt, va_list args) { vfprintf(stdout, fmt, args); @@ -328,7 +330,7 @@ a1log *new_a1log_d(a1log *log) { /* Returns NULL */ a1log *del_a1log(a1log *log) { if (log != NULL) { - if (--log->refc == 0) { + if (--log->refc <= 0) { #ifdef NT DeleteCriticalSection(&log->lock); #endif @@ -476,7 +478,7 @@ static void g_loge(char *fmt, ...) { void verbose(int level, char *fmt, ...) { - if (level >= g_log->verb) { + if (g_log->verb >= level) { va_list args; A1LOG_LOCK(g_log); @@ -1423,7 +1425,7 @@ void matrix_print(char *c, double **a, int nr, int nc) { /* Platform independent IEE754 conversions */ /*******************************************/ -/* Cast a native double to an IEEE754 encoded single precision value, */ +/* Convert a native double to an IEEE754 encoded single precision value, */ /* in a platform independent fashion. (ie. This works even */ /* on the rare platforms that don't use IEEE 754 floating */ /* point for their C implementation) */ @@ -1462,7 +1464,7 @@ ORD32 doubletoIEEE754(double d) { return id; } -/* Cast a an IEEE754 encoded single precision value to a native double, */ +/* Convert a an IEEE754 encoded single precision value to a native double, */ /* in a platform independent fashion. (ie. This works even */ /* on the rare platforms that don't use IEEE 754 floating */ /* point for their C implementation) */ @@ -1486,7 +1488,7 @@ double IEEE754todouble(ORD32 ip) { return op; } -/* Cast a native double to an IEEE754 encoded double precision value, */ +/* Convert a native double to an IEEE754 encoded double precision value, */ /* in a platform independent fashion. (ie. This works even */ /* on the rare platforms that don't use IEEE 754 floating */ /* point for their C implementation) */ @@ -1525,7 +1527,7 @@ ORD64 doubletoIEEE754_64(double d) { return id; } -/* Cast a an IEEE754 encode double precision value to a native double, */ +/* Convert a an IEEE754 encode double precision value to a native double, */ /* in a platform independent fashion. (ie. This works even */ /* on the rare platforms that don't use IEEE 754 floating */ /* point for their C implementation) */ |