/* common */
#include "fileid.h"
-/* sp65 */
+/* sp65 */
#include "error.h"
#include "input.h"
#include "pcx.h"
+int FindInputFormat (const char* Name)
+/* Find an input format by name. The function returns a value less than zero
+ * if Name is not a known input format.
+ */
+{
+ /* Search for the entry in the table */
+ const FileId* F = GetFileId (Name, FormatTable,
+ sizeof (FormatTable) / sizeof (FormatTable[0]));
+ return (F == 0)? -1 : F->Id;
+}
+
+
+
Bitmap* ReadInputFile (const char* Name, InputFormat Format)
/* Read a bitmap from a file and return it. If Format is ifAuto, the routine
* tries to determine the format from the file name extension.