Added parsing of arguments to --read. The explicit format spec is currently
broken. git-svn-id: svn://svn.cc65.org/cc65/trunk@5576 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
/* common */
|
||||
#include "fileid.h"
|
||||
|
||||
/* sp65 */
|
||||
/* sp65 */
|
||||
#include "error.h"
|
||||
#include "input.h"
|
||||
#include "pcx.h"
|
||||
@@ -78,6 +78,19 @@ static const FileId FormatTable[] = {
|
||||
|
||||
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user