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
@@ -27,7 +27,7 @@ void DXF_PLOTTER::set_viewport( wxPoint offset,
}
void DXF_PLOTTER::start_plot( FILE* fout )
bool DXF_PLOTTER::start_plot( FILE* fout )
{
wxASSERT( !output_file );
output_file = fout;
@@ -45,16 +45,20 @@ void DXF_PLOTTER::start_plot( FILE* fout )
/* End of layer table, begin entities */
fputs( "0\nENDTAB\n0\nENDSEC\n0\nSECTION\n2\nENTITIES\n", output_file );
return true;
}
void DXF_PLOTTER::end_plot()
bool DXF_PLOTTER::end_plot()
{
wxASSERT( output_file );
/* DXF FOOTER */
fputs( "0\nENDSEC\n0\nEOF\n", output_file );
fclose( output_file );
output_file = 0;
output_file = NULL;
return true;
}