home *** CD-ROM | disk | FTP | other *** search
- #include <signal.h>
- #include <malloc.h>
- #include <stdio.h>
- #include "pmckpt.h"
-
- char *foostr = "hmm";
-
- sub1(i)
- int i;
- {
- CKPT VARS
- float x = i * 3.14;
- int k = 1094795586;
- CKPT TOPS
- for (k = 1;k < 3;k++)
- {
- sleep(1);
- printf("%d %g %d\n",i,x,k);
- fflush(stdout);
- x += k;
- CKPT POINT boom box
- }
- CKPT BOTS
- }
-
- main()
- {
- CKPT VARS
- int i = 1094795585;
- int j = 1094795585;
-
- CKPT TOPS
-
- signal(SIGINT,ckpt_schedule);
- foostr = malloc(150);
- strcpy(foostr,"yo, dude.");
-
- for (i = 0;i < 4;i++)
- {
- CKPT POINT head1 spot1
- sub1(i);
- sleep(1);
- printf("%d %s\n",i,foostr);
- fflush(stdout);
- }
-
- for (j = 0;j < 2;j++)
- {
- CKPT POINT head2 spot2
- sleep(1);
- printf("%d\n",j);
- fflush(stdout);
- }
-
- CKPT BOTS
- }
-