~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.2.1/third_party/gsm/src/debug.c

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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: /tmp_amd/presto/export/kbs/jutta/src/gsm/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,
 
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