Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

definitions again (Developers)

posted by kerravon, Ligao, Free World North, 21.04.2024, 15:18

> >
> > #include <dos.h>
> >
> > and functions _dos_findfirst() and _dos_findnext().
>
>
> IMO
>
> #include <io.h>
> _WCRTLINK extern long _findfirst( const char *__filespec,
> struct _finddata_t *__fileinfo );
> _WCRTLINK extern int _findnext( long __handle,
> struct _finddata_t *__fileinfo );
>
> should be your choice; _dos_something() is not proper for your holy grail
> of portability.

Ok, thanks for that. So the attribute isn't being provided,
because that has no sense on non-FAT file systems anyway,
and if people want to differentiate based on that, then
hopefully they can find a suitable field in "finddata_t" -
but noting that any such use of an attribute is not portable.

I have another question.

In order to support EBCDIC ANSI X3.64 terminals on a mainframe
(theoretically they could exist, but I created an emulator
to do it instead), I need to know the ESC character. So in all
my code I need to put #define ESC 0x1b for ASCII, and 0x27
for EBCDIC (from memory).

I think this should instead be in a header file, as:

#define ESC_CHAR 0x1b

#define ESC_STRING "\x1b"

rather than burdening the compiler to recognize '\e' or whatever.

Do you agree that this should be in an "extended C90",
along with those findfirst/findnext functions, and
if so, should there be a generic header file called
nonc90.h or something, rather than io.h plus whatever?

Thanks. Paul.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 175 users online (0 registered, 175 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum