⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exclude.c

📁 刻录光盘的程序
💻 C
字号:
/* * 9-Dec-93 R.-D. Marzusch, marzusch@odiehh.hanse.de: * added 'exclude' option (-x) to specify pathnames NOT to be included in  * CD image. */static char rcsid[] ="$Id: exclude.c,v 1.2 1997/02/23 16:12:34 eric Rel $";#include <stdio.h>#ifndef VMS#ifdef HAVE_MALLOC_H#include <malloc.h>#else#include <stdlib.h>#endif#endif#include <string.h>#ifdef	USE_LIBSCHILY#include <standard.h>#endif/* this allows for 1000 entries to be excluded ... */#define MAXEXCL 1000static char * excl[MAXEXCL];void exclude(fn)char * fn;{  register int i;  for (i=0; excl[i] && i<MAXEXCL; i++);  if (i == MAXEXCL) {    fprintf(stderr,"Can't exclude '%s' - too many entries in table\n",fn);    return;  }   excl[i] = (char *) malloc(strlen(fn)+1);  if (excl[i] == NULL) {#ifdef	USE_LIBSCHILY    errmsg("Can't allocate memory for excluded filename\n");#else    fprintf(stderr,"Can't allocate memory for excluded filename\n");#endif    return;  }  strcpy(excl[i],fn);}int is_excluded(fn)char * fn;{  /* very dumb search method ... */  register int i;  for (i=0; excl[i] && i<MAXEXCL; i++) {    if (strcmp(excl[i],fn) == 0) {      return 1; /* found -> excluded filenmae */    }  }  return 0; /* not found -> not excluded */}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -