repo.or.cz
/
remote
/
remote-mci.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove TODO file
[remote/remote-mci.git]
/
protocols
/
macros.h
blob
d77bebf37e2df573f9254dc29c32148841f8b4ec
1
#ifndef MACROS_H_
2
#define MACROS_H_
3
#include <time.h>
4
#include <stdarg.h>
5
#include
"MMSException.h"
6
7
namespace
remote
8
{
9
10
#define __THROW__(s) throw remote::protocols::MMSException(s,__FILE__,__LINE__);
11
12
inline
void
log
(
const char
*
s
,...)
13
{
14
va_list
ap
;
15
va_start
(
ap
,
s
);
16
time_t
t
;
17
time
(&
t
);
18
char
*
time
=
ctime
(&
t
);
19
printf
(
"%s: "
,
strsep
(&
time
,
"
\n
"
));
20
vprintf
(
s
,
ap
);
21
va_end
(
ap
);
22
fflush
(
stdout
);
23
}
24
25
}
26
27
#endif
/*MACROS_H_*/