+} /* }}} int show_fh */
+
+static int show_file (const char *file) /* {{{ */
+{
+ FILE *fh;
+ int status;
+
+ if (file == NULL)
+ return (EINVAL);
+
+ fh = fopen (file, "r");
+ if (fh == NULL)
+ {
+ fprintf (stderr, "Opening file \"%s\" failed: %s\n",
+ file, strerror (errno));
+ return (errno);
+ }
+
+ status = show_fh (fh);
+
+ fclose (fh);
+ return (status);
+} /* }}} int show_file */
+
+int main (int argc, char **argv)
+{
+ if (argc == 1)
+ {
+ show_fh (stdin);
+ }
+ else
+ {
+ int i;
+ for (i = 1; i < argc; i++)
+ {
+ if (i > 1)
+ puts ("\n");
+
+ if (argc > 2)
+ printf ("=== %s ===\n\n", argv[i]);
+
+ show_file (argv[i]);
+ }
+ }
+
+ exit (EXIT_SUCCESS);