飞扬围棋
标题:
求助SGF文件分割
[打印本页]
作者:
forjoke21cn
时间:
2019-5-21 16:47
标题:
求助SGF文件分割
https://homepages.cwi.nl/~aeb/go/sgfutils/html/sgfsplit.html
下载包是一些c源程序,尝试编译搞不定。哪位老大有空帮忙生成一个可执行文件,只要sgfplit就可以了。
先谢过!
源程序在
https://homepages.cwi.nl/~aeb/go/sgfutils/html/sgfutils.html
作者:
lu01
时间:
2019-7-9 19:50
需要linux C source, written for a Linux environment.
作者:
lu01
时间:
2019-7-10 13:44
在termux编译有问题
$ make
cc -Wall -Wmissing-prototypes -O3 -c -o sgf.o sgf.c
sgf.c:90:7: warning: implicitly declaring library
function 'rindex' with type 'char *(const
char *, int)'
[-Wimplicit-function-declaration]
s = rindex(idbuf, '-');
^
sgf.c:90:7: note: include the header <strings.h>
or explicitly provide a declaration for
'rindex'
1 warning generated.
cc -Wall -Wmissing-prototypes -O3 -c -o errexit.o errexit.c
cc -Wall -Wmissing-prototypes -O3 -c -o readsgf.o readsgf.c
cc -Wall -Wmissing-prototypes -O3 -c -o xmalloc.o xmalloc.c
cc sgf.o errexit.o readsgf.o xmalloc.o -o sgf
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: sgf.o: in function `write_gametree':
sgf.c:(.text+0x630): undefined reference to `rindex'
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [<builtin>: sgf] Error 1
复制代码
作者:
lu01
时间:
2019-7-10 16:27
#define rindex strrchr 就可以了
作者:
lu01
时间:
2019-7-10 17:01
可以
cat 5*.sgf >d.sgf
$ ./sgfsplit d.sgf
$ ls *sgf
578418.sgf X-0001.sgf d.sgf 578446.sgf X-0002.sgf sgf
$ ls -l *sgf
-rw------- 1 u0_a131 u0_a131 2785 Jul 10 14:16 578418.sgf
-rw------- 1 u0_a131 u0_a131 2490 Jul 10 15:53 578446.sgf
-rw------- 1 u0_a131 u0_a131 2784 Jul 10 16:58 X-0001.sgf
-rw------- 1 u0_a131 u0_a131 2489 Jul 10 16:58 X-0002.sgf
-rw------- 1 u0_a131 u0_a131 5275 Jul 10 16:57 d.sgf
作者:
forjoke21cn
时间:
2019-7-11 00:48
谢谢版主
欢迎光临 飞扬围棋 (http://flygo.net/Bbs/)
Powered by Discuz! X3.2