rgbasm: improve error message for failed INCBIN

This commit is contained in:
bentley
2010-01-18 17:42:54 -07:00
parent 02ba30f8e0
commit 5f23215c5d
2 changed files with 5 additions and 1 deletions

View File

@@ -1,8 +1,11 @@
%{ %{
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <sysexits.h>
#include "asm/symbol.h" #include "asm/symbol.h"
#include "asm/asm.h" #include "asm/asm.h"

View File

@@ -267,6 +267,7 @@ include : T_POP_INCLUDE string
{ {
if( !fstk_RunInclude($2) ) if( !fstk_RunInclude($2) )
{ {
fprintf(stderr, "Could not open file '%s' : %s\n", $2, strerror(errno));
yyerror( "File not found" ); yyerror( "File not found" );
} }
} }