Added a rule to the conversion prescription for man pages
This commit is contained in:
parent
5c67bd0329
commit
e0658580d1
@ -147,8 +147,8 @@ overflow:;
|
||||
*/
|
||||
int Mx1_convert(struct Mx1 *m, char line_in[256], char line_out[256], int flag)
|
||||
{
|
||||
int l, num, keep= 0, ret, raw;
|
||||
char word[256], buf[256], *remainder;
|
||||
int l, num, keep= 0, ret, raw, i, backslash_count;
|
||||
char word[256], buf[256], *remainder, *wpt;
|
||||
|
||||
m->count_in++;
|
||||
l= strlen(line_in);
|
||||
@ -273,6 +273,26 @@ int Mx1_convert(struct Mx1 *m, char line_in[256], char line_out[256], int flag)
|
||||
return(0);
|
||||
strcpy(line_out, line_in);
|
||||
}
|
||||
|
||||
/* "-" which are not preceded by an uneven number of "\" will get
|
||||
prepended one "\".
|
||||
*/
|
||||
l= strlen(line_out);
|
||||
backslash_count= 0;
|
||||
wpt= buf;
|
||||
for(i= 0; i < l; i++) {
|
||||
if(line_out[i] == '\\')
|
||||
backslash_count++;
|
||||
else if(line_out[i] == '-') {
|
||||
if(backslash_count % 2 == 0)
|
||||
*(wpt++)= '\\';
|
||||
backslash_count= 0;
|
||||
} else
|
||||
backslash_count= 0;
|
||||
*(wpt++)= line_out[i];
|
||||
}
|
||||
*wpt= 0;
|
||||
strcpy(line_out, buf);
|
||||
m->count_out++;
|
||||
return(1);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -31,6 +31,8 @@
|
||||
@c @@ , @{, @} will get stripped of their first @.
|
||||
@c Other lines which begin by "@" will be discarded.
|
||||
@c In lines not stemming from "@c man", "\" becomes "\\"
|
||||
@c "-" which are not preceded by an uneven number of "\" will get
|
||||
@c prepended one "\".
|
||||
@c
|
||||
@c
|
||||
@c man .\" Hey, EMACS: -*- nroff -*-
|
||||
@ -44,7 +46,7 @@
|
||||
@c man .\" First parameter, NAME, should be all caps
|
||||
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
@c man .\" other parameters are allowed: see man(7), man(1)
|
||||
@c man .TH XORRISO 1 "Apr 22, 2011"
|
||||
@c man .TH XORRISO 1 "May 13, 2011"
|
||||
@c man .\" Please adjust this date whenever revising the manpage.
|
||||
@c man .\"
|
||||
@c man .\" Some roff macros, for reference:
|
||||
|
Loading…
Reference in New Issue
Block a user