Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000539graphvizDotpublic2004-12-02 01:172011-04-28 04:02
ReporterPaul Gardner-Stephen 
Assigned Toerg 
PlatformOS*-*-OS Version
Summary0000539: xfig figure generation bugs

xfig generation outputs multi-line comments without due care.
e.g. a node with the label "foo\\nbar" results in the following
broken comment in the .fig file when output as .fig:
# foo

when it should be:

# foo
# bar

Attached is a patch to fix it.
Note that I didn't use varargs in the solution, though it would be nicer,
since I couldn't spare the time (i.e. too lazy) to put in the stuff to do
varargs in a host portable way.

Additional Information

Can you send me a test .dot file, and command line, using dot 1.16 that illustrates the problem?

I tried dot 1.16 with:
   digraph G {
       foo [label="foo\\nbar"]

and got:
   ... # foo
   # foo\\nbar

which was accepted without error by xfig (Xfig 3.2 patchlevel 4 (Protocol 3.2))

Note that the "\\n" is actually two characters '\\' 'n'

I could escape the '\\', but it doesn't seem necessary?

(BTW. If you send another patch, could you please generate it with "diff -u old new"
and attach it to the email so that it doesn't get converted to html. Thanks.)

TagsNo tags attached.
Apply the following patch to figgen.c

(note this fix is for 1.12, but should apply to 1.16 as well, but
I can't get 1.16 to produce sane libraries on Solaris 8/Sparc at the

opt/build/src/apps/2004/graphviz-1.12 {16:44} [108] :diff dotnea
VERSION     1.16
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:02 user1 New Issue
2011-04-28 04:02 user1 Assigned To => erg

MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker