Corretta generazione nomi file temporanei e MESSAGE COPY delle maschere
git-svn-id: svn://10.65.10.50/trunk@309 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
f3d76f55e8
commit
6426742708
@ -5,11 +5,11 @@
|
|||||||
#include <isam.h>
|
#include <isam.h>
|
||||||
|
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
|
#include <expr.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#endif
|
#endif
|
||||||
#include <execp.h>
|
#include <execp.h>
|
||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
#include <expr.h>
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <prefix.h>
|
#include <prefix.h>
|
||||||
#include <extcdecl.h>
|
#include <extcdecl.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// $Id: maskfld.cpp,v 1.25 1994-10-03 08:47:14 guy Exp $
|
// $Id: maskfld.cpp,v 1.26 1994-10-04 15:38:47 guy Exp $
|
||||||
#include <xvt.h>
|
#include <xvt.h>
|
||||||
|
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
@ -516,7 +516,7 @@ HIDDEN void modify_list(bool add, TMask_field& f, TToken_string& msg)
|
|||||||
HIDDEN const char* copy_value(TToken_string& msg, const TString& val)
|
HIDDEN const char* copy_value(TToken_string& msg, const TString& val)
|
||||||
{
|
{
|
||||||
int from = msg.get_int()-1;
|
int from = msg.get_int()-1;
|
||||||
int to = 0;
|
int to = -1;
|
||||||
if (from < 0) from = 0;
|
if (from < 0) from = 0;
|
||||||
else to = msg.get_int();
|
else to = msg.get_int();
|
||||||
return val.sub(from, to);
|
return val.sub(from, to);
|
||||||
|
@ -547,7 +547,7 @@ break;
|
|||||||
}
|
}
|
||||||
c->set(nuo); // Set new mask value
|
c->set(nuo); // Set new mask value
|
||||||
c->set_dirty(); // Get it dirty!
|
c->set_dirty(); // Get it dirty!
|
||||||
if (c->on_key(K_TAB) == FALSE) // Test it
|
if (c->on_key(c->is_edit() ? K_TAB : K_SPACE) == FALSE) // Test it
|
||||||
{
|
{
|
||||||
c->set(old);
|
c->set(old);
|
||||||
xiev->refused = TRUE;
|
xiev->refused = TRUE;
|
||||||
@ -793,9 +793,25 @@ void TSpreadsheet::mask2str(int riga)
|
|||||||
r.cut(0);
|
r.cut(0);
|
||||||
for (short id = FIRST_FIELD; ; id++)
|
for (short id = FIRST_FIELD; ; id++)
|
||||||
{
|
{
|
||||||
const int pos = _mask.id2pos(id);
|
int pos = _mask.id2pos(id);
|
||||||
if (pos < 0) break;
|
if (pos < 0) break;
|
||||||
r.add(_mask.fld(pos).get());
|
|
||||||
|
for(int dlg = id; pos >= 0; pos = _mask.id2pos(dlg += 100))
|
||||||
|
{
|
||||||
|
const TMask_field& f = _mask.fld(pos);
|
||||||
|
if (f.showed())
|
||||||
|
{
|
||||||
|
r.add(f.get());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#ifdef DBG
|
||||||
|
if (pos < 0)
|
||||||
|
{
|
||||||
|
warning_box("Non e' visibile il campo %d per lo sheet", dlg);
|
||||||
|
r.add(" ");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#if XVT_OS == XVT_OS_WIN
|
#if XVT_OS == XVT_OS_WIN
|
||||||
update_rec(riga);
|
update_rec(riga);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// $Id: relation.cpp,v 1.13 1994-09-27 10:19:32 alex Exp $
|
// $Id: relation.cpp,v 1.14 1994-10-04 15:38:54 guy Exp $
|
||||||
// relation.cpp
|
// relation.cpp
|
||||||
// fv 12/8/93
|
// fv 12/8/93
|
||||||
// relation class for isam files
|
// relation class for isam files
|
||||||
@ -669,10 +669,10 @@ FILE* TCursor::open_index(bool create) const
|
|||||||
TRecnotype TCursor::buildcursor(TRecnotype rp)
|
TRecnotype TCursor::buildcursor(TRecnotype rp)
|
||||||
{
|
{
|
||||||
TRecnotype ap = 0, junkl;
|
TRecnotype ap = 0, junkl;
|
||||||
char s[82];
|
char s[82];
|
||||||
int junk, l, pagecnt = 0;
|
int junk, l, pagecnt = 0;
|
||||||
Page p;
|
Page p;
|
||||||
int pos;
|
int pos;
|
||||||
const int kl = file().filehnd()->i.Base[file().filehnd()->i.PN].KeyLen;
|
const int kl = file().filehnd()->i.Base[file().filehnd()->i.PN].KeyLen;
|
||||||
const bool filtered = has_filter();
|
const bool filtered = has_filter();
|
||||||
|
|
||||||
@ -959,9 +959,6 @@ TCursor::TCursor(TRelation* r, const char* filter, int nkey, TRectype *from, TRe
|
|||||||
CHECKD(_nkey > 0 && _nkey <= file().filehnd()->r->NKeys, "Bad key number : ", _nkey);
|
CHECKD(_nkey > 0 && _nkey <= file().filehnd()->r->NKeys, "Bad key number : ", _nkey);
|
||||||
_indexname.temp("ci");
|
_indexname.temp("ci");
|
||||||
|
|
||||||
FILE* _f = open_index(TRUE);
|
|
||||||
fclose(_f);
|
|
||||||
|
|
||||||
_pos = 0;
|
_pos = 0;
|
||||||
_totrec = 0;
|
_totrec = 0;
|
||||||
_lastrec = 0;
|
_lastrec = 0;
|
||||||
@ -1073,7 +1070,6 @@ TRecnotype TCursor::operator +=(const TRecnotype npos)
|
|||||||
|
|
||||||
|
|
||||||
TRecnotype TCursor::items()
|
TRecnotype TCursor::items()
|
||||||
|
|
||||||
{
|
{
|
||||||
if (changed())
|
if (changed())
|
||||||
_totrec = update();
|
_totrec = update();
|
||||||
|
@ -97,24 +97,24 @@ TString& TString::operator <<(char c)
|
|||||||
|
|
||||||
TString& TString::operator <<(int n)
|
TString& TString::operator <<(int n)
|
||||||
{
|
{
|
||||||
const int pos = make_room(8);
|
char s[16];
|
||||||
sprintf(&_str[pos], "%d", n);
|
sprintf(s, "%d", n);
|
||||||
return *this;
|
return operator <<(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TString& TString::operator <<(long n)
|
TString& TString::operator <<(long n)
|
||||||
{
|
{
|
||||||
const int pos = make_room(12);
|
char s[16];
|
||||||
sprintf(&_str[pos], "%ld", n);
|
sprintf(s, "%ld", n);
|
||||||
return *this;
|
return operator <<(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
TString& TString::operator <<(double n)
|
TString& TString::operator <<(double n)
|
||||||
{
|
{
|
||||||
const int pos = make_room(16);
|
char s[32];
|
||||||
sprintf(&_str[pos], "%lg", n);
|
sprintf(s, "%lf", n);
|
||||||
return *this;
|
return operator <<(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Appends an object to the string
|
// Appends an object to the string
|
||||||
@ -586,7 +586,7 @@ const TFilename& TFilename::tempdir()
|
|||||||
mkdir(_str);
|
mkdir(_str);
|
||||||
#endif
|
#endif
|
||||||
if (res == 0)
|
if (res == 0)
|
||||||
warning_box("E' stata creata la directory per i file temporanei '%s'", _str);
|
message_box("E' stata creata la directory per i file temporanei '%s'", _str);
|
||||||
else
|
else
|
||||||
fatal_box("Impossibile creare la directory '%s' per i file temporanei", _str);
|
fatal_box("Impossibile creare la directory '%s' per i file temporanei", _str);
|
||||||
}
|
}
|
||||||
@ -600,13 +600,9 @@ const TFilename& TFilename::temp(const char* prefix)
|
|||||||
const TFilename dirpref(tempdir());
|
const TFilename dirpref(tempdir());
|
||||||
char* t = NULL;
|
char* t = NULL;
|
||||||
|
|
||||||
TString16 est;
|
|
||||||
|
|
||||||
if (prefix)
|
if (prefix)
|
||||||
{
|
{
|
||||||
set(prefix);
|
set(prefix);
|
||||||
est = ext(); // Memorizza eventuale estensione
|
|
||||||
if (est.not_empty()) ext(""); // Toglie " "
|
|
||||||
|
|
||||||
strip("$#");
|
strip("$#");
|
||||||
t = tempnam((char*)(const char*)dirpref, (char*)_str);
|
t = tempnam((char*)(const char*)dirpref, (char*)_str);
|
||||||
@ -631,13 +627,10 @@ const TFilename& TFilename::temp(const char* prefix)
|
|||||||
set(t);
|
set(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (est.not_empty()) ext(est); // Ripristina estensione
|
#ifdef DBG
|
||||||
else
|
if (fexist(_str))
|
||||||
{
|
fatal_box("Il file '%s' esiste gia'", t);
|
||||||
const char* const e = ext();
|
#endif
|
||||||
if (e == NULL || *e == '\0') // Aggiunge estensione
|
|
||||||
ext("tmp");
|
|
||||||
}
|
|
||||||
if (t) free(t);
|
if (t) free(t);
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user