diff options
-rw-r--r-- | common/fltk_lines.cc | 2 | ||||
-rw-r--r-- | dwr/graph2.cc | 4 | ||||
-rw-r--r-- | tests/simple_sink.cc | 12 | ||||
-rw-r--r-- | tests/test_graphviz_1.c | 6 |
4 files changed, 13 insertions, 11 deletions
diff --git a/common/fltk_lines.cc b/common/fltk_lines.cc index 5bf4b00..aee635f 100644 --- a/common/fltk_lines.cc +++ b/common/fltk_lines.cc @@ -31,7 +31,7 @@ #include <stdio.h> #include <fcntl.h> -#include <Fl/Fl.H> +#include <FL/Fl.H> using namespace lout::container::typed; diff --git a/dwr/graph2.cc b/dwr/graph2.cc index 28f03f9..1ba381e 100644 --- a/dwr/graph2.cc +++ b/dwr/graph2.cc @@ -110,7 +110,7 @@ void Graph2::Node::initAg () char buf[64]; snprintf (buf, 64, "n%d", index); - node = agnode(graph->graph, buf, TRUE); + node = agnode(graph->graph, buf, 1); agsafeset (node, (char*)"shape", (char*)"rect", (char*)""); } @@ -152,7 +152,7 @@ void Graph2::Edge::initAg () char buf[64]; snprintf (buf, 64, "e%d", index); - edge = agedge (graph->graph, from->node, to->node, (char*)buf, TRUE); + edge = agedge (graph->graph, from->node, to->node, (char*)buf, 1); } void Graph2::Edge::cleanupAg () diff --git a/tests/simple_sink.cc b/tests/simple_sink.cc index d27fd18..045bbb9 100644 --- a/tests/simple_sink.cc +++ b/tests/simple_sink.cc @@ -2,7 +2,7 @@ #include "common/tools.hh" #include <unistd.h> -#include <sys/timeb.h> +#include <sys/time.h> namespace rtfl { @@ -38,10 +38,12 @@ void SimpleSink::finish () long SimpleSink::getCurrentTime () { - struct timeb t; - if (ftime (&t) == -1) - syserr ("ftime() failed"); - return t.time * 1000L + t.millitm; + struct timeval tv; + + if (gettimeofday (&tv, NULL) != 0) + syserr ("gettimeofday() failed"); + + return tv.tv_sec * 1000L + tv.tv_usec / 1000L; } void SimpleSink::msg (const char *fmt, ...) diff --git a/tests/test_graphviz_1.c b/tests/test_graphviz_1.c index 9199b25..2e26c37 100644 --- a/tests/test_graphviz_1.c +++ b/tests/test_graphviz_1.c @@ -10,15 +10,15 @@ int main(int argc, char *argv[]) gvc = gvContext (); graph = agopen ("graph", Agdirected, NULL); - node1 = agnode(graph, "node1", TRUE); + node1 = agnode(graph, "node1", 1); agsafeset (node1, "width", "1", ""); agsafeset (node1, "height", "1", ""); - node2 = agnode(graph, "node2", TRUE); + node2 = agnode(graph, "node2", 1); agsafeset (node2, "width", "1", ""); agsafeset (node2, "height", "1", ""); - edge1 = agedge(graph, node1, node2, "edge1", TRUE); + edge1 = agedge(graph, node1, node2, "edge1", 1); puts ("---------- initially ----------"); agwrite (graph, stdout); |