]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/gen/gen.c
ncurses 6.2 - patch 20200222
[ncurses.git] / Ada95 / gen / gen.c
index b204236b34c1d95cb8b694338900c064717a7541..22efff8e51ea2ca84af8be5ff79116079cbfc83b 100644 (file)
@@ -33,7 +33,7 @@
 
 /*
     Version Control
-    $Id: gen.c,v 1.71 2020/02/02 23:34:34 tom Exp $
+    $Id: gen.c,v 1.72 2020/02/22 21:01:00 tom Exp $
   --------------------------------------------------------------------------*/
 /*
   This program prints on its standard output the source for the
@@ -180,8 +180,17 @@ main(int argc, const char *argv[])
   if (argc != 2)
     my_error("Only one argument expected (DFT_ARG_SUFFIX)");
 
-  printf("--  Generated by the C program %s (source " __FILE__ ").\n",
-        my_program_invocation_name);
+  if ((strlen(argv[0]) + strlen(__FILE__)) > 25)
+    {
+      printf("--  Generated by the C program %.40s.\n",
+            my_program_invocation_name);
+    }
+  else
+    {
+      printf("--  Generated by the C program %s (source %s).\n",
+            my_program_invocation_name,
+            __FILE__);
+    }
   printf("--  Do not edit this file directly.\n");
   printf("--  The values provided here may vary on your system.\n");
   printf("\n");