Hallo Alle!
Does anybody has a idea whats going wrong? Well I'm absolutely clueless...
-+- Anfang compile.log -+-
dosfind.cc || echo './'`dosfind.cc
dosfind.cc: In function `void Dos2My(FLFFIND*)':
dosfind.cc:105: error: 'struct FLFFIND' has no member named 'longname' dosfind.cc:114: error: 'struct FLFFIND' has no member named 'longname' dosfind.cc:115: error: 'struct FLFFIND' has no member named 'longname' dosfind.cc:122: error: 'struct FLFFIND' has no member named 'longname' dosfind.cc: In function `unsigned int _DosFindFirst(const char*, unsigned int,
FLFFIND*)':
dosfind.cc:264: error: invalid conversion from `const char*' to `const unsigned
char*'
make.exe[3]: *** [dosfind.o] Error 1
make.exe[3]: Leaving directory `E:/GCC/gcc3/dev/husky_06_2015/husky/fastlst/aplibs'
make: *** [all] Error 2
-+- Ende compile.log -+-
-+- Anfang dosfind.cc -+-
#include "apgenlib.hpp"
#define EA_LONGNAME ".LONGNAME"
#ifdef __OS2__
#pragma pack(1)
struct FILEFINDBUF3NONAME {
ULONG oNextEntryOffset; /* new field */
FDATE fdateCreation;
FTIME ftimeCreation;
FDATE fdateLastAccess;
FTIME ftimeLastAccess;
FDATE fdateLastWrite;
FTIME ftimeLastWrite;
ULONG cbFile;
ULONG cbFileAlloc;
ULONG attrFile; /* widened field */
};
struct FILEFINDEABUF {
EAOP2 eaop2;
FILEFINDBUF3NONAME ffb3;
FEA2LIST fea2list; // followed by name and value of EA;
byte buffer[3 * _MAX_PATH]; // On dword boundary, cbName (byte) and achName
};
// for ffind.flags
#define FF_LONGNAME 0x01
#define DwordBound(p) pvoid ((dword(p)+3) & 0xFFFFFFFC)
#endif
void Dos2My (FLFFIND *buf)
{
#if defined (__OS2__)
FILEFINDBUF3NONAME *ffb3nn = (buf->flags & FF_LONGNAME) ?
&buf->ffeab->ffb3 :
(FILEFINDBUF3NONAME *)buf->ffb3;
buf->attrib = (char) ffb3nn->attrFile;
buf->cr_time = MKushort (ffb3nn->ftimeCreation);
buf->cr_date = MKushort (ffb3nn->fdateCreation);
buf->ac_time = MKushort (ffb3nn->ftimeLastAccess);
buf->ac_date = MKushort (ffb3nn->fdateLastAccess);
buf->wr_time = MKushort (ffb3nn->ftimeLastWrite);
buf->wr_date = MKushort (ffb3nn->fdateLastWrite);
buf->size = ffb3nn->cbFile;
if (buf->flags & FF_LONGNAME) {
PFEA2 fea2 = &buf->ffeab->fea2list.list[0];
byte *p = (byte *) DwordBound (
fea2->szName + // end of FEA2
fea2->cbName + // length of EA name
1 + // NULL terminator
fea2->cbValue // length of EA value
); // points to cbName of file
int filenamelen = *p;
buf->name = (char *)(p+1);
buf->name[filenamelen] = '\0'; // just make sure...
buf->longname = NULL;
if (fea2->cbValue != 0) {
byte *p = (byte *)fea2->szName + fea2->cbName + 1;
word eatype = *(word *)p;
if (eatype == EAT_ASCII) {
p += 2;
word ealen = *(word *)p;
if ((4 + ealen) <= fea2->cbValue) {
p += 2;
buf->longname = (char *)p;
buf->longname[ealen] = '\0'; // may overwrite cbName
}
}
}
} else {
buf->name = buf->ffb3->achName;
buf->longname = NULL;
}
#elif defined (__NT__)
PWIN32_FIND_DATA ff = buf->ff;
buf->attrib = (byte)ff->dwFileAttributes;
FiletimeUtc2Dosdatime (&ff->ftCreationTime, &buf->cr_date, &buf->cr_time);
FiletimeUtc2Dosdatime (&ff->ftLastAccessTime, &buf->ac_date, &buf->ac_time);
FiletimeUtc2Dosdatime (&ff->ftLastWriteTime, &buf->wr_date, &buf->wr_time);
buf->size = ff->nFileSizeLow;
buf->name = ff->cFileName;
#elif defined (__linux__) || defined(UNIX)
#else
find_t *ff = buf->ff;
buf->attrib = ff->attrib;
buf->cr_time = 0;
buf->cr_date = 0;
buf->ac_time = 0;
buf->ac_date = 0;
buf->wr_time = ff->wr_time;
buf->wr_date = ff->wr_date;
buf->size = ff->size;
buf->name = ff->name;
#endif
[....]
-+- Ende dosfind.cc -+-
Bye/2 Torsten
... MAILBOX02: Up 04d 11h 23m (BTUp2V1.5)
--- GoldED+/EMX 1.1.4.7
* Origin: DatenBahn BBS (2:240/5832)