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
+7 -3
View File
@@ -249,7 +249,7 @@ void PS_PLOTTER::pen_to( wxPoint pos, char plume )
* BBox is the boundary box (position and size of the "client rectangle"
* for drawings (page - margins) in mils (0.001 inch)
*/
void PS_PLOTTER::start_plot( FILE* fout )
bool PS_PLOTTER::start_plot( FILE* fout )
{
wxASSERT( !output_file );
wxString msg;
@@ -366,15 +366,19 @@ void PS_PLOTTER::start_plot( FILE* fout )
// Set default line width ( g_Plot_DefaultPenWidth is in user units )
fprintf( output_file, "%g setlinewidth\n",
user_to_device_size( default_pen_width ) );
return true;
}
void PS_PLOTTER::end_plot()
bool PS_PLOTTER::end_plot()
{
wxASSERT( output_file );
fputs( "showpage\ngrestore\n%%EOF\n", output_file );
fclose( output_file );
output_file = 0;
output_file = NULL;
return true;
}