projects
/
platform
/
upstream
/
libpinyin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3662fa3
)
WIP of spseg
author
Peng Wu
<alexepico@gmail.com>
Thu, 9 Sep 2010 06:15:08 +0000
(14:15 +0800)
committer
Peng Wu
<alexepico@gmail.com>
Thu, 9 Sep 2010 06:15:08 +0000
(14:15 +0800)
src/segment/spseg.cpp
patch
|
blob
|
history
diff --git
a/src/segment/spseg.cpp
b/src/segment/spseg.cpp
index
a710d47
..
6522b2e
100644
(file)
--- a/
src/segment/spseg.cpp
+++ b/
src/segment/spseg.cpp
@@
-20,6
+20,7
@@
*/
#include <stdio.h>
+#include <string.h>
#include <locale.h>
#include <glib.h>
#include "novel_types.h"
@@
-85,5
+86,14
@@
int main(int argc, char * argv[]){
g_phrases->store(chunk);
g_phrases->load(chunk);
+ char * linebuf = NULL;
+ size_t size = 0;
+ while(getline(&linebuf, &size, stdin)) {
+ if ( feof(stdin) )
+ break;
+ linebuf[strlen(linebuf) - 1] = '\0';
+
+
+ }
return 0;
}