diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-05-17 20:19:03 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-05-17 20:19:03 (GMT) |
commit | 6e92a0d3db80c3d93a35efbe52d45c73b8303e45 (patch) | |
tree | 5c4df5008d6c8033ded1f60fbb87461e666c8f1c /src/dot.cpp | |
parent | 53da67394cd52ea7301f306ad766107b38ffd2ae (diff) | |
download | Doxygen-6e92a0d3db80c3d93a35efbe52d45c73b8303e45.zip Doxygen-6e92a0d3db80c3d93a35efbe52d45c73b8303e45.tar.gz Doxygen-6e92a0d3db80c3d93a35efbe52d45c73b8303e45.tar.bz2 |
Release-1.3.7-20040517
Diffstat (limited to 'src/dot.cpp')
-rw-r--r-- | src/dot.cpp | 86 |
1 files changed, 29 insertions, 57 deletions
diff --git a/src/dot.cpp b/src/dot.cpp index 1429645..c9f54d0 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -35,7 +35,7 @@ //-------------------------------------------------------------------- -static const int maxCmdLine = 4096; +static const int maxCmdLine = 40960; /*! mapping from protection levels to color names */ static const char *edgeColorMap[] = @@ -981,9 +981,10 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) f.close(); QCString dotArgs(maxCmdLine); - dotArgs.sprintf("-T%s \"%s\" -o \"%s\"", - imgExt.data(), dotName.data(),imgName.data()); - //printf("Running: dot -T%s %s -o %s\n",imgExt.data(),dotName.data(),imgName.data()); + dotArgs.sprintf("\"%s\" -T%s -o \"%s\" -Timap -o \"%s\"", + dotName.data(), imgExt.data(), imgName.data(), mapName.data()); + //printf("Running: dot %s -T%s -o %s -Timap -o %s\n", + // dotName.data(),imgExt.data(),imgName.data(),mapName.data()); if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) { err("Problems running dot. Check your installation!\n"); @@ -991,14 +992,6 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) return; } checkDotResult(imgName); - dotArgs.sprintf("-Timap \"%s\" -o \"%s\"",dotName.data(),mapName.data()); - //printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data()); - if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - { - err("Problems running dot. Check your installation!\n"); - out << "</table>" << endl; - return; - } if (Config_getBool("DOT_CLEANUP")) thisDir.remove(dotName); } // write image and map in a table row @@ -1673,8 +1666,14 @@ QCString DotClassGraph::writeGraph(QTextStream &out, { QCString dotArgs(maxCmdLine); QCString imgName = baseName+"."+imgExt; - dotArgs.sprintf("-T%s \"%s.dot\" -o \"%s\"", - imgExt.data(),baseName.data(),imgName.data()); + dotArgs.sprintf("\"%s.dot\" -T%s -o \"%s\"", + baseName.data(),imgExt.data(),imgName.data()); + if (generateImageMap) + { + // run dot also to create an image map + dotArgs+=QCString(maxCmdLine).sprintf(" -Timap -o \"%s.map\"", + baseName.data()); + } if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) { err("Error: Problems running dot. Check your installation!\n"); @@ -1682,17 +1681,6 @@ QCString DotClassGraph::writeGraph(QTextStream &out, return baseName; } checkDotResult(imgName); - if (generateImageMap) - { - // run dot again to create an image map - dotArgs.sprintf("-Timap \"%s.dot\" -o \"%s.map\"",baseName.data(),baseName.data()); - if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - { - err("Error: Problems running dot. Check your installation!\n"); - QDir::setCurrent(oldDir); - return baseName; - } - } } else if (format==EPS) // run dot to create a .eps image { @@ -1942,8 +1930,14 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, // run dot to create a bitmap image QCString dotArgs(maxCmdLine); QCString imgName=baseName+"."+imgExt; - dotArgs.sprintf("-T%s \"%s.dot\" -o \"%s\"", - imgExt.data(),baseName.data(),imgName.data()); + dotArgs.sprintf("\"%s.dot\" -T%s -o \"%s\"", + baseName.data(),imgExt.data(),imgName.data()); + if (generateImageMap) + { + // run dot also to create an image map + dotArgs+=QCString(maxCmdLine).sprintf(" -Timap -o \"%s.map\"", + baseName.data()); + } if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) { err("Problems running dot. Check your installation!\n"); @@ -1951,21 +1945,6 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, return baseName; } checkDotResult(imgName); - - if (generateImageMap) - { - // run dot again to create an image map - dotArgs.sprintf("-Timap \"%s.dot\" -o \"%s.map\"", - baseName.data(),baseName.data()); - if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - { - err("Problems running dot. Check your installation!\n"); - QDir::setCurrent(oldDir); - return baseName; - } - - //thisDir.remove(baseName+".map"); - } } else if (format==EPS) { @@ -2128,8 +2107,14 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, // run dot to create a bitmap image QCString dotArgs(maxCmdLine); QCString imgName=baseName+"."+imgExt; - dotArgs.sprintf("-T%s \"%s.dot\" -o \"%s\"", - imgExt.data(),baseName.data(),imgName.data()); + dotArgs.sprintf("\"%s.dot\" -T%s -o \"%s\"", + baseName.data(),imgExt.data(),imgName.data()); + if (generateImageMap) + { + // run dot also to create an image map + dotArgs+=QCString(maxCmdLine).sprintf(" -Timap -o \"%s.map\"", + baseName.data()); + } if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) { err("Problems running dot. Check your installation!\n"); @@ -2137,19 +2122,6 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format, return baseName; } checkDotResult(imgName); - - if (generateImageMap) - { - // run dot again to create an image map - dotArgs.sprintf("-Timap \"%s.dot\" -o \"%s.map\"", - baseName.data(),baseName.data()); - if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) - { - err("Problems running dot. Check your installation!\n"); - QDir::setCurrent(oldDir); - return baseName; - } - } } else if (format==EPS) { |