Minor type fixes to DOS.

This commit is contained in:
2021-03-11 04:56:07 +00:00
parent 8944c844c4
commit 3f35c03934
11 changed files with 152 additions and 115 deletions

View File

@@ -36,10 +36,10 @@ Copyright (C) 2011-2021 Natalia Portillo
typedef struct
{
char filename[9];
char contents[170];
char description[63];
unsigned int attr;
char filename[9];
char contents[170];
char description[63];
unsigned int attr;
} dos_attr_tests_t;
#define KNOWN_DOS_ATTRS 16
@@ -50,34 +50,67 @@ static const dos_attr_tests_t dos_attrs[KNOWN_DOS_ATTRS] = {
{"SYSTEM", "This file has the system attribute set.\n", "File with system attribute", _A_SYSTEM},
{"HIDDEN", "This file has the hidden attribute set.\n", "File with hidden attribute", _A_HIDDEN},
{"READONLY", "This file has the read-only attribute set.\n", "File with read-only attribute", _A_RDONLY},
{"HIDDREAD", "This file has the hidden attribute set.\n"
"This file has the read-only attribute set.\n", "File with hidden, read-only attributes", _A_HIDDEN | _A_RDONLY},
{"SYSTREAD", "This file has the system attribute set.\n"
"This file has the read-only attribute set.\n", "File with system, read-only attributes", _A_SYSTEM | _A_RDONLY},
{"SYSTHIDD", "This file has the system attribute set.\n"
"This file has the hidden attribute set.\n", "File with system, hidden attributes", _A_SYSTEM | _A_HIDDEN},
{"SYSRDYHD", "This file has the system attribute set.\n"
"This file has the read-only attribute set.\n"
"This file has the hidden attribute set.\n", "File with system, read-only, hidden attributes", _A_SYSTEM | _A_RDONLY | _A_HIDDEN},
{"ARCHREAD", "This file has the archived attribute set.\n"
"This file has the read-only attribute set.\n", "File with archived, read-only attributes", _A_ARCH | _A_RDONLY},
{"ARCHHIDD", "This file has the archived attribute set.\n"
"This file has the hidden attribute set.\n", "File with archived, hidden attributes", _A_ARCH | _A_HIDDEN},
{"ARCHDRDY", "This file has the archived attribute set.\n"
"This file has the hidden attribute set.\n"
"This file has the read-only attribute set.\n", "File with archived, hidden, read-only attributes", _A_ARCH | _A_HIDDEN | _A_RDONLY},
{"ARCHSYST", "This file has the archived attribute set.\n"
"This file has the system attribute set.\n", "File with archived, system attributes", _A_ARCH | _A_SYSTEM},
{"ARSYSRDY", "This file has the archived attribute set.\n"
"This file has the system attribute set.\n"
"This file has the read-only attribute set.\n", "File with archived, system, read-only attributes", _A_ARCH | _A_SYSTEM | _A_RDONLY},
{"ARCSYSHD", "This file has the archived attribute set.\n"
"This file has the system attribute set.\n"
"This file has the hidden attribute set.\n", "File with archived, system, hidden attributes", _A_ARCH | _A_SYSTEM | _A_HIDDEN},
{"ARSYHDRD", "This file has the archived attribute set.\n"
"This file has the system attribute set.\n"
"This file has the hidden attribute set.\n"
"This file has the read-only attribute set.\n", "File with all (archived, system, hidden, read-only) attributes", _A_ARCH | _A_SYSTEM | _A_HIDDEN | _A_RDONLY},
{"HIDDREAD",
"This file has the hidden attribute set.\n"
"This file has the read-only attribute set.\n",
"File with hidden, read-only attributes",
_A_HIDDEN | _A_RDONLY},
{"SYSTREAD",
"This file has the system attribute set.\n"
"This file has the read-only attribute set.\n",
"File with system, read-only attributes",
_A_SYSTEM | _A_RDONLY},
{"SYSTHIDD",
"This file has the system attribute set.\n"
"This file has the hidden attribute set.\n",
"File with system, hidden attributes",
_A_SYSTEM | _A_HIDDEN},
{"SYSRDYHD",
"This file has the system attribute set.\n"
"This file has the read-only attribute set.\n"
"This file has the hidden attribute set.\n",
"File with system, read-only, hidden attributes",
_A_SYSTEM | _A_RDONLY | _A_HIDDEN},
{"ARCHREAD",
"This file has the archived attribute set.\n"
"This file has the read-only attribute set.\n",
"File with archived, read-only attributes",
_A_ARCH | _A_RDONLY},
{"ARCHHIDD",
"This file has the archived attribute set.\n"
"This file has the hidden attribute set.\n",
"File with archived, hidden attributes",
_A_ARCH | _A_HIDDEN},
{"ARCHDRDY",
"This file has the archived attribute set.\n"
"This file has the hidden attribute set.\n"
"This file has the read-only attribute set.\n",
"File with archived, hidden, read-only attributes",
_A_ARCH | _A_HIDDEN | _A_RDONLY},
{"ARCHSYST",
"This file has the archived attribute set.\n"
"This file has the system attribute set.\n",
"File with archived, system attributes",
_A_ARCH | _A_SYSTEM},
{"ARSYSRDY",
"This file has the archived attribute set.\n"
"This file has the system attribute set.\n"
"This file has the read-only attribute set.\n",
"File with archived, system, read-only attributes",
_A_ARCH | _A_SYSTEM | _A_RDONLY},
{"ARCSYSHD",
"This file has the archived attribute set.\n"
"This file has the system attribute set.\n"
"This file has the hidden attribute set.\n",
"File with archived, system, hidden attributes",
_A_ARCH | _A_SYSTEM | _A_HIDDEN},
{"ARSYHDRD",
"This file has the archived attribute set.\n"
"This file has the system attribute set.\n"
"This file has the hidden attribute set.\n"
"This file has the read-only attribute set.\n",
"File with all (archived, system, hidden, read-only) attributes",
_A_ARCH | _A_SYSTEM | _A_HIDDEN | _A_RDONLY},
};
#endif // SETTER_SRC_DOS_ATTR_H_