btcheck.c
来自「libbt-1.01 BT应用软件 是BT客户端的源代码」· C语言 代码 · 共 57 行
C
57 行
/* btcheck.c */#include "config.h"#ifdef WITH_DMALLOC#include <dmalloc.h>#endif /* WITH_DMALLOC */#include <curl/curl.h>#include <curl/easy.h>#include <openssl/sha.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include <stdio.h>#include <sys/types.h>#if !WIN32 #include <sys/param.h>#endif#include <time.h>#include <signal.h>/* libbt */#include "types.h"#include "benc.h"#include "util.h"#include "segmenter.h"#include "context.h"#include "bitset.h"/* globals */btContext context;/* functions */int main( int argc, char **argv) { int result; btStream *bts; struct btContext *ctx = &context; /* main */ if (argc < 2) { fprintf( stderr, "Usage: btcheck torrentfile\n"); exit( 1); } bts = bts_create_filestream( argv[1], BTS_INPUT); /* load tracker file */ ctx_loadfile( bts, ctx, 0); result=!bs_isFull(&ctx->downloads[0]->fileset.completed); bts_destroy( bts); btContext_destroy( ctx); return result;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?