📄 sca_mk_idx.c
字号:
/* * Copyright (c) 1997-2003 Erez Zadok * Copyright (c) 2001-2003 Stony Brook University * Copyright (c) 1997-2000 Columbia University * * For specific licensing information, see the COPYING file distributed with * this package, or get one from ftp://ftp.filesystems.org/pub/fist/COPYING. * * This Copyright notice must be kept intact and distributed with all * fistgen sources INCLUDING sources generated by fistgen. *//* * $Id: sca_mk_idx.c,v 1.4 2002/12/27 20:19:02 ezk Exp $ */#include <stdio.h>#include <limits.h>#include <fcntl.h>#include <sys/stat.h>#include <sys/mman.h>#include <string.h>#include <errno.h>#include "sca_aux.h"#include "sca_code.h"extern int chunksize; /* Must be the same as used to create the file (put in header?) */extern int do_fast_tails;voidusage(const char *progname){ fprintf(stderr, "Usage: %s [-c chunksize] [-f] file1 [file2 file3 ...]\n", progname);}intmain(int argc, char **argv){ int i, rc = 0; if (argc < 2) { usage(argv[0]); exit(1); } while((i = getopt(argc, argv, "c:f")) != EOF) { switch(i) { case 'c': chunksize = atoi(optarg); if (chunksize < 0) { fprintf(stderr, "Please use a positive chunk size\n"); exit(1); } break; case 'f': do_fast_tails = 1; break; default: usage(argv[0]); exit(1); } } for(i=optind; i<argc; i++) { if ((rc = sca_fix_idx(argv[i]))) { fprintf(stderr, "Error fixing %s\n", argv[i]); } } exit(0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -