20 static const char *
usage =
"Usage: example4 [-d]\n";
25 int main(
int argc,
char *argv[])
31 else if ((argc == 2) && !strcmp(argv[1],
"-d"))
37 fprintf(stderr,
"%s",
usage);
55 int readlen =
read(
STDIN, buf,
sizeof(buf));
70 write(
STDOUT, ebuf, ebuflen);
75 write(
STDOUT, ebuf, ebuflen);
89 int readlen =
read(
STDIN, buf,
sizeof(buf));
108 write(
STDOUT, ebuf, ebuflen);
112 fprintf(stderr,
"Error: decoding message\n");
116 write(
STDOUT, ebuf, ebuflen);
121 write(
STDOUT, ebuf, ebuflen);