-/* checkMode - interpret mode string */
-/* r = 1 */
-/* w = 2 */
-/* a = 3 */
-/* rb = 4 */
-/* wb = 5 */
-/* ab = 6 */
-/* r+ = 7 */
-/* w+ = 8 */
-/* a+ = 9 */
-/* r+b or rb+ = 10 */
-/* w+b or wb+ = 11 */
-/* a+b or ab+ = 12 */
-
-static void checkMode(void)
-{
- if (strncmp(modus, "r+b", 3) == 0)
- {
- modeType = 10;
- }
- else if (strncmp(modus, "rb+", 3) == 0)
- {
- modeType = 10;
- }
- else if (strncmp(modus, "w+b", 3) == 0)
- {
- modeType = 11;
- }
- else if (strncmp(modus, "wb+", 3) == 0)
- {
- modeType = 11;
- }
- else if (strncmp(modus, "a+b", 3) == 0)
- {
- modeType = 12;
- }
- else if (strncmp(modus, "ab+", 3) == 0)
- {
- modeType = 12;
- }
- else if (strncmp(modus, "r+", 2) == 0)
- {
- modeType = 7;
- }
- else if (strncmp(modus, "w+", 2) == 0)
- {
- modeType = 8;
- }
- else if (strncmp(modus, "a+", 2) == 0)
- {
- modeType = 9;
- }
- else if (strncmp(modus, "rb", 2) == 0)
- {
- modeType = 4;
- }
- else if (strncmp(modus, "wb", 2) == 0)
- {
- modeType = 5;
- }
- else if (strncmp(modus, "ab", 2) == 0)
- {
- modeType = 6;
- }
- else if (strncmp(modus, "r", 1) == 0)
- {
- modeType = 1;
- }
- else if (strncmp(modus, "w", 1) == 0)
- {
- modeType = 2;
- }
- else if (strncmp(modus, "a", 1) == 0)
- {
- modeType = 3;
- }
- else
- {
- err = 1;
- return;