[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ./ChangeLog doc/pic.ms src/preproc/pic/ob...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ./ChangeLog doc/pic.ms src/preproc/pic/ob... |
Date: |
Sun, 19 Mar 2006 14:56:52 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Branch:
Changes by: Werner LEMBERG <address@hidden> 06/03/19 14:56:52
Modified files:
. : ChangeLog
doc : pic.ms
src/preproc/pic: object.cpp
Log message:
* src/preproc/pic/objects.cpp (object_spec::make_line): Handle `at'
attribute in combination with `with'. Bug reported by Jennifer
Sayers <address@hidden>.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/groff/ChangeLog.diff?tr1=1.933&tr2=1.934&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/doc/pic.ms.diff?tr1=1.30&tr2=1.31&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/src/preproc/pic/object.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.933 groff/ChangeLog:1.934
--- groff/ChangeLog:1.933 Sun Mar 19 11:38:28 2006
+++ groff/ChangeLog Sun Mar 19 14:56:52 2006
@@ -2,6 +2,10 @@
* src/preproc/pic/pic.y (expr <INT>): Really return integer part.
+ * src/preproc/pic/objects.cpp (object_spec::make_line): Handle `at'
+ attribute in combination with `with'. Bug reported by Jennifer
+ Sayers <address@hidden>.
+
2006-03-19 Miklos Somogyi <address@hidden>
* doc/groff.texinfo: Improve documentation of `.sp'.
Index: groff/doc/pic.ms
diff -u groff/doc/pic.ms:1.30 groff/doc/pic.ms:1.31
--- groff/doc/pic.ms:1.30 Sat Jan 21 14:14:09 2006
+++ groff/doc/pic.ms Sun Mar 19 14:56:52 2006
@@ -10,7 +10,7 @@
.\" This document was written for free use and redistribution by
.\" Eric S. Raymond <address@hidden> in August 1995.
.\"
-.\" $Id: pic.ms,v 1.30 2006/01/21 14:14:09 wl Exp $
+.\" $Id: pic.ms,v 1.31 2006/03/19 14:56:52 wl Exp $
.\"
.\" Set a proper TeX and LaTeX
.ie t \{\
@@ -1150,7 +1150,7 @@
Using Locations
.PP
There are four ways to use locations; \fBat\fP, \fBfrom\fP, \fBto\fP,
-and \fBwith\fP. All three are object modifiers; that is, you use them
+and \fBwith\fP. All four are object modifiers; that is, you use them
as suffixes to a drawing command.
.PP
The \fBat\fP modifier says to draw a closed object or arc with its
Index: groff/src/preproc/pic/object.cpp
diff -u groff/src/preproc/pic/object.cpp:1.6
groff/src/preproc/pic/object.cpp:1.7
--- groff/src/preproc/pic/object.cpp:1.6 Thu May 26 21:02:01 2005
+++ groff/src/preproc/pic/object.cpp Sun Mar 19 14:56:52 2006
@@ -1,5 +1,6 @@
// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005
+/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005,
+ 2006
Free Software Foundation, Inc.
Written by James Clark (address@hidden)
@@ -1418,8 +1419,16 @@
static position last_line;
static int have_last_line = 0;
*dirp = dir;
- // No need to look at at since `at' attribute sets `from' attribute.
- position startpos = (flags & HAS_FROM) ? from : *curpos;
+ // We handle `at' only in conjunction with `with', otherwise it is
+ // the same as the `from' attribute.
+ position startpos;
+ if ((flags & HAS_AT) && (flags & HAS_WITH))
+ // handled later -- we need the end position
+ startpos = *curpos;
+ else if (flags & HAS_FROM)
+ startpos = from;
+ else
+ startpos = *curpos;
if (!(flags & HAS_SEGMENT)) {
if ((flags & IS_SAME) && (type == LINE_OBJECT || type == ARROW_OBJECT)
&& have_last_line)
@@ -1464,6 +1473,21 @@
s->pos = endpos;
s->is_absolute = 1; // to avoid confusion
}
+ if ((flags & HAS_AT) && (flags & HAS_WITH)) {
+ // `tmpobj' works for arrows and splines too -- we only need positions
+ line_object tmpobj(startpos, endpos, 0, 0);
+ position pos = at;
+ place offset;
+ place here;
+ here.obj = &tmpobj;
+ if (!with->follow(here, &offset))
+ return 0;
+ pos -= offset;
+ for (s = segment_list; s; s = s->next)
+ s->pos += pos;
+ startpos += pos;
+ endpos += pos;
+ }
// handle chop
line_object *p = 0;
position *v = new position[nsegments];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ./ChangeLog doc/pic.ms src/preproc/pic/ob...,
Werner LEMBERG <=