X-Git-Url: http://git.maemo.org/git/?p=scdataviz;a=blobdiff_plain;f=src%2Fscdataviz.c;h=516d6bae0e786672e67f87e7b08b12a14791ac16;hp=68d6c7466c8a0c6aee2cd229af93a8aa43b9d8c2;hb=refs%2Fheads%2Fmaster;hpb=4dafe799c1e27a1bd40be0ae67db3f96a72e05df diff --git a/src/scdataviz.c b/src/scdataviz.c index 68d6c74..516d6ba 100644 --- a/src/scdataviz.c +++ b/src/scdataviz.c @@ -24,7 +24,7 @@ along with this program. If not, see . ** Started on Thu Jul 17 11:03:27 2008 Johnny Q. Hacker -** Last update Thu Oct 15 21:51:34 2009 Johnny Q. Hacker +** Last update Thu Oct 15 22:28:18 2009 Johnny Q. Hacker */ #include @@ -138,11 +138,19 @@ static void link_materials(gpointer key, gpointer value, gpointer user_data) { g_hash_table_foreach(propmap->mdb->materials, &inner_link_materials, propmap); } + +#define xstr(s) str(s) +#define str(s) #s + +#ifndef MATDBFILE +#define MATDBFILE matdb.txt +#endif + int main(int argc, char *argv[]) { GtkWidget *window; GtkWidget *graph; - GString *file = g_string_new("matdb.txt"); + GString *file = g_string_new(xstr(MATDBFILE)); int err=0; struct matdb *mdb = read_matdb_dotcode(file, &err); //fprintf(stderr, "read_matdb_dotcode(%s, %d)=%x", file->str, err,