File: upstream-source-CC2help2man.patch

package info (click to toggle)
bliss 0.77-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 880 kB
  • sloc: cpp: 6,505; makefile: 183; sh: 6
file content (70 lines) | stat: -rw-r--r-- 2,027 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Description: format usages and helps
 Attempt to format the help message of the bliss front-end program
 wrt UN*X customs in view to employ help2man to generate a manpage;
 meant to be submitted to the upstream maintainer team.
Origin: debian
Forwarded: by-email
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2023-07-09

--- a/src/bliss.cc
+++ b/src/bliss.cc
@@ -50,6 +50,25 @@
 
 
 
+#if !defined(BLISS_COMPILED_DATE)
+#define BLISS_COMPILED_DATE "compiled " __DATE__
+#endif
+
+static void
+version(FILE* const fp)
+{
+  fprintf(fp,
+"bliss version %s (" BLISS_COMPILED_DATE ")\n"
+"Copyright (C) 2003-2015 Tommi Junttila.\n"
+"\n"
+"License LGPLv3+: GNU LGPL version 3 or later, <http://gnu.org/licenses/lgpl.html>.\n"
+"This program comes with ABSOLUTELY NO WARRANTY. This is free software,\n"
+"and you are welcome to redistribute it under certain conditions;\n"
+"see COPYING and COPYING.LESSER for details.\n"
+      , bliss::version
+	  );
+}
+
 static void
 usage(FILE* const fp, const char* argv0)
 {
@@ -59,12 +78,10 @@
   else program_name = argv0;  
   if(!program_name or *program_name == 0) program_name = "bliss";
 
-  fprintf(fp, "bliss version %s (compiled " __DATE__ ")\n", bliss::version);
-  fprintf(fp, "Copyright 2003-2021 Tommi Junttila\n");
   fprintf(fp,
-"\n"
-"Usage: %s [options] [<graph file>]\n"
-"\n"
+"Usage: %s [options] [<graphfile>]\n"
+"  Run bliss on <graphfile>.\n"
+"Options:\n"
 "  -directed   the input graph is directed\n"
 "  -can        compute canonical form\n"
 "  -ocan=f     compute canonical form and output it in file f\n"
@@ -83,6 +100,7 @@
 "  -cr=X       use component recursion? [X=y/n, default: y]\n"
 "  -version    print the version number and exit\n"
 "  -help       print this help and exit\n"
+"\n"
           ,program_name
 	  );
 }
@@ -120,7 +138,7 @@
 	}
       else if(strcmp(argv[i], "-version") == 0)
 	{
-	  fprintf(stdout, "bliss version %s\n", bliss::version);
+	  version(stdout);
 	  exit(0);
 	}
       else if(strcmp(argv[i], "-help") == 0)