Skip to content
Snippets Groups Projects
Commit e162b970 authored by Erik Alexandre Pucci's avatar Erik Alexandre Pucci Committed by Danilo K. S. Yorinori
Browse files

client.h: Added ERROR and new DEBUG defines


These definitions will be used to facilitate the identification of messages.

Signed-off-by: default avatarErik Alexandre Pucci <eap08@c3sl.ufpr.br>
Acked-by: default avatarRicardo Tavares de Oliveira <rto07@c3sl.ufpr.br>
Signed-off-by: default avatarDanilo K. S. Yorinori <danilok@c3sl.ufpr.br>
parent 135f8c48
Branches
Tags
No related merge requests found
......@@ -38,6 +38,16 @@
#define DEBUG 0
/* 5 minutes before timeout */
#define TIMEOUT 300
// Print ERROR messages
#define ERROR(fmt, args...) ( fprintf(stderr, fmt, ##args), \
fflush(stderr) )
// Print DEBUG messages, if DEBUGFLAG is "true"
#ifdef DEBUGFLAG
#define DEBUG(fmt, args...) ( printf("DEBUG: "fmt"", ##args), \
fflush(stdout) )
#else
#define DEBUG(fmt, args...)
#endif
/* Statics strings */
static const char *exe = "bin/client";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment