repo.or.cz
/
ghsmtp.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
empty statement
[ghsmtp.git]
/
cdb-gen.cpp
blob
0e447cefe4f896533540ef9b48b7f3ab3387b119
1
#include <iostream>
2
#include <string>
3
4
int
main
(
int
argc
,
char const
*
argv
[])
5
{
6
std
::
string line
;
7
while
(
std
::
getline
(
std
::
cin
,
line
)) {
8
9
/* From cdb(1) man page, section Input/Output Format:
10
+klen,vlen:key->val\n
11
*/
12
std
::
cout
<<
"+"
<<
line
.
length
() <<
",1:"
<<
line
<<
"->1
\n
"
;
13
}
14
std
::
cout
<<
"
\n
"
;
15
}