mask.cpp Aggiunta clessidra

strings.cpp  Corretto metodo TFilename::ext in seguito alla correzione
             del metodo name.


git-svn-id: svn://10.65.10.50/trunk@5727 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1997-12-12 08:38:14 +00:00
parent b88cceb3dd
commit 0e4f20e083
2 changed files with 11 additions and 9 deletions

View File

@ -108,6 +108,7 @@ void TMask::read_mask(
int num, // @parm Numero della maschera da leggere all'interno del file int num, // @parm Numero della maschera da leggere all'interno del file
int max) // @parm Numero massimo di pagine che deve avere la maschera int max) // @parm Numero massimo di pagine che deve avere la maschera
{ {
TWait_cursor hourglass;
if (max <= 0) max = MAX_PAGES; if (max <= 0) max = MAX_PAGES;
_source_file = name; _source_file = name;
@ -132,7 +133,6 @@ void TMask::read_mask(
TToken_string captions(80); TToken_string captions(80);
main_app().begin_wait();
while (scanner.ok() && scanner.popkey() != "EN") while (scanner.ok() && scanner.popkey() != "EN")
{ {
if (scanner.key() == "PA") if (scanner.key() == "PA")
@ -163,8 +163,6 @@ void TMask::read_mask(
if (num == 0) if (num == 0)
_total_time = clock()-start_t; _total_time = clock()-start_t;
main_app().end_wait();
} }
void TMask::add_tag_button(byte pag, TToken_string& tags, byte sel) void TMask::add_tag_button(byte pag, TToken_string& tags, byte sel)

View File

@ -990,9 +990,13 @@ const char* TFilename::ext() const
// Certified 90% // Certified 90%
void TFilename::ext(const char* e) void TFilename::ext(const char* e)
{ {
char* d = strrchr(name(), '.'); int start = find(' ')-1;
if (d && is_not_slash(*(d+1))) if (start < 0)
*d = '\0'; start = len()-1;
for (int i = start; i > 0 && _str[i] != '.'; i--);
if (i && is_not_slash(_str[i+1]))
cut(i);
if (*e) if (*e)
{ {
if (*e != '.') if (*e != '.')