octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48326] test printd fails in Win-7


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #48326] test printd fails in Win-7
Date: Sat, 9 Jul 2016 23:49:32 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

Follow-up Comment #9, bug #48326 (project octave):

Ok, can you try moving the fclose of the temporary file and printing the file
size after it's closed? Something like this change (with a pause inserted as
well):


diff --git a/scripts/plot/util/printd.m b/scripts/plot/util/printd.m
--- a/scripts/plot/util/printd.m
+++ b/scripts/plot/util/printd.m
@@ -46,7 +46,10 @@ function pr_out = printd (obj, filename)
   opt = substr (filename, sufix+1);
   [pf, tempf, mag] = mkstemp ("oct-XXXXXX", 1);
   fprintf (pf, "%s", disp (obj));
-  frewind (pf);
+  fclose (pf);
+  pause (2);
+  tmp = dir (tempf);
+  fprintf (stdout, "size of temp file on filesystem = %ld bytes\n",
tmp.bytes);
 
   ## It seems best to only use convert for image output.  Its ps and pdf
   ## are badly rendered.
@@ -77,7 +80,6 @@ function pr_out = printd (obj, filename)
       error ("printd: unknown conversion type: %s.\nOptions are: pdf ps eps
txt jpg jpeg", opt);
 
   endswitch
-  fclose (pf);
   delete (tempf);
   pr_out = sprintf ("%s file %s written\n", opt, filename);
 


We need to know if it's the writing of the file by Octave, or if it's the cp
command executed by the shell that converts the line endings. Or does moving
the fclose() up higher in the function and adding a pause() make the test
start passing?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48326>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]