contrib/gdb-7/gdb/utils.c
int
parse_pid_to_attach (char *args)
{
  unsigned long pid;
  char *dummy;

  if (!args)
    error_no_arg (_("process-id to attach"));

  dummy = args;
  pid = strtoul (args, &dummy, 0);
  /* Some targets don't set errno on errors, grrr!  */
  if ((pid == 0 && dummy == args) || dummy != &args[strlen (args)])
    error (_("Illegal process-id: %s."), args);

  return pid;
}
/* Return ARGS parsed as a valid pid, or throw an error.  */
Return ARGS parsed as a valid pid, or throw an error.
Return ARGS parsed as a valid pid or throw an error .
int
parse_pid_to_attach (char *args)
{
  unsigned long pid;
  char *dummy;
  if (!args)
    error_no_arg (_("process-id to attach"));
  dummy = args;
  pid = strtoul (args, &dummy, 0);
  if ((pid == 0 && dummy == args) || dummy != &args[strlen (args)])
    error (_("Illegal process-id: %s."), args);
  return pid;
}
int parse_pid_to_attach ( char * args ) { unsigned long pid ; char * dummy ; if ( ! args ) error_no_arg ( _ ( " " ) ) ; dummy = args ; pid = strtoul ( args , & dummy , 0 ) ; if ( ( pid == 0 && dummy == args ) || dummy != & args [ strlen ( args ) ] ) error ( _ ( " " ) , args ) ; return pid ; }
Return ARGS parsed as a valid pid, or throw an error.
Return ARGS parsed as a valid pid or throw an error .
/* Some targets don't set errno on errors, grrr!  */