diff src/tokenizer.h @ 5:276c4edc8521

initial coding
author carl
date Fri, 02 Dec 2005 17:52:44 -0800
parents 551433a01cab
children d76f9ff42487
line wrap: on
line diff
--- a/src/tokenizer.h	Thu Dec 01 17:17:37 2005 -0800
+++ b/src/tokenizer.h	Fri Dec 02 17:52:44 2005 -0800
@@ -63,8 +63,8 @@
 	int 	nextint();
 	void	skipeol();			// skip to eol
 	void	push(char *token)			{pending_tokens.push_front(token);};
-	char	*cur_fn()					{return filenames.front();};
-	int 	cur_line()					{return linenumbers.front();};
+	const char	*cur_fn()					{return filenames.empty()	? "" : filenames.front();};
+	int 		cur_line()					{return linenumbers.empty() ? 0  : linenumbers.front();};
 	void	token_error(const char *err);
 	void	token_error(const char *fmt, int d, const char *s);
 	void	token_error(const char *fmt, const char *t, const char *h);