2007-10-08 Carlos O'Donell <carlos@codesourcery.com>

* resrc.c (read_rc_file): Rename e to edit, and c to dir.
	Pass dir to windres_add_include_dir.  Add comments.
	(close_input_stream): Check pclose error, and call fatal if
	the preprocessor failed.
	* windres.c (windres_add_include_dir): Assert that p is non-NULL,
	and not an empty string.
This commit is contained in:
Carlos O'Donell
2007-10-08 13:50:18 +00:00
parent 313628ccba
commit c7f0a8e098
2 changed files with 42 additions and 17 deletions

View File

@@ -765,6 +765,12 @@ windres_add_include_dir (const char *p)
{
struct include_dir *n, **pp;
/* Computing paths is often complicated and error prone.
The easiest way to check for mistakes is at the time
we add them to include_dirs. */
assert (p != NULL);
assert (*p != '\0');
n = xmalloc (sizeof *n);
n->next = NULL;
n->dir = (char * ) p;