* Still not quite right:
[scdataviz] / scdataviz.c
index 1024a12..9597ec9 100644 (file)
@@ -6,20 +6,22 @@
 ** 
 ** Holds the SC graphing widget.
 
-Copyright (C) 2008 Joseph Pingenot
 
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+    Copyright (C) 2008 Joseph Pingenot
 
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ** Started on  Thu Jul 17 11:03:27 2008 Johnny Q. Hacker
 ** Last update Sun May 12 01:17:25 2002 Speed Blue
@@ -27,14 +29,25 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <gtk/gtk.h>
 #include <graphwidget.h>
+#include <matdb-dotcode.h>
 
 int main(int   argc, char *argv[]) 
 {
     GtkWidget *window;
     GtkWidget *button;
     GtkWidget *graph;
+    GString *file = g_string_new("../matdb");
+    int err=0;
+    struct matdb *mdb = read_matdb_dotcode(file, &err);
+    //fprintf(stderr, "read_matdb_dotcode(%s, %d)=%x", file->str, err,
+    //(int)mdb);
+    fprintf(stderr, "err=%d\n", err);
+    print_matdb(mdb);
+    
     
     gtk_init (&argc, &argv);
+
+    
     
     window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
     graph = graph_widget_new();
@@ -44,6 +57,9 @@ int main(int   argc, char *argv[])
     g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
 
     gtk_container_add(GTK_CONTAINER(window), graph);
+    graph_add_point(graph_widget_get_graph(graph), 5, 3);
+    graph_add_point(graph_widget_get_graph(graph), 8, 12);
+    graph_add_point(graph_widget_get_graph(graph), 11, 48);
     
     gtk_widget_show_all  (window);