On Sat, Aug 03, 2019 at 05:06:54PM +0200, Karl Hammar wrote:
> urj_vhdl_set_entity() saved the entity name in the parts part_name
> save it to a vhdl struct instead, it is the callers responsibility
> to set part_name
> ---
> urjtag/src/bsdl/bsdl_types.h | 2 ++
> urjtag/src/bsdl/vhdl_bison.y | 5 ++---
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/urjtag/src/bsdl/bsdl_types.h b/urjtag/src/bsdl/bsdl_types.h
> index d19ffd11..efe09579 100644
> --- a/urjtag/src/bsdl/bsdl_types.h
> +++ b/urjtag/src/bsdl/bsdl_types.h
> @@ -157,10 +157,12 @@ typedef struct jtag_ctrl urj_bsdl_jtag_ctrl_t;
>
> /* private data of the VHDL bison parser
> used to store variables the would end up as globals otherwise */
> +#define VHDL_PARSER_ENTITY_NAME_MAXLEN 20
> struct vhdl_parser_priv
> {
> char Package_File_Name[100];
> int Reading_Package;
> + char entity_name[VHDL_PARSER_ENTITY_NAME_MAXLEN+1];
> char *buffer;
> size_t len_buffer;
> void *scanner;
> diff --git a/urjtag/src/bsdl/vhdl_bison.y b/urjtag/src/bsdl/vhdl_bison.y
> index 50816628..4d057df5 100644
> --- a/urjtag/src/bsdl/vhdl_bison.y
> +++ b/urjtag/src/bsdl/vhdl_bison.y
> @@ -918,9 +918,8 @@ urj_vhdl_set_entity (urj_vhdl_parser_priv_t *priv, char
> *entityname)
> {
> if (priv->jtag_ctrl->proc_mode & URJ_BSDL_MODE_INSTR_EXEC)
> {
> - strncpy (priv->jtag_ctrl->part->part_name, entityname,
> - URJ_PART_PART_MAXLEN);
> - priv->jtag_ctrl->part->part_name[URJ_PART_PART_MAXLEN] = '\0';
> + strncpy (priv->entity_name, entityname,
> VHDL_PARSER_ENTITY_NAME_MAXLEN);
> + priv->entity_name[VHDL_PARSER_ENTITY_NAME_MAXLEN] = '\0';
> }
>
> free (entityname);
Will be applied.
Waits for inclusion of the patch that introduced part->part_name
Groeten
Geert Stappers
--
Leven en laten leven
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development