Fixed problems that occured on input files with missing LF at end of file.

git-svn-id: svn://svn.cc65.org/cc65/trunk@1903 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-01-19 12:04:33 +00:00
parent 22b4faabb2
commit b6c4ff2e01
7 changed files with 40 additions and 29 deletions

View File

@@ -40,6 +40,7 @@
/* common */
#include "filepos.h"
#include "inline.h"
@@ -82,7 +83,7 @@ enum Token {
TOK_PLUS, /* + */
TOK_MINUS, /* - */
TOK_MUL, /* * */
TOK_MUL, /* * */
TOK_STAR = TOK_MUL, /* Alias */
TOK_DIV, /* / */
TOK_MOD, /* ! */
@@ -258,6 +259,16 @@ int TokHasSVal (enum Token Tok);
int TokHasIVal (enum Token Tok);
/* Return true if the given token has an attached IVal */
#if defined(HAVE_INLINE)
INLINE int TokIsSep (enum Token T)
/* Return true if this is a separator token */
{
return (T == TOK_SEP || T == TOK_EOF);
}
#else
# define TokIsSep(T) (T == TOK_SEP || T == TOK_EOF)
#endif
int GetSubKey (const char** Keys, unsigned Count);
/* Search for a subkey in a table of keywords. The current token must be an
* identifier and all keys must be in upper case. The identifier will be