home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / PowerPC / Dev / PPCRelease / Examples / Misc / loop.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-07  |  409 b   |  25 lines

  1. #include <exec/types.h>
  2. #include <exec/nodes.h>
  3. #include <exec/lists.h>
  4. #include <exec/memory.h>
  5. #include <powerup/ppclib/interface.h>
  6. #include <powerup/gcclib/powerup_protos.h>
  7.  
  8. int    main(void)
  9. {
  10. long long    i;
  11.  
  12.   i    =    0;
  13.   for(;;)
  14.   {
  15.     if (PPCSetSignal(0L,SIGBREAKF_CTRL_C) & SIGBREAKF_CTRL_C)
  16.     {
  17.       break;
  18.     }
  19.     i++;
  20.   }
  21.   PPCprintf("The loop ran %Ld iterations\n",
  22.             i);
  23.   return(0);
  24. }
  25.