00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "private.h"
00010
00011 #ifndef NDEBUG
00012
00013
00014
00015
00016
00017
00018 #include <stdio.h>
00019 #include "proto.h"
00020
00021 void gsm_debug_words P4( (name, from, to, ptr),
00022 char * name,
00023 int from,
00024 int to,
00025 word * ptr)
00026 {
00027 int nprinted = 0;
00028
00029 fprintf( stderr, "%s [%d .. %d]: ", name, from, to );
00030 while (from <= to) {
00031 fprintf(stderr, "%d ", ptr[ from ] );
00032 from++;
00033 if (nprinted++ >= 7) {
00034 nprinted = 0;
00035 if (from < to) putc('\n', stderr);
00036 }
00037 }
00038 putc('\n', stderr);
00039 }
00040
00041 void gsm_debug_longwords P4( (name, from, to, ptr),
00042 char * name,
00043 int from,
00044 int to,
00045 longword * ptr)
00046 {
00047 int nprinted = 0;
00048
00049 fprintf( stderr, "%s [%d .. %d]: ", name, from, to );
00050 while (from <= to) {
00051
00052 fprintf(stderr, "%ld ", ptr[ from ] );
00053 from++;
00054 if (nprinted++ >= 7) {
00055 nprinted = 0;
00056 if (from < to) putc('\n', stderr);
00057 }
00058 }
00059 putc('\n', stderr);
00060 }
00061
00062 void gsm_debug_longword P2( (name, value),
00063 char * name,
00064 longword value )
00065 {
00066 fprintf(stderr, "%s: %ld\n", name, (long)value );
00067 }
00068
00069 void gsm_debug_word P2( (name, value),
00070 char * name,
00071 word value )
00072 {
00073 fprintf(stderr, "%s: %ld\n", name, (long)value);
00074 }
00075
00076 #endif