File: gutter-width

package info (click to toggle)
paps 0.6.8-7.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, stretch
  • size: 2,192 kB
  • ctags: 665
  • sloc: sh: 9,020; ansic: 1,681; makefile: 78
file content (43 lines) | stat: -rw-r--r-- 1,870 bytes parent folder | download | duplicates (4)
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
Description: Implement --gutter-width option
Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=536761
Bug-Debian: http://bugs.debian.org/536761
Author: Arthur de Jong <arthur@west.nl>

--- a/src/paps.1
+++ b/src/paps.1
@@ -60,6 +60,9 @@
 .B \-\-right-margin=rm
 Set right margin. Default is 36 postscript points.
 .TP
+.B \-\-gutter-width=gw
+Set gutter width. Default is 40 postscript points.
+.TP
 .B \-\-help
 Show summary of options.
 .TP
--- a/src/paps.c
+++ b/src/paps.c
@@ -282,6 +282,7 @@
   gboolean do_wordwrap = TRUE; // What should be default?
   int num_columns = 1;
   int top_margin = 36, bottom_margin = 36, right_margin = 36, left_margin = 36;
+  int gutter_width = 40;
   gchar *font = MAKE_FONT_NAME (DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE), *encoding = NULL;
   page_layout_t page_layout;
   GOptionContext *ctxt = g_option_context_new("[text file]");
@@ -299,6 +300,7 @@
     {"top-margin", 0, 0, G_OPTION_ARG_INT, &top_margin, "Set top margin. (Default: 36)", "NUM"},
     {"right-margin", 0, 0, G_OPTION_ARG_INT, &right_margin, "Set right margin. (Default: 36)", "NUM"},
     {"left-margin", 0, 0, G_OPTION_ARG_INT, &left_margin, "Set left margin. (Default: 36)", "NUM"},
+    {"gutter-width", 0, 0, G_OPTION_ARG_INT, &gutter_width, "Set gutter width. (Default: 40)", "NUM"},
     {"header", 0, 0, G_OPTION_ARG_NONE, &do_draw_header, "Draw page header for each page.", NULL},
     {"encoding", 0, 0, G_OPTION_ARG_STRING, &encoding, "Assume the documentation encoding.", "ENCODING"},
     {"lpi", 0, 0, G_OPTION_ARG_CALLBACK, _paps_arg_lpi_cb, "Set the amount of lines per inch.", "REAL"},
@@ -317,7 +319,6 @@
   PangoFontset *fontset;
   PangoFontMetrics *metrics;
   int num_pages = 1;
-  int gutter_width = 40;
   int total_gutter_width;
   int page_width = paper_sizes[0].width;
   int page_height = paper_sizes[0].height;