Diff of /gencat.c [8fd865] .. [8ddd2a]  Maximize  Restore

  Switch to side-by-side view

--- a/gencat.c
+++ b/gencat.c
@@ -182,10 +182,16 @@
 
   if( (argc -= optind) > 1 )
   {
+    /* Establish the message catalogue name, recognising `/dev/stdout'
+     * as an alias for `-', representing the standard output stream.
+     */
+    if( strcasecmp( (msgcat = *(argv += optind)), "/dev/stdout" ) == 0 )
+      msgcat = "-";
+
     /* Initialise the message list, to incorporate any messages which
      * are already contained within the specified message catalogue.
      */
-    if( (cat = mc_load( msgcat = *(argv += optind) )) == NULL )
+    if( (cat = mc_load( msgcat )) == NULL )
       switch( errno )
       {
 	case ENOENT:
@@ -382,4 +388,4 @@
   return EXIT_SUCCESS;
 }
 
-/* $RCSfile$Revision: 1.2 $: end of file */
+/* $RCSfile$Revision: 1.3 $: end of file */