tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* PATCH: roff.c stubs for .ds,.rm,.tr
@ 2010-05-24 19:18 Ingo Schwarze
  2010-05-24 19:26 ` Joerg Sonnenberger
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Schwarze @ 2010-05-24 19:18 UTC (permalink / raw)
  To: tech

Hi Kristaps and Joerg,

when importing roff.c, i was under the impression that .ds, .rm,
and .tr stubs would be needed to deal with Perl manuals.
Later on, it turned out this impression was not actually true,
but caused by misunderstanding another bug.

All the same, i guess we will need to implement them at some point
anyway, so providing the stubs now will hardly do any harm.
And it helps syncing, this diff is already in OpenBSD.

The diff is also at
  /usr/vhosts/mdocml.bsd.lv/patch/schwarze/07.ds-rm-tr.patch

OK?

Yours,
  Ingo


--- roff.c	Mon May 24 17:58:19 2010
+++ roff.c	Sun May 23 21:48:40 2010
@@ -38,10 +38,13 @@ enum	rofft {
 	ROFF_de,
 	ROFF_dei,
 	ROFF_de1,
+	ROFF_ds,
 	ROFF_el,
 	ROFF_ie,
 	ROFF_if,
 	ROFF_ig,
+	ROFF_rm,
+	ROFF_tr,
 	ROFF_cblock,
 	ROFF_ccond,
 	ROFF_MAX
@@ -98,6 +101,7 @@ static	enum rofferr	 roff_ccond(ROFF_ARGS);
 static	enum rofferr	 roff_cond(ROFF_ARGS);
 static	enum rofferr	 roff_cond_text(ROFF_ARGS);
 static	enum rofferr	 roff_cond_sub(ROFF_ARGS);
+static	enum rofferr	 roff_line(ROFF_ARGS);
 
 const	struct roffmac	 roffs[ROFF_MAX] = {
 	{ "am", roff_block, roff_block_text, roff_block_sub, 0 },
@@ -106,10 +110,13 @@ const	struct roffmac	 roffs[ROFF_MAX] = {
 	{ "de", roff_block, roff_block_text, roff_block_sub, 0 },
 	{ "dei", roff_block, roff_block_text, roff_block_sub, 0 },
 	{ "de1", roff_block, roff_block_text, roff_block_sub, 0 },
+	{ "ds", roff_line, NULL, NULL, 0 },
 	{ "el", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT },
 	{ "ie", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT },
 	{ "if", roff_cond, roff_cond_text, roff_cond_sub, ROFFMAC_STRUCT },
 	{ "ig", roff_block, roff_block_text, roff_block_sub, 0 },
+	{ "rm", roff_line, NULL, NULL, 0 },
+	{ "tr", roff_line, NULL, NULL, 0 },
 	{ ".", roff_cblock, NULL, NULL, 0 },
 	{ "\\}", roff_ccond, NULL, NULL, 0 },
 };
@@ -713,4 +720,13 @@ roff_cond(ROFF_ARGS)
 
 	*offs = pos;
 	return(ROFF_RERUN);
+}
+
+
+/* ARGSUSED */
+static enum rofferr
+roff_line(ROFF_ARGS)
+{
+
+	return(ROFF_IGN);
 }
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: roff.c stubs for .ds,.rm,.tr
  2010-05-24 19:18 PATCH: roff.c stubs for .ds,.rm,.tr Ingo Schwarze
@ 2010-05-24 19:26 ` Joerg Sonnenberger
  2010-05-24 21:13   ` Kristaps Dzonsons
  0 siblings, 1 reply; 4+ messages in thread
From: Joerg Sonnenberger @ 2010-05-24 19:26 UTC (permalink / raw)
  To: tech

On Mon, May 24, 2010 at 09:18:52PM +0200, Ingo Schwarze wrote:
> All the same, i guess we will need to implement them at some point
> anyway, so providing the stubs now will hardly do any harm.
> And it helps syncing, this diff is already in OpenBSD.

Sounds good. Not sure about anything beyond .ds in terms of usage, but
that's a separate discussion.

Joerg
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: roff.c stubs for .ds,.rm,.tr
  2010-05-24 19:26 ` Joerg Sonnenberger
@ 2010-05-24 21:13   ` Kristaps Dzonsons
  2010-05-24 21:16     ` Ingo Schwarze
  0 siblings, 1 reply; 4+ messages in thread
From: Kristaps Dzonsons @ 2010-05-24 21:13 UTC (permalink / raw)
  To: tech

Joerg Sonnenberger wrote:
> On Mon, May 24, 2010 at 09:18:52PM +0200, Ingo Schwarze wrote:
>> All the same, i guess we will need to implement them at some point
>> anyway, so providing the stubs now will hardly do any harm.
>> And it helps syncing, this diff is already in OpenBSD.
> 
> Sounds good. Not sure about anything beyond .ds in terms of usage, but
> that's a separate discussion.

This can be checked in; however, roff.7 needs to be updated to note the 
new macros, that they're discarded, and their original functions.

I do want to keep roff.7 as the reference for what mandoc(1) discards, 
if only just for us.

Thanks,

Kristaps
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: roff.c stubs for .ds,.rm,.tr
  2010-05-24 21:13   ` Kristaps Dzonsons
@ 2010-05-24 21:16     ` Ingo Schwarze
  0 siblings, 0 replies; 4+ messages in thread
From: Ingo Schwarze @ 2010-05-24 21:16 UTC (permalink / raw)
  To: tech

Hi Kristaps,

> This can be checked in; however, roff.7 needs to be updated to note
> the new macros, that they're discarded, and their original
> functions.

OK, i will add this now, then commit everything together.

> I do want to keep roff.7 as the reference for what mandoc(1)
> discards, if only just for us.

Sure.

Yours,
  Ingo
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-24 21:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-24 19:18 PATCH: roff.c stubs for .ds,.rm,.tr Ingo Schwarze
2010-05-24 19:26 ` Joerg Sonnenberger
2010-05-24 21:13   ` Kristaps Dzonsons
2010-05-24 21:16     ` Ingo Schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).