Asterisk - The Open Source Telephony Project  18.5.0
Functions
debug.c File Reference
#include "private.h"
#include <stdio.h>
#include "proto.h"
Include dependency graph for debug.c:

Go to the source code of this file.

Functions

void gsm_debug_longword P2 ((name, value), char *name, longword value)
 
void gsm_debug_word P2 ((name, value), char *name, word value)
 
void gsm_debug_words P4 ((name, from, to, ptr), char *name, int from, int to, word *ptr)
 
void gsm_debug_longwords P4 ((name, from, to, ptr), char *name, int from, int to, longword *ptr)
 

Function Documentation

◆ P2() [1/2]

void gsm_debug_longword P2 ( (name, value ,
char *  name,
longword  value 
)

Definition at line 62 of file debug.c.

65 {
66  fprintf(stderr, "%s: %d\n", name, (long)value );
67 }
int value
Definition: syslog.c:37
static const char name[]
Definition: cdr_mysql.c:74

◆ P2() [2/2]

void gsm_debug_word P2 ( (name, value ,
char *  name,
word  value 
)

Definition at line 69 of file debug.c.

72 {
73  fprintf(stderr, "%s: %d\n", name, (long)value);
74 }
int value
Definition: syslog.c:37
static const char name[]
Definition: cdr_mysql.c:74

◆ P4() [1/2]

void gsm_debug_words P4 ( (name, from, to, ptr)  ,
char *  name,
int  from,
int  to,
word ptr 
)

Definition at line 21 of file debug.c.

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 }
static const char name[]
Definition: cdr_mysql.c:74

◆ P4() [2/2]

void gsm_debug_longwords P4 ( (name, from, to, ptr)  ,
char *  name,
int  from,
int  to,
longword ptr 
)

Definition at line 41 of file debug.c.

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 }
static const char name[]
Definition: cdr_mysql.c:74