src/findlib/match.c
void add_fname_to_exclude_list(FF_PKT *ff, const char *fname)
{
   int len;
   struct s_excluded_file *exc, **list;

   Dmsg1(20, "Add name to exclude: %s\n", fname);

   if (first_path_separator(fname) != NULL) {
      list = &ff->excluded_paths_list;
   } else {
      list = &ff->excluded_files_list;
   }

   len = strlen(fname);

   exc = (struct s_excluded_file *)bmalloc(sizeof(struct s_excluded_file) + len + 1);
   exc->next = *list;
   exc->len = len;
   strcpy(exc->fname, fname);
#if defined(HAVE_WIN32)
   /* Convert any \'s into /'s */
   for (char *p=exc->fname; *p; p++) {
      if (*p == '\\') {
         *p = '/';
      }
   }
#endif
   *list = exc;
}
/*
 * We add an exclude name to either the exclude path
 *  list or the exclude filename list.
 */
We add an exclude name to either the exclude path
list or the exclude filename list.
We add an exclude name to either the exclude path list or the exclude filename list .
void add_fname_to_exclude_list(FF_PKT *ff, const char *fname)
{
   int len;
   struct s_excluded_file *exc, **list;
   Dmsg1(20, "Add name to exclude: %s\n", fname);
   if (first_path_separator(fname) != NULL) {
      list = &ff->excluded_paths_list;
   } else {
      list = &ff->excluded_files_list;
   }
   len = strlen(fname);
   exc = (struct s_excluded_file *)bmalloc(sizeof(struct s_excluded_file) + len + 1);
   exc->next = *list;
   exc->len = len;
   strcpy(exc->fname, fname);
#if defined(HAVE_WIN32)
   for (char *p=exc->fname; *p; p++) {
      if (*p == '\\') {
         *p = '/';
      }
   }
#endif
   *list = exc;
}
void add_fname_to_exclude_list ( FF_PKT * ff , const char * fname ) { int len ; struct s_excluded_file * exc , * * list ; Dmsg1 ( 20 , " \n " , fname ) ; if ( first_path_separator ( fname ) != NULL ) { list = & ff -> excluded_paths_list ; } else { list = & ff -> excluded_files_list ; } len = strlen ( fname ) ; exc = ( struct s_excluded_file * ) bmalloc ( sizeof ( struct s_excluded_file ) + len + 1 ) ; exc -> next = * list ; exc -> len = len ; strcpy ( exc -> fname , fname ) ; #if defined ( HAVE_WIN32 ) for ( char * p = exc -> fname ; * p ; p ++ ) { if ( * p == ' \\ ' ) { * p = ' ' ; } } #endif * list = exc ; }
We add an exclude name to either the exclude path
  list or the exclude filename list.
We add an exclude name to either the exclude path list or the exclude filename list .
/* Convert any \'s into /'s */