| 1 | /***************************************************************************** |
| 2 | * Copyright (c) 2018 Matt Tropiano |
| 3 | * All rights reserved. This source and the accompanying materials |
| 4 | * are made available under the terms of the GNU Lesser Public License v2.1 |
| 5 | * which accompanies this distribution, and is available at |
| 6 | * http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html |
| 7 | *****************************************************************************/ |
| 8 | |
| 9 | #include <stdio.h> |
| 10 | #include "waderrno.h" |
| 11 | |
| 12 | static char *waderr[WADERROR_COUNT] = { |
| 13 | "No error.", |
| 14 | "File error.", |
| 15 | "Not a WAD file.", |
| 16 | "WAD pointer invalid.", |
| 17 | "Out of memory.", |
| 18 | "Problem closing WAD.", |
| 19 | "Cannot commit WAD entry list.", |
| 20 | "Operation not supported in this implementation.", |
| 21 | "Index out of range.", |
| 22 | }; |
| 23 | |
| 24 | char* strwaderror(int n) |
| 25 | { |
| 26 | if (n < 0 || n >= WADERROR_COUNT) |
| 27 | return NULL; |
| 28 | else |
| 29 | return waderr[n]; |
| 30 | } |