strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
build dumm with leak ./configure
[strongswan.git]
/
scripts
/
bin2sql.c
1
2
#include <stdio.h>
3
4
/**
5
* convert standard input to SQL hex binary
6
*/
7
int
main
(
int
argc
,
char
*
argv
[])
8
{
9
int
end
=
0
;
10
unsigned char
byte
;
11
12
printf
(
"X'"
);
13
while
(
1
)
14
{
15
if
(
fread
(&
byte
,
1
,
1
,
stdin
) !=
1
)
16
{
17
end
=
1
;
18
break
;
19
}
20
printf
(
"%02x"
, (
unsigned int
)
byte
);
21
}
22
printf
(
"'
\n
"
);
23
return
0
;
24
}
25