飞扬围棋论坛

 找回密码
 注册
搜索
查看: 7205|回复: 5

求助SGF文件分割

[复制链接]
发表于 2019-5-21 16:47 | 显示全部楼层 |阅读模式
https://homepages.cwi.nl/~aeb/go/sgfutils/html/sgfsplit.html

下载包是一些c源程序,尝试编译搞不定。哪位老大有空帮忙生成一个可执行文件,只要sgfplit就可以了。

先谢过!

源程序在 https://homepages.cwi.nl/~aeb/go/sgfutils/html/sgfutils.html


回复

使用道具 举报

发表于 2019-7-9 19:50 来自手机 | 显示全部楼层
需要linux C source, written for a Linux environment.
回复 支持 反对

使用道具 举报

发表于 2019-7-10 13:44 来自手机 | 显示全部楼层
在termux编译有问题

  1. $ make
  2. cc -Wall -Wmissing-prototypes -O3   -c -o sgf.o sgf.c
  3. sgf.c:90:7: warning: implicitly declaring library
  4.       function 'rindex' with type 'char *(const
  5.       char *, int)'
  6.       [-Wimplicit-function-declaration]
  7.                 s = rindex(idbuf, '-');
  8.                     ^
  9. sgf.c:90:7: note: include the header <strings.h>
  10.       or explicitly provide a declaration for
  11.       'rindex'
  12. 1 warning generated.
  13. cc -Wall -Wmissing-prototypes -O3   -c -o errexit.o errexit.c
  14. cc -Wall -Wmissing-prototypes -O3   -c -o readsgf.o readsgf.c
  15. cc -Wall -Wmissing-prototypes -O3   -c -o xmalloc.o xmalloc.c
  16. cc   sgf.o errexit.o readsgf.o xmalloc.o   -o sgf
  17. /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: sgf.o: in function `write_gametree':
  18. sgf.c:(.text+0x630): undefined reference to `rindex'
  19. clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
  20. make: *** [<builtin>: sgf] Error 1
复制代码
回复 支持 反对

使用道具 举报

发表于 2019-7-10 16:27 来自手机 | 显示全部楼层
#define rindex strrchr 就可以了
回复 支持 反对

使用道具 举报

发表于 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
回复 支持 反对

使用道具 举报

 楼主| 发表于 2019-7-11 00:48 | 显示全部楼层
谢谢版主
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|Archiver|手机版|飞扬围棋网 ( 苏ICP备11029047号-1 )

GMT+8, 2024-3-28 22:37 , Processed in 0.133280 second(s), 19 queries .

since 2003飞扬围棋论坛 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表