[AD] File flags

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


As briefly discussed here, 
http://www.allegro.cc/forums/view_thread.php?_id=530017, the attached 
patch adds an FA_ALL flag to pass in case one wants to match all flags 
(ie, find all files).
It also addss an FA_NONE flag, which only matches files that have no flags 
set. I don't think this is very useful in practice, but it is nice for the 
symmetry and it makes it possible to #define FA_ALL ~FA_NONE, which is 
somewhat more readable than ~0.

Evert
Index: include/allegro/internal/alconfig.h
===================================================================
RCS file: /cvsroot/alleg/allegro/include/allegro/internal/alconfig.h,v
retrieving revision 1.20
diff -u -r1.20 alconfig.h
--- include/allegro/internal/alconfig.h	28 Aug 2005 12:51:09 -0000	1.20
+++ include/allegro/internal/alconfig.h	21 Sep 2005 21:31:54 -0000
@@ -277,6 +277,8 @@
    #define FA_DIREC        16
    #define FA_ARCH         32
 #endif
+   #define FA_NONE         0
+   #define FA_ALL          (~FA_NONE)
 
 
 #ifdef __cplusplus


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/