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:
guy 1998-08-10 10:24:06 +00:00
parent 011286b521
commit ca3715012a
5 changed files with 20 additions and 10 deletions

View File

@ -946,7 +946,7 @@ void TPrinter::init_formlen(
{
// Compute maximum number of chars per line
int mincol = 0,maxcol=MAX_PR_WIDTH;
TString spc(maxcol,'M');
TString256 spc; spc.fill('m', maxcol);
_formwidth = maxcol;
int w;
@ -965,7 +965,11 @@ void TPrinter::init_formlen(
if (isfax())
_horz_offset = 56;
else
{
_horz_offset = (_formwidth > 80) ? (int)(pw - w)/2 : 0;
if (_horz_offset < 0)
_horz_offset = 0;
}
}
else
{

View File

@ -12,8 +12,8 @@ HIDDEN int LEN_SPACES(WINDOW win, int x)
}
if (w == 0L)
{
const TString spc(132, 'm');
w = xvt_dwin_get_text_width(win,(char*)(const char*)spc, 132);
TString256 spc; spc.fill('m', 132);
w = xvt_dwin_get_text_width(win, spc.get_buffer(), 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;
if (error_on)
{
TString spc(x, 'm');
const int k1 = xvt_dwin_get_text_width(win,(char*)(const char*)spc,x);
TString256 spc; spc.fill('m', x);
const int k1 = xvt_dwin_get_text_width(win, spc.get_buffer(), x);
if (k != k1)
error_on = error_box("Maguire disagrees: %d != %d", k, k1);
}

View File

@ -38,6 +38,11 @@
#define RDOC_MOVMAG "MOVMAG"
#define RDOC_CODMAGC "CODMAGC"
#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

View File

@ -241,7 +241,7 @@ bool TRecord_array::good(
int TRecord_array::read(TRectype* filter)
{
CHECK(filter != NULL , "You can't specify NULL as filter ");
CHECK(filter != NULL, "You can't specify NULL as filter ");
CHECKD(filter->num() == _file, "Bad key record ", filter->num());
CHECKS(filter->get(_num).empty(), "You can't specify in the filter the field ", (const char*)_num);
@ -251,7 +251,6 @@ int TRecord_array::read(TRectype* filter)
if (!filter->empty())
{
TLocalisamfile f(_file);
TRectype* rec = (TRectype*)filter->dup();
err = rec->read(f, _isgteq);
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());
}
delete rec;
} else
}
else
err = _iskeynotfound;
return err;
}
@ -270,7 +270,7 @@ int TRecord_array::read(TRectype* filter)
// @mfunc Copia un record array
//
// @rdesc Copia il record array passato in quello corrente
TRecord_array& TRecord_array::copy(
TRecord_array& TRecord_array::copy(
const TRecord_array& a) // @parm Record_array da copiare
{
_file = a._file;

View File

@ -188,7 +188,8 @@ HIDDEN int matche(const char *p, const char *t) {
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);
return (err == regexp_MATCH_VALID); // ritorna TRUE se il pattern e la stringa coincidono
}