Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mart Lubbers
CleanSerial
Commits
78b3c8b6
Commit
78b3c8b6
authored
Jan 23, 2017
by
Mart Lubbers
Browse files
add varargs macro for debugging
parent
67a53e5e
Changes
1
Show whitespace changes
Inline
Side-by-side
tty.c
View file @
78b3c8b6
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
#include "Clean.h"
#include "Clean.h"
#ifdef DEBUG
#ifdef DEBUG
#define debug(s
) {puts(s
); fflush(stdout);}
#define debug(s
, ...) {printf(s "\n", #__VA_ARGS__
); fflush(stdout);}
#else
#else
#define debug(s) ;
#define debug(s
, ...
) ;
#endif
#endif
#ifdef __APPLE__
#ifdef __APPLE__
...
@@ -198,10 +198,7 @@ void ttyreadline(int fd, CleanString *result, int *fdo)
...
@@ -198,10 +198,7 @@ void ttyreadline(int fd, CleanString *result, int *fdo)
CleanStringLength
(
readlinecl
)
=
charsread
;
CleanStringLength
(
readlinecl
)
=
charsread
;
*
fdo
=
fd
;
*
fdo
=
fd
;
debug
(
"Recv: "
);
debug
(
"Recv: '%s'"
,
buf
);
debug
(
buf
);
debug
(
"
\n
"
);
free
(
buf
);
debug
(
"ttyreadline-done"
);
debug
(
"ttyreadline-done"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment