diff --git a/include/maskfld.cpp b/include/maskfld.cpp index b6a2283da..4f6ab5b5f 100755 --- a/include/maskfld.cpp +++ b/include/maskfld.cpp @@ -1,4 +1,4 @@ -// $Id: maskfld.cpp,v 1.19 1994-09-16 16:59:05 guy Exp $ +// $Id: maskfld.cpp,v 1.20 1994-09-20 12:24:49 guy Exp $ #include #include @@ -2134,6 +2134,12 @@ void TButton_field::create(WINDOW parent) _virtual_key = 'E'; _exit_key = K_DEL; break; + case DLG_PRINT: + if (_prompt.empty()) + _prompt = "Stampa"; + _virtual_key = 'S'; + _exit_key = K_ENTER; + break; case DLG_QUIT: if (_prompt.empty()) _prompt = "Fine"; diff --git a/include/printer.h b/include/printer.h index 5ec72bd0f..19fe79727 100755 --- a/include/printer.h +++ b/include/printer.h @@ -258,7 +258,7 @@ public: bool formfeed (); bool print (TPrintrow& rowtoprint); bool isopen() { return _isopen; } - void setdate(TDate& d) { _date = d; } + void setdate(const TDate& d) { _date = d; } TPrtype printtype() { return _printertype; } void set_printtype(TPrtype dest) { _printertype=dest; } void set_printerfile(const char * ffile) { _printerfile=ffile; } diff --git a/include/real.cpp b/include/real.cpp index b0735da33..397aeafd5 100755 --- a/include/real.cpp +++ b/include/real.cpp @@ -181,47 +181,9 @@ char *real::string (int len, int dec, char pad) const else deltrz (__tmp_real.ptr (), __tmp_real.ptr ()); - // if (len == 0) dtoa (__string, __tmp_real.ptr ()); - /* - * else - * { - * char f[16]; - * if (dec == UNDEFINED) sprintf(f, "%%%dt", len); - * else - * sprintf(f, "%%%d.%dt", len, dec); - * dsprintf(__string, f, __tmp_real.ptr()); - * } - * - * if (dec <= 0 || dec == UNDEFINED) // Toglie una eventuale parte decimale .00 - * { - * if (dot) - * { - * for (const char* z = dot + 1; *z; z++) - * if (*z != '0') break; - * if (!*z) *dot = '\0'; - * } - * } - */ int lun = strlen (__string); - /* - * char* dot = strchr(__string, '.'); - * - * int d = dot ? strlen(dot+1) : 0; // Decimals already there - * - * if (d < dec) - * { - * if (dot == NULL) __string[lun++] = '.'); - * for (;d < dec; d++) __string[lun++] = '0'; - * __string[lun] = '\0'; - * } else - * if (dec >= 0 && d > dec) - * { - * *(dot+dec+(dec>0)) = '\0'; - * lun = strlen(__string); - * } - */ if (lun < len) { const int delta = len - lun; diff --git a/include/relation.cpp b/include/relation.cpp index 62cbd7b6c..1c49c1158 100755 --- a/include/relation.cpp +++ b/include/relation.cpp @@ -1,4 +1,4 @@ -// $Id: relation.cpp,v 1.7 1994-09-07 17:00:16 guy Exp $ +// $Id: relation.cpp,v 1.8 1994-09-20 12:24:54 guy Exp $ // relation.cpp // fv 12/8/93 // relation class for isam files @@ -1144,6 +1144,19 @@ TRecnotype TCursor::items() return _totrec; } +bool TCursor::next_match(int lognum, const char* fl, int nk) +{ + if (lognum == 0 || lognum == file()->num()) + {++(*this); return file()->good(); } + else return _if->next_match(lognum, fl, nk); +} + +bool TCursor::is_first_match(int ln) +{ + return (ln == 0 || ln == file()->num()) ? + (_pos == 0 && file()->good()) : (_if->is_first_match(ln)); +} + /////////////////////////////////////////////////////////// // TFieldRef /////////////////////////////////////////////////////////// @@ -1166,8 +1179,7 @@ int name2log(const char* name) log = TTable::name2log(name); } - if (log == 0) - fatal_box("'%s' non e' un file o una tabella", name); + CHECKS(log != 0, "Non e' un file ne' una tabella: ", name); } return log; @@ -1311,18 +1323,5 @@ int TFieldref::len(TRectype &rec) const return len - _from; } -bool TCursor::next_match(int lognum, const char* fl, int nk) -{ - if (lognum == 0 || lognum == file()->num()) - {++(*this); return file()->good(); } - else return _if->next_match(lognum, fl, nk); -} - -bool TCursor::is_first_match(int ln) -{ - return (ln == 0 || ln == file()->num()) ? - (_pos == 0 && file()->good()) : (_if->is_first_match(ln)); -} - // *** EOF relation.cpp