[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ./ChangeLog ./NEWS src/devices/grohtml/gr...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ./ChangeLog ./NEWS src/devices/grohtml/gr... |
Date: |
Tue, 23 Nov 2004 18:48:01 -0500 |
CVSROOT: /cvsroot/groff
Module name: groff
Branch:
Changes by: Werner LEMBERG <address@hidden> 04/11/23 23:42:02
Modified files:
. : ChangeLog NEWS
src/devices/grohtml: grohtml.man post-html.cpp
src/preproc/html: pre-html.cpp
Log message:
Add option -S grohtml to determine the file split level.
* src/devices/grohtml/post-html.cpp (split_level): New global
variable.
(html_header::determine_header_level): Use split_level.
(main): Handle `-S' command line option.
Sort options.
* src/preproc/html/pre-html.cpp (scanArguments): Updated.
* src/devices/grohtml/grohtml.man: Document it.
Sort options.
* NEWS: Document it.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/ChangeLog.diff?tr1=1.762&tr2=1.763&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/NEWS.diff?tr1=1.196&tr2=1.197&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/devices/grohtml/grohtml.man.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/devices/grohtml/post-html.cpp.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/preproc/html/pre-html.cpp.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.762 groff/ChangeLog:1.763
--- groff/ChangeLog:1.762 Tue Nov 23 22:22:06 2004
+++ groff/ChangeLog Tue Nov 23 23:42:02 2004
@@ -1,3 +1,20 @@
+2004-11-23 Larry Kollar <address@hidden>
+
+ Add option -S grohtml to determine the file split level.
+
+ * src/devices/grohtml/post-html.cpp (split_level): New global
+ variable.
+ (html_header::determine_header_level): Use split_level.
+ (main): Handle `-S' command line option.
+ Sort options.
+
+ * src/preproc/html/pre-html.cpp (scanArguments): Updated.
+
+ * src/devices/grohtml/grohtml.man: Document it.
+ Sort options.
+
+ * NEWS: Document it.
+
2004-11-23 Y T <address@hidden>
* tmac/s.tmac (ref*add-V, ref*add-N): New macros for handling
Index: groff/NEWS
diff -u groff/NEWS:1.196 groff/NEWS:1.197
--- groff/NEWS:1.196 Tue Nov 23 09:20:48 2004
+++ groff/NEWS Tue Nov 23 23:42:02 2004
@@ -31,6 +31,9 @@
be stable now.
o New command line option `-s' to set the base point size.
+
+o New command line option `-S' to set the split level while generating
+ multiple files.
Gxditview
---------
Index: groff/src/devices/grohtml/grohtml.man
diff -u groff/src/devices/grohtml/grohtml.man:1.20
groff/src/devices/grohtml/grohtml.man:1.21
--- groff/src/devices/grohtml/grohtml.man:1.20 Sat Nov 20 09:27:57 2004
+++ groff/src/devices/grohtml/grohtml.man Tue Nov 23 23:42:02 2004
@@ -46,16 +46,17 @@
. el .RB "[\ " "\\$1" "\ ]"
..
.
-.OP \-vbphlrn
+.OP \-bhlnprv
+.OP \-a \%aa-text-bits
.OP \-D dir
.OP \-F dir
+.OP \-g \%aa-graphic-bits
.OP \-i \%resolution
.OP \-I \%image-stem
-.OP \-o \%image-vertical-offset
.OP \-j \%filename
-.OP \-a \%aa-text-bits
-.OP \-g \%aa-graphic-bits
+.OP \-o \%image-vertical-offset
.OP \-s size
+.OP \-S level
.RI "[\ " files\|.\|.\|. "\ ]"
.br
.ad \na
@@ -117,6 +118,26 @@
.BR gs .
.
.TP
+.B \-b
+Initialize the background color to white.
+.
+.TP
+.BI \-D dir
+Inform
+.B grohtml
+to place all image files into directory
+.IR dir .
+.
+.TP
+.BI \-F dir
+Prepend directory
+.IB dir /dev name
+to the search path for font and device description files;
+.I name
+is the name of the device, usually
+.BR html .
+.
+.TP
.BI \-g aa-graphic-bits
Number of bits of antialiasing information to be used by
.I graphics
@@ -135,10 +156,6 @@
.BR gs .
.
.TP
-.B \-b
-Initialize the background color to white.
-.
-.TP
.B \-h
Generate section and number headings by using
.BR <B> .\|.\|. </B>
@@ -149,24 +166,36 @@
tags.
.
.TP
-.B \-l
-Turn off the production of automatic section links at the top of the
-document.
+.BI \-i resolution
+Select the resolution for all images.
+By default this is 100 pixels per inch.
+Example:
+.B \-i200
+indicates 200 pixels per inch.
.
.TP
-.B \-r
-Turn off the automatic header and footer line (html rule).
+.BI \-I stem
+Determine the image stem name.
+If omitted grohtml uses
+.BI \%grohtml- XXX
+.RI ( XXX
+is the process ID).
.
.TP
-.B \-s size
-Set the base point size of the source file.
-Thereafter when this point size is used in the source it will correspond
-to the html base size.
-Every increase of two points in the source will yield a
-.B <big>
-tag, and conversely when a decrease of two points is seen a
-.B <small>
-tag is emitted.
+.BI \-j filename
+Inform
+.B grohtml
+to split the html output into multiple files.
+The
+.I filename
+is the stem and specified section headings
+(default is level one) start a new file, named
+.IR filename-n.html .
+.
+.TP
+.B \-l
+Turn off the production of automatic section links at the top of the
+document.
.
.TP
.B \-n
@@ -177,57 +206,35 @@
This flag is automatically turned on if a heading contains an image.
.
.TP
+.BI \-o vertical-offset
+Specify the vertical offset of images in points.
+.
+.TP
.B \-p
Display page rendering progress to stderr.
.B grohtml
only displays a page number when an image is required.
.
.TP
-.BI \-F dir
-Prepend directory
-.IB dir /dev name
-to the search path for font and device description files;
-.I name
-is the name of the device, usually
-.BR html .
-.
-.TP
-.BI \-i resolution
-Select the resolution for all images.
-By default this is 100 pixels per inch.
-Example:
-.B \-i200
-indicates 200 pixels per inch.
-.
-.TP
-.BI \-I stem
-Determine the image stem name.
-If omitted grohtml uses
-.BI \%grohtml- XXX
-.RI ( XXX
-is the process ID).
-.
-.TP
-.BI \-o vertical-offset
-Specify the vertical offset of images in points.
+.B \-r
+Turn off the automatic header and footer line (html rule).
.
.TP
-.BI \-D dir
-Inform
-.B grohtml
-to place all image files into directory
-.IR dir .
+.B \-s size
+Set the base point size of the source file.
+Thereafter when this point size is used in the source it will correspond
+to the html base size.
+Every increase of two points in the source will yield a
+.B <big>
+tag, and conversely when a decrease of two points is seen a
+.B <small>
+tag is emitted.
.
.TP
-.BI \-j filename
-Inform
-.B grohtml
-to split the html output into multiple files.
-The
-.I filename
-is the stem and all level one section headings start a new
-file, named
-.IR filename-n.html .
+.BI \-S level
+When splitting html output,
+split at the heading level (or higher) defined by
+.IR level .
.
.TP
.B \-v
Index: groff/src/devices/grohtml/post-html.cpp
diff -u groff/src/devices/grohtml/post-html.cpp:1.13
groff/src/devices/grohtml/post-html.cpp:1.14
--- groff/src/devices/grohtml/post-html.cpp:1.13 Sat Nov 20 09:27:57 2004
+++ groff/src/devices/grohtml/post-html.cpp Tue Nov 23 23:42:02 2004
@@ -85,6 +85,7 @@
/* heading?
*/
static int base_point_size = 0; /* which troff font size
maps onto html */
/* size 3?
*/
+static int split_level = 2; /* what heading level to
split at? */
static string head_info; /* user supplied
information to be placed */
/* into <head> </head>
*/
@@ -2476,7 +2477,7 @@
}
}
header.header_level = level+1;
- if (header.header_level == 2) {
+ if (header.header_level >= 2 && header.header_level <= split_level) {
header.no_of_level_one_headings++;
insert_split_file();
}
@@ -4813,29 +4814,39 @@
{ "version", no_argument, 0, 'v' },
{ NULL, 0, 0, 0 }
};
- while ((c = getopt_long(argc, argv, "a:g:o:i:I:j:D:F:s:vbdhlrnp",
long_options, NULL))
+ while ((c = getopt_long(argc, argv, "a:bdD:F:g:hi:I:j:lno:prs:S:v",
+ long_options, NULL))
!= EOF)
switch(c) {
- case 'v':
- printf("GNU post-grohtml (groff) version %s\n", Version_string);
- exit(0);
- break;
case 'a':
/* text antialiasing bits - handled by pre-html */
break;
- case 'g':
- /* graphic antialiasing bits - handled by pre-html */
- break;
case 'b':
// set background color to white
default_background = new color;
default_background->set_gray(color::MAX_COLOR_VAL);
break;
+ case 'd':
+ /* handled by pre-html */
+ break;
+ case 'D':
+ /* handled by pre-html */
+ break;
case 'F':
font::command_line_font_dir(optarg);
break;
- case 's':
- base_point_size = atoi(optarg);
+ case 'g':
+ /* graphic antialiasing bits - handled by pre-html */
+ break;
+ case 'h':
+ /* do not use the Hn headings of html, but manufacture our own */
+ manufacture_headings = TRUE;
+ break;
+ case 'i':
+ /* handled by pre-html */
+ break;
+ case 'I':
+ /* handled by pre-html */
break;
case 'j':
multiple_files = TRUE;
@@ -4844,15 +4855,8 @@
case 'l':
auto_links = FALSE;
break;
- case 'r':
- auto_rule = FALSE;
- break;
- case 'd':
- /* handled by pre-html */
- break;
- case 'h':
- /* do not use the Hn headings of html, but manufacture our own */
- manufacture_headings = TRUE;
+ case 'n':
+ simple_anchors = TRUE;
break;
case 'o':
/* handled by pre-html */
@@ -4860,17 +4864,18 @@
case 'p':
/* handled by pre-html */
break;
- case 'i':
- /* handled by pre-html */
+ case 'r':
+ auto_rule = FALSE;
break;
- case 'I':
- /* handled by pre-html */
+ case 's':
+ base_point_size = atoi(optarg);
break;
- case 'D':
- /* handled by pre-html */
+ case 'S':
+ split_level = atoi(optarg) + 1;
break;
- case 'n':
- simple_anchors = TRUE;
+ case 'v':
+ printf("GNU post-grohtml (groff) version %s\n", Version_string);
+ exit(0);
break;
case CHAR_MAX + 1: // --help
usage(stdout);
Index: groff/src/preproc/html/pre-html.cpp
diff -u groff/src/preproc/html/pre-html.cpp:1.12
groff/src/preproc/html/pre-html.cpp:1.13
--- groff/src/preproc/html/pre-html.cpp:1.12 Tue Oct 12 21:39:31 2004
+++ groff/src/preproc/html/pre-html.cpp Tue Nov 23 23:42:02 2004
@@ -1545,13 +1545,10 @@
{ "version", no_argument, 0, 'v' },
{ NULL, 0, 0, 0 }
};
- while ((c = getopt_long(argc, argv,
- "+a:g:o:i:I:j:D:F:s:vbdhlrnp", long_options, NULL))
+ while ((c = getopt_long(argc, argv, "+a:bdD:F:g:hi:I:j:lno:prs:S:v",
+ long_options, NULL))
!= EOF)
switch(c) {
- case 'v':
- printf("GNU pre-grohtml (groff) version %s\n", Version_string);
- exit(0);
case 'a':
textAlphaBits = min(max(MIN_ALPHA_BITS, atoi(optarg)),
MAX_ALPHA_BITS);
@@ -1560,6 +1557,20 @@
exit(1);
}
break;
+ case 'b':
+ // handled by post-grohtml (set background color to white)
+ break;
+ case 'd':
+#if defined(DEBUGGING)
+ debug = TRUE;
+#endif
+ break;
+ case 'D':
+ image_dir = optarg;
+ break;
+ case 'F':
+ font_path.command_line_dir(optarg);
+ break;
case 'g':
graphicAlphaBits = min(max(MIN_ALPHA_BITS, atoi(optarg)),
MAX_ALPHA_BITS);
@@ -1568,41 +1579,42 @@
exit(1);
}
break;
- case 'b':
- // handled by post-grohtml (set background color to white)
- break;
- case 'D':
- image_dir = optarg;
- break;
- case 'I':
- image_template = optarg;
+ case 'h':
+ // handled by post-grohtml
break;
case 'i':
image_res = atoi(optarg);
break;
- case 'F':
- font_path.command_line_dir(optarg);
- break;
- case 's':
- // handled by post-grohtml (use font size n as the html base font size)
+ case 'I':
+ image_template = optarg;
break;
case 'j':
// handled by post-grohtml (set job name for multiple file output)
break;
+ case 'l':
+ // handled by post-grohtml (no automatic section links)
+ break;
+ case 'n':
+ // handled by post-grohtml (generate simple heading anchors)
+ break;
case 'o':
vertical_offset = atoi(optarg);
break;
case 'p':
show_progress = TRUE;
break;
- case 'd':
-#if defined(DEBUGGING)
- debug = TRUE;
-#endif
+ case 'r':
+ // handled by post-grohtml (no header and footer lines)
break;
- case 'h':
- // handled by post-grohtml
+ case 's':
+ // handled by post-grohtml (use font size n as the html base font size)
+ break;
+ case 'S':
+ // handled by post-grohtml (set file split level)
break;
+ case 'v':
+ printf("GNU pre-grohtml (groff) version %s\n", Version_string);
+ exit(0);
case CHAR_MAX + 1: // --help
usage(stdout);
exit(0);