groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff-commit] groff ./ChangeLog doc/pic.ms src/preproc/pic/pic.y


From: Werner LEMBERG
Subject: [Groff-commit] groff ./ChangeLog doc/pic.ms src/preproc/pic/pic.y
Date: Tue, 21 Mar 2006 07:57:58 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Branch:         
Changes by:     Werner LEMBERG <address@hidden> 06/03/21 07:57:57

Modified files:
        .              : ChangeLog 
        doc            : pic.ms 
        src/preproc/pic: pic.y 

Log message:
        * src/preproc/pic/pic.y (object_spec THEN): For compatibility with
        both DWB pic and dpic, make
        
        right;
        line then down;
        
        equal to
        
        right;
        line right then down;
        
        instead of
        
        right;
        line 0 then down;
        
        * doc/pic.ms: Document this.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/groff/ChangeLog.diff?tr1=1.935&tr2=1.936&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/doc/pic.ms.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/preproc/pic/pic.y.diff?tr1=1.19&tr2=1.20&r1=text&r2=text

Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.935 groff/ChangeLog:1.936
--- groff/ChangeLog:1.935       Mon Mar 20 12:59:09 2006
+++ groff/ChangeLog     Tue Mar 21 07:57:57 2006
@@ -1,3 +1,23 @@
+2006-03-21  Werner LEMBERG  <address@hidden>
+
+       * src/preproc/pic/pic.y (object_spec THEN): For compatibility with
+       both DWB pic and dpic, make
+
+         right;
+         line then down;
+
+       equal to
+
+         right;
+         line right then down;
+
+       instead of
+
+         right;
+         line 0 then down;
+
+       * doc/pic.ms: Document this.
+
 2006-03-20  Werner LEMBERG  <address@hidden>
 
        * doc/pic.ms: With permission of Eric Raymond, put it under the
Index: groff/doc/pic.ms
diff -u groff/doc/pic.ms:1.32 groff/doc/pic.ms:1.33
--- groff/doc/pic.ms:1.32       Mon Mar 20 12:59:09 2006
+++ groff/doc/pic.ms    Tue Mar 21 07:57:57 2006
@@ -31,7 +31,7 @@
 .\" Eric S. Raymond <address@hidden> in August 1995.  It has been put
 .\" under the GPL in March 2006.
 .\"
-.\"    $Id: pic.ms,v 1.32 2006/03/20 12:59:09 wl Exp $ 
+.\"    $Id: pic.ms,v 1.33 2006/03/21 07:57:57 wl Exp $ 
 .
 .
 .\" Set a proper TeX and LaTeX
@@ -515,6 +515,9 @@
 zigzag(line); 
 .PE
 .CE "2: \fBline right 1 then down .5 left 1 then right 1\fP"
+.PP
+If a path starts with \fBthen\fP, the first segment is assumed to be into
+the current direction, using the default length.
 .
 .NH 2
 Spline Objects
Index: groff/src/preproc/pic/pic.y
diff -u groff/src/preproc/pic/pic.y:1.19 groff/src/preproc/pic/pic.y:1.20
--- groff/src/preproc/pic/pic.y:1.19    Sun Mar 19 11:38:29 2006
+++ groff/src/preproc/pic/pic.y Tue Mar 21 07:57:57 2006
@@ -878,14 +878,27 @@
        | object_spec THEN
                {
                  $$ = $1;
-                 if ($$->flags & HAS_SEGMENT) {
-                   $$->segment_list = new segment($$->segment_pos,
-                                                  $$->segment_is_absolute,
-                                                  $$->segment_list);
-                   $$->flags &= ~HAS_SEGMENT;
-                   $$->segment_pos.x = $$->segment_pos.y = 0.0;
-                   $$->segment_is_absolute = 0;
-                 }
+                 if (!($$->flags & HAS_SEGMENT))
+                   switch ($$->dir) {
+                   case UP_DIRECTION:
+                     $$->segment_pos.y += $$->segment_width;
+                     break;
+                   case DOWN_DIRECTION:
+                     $$->segment_pos.y -= $$->segment_width;
+                     break;
+                   case RIGHT_DIRECTION:
+                     $$->segment_pos.x += $$->segment_width;
+                     break;
+                   case LEFT_DIRECTION:
+                     $$->segment_pos.x -= $$->segment_width;
+                     break;
+                   }
+                 $$->segment_list = new segment($$->segment_pos,
+                                                $$->segment_is_absolute,
+                                                $$->segment_list);
+                 $$->flags &= ~HAS_SEGMENT;
+                 $$->segment_pos.x = $$->segment_pos.y = 0.0;
+                 $$->segment_is_absolute = 0;
                }
        | object_spec SOLID
                {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]