Bug #14: Temporary hack to display file path
authorali@harlow.me.uk
Thu Sep 26 07:03:31 2013 +0100 (2013-09-26)
changeset 115df21841a2b64
parent 106 9fb13a5dde3b
child 116 24b0e5ecffe5
child 119 9d3a8ee81151
Bug #14: Temporary hack to display file path
bookloupe/bookloupe.c
     1.1 --- a/bookloupe/bookloupe.c	Mon Sep 23 21:18:27 2013 +0100
     1.2 +++ b/bookloupe/bookloupe.c	Thu Sep 26 07:03:31 2013 +0100
     1.3 @@ -2512,7 +2512,17 @@
     1.4  	    fprintf(stderr,"bookloupe: %s: %s\n",filename,err->message);
     1.5  	exit(1);
     1.6      }
     1.7 -    g_print("\n\nFile: %s\n\n",filename);
     1.8 +    if (g_path_is_absolute(filename))
     1.9 +	g_print("\n\nFile: %s\n\n",filename);
    1.10 +    else
    1.11 +    {
    1.12 +	gchar *cwd,*path;
    1.13 +	cwd=g_get_current_dir();
    1.14 +	path=g_build_filename(cwd,filename,NULL);
    1.15 +	g_free(cwd);
    1.16 +	g_print("\n\nFile: %s\n\n",path);
    1.17 +	g_free(path);
    1.18 +    }
    1.19      first_pass_results=first_pass(etext);
    1.20      warnings=report_first_pass(first_pass_results);
    1.21      qword=g_tree_new_full((GCompareDataFunc)strcmp,NULL,g_free,g_free);