tech@mandoc.bsd.lv
 help / color / Atom feed
* eqn(7): leading ~ doesn't become space
@ 2017-06-29  6:40 Anthony J. Bentley
  2017-06-29 16:37 ` Ingo Schwarze
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony J. Bentley @ 2017-06-29  6:40 UTC (permalink / raw)
  To: tech

Hi,

.EQ
a~<
.EN
.EQ
~<
.EN

In groff:

  a< <

In mandoc:

  a < ~<

~ should not appear in the output.

This shows up in glCopyTexSubImage1D(3) and possibly other places.

-- 
Anthony J. Bentley
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv

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

* Re: eqn(7): leading ~ doesn't become space
  2017-06-29  6:40 eqn(7): leading ~ doesn't become space Anthony J. Bentley
@ 2017-06-29 16:37 ` Ingo Schwarze
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Schwarze @ 2017-06-29 16:37 UTC (permalink / raw)
  To: Anthony J. Bentley; +Cc: tech

Hi Anthony,

Anthony J. Bentley wrote on Thu, Jun 29, 2017 at 12:40:28AM -0600:

> .EQ
> a~<
> .EN
> .EQ
> ~<
> .EN

> In groff:
> 
>   a< <
> 
> In mandoc:
> 
>   a < ~<
> 
> ~ should not appear in the output.

True, fixed with the following commit.

Thanks for reporting,
  Ingo


Log Message:
-----------
Skip whitespace at the beginning of eqn(7) nodes,
in particular ~ and ^ that misrendered;
found by bentley@ in glCopyTexSubImage1D(3); also affected
glAccum(3), glClipPlane(3), glDrawPixels(3), glEvalMesh(3), and others.

Modified Files:
--------------
    mandoc:
        eqn.c

Revision Data
-------------
Index: eqn.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/eqn.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -Leqn.c -Leqn.c -u -p -r1.71 -r1.72
--- eqn.c
+++ eqn.c
@@ -683,7 +683,7 @@ eqn_parse(struct eqn_node *ep, struct eq
 	if (ep->data == NULL)
 		return ROFF_IGN;
 
-	ep->start = ep->end = ep->data;
+	ep->start = ep->end = ep->data + strspn(ep->data, " ^~");
 
 next_tok:
 	tok = eqn_next(ep, MODE_TOK);
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29  6:40 eqn(7): leading ~ doesn't become space Anthony J. Bentley
2017-06-29 16:37 ` Ingo Schwarze

tech@mandoc.bsd.lv

Archives are clonable: git clone --mirror http://inbox.vuxu.org/mandoc-tech

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.tech


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git