execp.cpp Mega correzione del metodo TExternal_app::run che ora
puo' attendere bene i programmi a 16 e a 32 bit! form.cpp Corretto metodo TForm::print per form TCursorless sheet.cpp Corretta larghezza colonne con intestazioni su piu' righe strings.cpp Corretti metodi TFilename::name() e TFilename::path() xvtility.cpp Migliorata indentazione per facilitare il debug dei messaggi WM_WAKEUP git-svn-id: svn://10.65.10.50/trunk@5724 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
29dc209df8
commit
b88cceb3dd
@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define STRICT
|
||||
//#define STRICT // Guai a me
|
||||
#define XVT_INCL_NATIVE
|
||||
#include <xvt.h>
|
||||
|
||||
@ -156,12 +156,23 @@ word TExternal_app::run(
|
||||
TWait_cursor hourglass;
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
HL_LOGOUT();
|
||||
_exitcode = WinExec(path.get_buffer(), show ? SW_SHOWNORMAL : SW_HIDE);
|
||||
_exitcode = WinExec((const char*)path, show ? SW_SHOWNORMAL : SW_HIDE);
|
||||
|
||||
if (_exitcode >= 32)
|
||||
{
|
||||
if (!async)
|
||||
{
|
||||
const char* szModule = path.name();
|
||||
HTASK child = NULL;
|
||||
TASKENTRY te; te.dwSize = sizeof(TASKENTRY);
|
||||
for (bool ok = TaskFirst(&te); ok; ok = TaskNext(&te))
|
||||
if (te.hInst == (HINSTANCE)_exitcode ||
|
||||
stricmp(te.szModule, szModule) == 0)
|
||||
{
|
||||
child = te.hTask;
|
||||
break;
|
||||
}
|
||||
|
||||
TTemp_window tw(TASK_WIN);
|
||||
if (iconize)
|
||||
{
|
||||
@ -169,15 +180,6 @@ word TExternal_app::run(
|
||||
tw.deactivate();
|
||||
}
|
||||
|
||||
HTASK child = NULL;
|
||||
TASKENTRY te; te.dwSize = sizeof(TASKENTRY);
|
||||
for (bool ok = TaskFirst(&te); ok; ok = TaskNext(&te))
|
||||
if (te.hInst == (HINSTANCE)_exitcode)
|
||||
{
|
||||
child = te.hTask;
|
||||
break;
|
||||
}
|
||||
|
||||
// Warning! child could be NULL if you run that beast called Foxpro
|
||||
|
||||
main_app().wait_for((word)child);
|
||||
|
@ -4263,7 +4263,7 @@ bool TForm::genera_fincatura(
|
||||
//
|
||||
// @rdesc Ritorna FALSE se non esiste body (o non e' COLUMNWISE) o se non esiste l'header
|
||||
bool TForm::genera_intestazioni(
|
||||
pagetype p, // @parm Posizione della pgaina (vedi <t pagetype>)
|
||||
pagetype p, // @parm Posizione della pagina (vedi <t pagetype>)
|
||||
short y) // @parm Riga dell'header in cui vanno inserite
|
||||
|
||||
// @comm I form_items di intestazione vengono aggiunti alla sezione header di tipo <p p> con ID -1
|
||||
@ -4308,11 +4308,13 @@ bool TForm::genera_intestazioni(
|
||||
break;
|
||||
}
|
||||
}
|
||||
TParagraph_string prompts(fi.col_head().mid(align ? 2:0),fi.width());
|
||||
|
||||
// Paragraph_string has as many items as lines needed...
|
||||
TParagraph_string prompts(fi.col_head().mid(align ? 2:0),fi.width());
|
||||
TString p;
|
||||
for (int c=0;c < prompts.items(); c++)
|
||||
{
|
||||
TString p(prompts.get(c));
|
||||
p = prompts.get(c);
|
||||
switch (align)
|
||||
{
|
||||
case 'c':
|
||||
@ -4497,15 +4499,19 @@ bool TForm::print(
|
||||
|
||||
for (long i = from; i <= to && ok;)
|
||||
{
|
||||
if (from < 0) to = from;
|
||||
else if (cursor())
|
||||
*cursor()=i;
|
||||
match_result();
|
||||
if (from < 0)
|
||||
to = from;
|
||||
else if (cursor())
|
||||
{
|
||||
*cursor()=i;
|
||||
match_result();
|
||||
}
|
||||
|
||||
if (pr.current_row() > pr.headersize()+1)
|
||||
{
|
||||
const word h = set_body(page(pr), FALSE);
|
||||
if (h > pr.rows_left()) {
|
||||
if (h > pr.rows_left())
|
||||
{
|
||||
pr.formfeed();
|
||||
// quanto resta da stampare sta nell'ultima pagina
|
||||
if (!fixed_pages() && set_body(0,FALSE) * word(to-i+1) <= pr.formlen()- set_header(1,FALSE) - set_footer(0,FALSE))
|
||||
@ -4527,12 +4533,15 @@ bool TForm::print(
|
||||
}
|
||||
|
||||
set_body(page(pr), TRUE);
|
||||
if (cursor()) {
|
||||
if (cursor())
|
||||
{
|
||||
if (next_match_done())
|
||||
i=cursor()->pos();
|
||||
else
|
||||
i++;
|
||||
}
|
||||
else
|
||||
i++;
|
||||
} // fine ciclo di stampa
|
||||
|
||||
while (fixed_pages() && page(pr) % _npages !=0)
|
||||
@ -4540,8 +4549,9 @@ bool TForm::print(
|
||||
static TPrintrow empty_line;
|
||||
pr.formfeed();
|
||||
pr.print(empty_line);
|
||||
}
|
||||
pr.formfeed();
|
||||
}
|
||||
if (from >= 0)
|
||||
pr.formfeed();
|
||||
if (!was_open)
|
||||
pr.close();
|
||||
|
||||
@ -5315,21 +5325,23 @@ void TForm::set_compulsory_specials()
|
||||
const char sc = sechar[sn];
|
||||
for (pagetype pt = odd_page; pt <= last_page; pt = pagetype(pt+1))
|
||||
{
|
||||
TPrint_section* sec = exist(sc, pt);
|
||||
if (sec != NULL)
|
||||
const TPrint_section* sec = exist(sc, pt);
|
||||
if (sec != NULL && sec->columnwise())
|
||||
{
|
||||
const word fields = sec->fields();
|
||||
const bool col_wise = sec->columnwise();
|
||||
for (word i = 0; col_wise && i < fields; i++)
|
||||
for (word i = 0; i < fields; i++)
|
||||
{
|
||||
TForm_item& fi = sec->field(i);
|
||||
if (fi.special_items()>0)
|
||||
if (fi.special_items() > 0)
|
||||
{
|
||||
fi.set_col_head(fi.get_special_value("INTESTAZIONE"));
|
||||
fi.ofs() = (short)atoi(fi.get_special_value("OFFSET"));
|
||||
TString fnk(fi.get_special_value("FINCATURA"));
|
||||
fi.set_finkl(fnk[0]!='X'); // !finkl significa fincatura abilitata
|
||||
fi.set_finkr(fnk[1]!='X'); // !finkr significa fincatura abilitata
|
||||
const TString& fnk = fi.get_special_value("FINCATURA");
|
||||
if (fnk.not_empty())
|
||||
{
|
||||
fi.set_finkl(fnk[0]!='X'); // !finkl significa fincatura abilitata
|
||||
fi.set_finkr(fnk[1]!='X'); // !finkr significa fincatura abilitata
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ TSheet_control::TSheet_control(
|
||||
}
|
||||
|
||||
testa.cut(at);
|
||||
v = max(at, v);
|
||||
if (v == 0) v = at;
|
||||
}
|
||||
|
||||
if (v > 64)
|
||||
|
@ -1002,23 +1002,29 @@ void TFilename::ext(const char* e)
|
||||
}
|
||||
|
||||
|
||||
// Certified 90%
|
||||
// Certified 95%
|
||||
const char* TFilename::name() const
|
||||
{
|
||||
for (int i = strlen(_str)-1; i >= 0; i--)
|
||||
int start = find(' ')-1;
|
||||
if (start < 0)
|
||||
start = len()-1;
|
||||
for (int i = start; i >= 0; i--)
|
||||
if (_str[i] == '/' || _str[i] == '\\' || _str[i] == ':')
|
||||
break;
|
||||
|
||||
return &_str[i+1];
|
||||
spark.strncpy(&_str[i+1], start-i);
|
||||
return spark;
|
||||
}
|
||||
|
||||
// Certified 90%
|
||||
// Certified 95%
|
||||
const char* TFilename::path() const
|
||||
{
|
||||
for (int i = strlen(_str)-1; i >= 0; i--)
|
||||
int start = find(' ')-1;
|
||||
if (start < 0)
|
||||
start = len()-1;
|
||||
for (int i = start; i >= 0; i--)
|
||||
if (_str[i] == '/' || _str[i] == '\\' || _str[i] == ':')
|
||||
break;
|
||||
|
||||
spark.strncpy(_str, i+1);
|
||||
return spark;
|
||||
}
|
||||
|
@ -82,8 +82,11 @@ static BOOLEAN event_hook(HWND hwnd,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (msg == WM_WAKEUP && wparam == main_app().waiting())
|
||||
main_app().wake_up();
|
||||
if (msg == WM_WAKEUP)
|
||||
{
|
||||
if (wparam == main_app().waiting())
|
||||
main_app().wake_up();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user