*** empty log message ***

git-svn-id: svn://10.65.10.50/trunk@11844 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2004-03-12 15:35:52 +00:00
parent 4127fc0dce
commit 95589d41e2
8 changed files with 44 additions and 45 deletions

View File

@ -95,8 +95,8 @@ class TObject_tree : public TBidirectional_tree
TTree_node *_father, *_son, *_rbrother, *_lbrother;
TObject* _obj;
TTree_node() : _father(NULL), _son(NULL), _rbrother(NULL), _lbrother(NULL),
_obj(NULL), _expanded(FALSE) { }
TTree_node() : _expanded(FALSE), _father(NULL), _son(NULL), _rbrother(NULL), _lbrother(NULL),
_obj(NULL) { }
virtual ~TTree_node() { if (_obj) delete _obj; }
};

View File

@ -16,7 +16,8 @@ bool fcopy(const char* orig, const char* dest, bool append=FALSE);
bool fexist(const char* file);
long fsize(const char* file);
bool make_dir(const char* file);
bool make_dir(const char* dir);
bool remove_file(const char* file);
int list_files(const char* mask, TString_array& result);
bool input_filename(TFilename& file);

View File

@ -1,4 +1,4 @@
// $Id: value.h,v 1.5 1996-09-03 09:54:51 simona Exp $
// $Id: value.h,v 1.6 2004-03-12 15:35:51 alex Exp $
// language types for Simulation and SimulationManager
// -------------------------------------------------------------------------
@ -12,12 +12,8 @@
#include <stdio.h>
#ifndef _iostream_h
#include <iostream.h>
#endif
#ifdef __WATCOMC__
#include <stdlib.h>
#ifndef INCSTR_H
#include <incstr.h>
#endif
enum basetype

View File

@ -83,7 +83,6 @@ void TVariable_sheet_field::post_insert(int r)
if (column_enabled(col))
{
int pos = m.id2pos(id);
const int firstpos = pos;
if (pos >= 0)
{
@ -106,7 +105,7 @@ void TVariable_sheet_field::post_insert(int r)
TVariable_sheet_field::~TVariable_sheet_field()
{
TMask & m = TSheet_field::sheet_mask();
TSheet_field::sheet_mask();
}

View File

@ -121,8 +121,9 @@ HIDDEN void build_menu_tree(TArray& flat, TArray& tree, int level)
{
// find ID in flat array
_BkMenuDesc* bds = NULL;
int i;
for (int i = 0; i < flat.items(); i++)
for (i = 0; i < flat.items(); i++)
{
_BkMenuDesc& bdss = (_BkMenuDesc&)flat[i];
if (bdss._father_id == 1000 + level)
@ -153,10 +154,11 @@ void TViswin::build_index_menu()
// builds bk_menu tree and index menu
TArray bk_tree;
TToken_string tt(128);
TToken_string tt(128);
int i;
// build tree
for (int i = 0; i < _bookmarks->items(); i++)
for (i = 0; i < _bookmarks->items(); i++)
{
BkDef& bkd = (BkDef&)(*_bookmarks)[i];
@ -408,7 +410,7 @@ bool TViswin::check_link (
const char fg = *ttt.get(1);
const char bg = *ttt.get(2);
while (cp = _txt.piece ())
while ((cp = _txt.piece ()))
{
if (_txt.get_foreground() == fg && _txt.get_background() == bg)
{
@ -643,7 +645,6 @@ void TViswin::paint_screen ()
clip.left = clip.top = 0;
xvt_dwin_set_clip(win(), &clip);
bool first = TRUE;
for (int j = 0; j < _textrows; j++)
{
const long rw = origin ().y + j;
@ -1513,7 +1514,6 @@ void TViswin::handler (WINDOW win, EVENT * ep)
}
else
{
TPoint xx;
_point.x = p.x;
_point.y = p.y;
if (_point.y > _txt.lines ())
@ -2222,8 +2222,9 @@ void TViswin::sel_to_clipboard()
long size = 0l; int eol_len = strlen(EOL_SEQ);
// open clipboard
xvt_cb_open(TRUE);
// allocate clipboard
for (int i = 0; i < txt.items(); i++)
// allocate clipboard
int i;
for (i = 0; i < txt.items(); i++)
size += txt.row(i).len() + eol_len;
char* p = (char*)xvt_cb_alloc_data(size);
if (p == NULL)
@ -2236,7 +2237,8 @@ void TViswin::sel_to_clipboard()
{
const TString& s = txt.row(i);
const int slen = s.len();
for (int j = 0; j < slen; j++)
int j;
for (j = 0; j < slen; j++)
*p++ = s[j];
for (j = 0; j < eol_len; j++)
*p++ = EOL_SEQ[j];
@ -2521,15 +2523,14 @@ TViswin::TViswin(const char *fname,
WINDOW parent,
TBrowsefile_field* brwfld):
TField_window(x, y, width, height, parent, brwfld),
_filename (fname), _txt (fname, BUFFERSIZE), _islink (linkbutton), _isedit (editbutton),
_isprint (printbutton), _isbar (FALSE), _istimer (FALSE), _iscross (FALSE),
_isselection (FALSE), _sel_displayed (FALSE), _cross_displayed (FALSE),
_link_displayed (FALSE), _point_displayed (FALSE), _selecting (FALSE),
_scrolling (FALSE), _selflag (FALSE), _need_scroll (none),
_multiple (FALSE), _rulers(rulers), _txt_to_find(64),
_frozen (FALSE), _brwfld(brwfld), _link_button(NULL), _print_button(NULL),
_down_dir(TRUE), _showbuts(FALSE), _case_sensitive(FALSE),
_menu_present(FALSE), _regexp(FALSE)
_filename (fname), _islink (linkbutton), _isedit (editbutton),
_isprint (printbutton), _iscross (FALSE), _selecting (FALSE), _isselection (FALSE),
_isbar (FALSE), _scrolling (FALSE), _istimer (FALSE), _selflag (FALSE), _sel_displayed (FALSE),
_link_displayed (FALSE), _cross_displayed (FALSE),
_point_displayed (FALSE), _need_scroll (none),
_link_button(NULL), _print_button(NULL), _txt (fname, BUFFERSIZE), _txt_to_find(64),
_down_dir(TRUE), _case_sensitive(FALSE), _regexp(FALSE), _multiple (FALSE),
_frozen (FALSE), _rulers(rulers), _showbuts(FALSE), _menu_present(FALSE), _brwfld(brwfld)
{
TWait_cursor hourglass;
@ -2675,7 +2676,7 @@ TViswin ::~TViswin ()
// Certified 100%
TBrowsefile_field::TBrowsefile_field(TMask* m)
: TWindowed_field(m), _m_link(FALSE), _background(36), _lh(NULL)
: TWindowed_field(m), _lh(NULL), _m_link(FALSE), _background(36)
{}
// Certified 100%

View File

@ -87,7 +87,7 @@ class TWindow_manager
// @cmember:(INTERNAL) Stack contenente la finestra attiva
TWindow* _window[MAX_WIN];
// @cmember:(INTERNAL) Stack pointer
char _current;
short _current;
// @cmember:(INTERNAL) Permette di abilitare/disabilitare il menu' della task window (stesso
// funzionamento della <mf TMask::enable>)
void menu_enable(bool) const;
@ -261,7 +261,7 @@ bool is_valid_window(WINDOW w)
{
bool ok = FALSE;
if (w != NULL_WIN)
ok = xvt_vobj_get_attr(w, ATTR_NATIVE_WINDOW) != NULL;
ok = (xvt_vobj_get_attr(w, ATTR_NATIVE_WINDOW) != 0L);
return ok;
}
@ -296,8 +296,9 @@ bool TWindow::_ctools_saved;
TWindow::TWindow()
: _win(NULL_WIN), _open(FALSE), _modal(FALSE), _active(TRUE),
_running(FALSE), _pixmap(FALSE), _lastkey(0), _base_char_width(0L)
: _win(NULL_WIN), _lastkey(0),
_base_char_width(0L), _open(FALSE), _modal(FALSE),
_active(TRUE), _running(FALSE), _pixmap(FALSE)
{}
word TWindow::class_id() const
@ -868,7 +869,8 @@ bool TWindow::add_menu(
if (id == 0) // add to menubar
{
// count menus
for (int nmen = 0; menubar[nmen].tag != 0; nmen++);
int nmen;
for (nmen = 0; menubar[nmen].tag != 0; nmen++);
menubar = (MENU_ITEM*)xvt_mem_realloc((DATA_PTR)menubar,
sizeof(MENU_ITEM)*(nmen+menu.items()+1));
// zero new
@ -884,7 +886,8 @@ bool TWindow::add_menu(
CHECK(father != NULL, "TWindow::add_menu: you're adding to a NULL menu item");
// count children
for (int nmen = 0; father->child != NULL && father->child[nmen].tag != 0; nmen++);
int nmen;
for (nmen = 0; father->child != NULL && father->child[nmen].tag != 0; nmen++);
father->child = (MENU_ITEM*)xvt_mem_realloc((DATA_PTR)father->child,
sizeof(MENU_ITEM)*(nmen+menu.items()+1));
// zero new
@ -1076,4 +1079,4 @@ bool TScroll_window::on_key(KEY key)
}
return TWindow::on_key(key);
}
}

View File

@ -11,7 +11,6 @@ typedef bool (*XmlItemCallback)(TXmlItem& item, long jolly);
class TXmlItem : public TObject
{
DECLARE_DYNAMIC_CLASS(TXmlItem);
TString m_strTag;
TString* m_strText;

View File

@ -29,7 +29,7 @@ HIDDEN BOOLEAN error_hook(XVT_ERRMSG err, DATA_PTR)
return TRUE;
const XVT_ERRSEV sev = xvt_errmsg_get_sev_id(err);
#ifdef DBG
return FALSE;
return sev == 0 ? FALSE : FALSE;
#else
return sev < SEV_ERROR;
#endif
@ -383,14 +383,14 @@ void set_xvt_hooks()
long twin_style = WSF_ICONIZABLE | WSF_CLOSE | WSF_SIZE;
TConfig cfg(CONFIG_USER, "Colors");
const int res = cfg.get_int("Resolution");
const int scx = xvt_vobj_get_attr(NULL_WIN, ATTR_SCREEN_WIDTH);
const int scy = xvt_vobj_get_attr(NULL_WIN, ATTR_SCREEN_HEIGHT);
if (res >= 640 && res < scx)
{
const fx = xvt_vobj_get_attr(NULL_WIN, ATTR_FRAME_WIDTH);
const fy = xvt_vobj_get_attr(NULL_WIN, ATTR_FRAME_HEIGHT);
const cy = xvt_vobj_get_attr(NULL_WIN, ATTR_TITLE_HEIGHT);
const int fx = xvt_vobj_get_attr(NULL_WIN, ATTR_FRAME_WIDTH);
const int fy = xvt_vobj_get_attr(NULL_WIN, ATTR_FRAME_HEIGHT);
const int cy = xvt_vobj_get_attr(NULL_WIN, ATTR_TITLE_HEIGHT);
const int width = res + 2*fx;
const int height = (res * scy) / scx + 2*fy + cy;
const int deltax = (scx - width) / 2;
@ -671,7 +671,7 @@ bool xvt_test_menu_tag(
COLOR trans_color(
char c) // @parm Codice carattere da convertire
{
COLOR col;
COLOR col = COLOR_WHITE;
switch (c)
{
case 'b':