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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.base/] [interrupt.c] - Diff between revs 106 and 107

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 106 Rev 107
#include <errno.h>
#include <errno.h>
#include <stdio.h>
#include <stdio.h>
#include <unistd.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdlib.h>
int
int
main ()
main ()
{
{
  char x;
  char x;
  int nbytes;
  int nbytes;
#ifdef usestubs
#ifdef usestubs
  set_debug_traps();
  set_debug_traps();
  breakpoint();
  breakpoint();
#endif
#endif
  printf ("talk to me baby\n");
  printf ("talk to me baby\n");
  while (1)
  while (1)
    {
    {
      nbytes = read (0, &x, 1);
      nbytes = read (0, &x, 1);
      if (nbytes < 0)
      if (nbytes < 0)
        {
        {
#ifdef EINTR
#ifdef EINTR
          if (errno != EINTR)
          if (errno != EINTR)
#endif
#endif
            perror ("");
            perror ("");
        }
        }
      else if (nbytes == 0)
      else if (nbytes == 0)
        {
        {
          printf ("end of file\n");
          printf ("end of file\n");
          exit (0);
          exit (0);
        }
        }
      else
      else
        write (1, &x, 1);
        write (1, &x, 1);
    }
    }
  return 0;
  return 0;
}
}
 
 
int
int
func1 ()
func1 ()
{
{
  return 4;
  return 4;
}
}
 
 

powered by: WebSVN 2.1.0

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