Patch by Mats Erik Anderson: wrap @command{} around the word xorriso
This commit is contained in:
@ -111,6 +111,23 @@ int Mx1_substitute(struct Mx1 *m, char line_in[256], char line_out[256],
|
||||
strcpy(wpt, "\\fR");
|
||||
wpt+= 3;
|
||||
rpt+= ept - rpt;
|
||||
} else if(strncmp(rpt, "@command{}", 9) == 0) {
|
||||
/* @command{... } gets mapped to \fB...\fR . */
|
||||
ept= strchr(rpt, '}');
|
||||
if(ept == NULL) {
|
||||
Mx1_report_error(m, "No closing bracket found for '@command{'", 0);
|
||||
return(-1);
|
||||
}
|
||||
l= ept - rpt - 9;
|
||||
if((wpt - line_out) + l + 6 + (rpt[9] == '-') > 255)
|
||||
goto overflow;
|
||||
strcpy(wpt, "\\fB");
|
||||
wpt+= 3;
|
||||
strncpy(wpt, rpt + 9, l);
|
||||
wpt+= l;
|
||||
strcpy(wpt, "\\fR");
|
||||
wpt+= 3;
|
||||
rpt+= ept - rpt;
|
||||
} else if(strncmp(rpt, "@minus{}", 8) == 0) {
|
||||
/* @minus{} will become "-". */
|
||||
if((wpt - line_out) + 1 > 255)
|
||||
@ -252,11 +269,13 @@ int Mx1_convert(struct Mx1 *m, char line_in[256], char line_out[256], int flag)
|
||||
|
||||
/* @strong{-...} gets mapped to \fB\-...\fR . */
|
||||
/* @strong{... } gets mapped to \fB...\fR . */
|
||||
/* @command{... } gets mapped to \fB...\fR . */
|
||||
/* @minus{} will become "-". */
|
||||
/* @@ , @{, @} will get stripped of their first @. */
|
||||
/* "\" becomes "\\" */
|
||||
if(line_in[0] != '@' ||
|
||||
strncmp(line_in, "@strong{", 8) == 0 ||
|
||||
strncmp(line_in, "@command{", 9) == 0 ||
|
||||
strncmp(line_in, "@minus{}", 8) == 0 ||
|
||||
strncmp(line_in, "@@", 2) == 0 ||
|
||||
strncmp(line_in, "@{", 2) == 0 ||
|
||||
|
Reference in New Issue
Block a user