mirror of
https://github.com/curl/curl.git
synced 2026-08-25 12:33:35 +03:00
docs: ascii version of manpage without nroff
Create ASCII version of manpage without nroff
- build src/tool_hugegelp.c from the ascii manpage
- move the the manpage and the ascii version build to docs/cmdline-opts
- remove all use of nroff from the build process
- should make the build entirely reproducible (by avoiding nroff)
- partly reverts 2620aa9 to build libcurl option man pages one by one
in cmake because the appveyor builds got all crazy until I did
The ASCII version of the manpage
- is built with gen.pl, just like the manpage is
- has a right-justified column making the appearance similar to the previous
version
- uses a 4-space indent per level (instead of the old version's 7)
- does not do hyphenation of words (which nroff does)
History
We first made the curl build use nroff for building the hugehelp file in
December 1998, for curl 5.2.
Closes #13047
This commit is contained in:
parent
9978d40ddb
commit
f03c85635f
22 changed files with 280 additions and 257 deletions
|
|
@ -44,45 +44,8 @@ push @out, " \\___|\\___/|_| \\_\\_____|\n";
|
|||
my $olen=0;
|
||||
while (<STDIN>) {
|
||||
my $line = $_;
|
||||
|
||||
# this should be removed:
|
||||
$line =~ s/(.|_)//g;
|
||||
|
||||
# remove trailing CR from line. msysgit checks out files as line+CRLF
|
||||
$line =~ s/\r$//;
|
||||
|
||||
$line =~ s/\x1b\x5b[0-9]+m//g; # escape sequence
|
||||
if($line =~ /^([ \t]*\n|curl)/i) {
|
||||
# cut off headers and empty lines
|
||||
$wline++; # count number of cut off lines
|
||||
next;
|
||||
}
|
||||
|
||||
my $text = $line;
|
||||
$text =~ s/^\s+//g; # cut off preceding...
|
||||
$text =~ s/\s+$//g; # and trailing whitespaces
|
||||
|
||||
$tlen = length($text);
|
||||
|
||||
if($wline && ($olen == $tlen)) {
|
||||
# if the previous line with contents was exactly as long as
|
||||
# this line, then we ignore the newlines!
|
||||
|
||||
# We do this magic because a header may abort a paragraph at
|
||||
# any line, but we don't want that to be noticed in the output
|
||||
# here
|
||||
$wline=0;
|
||||
}
|
||||
$olen = $tlen;
|
||||
|
||||
if($wline) {
|
||||
# we only make one empty line max
|
||||
$wline = 0;
|
||||
push @out, "\n";
|
||||
}
|
||||
push @out, $line;
|
||||
}
|
||||
push @out, "\n"; # just an extra newline
|
||||
|
||||
print <<HEAD
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue