~ubuntu-branches/ubuntu/breezy/orbit2/breezy

« back to all changes in this revision

Viewing changes to linc2/src/linc-debug.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2005-09-06 16:37:02 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050906163702-hrqi0ctymth53bnn
Tags: 1:2.12.4-0ubuntu1
* New upstream version.
* debian/patches/100-compile-name-server.patch:
  - updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _LINK_DEBUG_H
 
2
#define _LINK_DEBUG_H
 
3
 
 
4
/*
 
5
 * Enables debug on the Unix socket / connection
 
6
 */
 
7
#ifdef _WIN32
 
8
#  define CONNECTION_DEBUG      /* Temporary... */
 
9
#else
 
10
#  undef CONNECTION_DEBUG
 
11
#endif
 
12
 
 
13
#ifndef CONNECTION_DEBUG
 
14
#ifdef G_HAVE_ISO_VARARGS
 
15
#  define d_printf(...)
 
16
#elif defined(G_HAVE_GNUC_VARARGS)
 
17
#  define d_printf(args...)
 
18
#else
 
19
static inline void d_printf (const char *format, ...)
 
20
{
 
21
}
 
22
#endif
 
23
#  define STATE_NAME(s) ""
 
24
#else
 
25
#  include <stdio.h>
 
26
#  define d_printf(format...) fprintf (stderr, format)
 
27
#  define STATE_NAME(s) (((s) == LINK_CONNECTED) ? "Connected" : \
 
28
                         ((s) == LINK_CONNECTING) ? "Connecting" : \
 
29
                         ((s) == LINK_DISCONNECTED) ? "Disconnected" : \
 
30
                         "Invalid state")
 
31
#endif
 
32
 
 
33
#endif /* _LINK_DEBUG_H */