Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r1885 - trunk: . fsvs/src

fsvs
Discussion topic

Back to topic list

svn commit: r1885 - trunk: . fsvs/src

Author pmarek
Full name P.Marek
Date 2008-10-02 10:37:35 PDT
Message Author: pmarek
Date: 2008-10-02 10:37:35-0700
New Revision: 1885

Modified:
   trunk/ (props changed)
   trunk/fsvs/src/cp_mv.c

Log:
A bit of cleanup - use an explicit flag for disabled copyfrom checks instead of clearing the bitmask.


Modified: trunk/fsvs/src/cp_mv.c
Url: http://fsvs.tigris.o​rg/source/browse/fsv​s/trunk/fsvs/src/cp_​mv.c?view=diff&r​ev=1885&p1=trunk​/fsvs/src/cp_mv.c​&p2=trunk/fsvs/src/​cp_mv.c&r1=1884​&r2=1885
====================​====================​====================​==================
--- trunk/fsvs/src/cp_mv.c (original)
+++ trunk/fsvs/src/cp_mv.c 2008-10-02 10:37:35-0700
@@ -401,7 +401,9 @@
     /** Which entry types are allowed? */
     int entry_types;
     /** Whether this can be avoided by an option. */
- int is_expensive;
+ int is_expensive:1;
+ /** Whether this match is allowed. */
+ int is_enabled:1;
 
     /** Callback function for inserting elements */
     cm___register_fn *insert;
@@ -692,8 +694,8 @@
         for(i=0; i<CM___MATCH_NUM; i++)
         {
             match=cm___match_array+i;
- if ((sts->entry_type & match->entry_types) &&
- match->insert)
+ if (match->is_enabled && match->insert &&
+ (sts->entry_type & match->entry_types))
             {
                 STOPIF( (match->insert)(sts, match), NULL);
                 DEBUGP("inserted %s for %s", sts->name, match->name);
@@ -967,8 +969,8 @@
     {
         match=cm___match_array+i;
 
- if (match->is_expensive && !opt__get_int(OPT__C​OPYFROM_EXP))
- match->entry_types=0;
+ match->is_enabled= !match->is_expensive ||
+ opt__get_int(OPT__CO​PYFROM_EXP);
 
         if (!match->filename[0]) continue;

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r1885 - trunk: . fsvs/src pmarek P.Marek 2008-10-02 10:37:35 PDT
Messages per page: