| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#include "private.h" |
| 10 |
|
| 11 |
#ifndef NDEBUG |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#include <stdio.h> |
| 19 |
#include "proto.h" |
| 20 |
|
| 21 |
void gsm_debug_words P4( (name, from, to, ptr), |
| 22 |
char * name, |
| 23 |
int from, |
| 24 |
int to, |
| 25 |
word * ptr) |
| 26 |
{ |
| 27 |
int nprinted = 0; |
| 28 |
|
| 29 |
fprintf( stderr, "%s [%d .. %d]: ", name, from, to ); |
| 30 |
while (from <= to) { |
| 31 |
fprintf(stderr, "%d ", ptr[ from ] ); |
| 32 |
from++; |
| 33 |
if (nprinted++ >= 7) { |
| 34 |
nprinted = 0; |
| 35 |
if (from < to) putc('\n', stderr); |
| 36 |
} |
| 37 |
} |
| 38 |
putc('\n', stderr); |
| 39 |
} |
| 40 |
|
| 41 |
void gsm_debug_longwords P4( (name, from, to, ptr), |
| 42 |
char * name, |
| 43 |
int from, |
| 44 |
int to, |
| 45 |
longword * ptr) |
| 46 |
{ |
| 47 |
int nprinted = 0; |
| 48 |
|
| 49 |
fprintf( stderr, "%s [%d .. %d]: ", name, from, to ); |
| 50 |
while (from <= to) { |
| 51 |
|
| 52 |
fprintf(stderr, "%d ", ptr[ from ] ); |
| 53 |
from++; |
| 54 |
if (nprinted++ >= 7) { |
| 55 |
nprinted = 0; |
| 56 |
if (from < to) putc('\n', stderr); |
| 57 |
} |
| 58 |
} |
| 59 |
putc('\n', stderr); |
| 60 |
} |
| 61 |
|
| 62 |
void gsm_debug_longword P2( (name, value), |
| 63 |
char * name, |
| 64 |
longword value ) |
| 65 |
{ |
| 66 |
fprintf(stderr, "%s: %d\n", name, (long)value ); |
| 67 |
} |
| 68 |
|
| 69 |
void gsm_debug_word P2( (name, value), |
| 70 |
char * name, |
| 71 |
word value ) |
| 72 |
{ |
| 73 |
fprintf(stderr, "%s: %d\n", name, (long)value); |
| 74 |
} |
| 75 |
|
| 76 |
#endif |