Asterisk - The Open Source Telephony Project GIT-master-2de1a68
debug.c
Go to the documentation of this file.
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$ */
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
21void 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
41void 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
62void gsm_debug_longword P2( (name, value),
63 char * name,
65{
66 fprintf(stderr, "%s: %d\n", name, (long)value );
67}
68
69void 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
short word
long longword
void gsm_debug_longword P2((name, value), char *name, longword value)
Definition: debug.c:62
void gsm_debug_words P4((name, from, to, ptr), char *name, int from, int to, word *ptr)
Definition: debug.c:21
static const char name[]
Definition: format_mp3.c:68
int value
Definition: syslog.c:37