Correzioni per xvt 4 sotto windows
git-svn-id: svn://10.65.10.50/trunk@1201 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									cb9a9ceeb0
								
							
						
					
					
						commit
						c8bb8df469
					
				| @ -1,15 +1,15 @@ | |||||||
|  | #include <applicat.h> | ||||||
| #if XVT_OS == XVT_OS_SCOUNIX | #if XVT_OS == XVT_OS_SCOUNIX | ||||||
| 
 | 
 | ||||||
| // EDIT Printer File
 | // EDIT Printer File
 | ||||||
| // Utility for printer configuration files editing
 | // Utility for printer configuration files editing
 | ||||||
| // by MB SEP 1993
 | // by MB SEP 1993
 | ||||||
| 
 | 
 | ||||||
| #include <applicat.h> |  | ||||||
| #include <mask.h> | #include <mask.h> | ||||||
| #include <utility.h> | #include <utility.h> | ||||||
| 
 | 
 | ||||||
| #define __BA2300_CPP | #define __BA2300_CPP | ||||||
| #include <ba2300.h> | #include "ba2300.h" | ||||||
| 
 | 
 | ||||||
| FILE* mirror; | FILE* mirror; | ||||||
| FILE* mirror2; | FILE* mirror2; | ||||||
| @ -38,7 +38,7 @@ void build_list_file (FILE* inputfile, TFilename& outputfile) | |||||||
|     { |     { | ||||||
|       junk.ltrim(1); |       junk.ltrim(1); | ||||||
|       junk.rtrim(2); |       junk.rtrim(2); | ||||||
|       fprintf(printerlist, "  ITEM \"%i|%s\"\n", prog++, (char*)junk); |       fprintf(printerlist, "  ITEM \"%i|%s\"\n", prog++, (const char*)junk); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   fclose(printerlist); |   fclose(printerlist); | ||||||
| @ -155,7 +155,7 @@ bool change_default_printer (TFilename& inputfilename, FILE* inputfile, TString& | |||||||
|       fgets(__tmp_string, 256, inputfile); |       fgets(__tmp_string, 256, inputfile); | ||||||
|     } |     } | ||||||
|     else fprintf(mirror, "[Default]\n"); |     else fprintf(mirror, "[Default]\n"); | ||||||
|     fprintf(mirror, "%s\n", (char*)newdefprinter); |     fprintf(mirror, "%s\n", (const char*)newdefprinter); | ||||||
|     fputs(__tmp_string, mirror); |     fputs(__tmp_string, mirror); | ||||||
|     while (fgets(__tmp_string, 256, inputfile)) |     while (fgets(__tmp_string, 256, inputfile)) | ||||||
|       fputs (__tmp_string, mirror); |       fputs (__tmp_string, mirror); | ||||||
| @ -225,7 +225,7 @@ void build_list_box (FILE* names, TMask& mask, short field) | |||||||
|       } |       } | ||||||
|       junk.ltrim(1); |       junk.ltrim(1); | ||||||
|       junk.rtrim(2); |       junk.rtrim(2); | ||||||
|       replace2 << (char*)junk; |       replace2 << junk; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   ((TList_field&)mask.field(field)).replace_items(replace1, replace2); |   ((TList_field&)mask.field(field)).replace_items(replace1, replace2); | ||||||
| @ -244,7 +244,7 @@ void place_codes_on_file (FILE* names, FILE* codes, FILE* output) | |||||||
|     name << "Code        = " << junk << "|"; |     name << "Code        = " << junk << "|"; | ||||||
|     if (fgets(__tmp_string, 256, codes)) |     if (fgets(__tmp_string, 256, codes)) | ||||||
|       if (!(__tmp_string=="\n"||__tmp_string=="")) |       if (!(__tmp_string=="\n"||__tmp_string=="")) | ||||||
|         fprintf(output, "%s%s", (char*)name, __tmp_string); |         fprintf(output, "%s%s", (const char*)name, __tmp_string); | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -477,12 +477,9 @@ int EPF_Application::accept_current_name(bool mode) | |||||||
|   //         2 se l'operazioe e' stata interrotta
 |   //         2 se l'operazioe e' stata interrotta
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| #if XVT_OS == XVT_OS_DOS |  | ||||||
|   typespec.upper(); |  | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
|   get_dir(&_workdir); |   get_dir(&_workdir); | ||||||
|   strcpy(filetoopen.type, (char*)typespec); |   strcpy(filetoopen.type, ( const char*)typespec); | ||||||
|   filetoopen.dir=_workdir; |   filetoopen.dir=_workdir; | ||||||
|   if (mode==OPEN) junk=open_file_dlg(&filetoopen, "Scegli un file di configurazione stampanti"); |   if (mode==OPEN) junk=open_file_dlg(&filetoopen, "Scegli un file di configurazione stampanti"); | ||||||
|   else junk=save_file_dlg(&filetoopen, "Digita il nome del nuovo file"); |   else junk=save_file_dlg(&filetoopen, "Digita il nome del nuovo file"); | ||||||
| @ -539,28 +536,28 @@ void EPF_Application::update_mirror (TMask& mask) | |||||||
|   } |   } | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "[" << (char*)mask.get(MSK_23_LOGIC) << ']' << '\n'; |   linetoadd << "[" << (char*)mask.get(MSK_23_LOGIC) << ']' << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char*)linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Printer type= " << (char*)mask.get(MSK_23_TYPE) << '\n'; |   linetoadd << "Printer type= " << (const char*)mask.get(MSK_23_TYPE) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char*)linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Device name = " << (char*)mask.get(MSK_23_PHYSIC) << '\n'; |   linetoadd << "Device name = " << (const char*)mask.get(MSK_23_PHYSIC) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char*)linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Filter name = " << (char*)mask.get(MSK_23_FILTER) << '\n'; |   linetoadd << "Filter name = " << (const char*)mask.get(MSK_23_FILTER) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char*)linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Normal      = " << (char*)mask.get(MSK_23_NORMAL) << '\n'; |   linetoadd << "Normal      = " << (const char*)mask.get(MSK_23_NORMAL) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char*)linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Bold        = " << (char*)mask.get(MSK_23_BOLD) << '\n'; |   linetoadd << "Bold        = " << (const char*)mask.get(MSK_23_BOLD) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", const (char*)linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Italic      = " << (char*)mask.get(MSK_23_ITALIC) << '\n'; |   linetoadd << "Italic      = " << (const char*)mask.get(MSK_23_ITALIC) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char*)linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Underlined  = " << (char*)mask.get(MSK_23_UNDERLINED) << '\n'; |   linetoadd << "Underlined  = " << (const char*)mask.get(MSK_23_UNDERLINED) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char*)linetoadd); | ||||||
| 
 | 
 | ||||||
|   names=fopen(FILE_NAMES, "r"); |   names=fopen(FILE_NAMES, "r"); | ||||||
|   codes=fopen(FILE_CODES, "r"); |   codes=fopen(FILE_CODES, "r"); | ||||||
| @ -698,7 +695,7 @@ void EPF_Application::fill_mask (TMask& mask, bool inrun) // a ba2300 | |||||||
|     if (junk.find(_currentprinter)!=-1 && junk.find("[")!=-1) |     if (junk.find(_currentprinter)!=-1 && junk.find("[")!=-1) | ||||||
|     { |     { | ||||||
|       found=TRUE; |       found=TRUE; | ||||||
|       set_field(mask, MSK_23_LOGIC, _currentprinter, inrun); |       set_field(mask, MSK_23_LOGIC, (const char *) _currentprinter, inrun); | ||||||
|       fgets(__tmp_string, 256, mirror ); |       fgets(__tmp_string, 256, mirror ); | ||||||
|       junk=__tmp_string; |       junk=__tmp_string; | ||||||
|       junk.ltrim(14); |       junk.ltrim(14); | ||||||
| @ -708,32 +705,32 @@ void EPF_Application::fill_mask (TMask& mask, bool inrun) // a ba2300 | |||||||
|       junk=__tmp_string; |       junk=__tmp_string; | ||||||
|       junk.ltrim(14); |       junk.ltrim(14); | ||||||
|       junk.rtrim(1); |       junk.rtrim(1); | ||||||
|       set_field(mask, MSK_23_PHYSIC, (char*)junk, inrun); |       set_field(mask, MSK_23_PHYSIC, (const char*)junk, inrun); | ||||||
|       fgets(__tmp_string, 256, mirror ); |       fgets(__tmp_string, 256, mirror ); | ||||||
|       junk=__tmp_string; |       junk=__tmp_string; | ||||||
|       junk.ltrim(14); |       junk.ltrim(14); | ||||||
|       junk.rtrim(1); |       junk.rtrim(1); | ||||||
|       set_field(mask, MSK_23_FILTER, junk, inrun); |       set_field(mask, MSK_23_FILTER, (const char *)junk, inrun); | ||||||
|       fgets(__tmp_string, 256, mirror ); |       fgets(__tmp_string, 256, mirror ); | ||||||
|       junk=__tmp_string; |       junk=__tmp_string; | ||||||
|       junk.ltrim(14); |       junk.ltrim(14); | ||||||
|       junk.rtrim(1); |       junk.rtrim(1); | ||||||
|       set_field(mask, MSK_23_NORMAL, junk, inrun); |       set_field(mask, MSK_23_NORMAL, (const char *) junk, inrun); | ||||||
|       fgets(__tmp_string, 256, mirror ); |       fgets(__tmp_string, 256, mirror ); | ||||||
|       junk=__tmp_string; |       junk=__tmp_string; | ||||||
|       junk.ltrim(14); |       junk.ltrim(14); | ||||||
|       junk.rtrim(1); |       junk.rtrim(1); | ||||||
|       set_field(mask, MSK_23_BOLD, junk, inrun); |       set_field(mask, MSK_23_BOLD, (const char *) junk, inrun); | ||||||
|       fgets(__tmp_string, 256, mirror ); |       fgets(__tmp_string, 256, mirror ); | ||||||
|       junk=__tmp_string; |       junk=__tmp_string; | ||||||
|       junk.ltrim(14); |       junk.ltrim(14); | ||||||
|       junk.rtrim(1); |       junk.rtrim(1); | ||||||
|       set_field(mask, MSK_23_ITALIC, junk, inrun); |       set_field(mask, MSK_23_ITALIC, (const char *) junk, inrun); | ||||||
|       fgets(__tmp_string, 256, mirror ); |       fgets(__tmp_string, 256, mirror ); | ||||||
|       junk=__tmp_string; |       junk=__tmp_string; | ||||||
|       junk.ltrim(14); |       junk.ltrim(14); | ||||||
|       junk.rtrim(1); |       junk.rtrim(1); | ||||||
|       set_field(mask, MSK_23_UNDERLINED, junk, inrun); |       set_field(mask, MSK_23_UNDERLINED, (const char *) junk, inrun); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
| @ -775,39 +772,36 @@ void EPF_Application::insert_new_info (TMask& mask) | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "[" << (char*)mask.get(MSK_23_LOGIC) << ']' << '\n'; |   linetoadd << "[" << (const char *) mask.get(MSK_23_LOGIC) << ']' << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char *) linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Printer type= " << (char*)mask.get(MSK_23_TYPE) << '\n'; |   linetoadd << "Printer type= " << (const char *) mask.get(MSK_23_TYPE) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char *) linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Device name = " << (char*)mask.get(MSK_23_PHYSIC) << '\n'; |   linetoadd << "Device name = " << (const char *) mask.get(MSK_23_PHYSIC) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char *) linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Filter name = " << (char*)mask.get(MSK_23_FILTER) << '\n'; |   linetoadd << "Filter name = " << (const char *) mask.get(MSK_23_FILTER) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char *) linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Normal      = " << (char*)mask.get(MSK_23_NORMAL) << '\n'; |   linetoadd << "Normal      = " << (const char *) mask.get(MSK_23_NORMAL) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char *) linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Bold        = " << (char*)mask.get(MSK_23_BOLD) << '\n'; |   linetoadd << "Bold        = " << (const char *) mask.get(MSK_23_BOLD) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char *) linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Italic      = " << (char*)mask.get(MSK_23_ITALIC) << '\n'; |   linetoadd << "Italic      = " << (const char *) mask.get(MSK_23_ITALIC) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char *) linetoadd); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "Underlined  = " << (char*)mask.get(MSK_23_UNDERLINED) << '\n'; |   linetoadd << "Underlined  = " << (const char *) mask.get(MSK_23_UNDERLINED) << '\n'; | ||||||
|   fprintf(mirror2 , "%s", (char*)linetoadd); |   fprintf(mirror2 , "%s", (const char *) linetoadd); | ||||||
|   names=fopen(FILE_NAMES, "r"); |   names=fopen(FILE_NAMES, "r"); | ||||||
|   codes=fopen(FILE_CODES, "r"); |   codes=fopen(FILE_CODES, "r"); | ||||||
|   place_codes_on_file (names, codes, mirror2 ); |   place_codes_on_file (names, codes, mirror2 ); | ||||||
|   linetoadd.cut(0); |   linetoadd.cut(0); | ||||||
|   linetoadd << "[End of File]\n"; |   linetoadd << "[End of File]\n"; | ||||||
|   fprintf(mirror2, "%s", (char*)linetoadd); |   fprintf(mirror2, "%s", (const char *) linetoadd); | ||||||
| 
 | 
 | ||||||
| #if XVT_OS != XVT_OS_SCOUNIX |  | ||||||
|   fflush(mirror2 ); |  | ||||||
| #endif |  | ||||||
|   fclose(mirror2 ); |   fclose(mirror2 ); | ||||||
|   fclose(mirror ); |   fclose(mirror ); | ||||||
|   fclose(names); |   fclose(names); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user