Merge bug #14: Hack path into first warning
authorali <ali@juiblex.co.uk>
Thu Sep 26 08:36:08 2013 +0100 (2013-09-26)
changeset 120797e80d13543
parent 118 c16163697dd6
parent 119 9d3a8ee81151
child 121 ea3555c0bf85
Merge bug #14: Hack path into first warning
bookloupe/bookloupe.c
     1.1 --- a/bookloupe/bookloupe.c	Thu Sep 26 07:06:19 2013 +0100
     1.2 +++ b/bookloupe/bookloupe.c	Thu Sep 26 08:36:08 2013 +0100
     1.3 @@ -2514,17 +2514,7 @@
     1.4  	    fprintf(stderr,"bookloupe: %s: %s\n",filename,err->message);
     1.5  	exit(1);
     1.6      }
     1.7 -    if (g_path_is_absolute(filename))
     1.8 -	g_print("\n\nFile: %s\n\n",filename);
     1.9 -    else
    1.10 -    {
    1.11 -	gchar *cwd,*path;
    1.12 -	cwd=g_get_current_dir();
    1.13 -	path=g_build_filename(cwd,filename,NULL);
    1.14 -	g_free(cwd);
    1.15 -	g_print("\n\nFile: %s\n\n",path);
    1.16 -	g_free(path);
    1.17 -    }
    1.18 +    g_print("\n\nFile: %s\n\n",filename);
    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);
    1.22 @@ -2534,6 +2524,18 @@
    1.23       */
    1.24      linecnt=0;
    1.25      etext_ptr=etext;
    1.26 +    if (g_path_is_absolute(filename))
    1.27 +	g_print("\nPath: %s\n",filename);
    1.28 +    else
    1.29 +    {
    1.30 +	gchar *cwd,*path;
    1.31 +	cwd=g_get_current_dir();
    1.32 +	path=g_build_filename(cwd,filename,NULL);
    1.33 +	g_free(cwd);
    1.34 +	g_print("\nPath: %s\n",path);
    1.35 +	g_free(path);
    1.36 +    }
    1.37 +    g_print("    Line 1 - Path to ebook printed\n");
    1.38      while ((aline=flgets(&etext_ptr,linecnt+1)))
    1.39      {
    1.40  	linecnt++;