--- parser3/src/include/pa_dir.h 2001/04/26 14:55:25 1.3 +++ parser3/src/include/pa_dir.h 2002/02/08 07:27:43 1.9 @@ -1,16 +1,17 @@ /** @file Parser: directory scanning for different OS-es decls. - Copyright (c) 2000,2001 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2000,2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://paf.design.ru) - Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: pa_dir.h,v 1.3 2001/04/26 14:55:25 paf Exp $ + $Id: pa_dir.h,v 1.9 2002/02/08 07:27:43 paf Exp $ */ #ifndef PA_DIR_H #define PA_DIR_H +#include "pa_config_includes.h" + /** @struct ffblk win32/unix unified directory entry structure name for findfirst/next/close interface @@ -75,14 +76,14 @@ void findclose(struct ffblk *_ffblk); /// main dir workhorse: calles win32/unix unified functions findfirst/next/close #define LOAD_DIR(dir,action) {\ ffblk ffblk; \ - bool done=findfirst(dir, &ffblk, 0); \ - while(!done) { \ - if(*ffblk.ff_name && ffblk.ff_name[0]!='.') {\ - action; \ - } \ - done=findnext(&ffblk); \ - } \ - findclose(&ffblk); \ + if(!findfirst(dir, &ffblk, 0)) { \ + do \ + if(*ffblk.ff_name && ffblk.ff_name[0]!='.') {\ + action; \ + } \ + while(!findnext(&ffblk)); \ + findclose(&ffblk); \ + } \ } #endif