9 unsigned char buf[65536];
10 size_t histogram[256];
23 fd = open ("buffer", O_RDWR);
27 printf ("(child-sort) open() failed\n");
31 size = read (fd, buf, sizeof buf);
32 for (i = 0; i < size; i++)
35 for (i = 0; i < sizeof histogram / sizeof *histogram; i++)
37 size_t j = histogram[i];
44 lseek (fd, 0, SEEK_SET);
46 write (fd, buf, size);