diff --git a/ba/ba1100.cpp b/ba/ba1100.cpp index b01e74d91..7193b1643 100755 --- a/ba/ba1100.cpp +++ b/ba/ba1100.cpp @@ -19,7 +19,10 @@ struct direct { unsigned short d_ino; char d_name[DIRSIZ]; -}; +}; +#else +#include +#include #endif class TManutenzione_app : public TApplication @@ -74,7 +77,21 @@ HIDDEN void build_filelist(const char *path, TArray & list) list.add(dname.mid(1,3)); } } - close(fd); + close(fd); +#else + _find_t f; + + if (_dos_findfirst("recdesc/d???.des", _A_NORMAL, &f) == 0) + { + bool one_to_add = TRUE; + while (one_to_add) + { + TString80 dname(f.name); + + list.add(dname.mid(1,3)); + one_to_add = _dos_findnext(&f) != 0; + } + } #endif } @@ -180,8 +197,11 @@ void TManutenzione_app::print() p.headerlen(6); p.footerlen(4); if (_rec == NULL) - { - int items = _rec->dir()->items(); + { + TDir d; + + d.get(LF_DIR); + int items = d.eod(); for (int i = 2 ; i <= items; i++) {