/* Add a Base Address selector to a mapping  */
static int mapping_addbaseaddr(struct if_mapping *ifnode, int *active, char *pos, size_t len, struct add_extra *extra, int linenum)
/* Add a Base Address selector to a mapping  */
static int mapping_addbaseaddr(struct if_mapping *ifnode, int *active, char *pos, size_t len, struct add_extra *extra, int linenum)
{
  size_t	n;
  unsigned int	address;
  extra = extra;
  n = strspn(string, "0123456789ABCDEFabcdefx"); 
  if((n < len) || (sscanf(string, "0x%X", &address) != 1))
    {
      fprintf(stderr, "Error: Invalid Base Address `%s' at line %d\n",
	      string, linenum);
      return(-1);
    }
  ifnode->base_addr = (unsigned short) address;
  ifnode->active[SELECT_BASEADDR] = 1;
  active[SELECT_BASEADDR] = 1;
  if(verbose)
    fprintf(stderr,
	    "Parsing : Added Base Address `0x%X' from line %d.\n",
	    ifnode->base_addr, linenum);
  return(0);
}