Correzioni puramente estetiche (commenti e indentazioni)

git-svn-id: svn://10.65.10.50/trunk@664 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-11-18 16:49:51 +00:00
parent 0d1752b7f2
commit 5acff4f45b
5 changed files with 27 additions and 12 deletions

View File

@ -1115,7 +1115,7 @@ void TMask::autoload(const TRelation* r)
for (int i = 0; i < max; i++)
{
TMask_field& f = fld(i);
if (f.field())
if (f.field() != NULL)
f.autoload(r);
}
}
@ -1128,7 +1128,7 @@ void TMask::autosave(TRelation* r) const
{
TMask_field& f = fld(i);
const TFieldref* fr =f.field();
if (fr)
if (fr != NULL)
{
if (f.showed() || *fr->read(r) == '\0')
f.autosave(r);

View File

@ -1,4 +1,4 @@
// $Id: maskfld.cpp,v 1.50 1994-11-17 14:47:35 guy Exp $
// $Id: maskfld.cpp,v 1.51 1994-11-18 16:49:41 guy Exp $
#include <xvt.h>
#include <applicat.h>
@ -1397,8 +1397,17 @@ TToken_string& TBrowse::create_siblings(TToken_string& siblings)
if (c->file().num() == _cursor->file().num() &&
(key[c->key()] == FALSE || id == _fld->dlg()))
{
const TString16 fn(_out_fn.get(n)); // Legge nome del campo su file
const int pos = _items.get_pos(fn); // Determina header corrispondente
TString16 fn(_out_fn.get(n)); // Legge nome del campo su file
int pos = _items.get_pos(fn); // Determina header corrispondente
if (pos < 0) // Se non lo trova identico ...
{
const int q = fn.find('[');
if (q > 0)
{
fn.cut(q);
pos = _items.get_pos(fn); // ... ritenta senza parentesi
}
}
if (pos >= 0)
{
siblings.add(id);

View File

@ -1,4 +1,4 @@
// $Id: relapp.cpp,v 1.31 1994-11-17 15:18:28 alex Exp $
// $Id: relapp.cpp,v 1.32 1994-11-18 16:49:47 guy Exp $
#include <mailbox.h>
#include <sheet.h>
#include <urldefid.h>
@ -645,7 +645,6 @@ int TRelation_application::read(TMask& m)
int TRelation_application::write(const TMask& m)
{
TRelation *r = get_relation();
// r->zero();
m.autosave(r);
r->write();
return r->status();
@ -655,7 +654,6 @@ int TRelation_application::write(const TMask& m)
int TRelation_application::rewrite(const TMask& m)
{
TRelation *r = get_relation();
// r->zero();
m.autosave(r);
r->rewrite();
return r->status();
@ -710,7 +708,10 @@ bool TRelation_application::main_loop()
set_cursor(TASK_WIN, CURSOR_ARROW);
// Dis/abilita cambio ditta
enable_menu_item(M_FILE_NEW, (_mask->mode() == MODE_QUERY));
enable_menu_item(M_FILE_NEW, _mask->query_mode());
// Dis/abilita cambio parametri
enable_menu_item(M_FILE_REVERT, _mask->qury_mode());
k = _mask->run();

View File

@ -1,4 +1,4 @@
// $Id: relation.cpp,v 1.22 1994-11-07 11:46:16 alex Exp $
// $Id: relation.cpp,v 1.23 1994-11-18 16:49:49 guy Exp $
// relation.cpp
// fv 12/8/93
// relation class for isam files
@ -40,7 +40,7 @@ class TRelationdef : public TObject
TBit_array _forced;
bool _first_match : 1; // primo match (ed esiste)
bool _allow_lock : 1; // ?????
bool _write_enable;
bool _write_enable : 1;
protected:
virtual void print_on(ostream& out) const;
@ -593,7 +593,7 @@ int TRelation::write(bool force, TDate& atdate)
int TRelation::rewrite(bool force, TDate& atdate)
{
_errors = file(0).rewrite(atdate); // Riscrive testata
if (force && _errors == _iskeynotfound) // Se non la trova ...
if (force && _errors == _iskeynotfound) // Se non la trova ...
_errors = file(0).write(atdate); // ... forza la scrittura
for (int i = 0; i < _reldefs.items(); i++)

View File

@ -569,8 +569,13 @@ void xvt_set_font(WINDOW win, int family, int style, int dim)
#if XVT_OS == XVT_OS_WIN
if (dim < 1)
{
<<<<<<< xvtility.cpp
// LogFont.lfWidth = (style & FS_BOLD) ? width : width;
// LogFont.lfHeight = CHARY - ((style & FS_BOLD) ? 1 : 0);
=======
// LogFont.lfWidth = CHARX - (style & FS_BOLD) ? 2 : 1;
// LogFont.lfHeight = CHARY - ((style & FS_BOLD) ? 4 : 2);
>>>>>>> 1.21
LogFont.lfWeight = FontWeight + ((style & FS_BOLD) ? 300 : 0);
LogFont.lfItalic = (style & FS_ITALIC) ? TRUE : FALSE;
set_value(NULL_WIN, ATTR_WIN_PM_LOGFONT, (long)&LogFont);