Asterisk - The Open Source Telephony Project
18.5.0
codecs
gsm
src
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
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
P4
void gsm_debug_words P4((name, from, to, ptr), char *name, int from, int to, word *ptr)
Definition:
debug.c:21
value
int value
Definition:
syslog.c:37
proto.h
name
static const char name[]
Definition:
cdr_mysql.c:74
longword
long longword
Definition:
codecs/gsm/inc/private.h:13
P2
void gsm_debug_longword P2((name, value), char *name, longword value)
Definition:
debug.c:62
word
short word
Definition:
codecs/gsm/inc/private.h:12
Generated on Sun Aug 8 2021 19:43:41 for Asterisk - The Open Source Telephony Project by
1.8.13