DTC: Add support for a C-like #include "file" mechanism.

Keeps track of open files in a stack, and assigns
a filenum to source positions for each lexical token.
Modified error reporting to show source file as well.
No policy on file directory basis has been decided.
Still handles stdin.

Tested on all arch/powerpc/boot/dts DTS files

Signed-off-by: Jon Loeliger <jdl@freescale.com>
This commit is contained in:
Jon Loeliger 2007-03-23 15:18:41 -05:00
parent b29597d9a3
commit e45e6fd274
9 changed files with 369 additions and 23 deletions

2
dtc.h
View file

@ -223,7 +223,7 @@ struct boot_info *dt_from_blob(FILE *f);
/* Tree source */
void dt_to_source(FILE *f, struct boot_info *bi);
struct boot_info *dt_from_source(FILE *f);
struct boot_info *dt_from_source(const char *f);
/* FS trees */