* defilep.y (def_name, def_library): Combine into...
(def_image_name): New function. Strip name to basename, with warning.
This commit is contained in:
parent
af42176667
commit
a880c7485c
2 changed files with 16 additions and 17 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-01-16 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* defilep.y (def_name, def_library): Combine into...
|
||||
(def_image_name): New function. Strip name to basename,
|
||||
with warning.
|
||||
|
||||
2005-01-12 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* configure.in: Be sure to invoke config.sub using the shell.
|
||||
|
|
|
@ -83,8 +83,7 @@ static void def_exports (const char *, const char *, int, int);
|
|||
static void def_heapsize (int, int);
|
||||
static void def_import (const char *, const char *, const char *, const char *,
|
||||
int);
|
||||
static void def_library (const char *, int);
|
||||
static void def_name (const char *, int);
|
||||
static void def_image_name (const char *, int, int);
|
||||
static void def_section (const char *, int);
|
||||
static void def_section_alt (const char *, const char *);
|
||||
static void def_stacksize (int, int);
|
||||
|
@ -122,8 +121,8 @@ start: start command
|
|||
;
|
||||
|
||||
command:
|
||||
NAME opt_name opt_base { def_name ($2, $3); }
|
||||
| LIBRARY opt_name opt_base { def_library ($2, $3); }
|
||||
NAME opt_name opt_base { def_image_name ($2, $3, 0); }
|
||||
| LIBRARY opt_name opt_base { def_image_name ($2, $3, 1); }
|
||||
| DESCRIPTION ID { def_description ($2);}
|
||||
| STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
|
||||
| HEAPSIZE NUMBER opt_number { def_heapsize ($2, $3);}
|
||||
|
@ -647,23 +646,17 @@ def_file_add_directive (def_file *my_def, const char *param, int len)
|
|||
/* Parser Callbacks. */
|
||||
|
||||
static void
|
||||
def_name (const char *name, int base)
|
||||
def_image_name (const char *name, int base, int is_dll)
|
||||
{
|
||||
const char* image_name = lbasename (name);
|
||||
if (image_name != name)
|
||||
einfo ("%s:%d: Warning: path components stripped from %s, '%s'\n",
|
||||
def_filename, linenumber, is_dll ? "LIBRARY" : "NAME", name);
|
||||
if (def->name)
|
||||
free (def->name);
|
||||
def->name = xstrdup (name);
|
||||
def->name = xstrdup (image_name);
|
||||
def->base_address = base;
|
||||
def->is_dll = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
def_library (const char *name, int base)
|
||||
{
|
||||
if (def->name)
|
||||
free (def->name);
|
||||
def->name = xstrdup (name);
|
||||
def->base_address = base;
|
||||
def->is_dll = 1;
|
||||
def->is_dll = is_dll;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue