From ce34ae3b238c562a215df0dddea56da866f16c0f Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Wed, 28 Mar 2007 17:05:33 -0500 Subject: DTC: Incorporate some review suggestions. - Change include syntax to: /include/ "filename" - Move private functions directly into dtc-lexer.l - Define YYID for some older parser templates Also fix a #include ordering problem around YYLTPE. Signed-off-by; Jon Loeliger Acked-by: Haiying Wang --- srcpos.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'srcpos.h') diff --git a/srcpos.h b/srcpos.h index d591e7e..bc5b525 100644 --- a/srcpos.h +++ b/srcpos.h @@ -22,7 +22,7 @@ * array of all opened filenames. */ -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +#if ! defined(YYLTYPE) && ! defined(YYLTYPE_IS_DECLARED) typedef struct YYLTYPE { int first_line; int first_column; @@ -35,6 +35,10 @@ typedef struct YYLTYPE { #define YYLTYPE_IS_TRIVIAL 1 #endif +/* Cater to old parser templates. */ +#ifndef YYID +#define YYID(n) (n) +#endif #define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ @@ -68,4 +72,3 @@ extern FILE *dtc_open_file(const char *fname); extern int lookup_file_name(const char *fname, int add_it); extern const char *srcpos_filename_for_num(int filenum); const char *srcpos_get_filename(void); - -- cgit v1.2.3-59-g8ed1b