~ubuntu-branches/ubuntu/precise/libmtp/precise-proposed

« back to all changes in this revision

Viewing changes to src/util.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-02-04 16:34:58 UTC
  • mto: (16.1.5 sid) (0.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20100204163458-pegywpiiisrzx72w
Tags: upstream-1.0.2
ImportĀ upstreamĀ versionĀ 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
void data_dump(FILE *f, void *buf, uint32_t nbytes);
27
27
void data_dump_ascii (FILE *f, void *buf, uint32_t n, uint32_t dump_boundry);
28
28
 
 
29
/**
 
30
 * Info macro
 
31
 */
 
32
#define LIBMTP_INFO(format, args...) \
 
33
  do { \
 
34
    if (LIBMTP_debug != 0) \
 
35
      fprintf(stdout, "LIBMTP %s[%d]: " format, __FUNCTION__, __LINE__, ##args); \
 
36
        else \
 
37
      fprintf(stdout, format, ##args); \
 
38
  } while (0)
 
39
 
 
40
/**
 
41
 * Error macro
 
42
 */
 
43
#define LIBMTP_ERROR(format, args...) \
 
44
  do { \
 
45
    if (LIBMTP_debug != 0) \
 
46
      fprintf(stderr, "LIBMTP %s[%d]: " format, __FUNCTION__, __LINE__, ##args); \
 
47
        else \
 
48
      fprintf(stderr, format, ##args); \
 
49
  } while (0)
 
50
 
 
51
 
29
52
#endif //__MTP__UTIL__H