# HG changeset patch
# User hegyi
# Date 1112362951 0
# Node ID 082fc511c2b9814feafd3fbaa6931d0bc480c095
# Parent 142633fc5014b3e0f84e223a7387fc1e7ab8a8a2
To run graph-displayer with sample input, type make run, but do not move the nodes, YET
diff -r 142633fc5014 -r 082fc511c2b9 src/work/peter/Makefile
--- a/src/work/peter/Makefile Fri Apr 01 09:44:29 2005 +0000
+++ b/src/work/peter/Makefile Fri Apr 01 13:42:31 2005 +0000
@@ -5,6 +5,6 @@
g++ xy-reader.cc -W -Wall -ansi -pedantic -o xyr -I../..
run: gd
- ./gd
+ ./gd graphocska.lgf
.PHONY: run
diff -r 142633fc5014 -r 082fc511c2b9 src/work/peter/graph-displayer.cc
--- a/src/work/peter/graph-displayer.cc Fri Apr 01 09:44:29 2005 +0000
+++ b/src/work/peter/graph-displayer.cc Fri Apr 01 13:42:31 2005 +0000
@@ -279,6 +279,11 @@
int main(int argc, char *argv[])
{
+ if(argc<2)
+ {
+ std::cerr << "USAGE: gd " << endl;
+ return 0;
+ }
Coordinates coosvector;
@@ -291,7 +296,7 @@
CoordReaderMap xreader('x',cm);
CoordReaderMap yreader('y',cm);
- std::ifstream is("graphocska.lemon");
+ std::ifstream is(argv[1]);
GraphReader reader(is, g);
reader.addNodeMap("coordinates_x", xreader);
diff -r 142633fc5014 -r 082fc511c2b9 src/work/peter/graphocska.lgf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/work/peter/graphocska.lgf Fri Apr 01 13:42:31 2005 +0000
@@ -0,0 +1,11 @@
+@nodeset
+id coordinates_x coordinates_y
+1 300 300
+2 -300 -300
+3 300 -300
+4 -300 300
+5 100 100
+6 -100 -100
+7 -100 100
+8 100 -100
+@end