[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/
- [Octave-bug-tracker] [bug #48326] test printd fails in Win-7, Mike Miller, 2016/07/08
- [Octave-bug-tracker] [bug #48326] test printd fails in Win-7, Philip Nienhuis, 2016/07/09
- Message not available
- [Octave-bug-tracker] [bug #48326] test printd fails in Win-7, Philip Nienhuis, 2016/07/09
- [Octave-bug-tracker] [bug #48326] test printd fails in Win-7,
Mike Miller <=
- [Octave-bug-tracker] [bug #48326] test printd fails in Win-7, Philip Nienhuis, 2016/07/10
- [Octave-bug-tracker] [bug #48326] test printd fails in Win-7, Philip Nienhuis, 2016/07/11
- [Octave-bug-tracker] [bug #48326] mkstemp opens file in text mode on Windows (test printd fails), Mike Miller, 2016/07/11
- [Octave-bug-tracker] [bug #48326] mkstemp opens file in text mode on Windows (test printd fails), Philip Nienhuis, 2016/07/11
- [Octave-bug-tracker] [bug #48326] mkstemp opens file in text mode on Windows (test printd fails), Mike Miller, 2016/07/11
- [Octave-bug-tracker] [bug #48326] mkstemp opens file in text mode on Windows (test printd fails), Philip Nienhuis, 2016/07/11
- [Octave-bug-tracker] [bug #48326] mkstemp opens file in text mode on Windows (test printd fails), Mike Miller, 2016/07/11
- [Octave-bug-tracker] [bug #48326] mkstemp opens file in text mode on Windows (test printd fails), Mike Miller, 2016/07/11
- [Octave-bug-tracker] [bug #48326] mkstemp opens file in text mode on Windows (test printd fails), Philip Nienhuis, 2016/07/11
- [Octave-bug-tracker] [bug #48326] mkstemp opens file in text mode on Windows (test printd fails), Philip Nienhuis, 2016/07/12