hdshrink.c
来自「speech signal process tools」· C语言 代码 · 共 58 行
C
58 行
/* This material contains proprietary software of Entropic Speech, Inc. Any reproduction, distribution, or publication without the prior written permission of Entropic Speech, Inc. is strictly prohibited. Any public distribution of copies of this work authorized in writing by Entropic Speech, Inc. must bear the notice "Copyright (c) 1987 Entropic Speech, Inc.; All rights reserved" */static char *sccs_id = "@(#)hdshrink.c 1.3 6/17/87 ESI"; #include <stdio.h>#include <sps/sps.h>#define SYNTAX USAGE ("hdshrink infile output (or '-' for stdio)")main(argc,argv)int argc;char **argv;{ FILE *f1strm = stdin; FILE *f2strm = stdout; char *f1name = "<stdin>"; char *f2name = "<stdout>"; int c, i; struct header *f1hd; if (argc != 3) SYNTAX; f1name = argv[1]; if (strcmp(f1name,"-") != 0) TRYOPEN("hdshrink",f1name,"r",f1strm); f2name = argv[2]; if (strcmp(f1name,f2name) == 0) { fprintf(stderr,"infile and outfile cannot be the same\n"); exit(1); } if (strcmp(f2name,"-") != 0) TRYOPEN("hdshrink",f2name,"w",f2strm); if(!(f1hd = read_header(f1strm))) NOTSPS(argv[0],f1name);/* zap all the source files and headers */ for (i = 0; i < MAX_SOURCES; i++) { f1hd -> variable.srchead[i] = NULL; } f1hd -> variable.nnames = f1hd -> variable.nheads = 0; (void) add_comment(f1hd,get_cmd_line(argc,argv)); (void) add_comment(f1hd,"Embedded headers dropped by hdshrink"); write_header(f1hd,f2strm); while ((c = getc(f1strm)) != EOF) (void) putc(c,f2strm); }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?