--- parser3/src/include/pa_dir.h 2001/10/30 14:27:19 1.7 +++ parser3/src/include/pa_dir.h 2012/03/16 09:24:09 1.20 @@ -1,15 +1,15 @@ /** @file Parser: directory scanning for different OS-es decls. - Copyright (c) 2000,2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: pa_dir.h,v 1.7 2001/10/30 14:27:19 paf Exp $ + Copyright (c) 2000-2012 Art. Lebedev Studio (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_DIR_H #define PA_DIR_H +#define IDENT_PA_DIR_H "$Id: pa_dir.h,v 1.20 2012/03/16 09:24:09 moko Exp $" + #include "pa_config_includes.h" /** @struct ffblk @@ -19,6 +19,7 @@ #ifdef WIN32 +#define WINVER 0x0400 #include #define MAXPATH MAX_PATH @@ -69,16 +70,16 @@ struct ffblk { #endif -bool findfirst(const char *_pathname, struct ffblk *_ffblk, int _attrib); +bool findfirst(const char* _pathname, struct ffblk *_ffblk, int _attrib); bool findnext(struct ffblk *_ffblk); void findclose(struct ffblk *_ffblk); -/// main dir workhorse: calles win32/unix unified functions findfirst/next/close +/// main dir workhorse: calles win32/unix unified functions findfirst/next/close [skip . and ..] #define LOAD_DIR(dir,action) {\ ffblk ffblk; \ if(!findfirst(dir, &ffblk, 0)) { \ do \ - if(*ffblk.ff_name && ffblk.ff_name[0]!='.') {\ + if(*ffblk.ff_name && !(ffblk.ff_name[0]=='.' && (ffblk.ff_name[1]==0 || ffblk.ff_name[1]=='.' && ffblk.ff_name[2]==0) )) {\ action; \ } \ while(!findnext(&ffblk)); \