DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦29401ff02⟧ TextFile

    Length: 662 (0x296)
    Types: TextFile
    Notes: R1k Text-file segment

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦b040f66dc⟧ 
            └─⟦this⟧ 

TextFile

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>

void BreakPipe()
{
  printf("\rReader receive signal SIGPIPE \n");
}

main(argc,argv)
int argc;
char *argv[];
{
  int fd;
  char car;

  signal(SIGPIPE,BreakPipe);
  printf("\rBegin Reader on pipe %s\n",argv[1]);
  setbuf(stdout,NULL);
  if ((fd=open(argv[1],O_RDONLY|O_SYNC,0)) == -1)
  {
    fprintf(stderr,"%s : ouverture impossible pipe %s errno = %d \n",
	argv[0],argv[1],errno);
    exit(1);
  }
  while (1)
  {
    if (read(fd,&car,1) > 0)
      printf("%c",car);
    else break;
  }
  printf("\rEnd Reader on pipe %s\n",argv[1]);
}