source: trunk/third/linc/src/linc-debug.h @ 18242

Revision 18242, 545 bytes checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18241, which included commits to RCS files with non-trunk default branches.
Line 
1#ifndef _LINC_DEBUG_H
2#define _LINC_DEBUG_H
3
4/*
5 * Enables debug on the Unix socket / connection
6 */
7#undef CONNECTION_DEBUG
8
9#ifndef CONNECTION_DEBUG
10   static inline void d_printf (const char *format, ...) { };
11#  define STATE_NAME(s) ""
12#else
13#  include <stdio.h>
14#  define d_printf(format...) fprintf (stderr, format)
15#  define STATE_NAME(s) (((s) == LINC_CONNECTED) ? "Connected" : \
16                         ((s) == LINC_CONNECTING) ? "Connecting" : \
17                         ((s) == LINC_DISCONNECTED) ? "Disconnected" : \
18                         "Invalid state")
19#endif
20
21#endif /* _LINC_DEBUG_H */
Note: See TracBrowser for help on using the repository browser.