Mercurial > hg > audiostuff
comparison intercom/gsm/debug.c @ 2:13be24d74cd2
import intercom-0.4.1
| author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
|---|---|
| date | Fri, 25 Jun 2010 09:57:52 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:9cadc470e3da | 2:13be24d74cd2 |
|---|---|
| 1 /* | |
| 2 * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische | |
| 3 * Universitaet Berlin. See the accompanying file "COPYRIGHT" for | |
| 4 * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. | |
| 5 */ | |
| 6 | |
| 7 /* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/debug.c,v 1.2 1993/01/29 18:22:20 jutta Exp $ */ | |
| 8 | |
| 9 #include "private.h" | |
| 10 | |
| 11 #ifndef NDEBUG | |
| 12 | |
| 13 /* If NDEBUG _is_ defined and no debugging should be performed, | |
| 14 * calls to functions in this module are #defined to nothing | |
| 15 * in private.h. | |
| 16 */ | |
| 17 | |
| 18 #include <stdio.h> | |
| 19 #include "proto.h" | |
| 20 | |
| 21 void gsm_debug_words P4((name, from, to, ptr), | |
| 22 char *name, int from, int to, word * ptr) | |
| 23 { | |
| 24 int nprinted = 0; | |
| 25 | |
| 26 fprintf(stderr, "%s [%d .. %d]: ", name, from, to); | |
| 27 while (from <= to) { | |
| 28 fprintf(stderr, "%d ", ptr[from]); | |
| 29 from++; | |
| 30 if (nprinted++ >= 7) { | |
| 31 nprinted = 0; | |
| 32 if (from < to) | |
| 33 putc('\n', stderr); | |
| 34 } | |
| 35 } | |
| 36 putc('\n', stderr); | |
| 37 } | |
| 38 | |
| 39 void gsm_debug_longwords P4((name, from, to, ptr), | |
| 40 char *name, int from, int to, longword * ptr) | |
| 41 { | |
| 42 int nprinted = 0; | |
| 43 | |
| 44 fprintf(stderr, "%s [%d .. %d]: ", name, from, to); | |
| 45 while (from <= to) { | |
| 46 | |
| 47 fprintf(stderr, "%d ", ptr[from]); | |
| 48 from++; | |
| 49 if (nprinted++ >= 7) { | |
| 50 nprinted = 0; | |
| 51 if (from < to) | |
| 52 putc('\n', stderr); | |
| 53 } | |
| 54 } | |
| 55 putc('\n', stderr); | |
| 56 } | |
| 57 | |
| 58 void gsm_debug_longword P2((name, value), char *name, longword value) | |
| 59 { | |
| 60 fprintf(stderr, "%s: %d\n", name, (long) value); | |
| 61 } | |
| 62 | |
| 63 void gsm_debug_word P2((name, value), char *name, word value) | |
| 64 { | |
| 65 fprintf(stderr, "%s: %d\n", name, (long) value); | |
| 66 } | |
| 67 | |
| 68 #endif |
