don't set page size by default
[tridge/junkcode.git] / rep.c
1 #include <stdio.h>
2
3 short to=0x1043;
4 short from=0x1102;
5
6 main()
7 {
8         int i, ofs=0, count=0;
9         short x;
10         while (!feof(stdin)) {
11                 fread(&x, sizeof(x), 1, stdin);
12                 if (x == from) {
13                         count++;
14                         if (count == 2) {
15                                 x = to;
16                                 fprintf(stderr,"changed at %d\n", ofs);
17                         }
18                 }
19                 fwrite(&x, sizeof(x), 1, stdout);
20                 ofs += 2;
21         }
22 }