diff --git a/include/printapp.cpp b/include/printapp.cpp index c1fa3b9cc..df18e59d8 100755 --- a/include/printapp.cpp +++ b/include/printapp.cpp @@ -1,4 +1,4 @@ -// $Id: printapp.cpp,v 1.17 1995-02-17 09:16:57 villa Exp $ +// $Id: printapp.cpp,v 1.18 1995-02-21 10:21:35 villa Exp $ #include #include @@ -912,7 +912,7 @@ bool TPrint_application::print_one (int file) { int i = 0; - if ((_prind && _prind->iscancelled ()) || printer ().frozen ()) + if ((_prind && _prind->iscancelled()) || printer().frozen()) if (_cancelled = cancel_hook()) return FALSE; if (!_print_defined) diff --git a/include/strings.cpp b/include/strings.cpp index 93ed40a9a..a70d90ae5 100755 --- a/include/strings.cpp +++ b/include/strings.cpp @@ -187,6 +187,15 @@ TString& TString::strip(const char* k) } +bool TString::blank() const +{ + if (empty()) return TRUE; + for (int i = 0; _str[i]; i++) + if (!isspace(_str[i])) + return FALSE; + return TRUE; +} + TString& TString::strip_spaces() { char instring = '\0'; diff --git a/include/strings.h b/include/strings.h index cb03dcaf4..09ab628ee 100755 --- a/include/strings.h +++ b/include/strings.h @@ -71,6 +71,7 @@ public: int len() const { return strlen(_str); } bool empty() const { return *_str == '\0'; } bool not_empty() const { return *_str != '\0'; } + bool blank() const; // TRUE se e' vuota o contiene solo whitespace int find(char, int from = 0) const; // Ritorna la posizione del carattere char nell'oggetto TString int find(const char* s, int from = 0) const; // Ritorna la posizione della stringa s nell'oggetto TString