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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [or1ksim/] [sim-cmd.c] - Diff between revs 235 and 240

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

Rev 235 Rev 240
Line 613... Line 613...
}
}
 
 
static char *
static char *
strip_space (char *str)
strip_space (char *str)
{
{
  while (isblank (*str) && *str)
  while (isblank ((int)*str) && *str)
    str++;
    str++;
  return str;
  return str;
}
}
 
 
struct sim_command
struct sim_command
Line 730... Line 730...
 
 
      if ((redirstr = strchr (cur_arg, '>')))
      if ((redirstr = strchr (cur_arg, '>')))
        {
        {
          redirstr = strip_space (++redirstr);
          redirstr = strip_space (++redirstr);
 
 
          while (!isspace (*redirstr) && *redirstr)
          while (!isspace ((int)*redirstr) && *redirstr)
            redirstr++;
            redirstr++;
          *redirstr = '\0';
          *redirstr = '\0';
 
 
          redirstr = strchr (cur_arg, '>');
          redirstr = strchr (cur_arg, '>');
          *redirstr = '\0';
          *redirstr = '\0';
Line 750... Line 750...
          argc = 0;
          argc = 0;
          while (*cur_arg)
          while (*cur_arg)
            {
            {
              argv[argc] = cur_arg;
              argv[argc] = cur_arg;
              argc++;
              argc++;
              while (!isspace (*cur_arg) && *cur_arg)
              while (!isspace ((int)*cur_arg) && *cur_arg)
                cur_arg++;
                cur_arg++;
              if (*cur_arg)
              if (*cur_arg)
                {
                {
                  *cur_arg = '\0';
                  *cur_arg = '\0';
                  cur_arg = strip_space (cur_arg + 1);
                  cur_arg = strip_space (cur_arg + 1);

powered by: WebSVN 2.1.0

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