Pcbnew: Fixed an issue in GERBER file creation, under Vista and W7 only for non administrator users
Plot files were 0 byte length.
This was due to use of function tmpfile() in a GERBER function to create a temporary file that seems not working using mingw.
Replaced by more usual files functions.
This commit is contained in:
charras
2010-03-31 16:59:32 +00:00
parent 7816b71798
commit 5f5620a1b9
8 changed files with 73 additions and 31 deletions
+5 -3
View File
@@ -28,20 +28,22 @@ void HPGL_PLOTTER::set_viewport( wxPoint offset, double aScale, int orient )
}
void HPGL_PLOTTER::start_plot( FILE* fout )
bool HPGL_PLOTTER::start_plot( FILE* fout )
{
wxASSERT( !output_file );
output_file = fout;
fprintf( output_file, "IN;VS%d;PU;PA;SP%d;\n", pen_speed, pen_number );
return true;
}
void HPGL_PLOTTER::end_plot()
bool HPGL_PLOTTER::end_plot()
{
wxASSERT( output_file );
fputs( "PU;PA;SP0;\n", output_file );
fclose( output_file );
output_file = 0;
output_file = NULL;
return true;
}