- if ((fd = open(filename, O_RDONLY)) != -1) {
- fflush(stdout);
- while ((sz = read(fd, buf, sizeof(buf))) > 0)
- write(STDOUT_FILENO, buf, sz);
- close(fd);
- }
+ if ((fd = open(filename, O_RDONLY)) == -1)
+ return 0;
+
+ if (element != NULL)
+ printf("<%s>\n", element);
+ fflush(stdout);
+ while ((sz = read(fd, buf, sizeof(buf))) > 0)
+ write(STDOUT_FILENO, buf, sz);
+ close(fd);
+ return 1;