Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : printer.cpp Azzerato eventuale offset negativo printwin.cpp Usate le m minuscole invece delle M maiuscole rdoc.h Aggiunte #define di campi recarray.cpp Aggiunstate spaziature regexp.cpp Aggiustata indentazione git-svn-id: svn://10.65.10.50/trunk@6949 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									011286b521
								
							
						
					
					
						commit
						ca3715012a
					
				| @ -946,7 +946,7 @@ void TPrinter::init_formlen( | |||||||
|     { |     { | ||||||
|       // Compute maximum number of chars per line
 |       // Compute maximum number of chars per line
 | ||||||
|       int mincol = 0,maxcol=MAX_PR_WIDTH; |       int mincol = 0,maxcol=MAX_PR_WIDTH; | ||||||
|       TString spc(maxcol,'M'); |       TString256 spc; spc.fill('m', maxcol); | ||||||
|          |          | ||||||
|       _formwidth = maxcol; |       _formwidth = maxcol; | ||||||
|       int  w; |       int  w; | ||||||
| @ -965,7 +965,11 @@ void TPrinter::init_formlen( | |||||||
|       if (isfax()) |       if (isfax()) | ||||||
|         _horz_offset = 56;          |         _horz_offset = 56;          | ||||||
|       else |       else | ||||||
|  |       { | ||||||
|         _horz_offset = (_formwidth > 80) ? (int)(pw - w)/2 : 0;          |         _horz_offset = (_formwidth > 80) ? (int)(pw - w)/2 : 0;          | ||||||
|  |         if (_horz_offset < 0) | ||||||
|  |           _horz_offset = 0; | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|     else  |     else  | ||||||
|     { |     { | ||||||
|  | |||||||
| @ -12,8 +12,8 @@ HIDDEN int LEN_SPACES(WINDOW win, int x) | |||||||
|   }   |   }   | ||||||
|   if (w == 0L) |   if (w == 0L) | ||||||
|   {                                     |   {                                     | ||||||
|     const TString spc(132, 'm'); |     TString256 spc; spc.fill('m', 132); | ||||||
|     w = xvt_dwin_get_text_width(win,(char*)(const char*)spc, 132); |     w = xvt_dwin_get_text_width(win, spc.get_buffer(), 132); | ||||||
|   } |   } | ||||||
|   const int k = int((w*x) / 132); |   const int k = int((w*x) / 132); | ||||||
|    |    | ||||||
| @ -21,8 +21,8 @@ HIDDEN int LEN_SPACES(WINDOW win, int x) | |||||||
|   static bool error_on = TRUE; |   static bool error_on = TRUE; | ||||||
|   if (error_on) |   if (error_on) | ||||||
|   { |   { | ||||||
|     TString spc(x, 'm'); |     TString256 spc; spc.fill('m', x); | ||||||
|     const int k1 = xvt_dwin_get_text_width(win,(char*)(const char*)spc,x); |     const int k1 = xvt_dwin_get_text_width(win, spc.get_buffer(), x); | ||||||
|     if (k != k1)  |     if (k != k1)  | ||||||
|       error_on = error_box("Maguire disagrees: %d != %d", k, k1); |       error_on = error_box("Maguire disagrees: %d != %d", k, k1); | ||||||
|   }   |   }   | ||||||
|  | |||||||
| @ -38,6 +38,11 @@ | |||||||
| #define RDOC_MOVMAG         "MOVMAG" | #define RDOC_MOVMAG         "MOVMAG" | ||||||
| #define RDOC_CODMAGC        "CODMAGC" | #define RDOC_CODMAGC        "CODMAGC" | ||||||
| #define RDOC_DATACONS       "DATACONS" | #define RDOC_DATACONS       "DATACONS" | ||||||
|  | #define RDOC_QTAGG1         "QTAGG1" | ||||||
|  | #define RDOC_QTAGG2         "QTAGG2" | ||||||
|  | #define RDOC_QTAGG3         "QTAGG3" | ||||||
|  | #define RDOC_QTAGG4         "QTAGG4" | ||||||
|  | #define RDOC_QTAGG5         "QTAGG5" | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -251,7 +251,6 @@ int TRecord_array::read(TRectype* filter) | |||||||
|   if (!filter->empty()) |   if (!filter->empty()) | ||||||
|   { |   { | ||||||
|     TLocalisamfile f(_file); |     TLocalisamfile f(_file); | ||||||
| 
 |  | ||||||
|     TRectype* rec = (TRectype*)filter->dup(); |     TRectype* rec = (TRectype*)filter->dup(); | ||||||
|     err = rec->read(f, _isgteq); |     err = rec->read(f, _isgteq); | ||||||
|     for (int e = err; e == NOERR && good(*rec); e = rec->next(f)) |     for (int e = err; e == NOERR && good(*rec); e = rec->next(f)) | ||||||
| @ -260,7 +259,8 @@ int TRecord_array::read(TRectype* filter) | |||||||
|       rec = (TRectype*)(key().dup()); |       rec = (TRectype*)(key().dup()); | ||||||
|     }   |     }   | ||||||
|     delete rec; |     delete rec; | ||||||
|   } else  |   }  | ||||||
|  |   else  | ||||||
|     err = _iskeynotfound; |     err = _iskeynotfound; | ||||||
|   return err;   |   return err;   | ||||||
| } | } | ||||||
|  | |||||||
| @ -188,7 +188,8 @@ HIDDEN int matche(const char *p, const char *t) { | |||||||
|   else return regexp_MATCH_VALID; |   else return regexp_MATCH_VALID; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool match(const char *pat, const char *str) { | bool match(const char *pat, const char *str)  | ||||||
|  | { | ||||||
|   int err= matche(pat, str); |   int err= matche(pat, str); | ||||||
|   return (err == regexp_MATCH_VALID); // ritorna TRUE se il pattern e la stringa coincidono
 |   return (err == regexp_MATCH_VALID); // ritorna TRUE se il pattern e la stringa coincidono
 | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user