- switch (m_printData.GetPrintMode()) {
-
- case wxPRINT_MODE_PREVIEW:
- {
- wxChar *argv[3];
- argv[0] = WXSTRINGCAST previewCommand;
- argv[1] = WXSTRINGCAST filename;
- argv[2] = (wxChar*) NULL;
- wxExecute (argv, TRUE);
- wxRemoveFile(m_printData.GetFilename());
- }
- break;
-
- case wxPRINT_MODE_PRINTER:
- {
- wxChar *argv[4];
- int argc = 0;
- argv[argc++] = WXSTRINGCAST printerCommand;
-
- // !SM! If we simply assign to argv[1] here, if printer options
- // are blank, we get an annoying and confusing message from lpr.
- wxChar * opts = WXSTRINGCAST printerOptions;
- if (opts && *opts)
- argv[argc++] = opts;
-
- argv[argc++] = WXSTRINGCAST filename;
- argv[argc++] = (wxChar *) NULL;
- wxExecute (argv, TRUE);
- wxRemoveFile(filename);
- }
- break;
-
- case wxPRINT_MODE_FILE:
- case wxPRINT_MODE_NONE:
- break;
- }
+ switch (m_printData.GetPrintMode())
+ {
+ case wxPRINT_MODE_PREVIEW:
+ {
+ wxChar *argv[3];
+ argv[0] = WXSTRINGCAST previewCommand;
+ argv[1] = WXSTRINGCAST filename;
+ argv[2] = (wxChar*) NULL;
+ wxExecute( argv, TRUE );
+ wxRemoveFile( m_printData.GetFilename() );
+ }
+ break;
+ case wxPRINT_MODE_PRINTER:
+ {
+ wxChar *argv[4];
+ int argc = 0;
+ argv[argc++] = WXSTRINGCAST printerCommand;
+
+ // !SM! If we simply assign to argv[1] here, if printer options
+ // are blank, we get an annoying and confusing message from lpr.
+ wxChar *opts = WXSTRINGCAST printerOptions;
+ if (opts && *opts)
+ argv[argc++] = opts;
+
+ argv[argc++] = WXSTRINGCAST filename;
+ argv[argc++] = (wxChar *) NULL;
+ wxExecute( argv, TRUE );
+ wxRemoveFile( filename );
+ }
+ break;
+ case wxPRINT_MODE_FILE:
+ case wxPRINT_MODE_NONE:
+ break;
+ }