📄 fcrc.c
字号:
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "utils.h"
#include "crc32.h"
#ifndef BUILD_WITH_VCC
#include <unistd.h>
#endif
#ifndef O_BINARY
#define O_BINARY 0
#endif
int debug;
/* Run the same CRC on a file as is run in the "mt -C" command
* in the monitor...
*/
int
main(int argc,char *argv[])
{
char *buf;
int ifd, opt;
unsigned long crc;
struct stat mstat;
while((opt=getopt(argc,argv,"V")) != EOF) {
switch(opt) {
case 'V':
showVersion();
break;
default:
exit(1);
}
}
if (argc != optind + 1)
usage(0);
if (fcrc32(argv[optind],&crc,1) < 0)
usage(0);
exit(0);
}
char *usage_txt[] = {
"Usage: fcrc [options] {ifile}",
" Run the same CRC as is used in 'mt -c'",
" Options:",
" -V show version (build date) of tool",
(char *)0,
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -