OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_1_x/] [or1ksim/] [cpu/] [common/] [parse.c] - Diff between revs 296 and 304

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 296 Rev 304
Line 67... Line 67...
        if ((newline = strchr(out, '\r')))      /* get rid of CR */
        if ((newline = strchr(out, '\r')))      /* get rid of CR */
                newline[0] = '\0';
                newline[0] = '\0';
        return(out);
        return(out);
}
}
 
 
 
char *
 
stripwhite (string)
 
     char *string;
 
{
 
  register char *s, *t;
 
 
 
  for (s = string; whitespace (*s); s++)
 
    ;
 
 
 
  if (*s == 0)
 
    return (s);
 
 
 
  t = s + strlen (s) - 1;
 
  while (t > s && whitespace (*t))
 
    t--;
 
  *++t = '\0';
 
 
 
  return s;
 
}
 
 
 
char *
 
dupstr (s)
 
     char *s;
 
{
 
  char *r;
 
 
 
  r = xmalloc (strlen (s) + 1);
 
  strcpy (r, s);
 
  return (r);
 
}
 
 
/* Used only by the simulator loader to translate logical addresses into physical.
/* Used only by the simulator loader to translate logical addresses into physical.
   If loadcode() is called with valid virtphy_transl pointer to a table of
   If loadcode() is called with valid virtphy_transl pointer to a table of
   translations then translate() performs translation otherwise phy address is
   translations then translate() performs translation otherwise phy address is
   equal to logical. */
   equal to logical. */
static unsigned int translate(unsigned int laddr,int* breakpoint)
static unsigned int translate(unsigned int laddr,int* breakpoint)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.