Patch level : 2.0 nopatch

Files correlati     : ba1 ba2
Ricompilazione Demo : [ ]
Commento            :

Tolte chiamate a funzioni di os_dep


git-svn-id: svn://10.65.10.50/trunk@10953 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-03-28 15:33:12 +00:00
parent 6876377a21
commit 2607ad4877
6 changed files with 21 additions and 27 deletions

View File

@ -848,7 +848,6 @@ void TManutenzione_app::update_dir()
prompt << TR("Aggiornamento direttorio della ditta ");
prompt << atol(pref) <<".";
}
prompt << TR(" Memoria libera: ") << long(os_get_free_memory()/1024) << " Kbytes.";
TProgind p(update_items ? update_items : 1, prompt, FALSE, TRUE);
p.setstatus(1);
@ -1121,13 +1120,13 @@ void TManutenzione_app::convert_dir()
const int update_items = (orig_items < items) ? orig_items : items;
TString s(256);
if (is_com) s = TR("Aggiornamento archivi comuni.");
if (is_com)
s = TR("Aggiornamento archivi comuni.");
else
{
s = TR("Aggiornamento archivi della ditta ");
s << atol (pref) << ".";
}
s << TR("Memoria libera: ") << long(os_get_free_memory()/1024) << " Kbytes.";
TProgind p(update_items ? update_items : 1, s, FALSE, TRUE);
p.setstatus(1);
@ -1464,8 +1463,7 @@ void TManutenzione_app::update()
const TRecnotype rec = ditte.recno();
const long codditta = ditte.get_long("CODDITTA");
mxs = s;
mxs << TR(" Ditta ") << codditta << TR(". Memoria libera: ")
<< long(os_get_free_memory()/1024) << " Kbytes.";
mxs << TR(" Ditta ") << codditta;
p.addstatus(1);
p.set_text(mxs);
if (codditta > _history_firm && prefix().exist(codditta))

View File

@ -1,7 +1,7 @@
#include <applicat.h>
#include <config.h>
#include <dongle.h>
#include <os_dep.h>
//#include <os_dep.h>
#include <scanner.h>
#include <utility.h>
@ -114,7 +114,7 @@ bool update_dninst(bool force)
{
TConfig ini("install.ini", "Main");
TFilename remote_name = ini.get("DiskPath");
if (os_is_removable_drive(remote_name))
if (xvt_fsys_is_removable_drive(remote_name))
message_box(FR("Assicuratevi che il CD di installazione sia nel lettore %c:"), remote_name[0]);
remote_name.add(keys_name);
if (remote_name.exist())

View File

@ -1801,12 +1801,12 @@ bool TCreadischi_mask::move_file(const TFilename& file, const char* dir) const
bool space_ok = FALSE;
while (!space_ok)
{
space_ok = ::os_test_disk_free_space(dest, filesize);
space_ok = xvt_fsys_test_disk_free_space(dest, filesize) != 0;
if (!space_ok)
{
TString msg(128);
msg << TR("Lo spazio sull'unita' e' insufficiente");
if (::os_is_removable_drive(dest))
if (xvt_fsys_is_removable_drive(dest))
{
msg << TR(":\nInserire un nuovo disco e ritentare?");
if (!yesno_box(msg))
@ -2097,7 +2097,7 @@ bool TCreadischi_mask::zip_module(const TString& main_module, bool agg, int patc
ini.export_paragraph(main_module, sommario,TRUE); // Aggiorna sommario
const char drive = toupper(path[0]);
const bool floppy = os_is_removable_drive(path);
const bool floppy = xvt_fsys_is_removable_drive(path) != 0;
msg = TR("Creazione file "); msg << archivio;
TProgind pi(disks, msg, FALSE, TRUE);

View File

@ -4,7 +4,6 @@
#include <dongle.h>
#include <execp.h>
#include <isamrpc.h>
#include <os_dep.h>
#include <progind.h>
#include <sheet.h>
#include <utility.h>
@ -563,12 +562,12 @@ bool TInstaller_mask::move_file(const TFilename& from, const TFilename& file, co
while (!space_ok)
{
space_ok = os_test_disk_free_space(dest, filesize);
space_ok = xvt_fsys_test_disk_free_space(dest, filesize) != 0;
if (!space_ok)
{
TString msg;
msg << TR("Lo spazio sull'unita' e' insufficiente");
if (os_is_removable_drive(dest))
if (xvt_fsys_is_removable_drive(dest))
{
msg << TR(":\nInserire un nuovo disco e ritentare?");
if (!yesno_box(msg))
@ -770,7 +769,7 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
if (ok)
{
const long required = fsize(chunk) * (dischi-d+1) * 4;
if (!os_test_disk_free_space(tempdir, required))
if (!xvt_fsys_test_disk_free_space(tempdir, required))
{
ok = yesno_box(TR("Lo spazio su disco potrebbe essere insufficiente:\nSi desidera continuare ugualmente?"));
}
@ -1211,7 +1210,7 @@ TInstaller_mask::TInstaller_mask()
TFilename path = ini.get("DiskPath");
set(F_PATH, path);
const bool floppy = os_is_removable_drive(path);
const bool floppy = xvt_fsys_is_removable_drive(path) != 0;
if (path.not_empty() && !floppy && !is_internet_path(path))
autoload();

View File

@ -1,12 +1,9 @@
#include <direct.h>
#include <agasys.h>
#include <automask.h>
#include <execp.h>
#include <isam.h>
#include <mailbox.h>
#include <os_dep.h>
#include <prefix.h>
#include <progind.h>
#include <utility.h>
@ -44,8 +41,8 @@ TArchive_mask::TArchive_mask() : TAutomask("ba2200")
for (int d = 0; d < 26; d++)
{
str.format("%c:/", d+'A');
const bool isrem = os_is_removable_drive(str);
const bool isfix = !isrem && os_is_fixed_drive(str);
const bool isrem = xvt_fsys_is_removable_drive(str) != 0;
const bool isfix = !isrem && xvt_fsys_is_fixed_drive(str);
if (isrem || isfix)
{
str.rtrim(1); // Togli slash finale
@ -245,7 +242,7 @@ bool TArchive_app::can_save_as(const TFilename& src, const TFilename& dst) const
if (dst.exist())
remove(dst);
long s = fsize(src);
return os_test_disk_free_space(dst.left(3), s);
return xvt_fsys_test_disk_free_space(dst.left(3), s) != 0;
}
void TArchive_app::save_zip_files(const TFilename& floppy_path, const TString& desc, unsigned long max_chunk)
@ -266,7 +263,7 @@ void TArchive_app::save_zip_files(const TFilename& floppy_path, const TString& d
}
bool ok = TRUE;
if (os_is_removable_drive(floppy_path.left(3)))
if (xvt_fsys_is_removable_drive(floppy_path.left(3)))
{
const char* msg = TR("Si desidera procedere con l'operazione di salvataggio?");
if (disk == 1)
@ -343,10 +340,10 @@ void TArchive_app::backup(int mode, long firm, const TFilename& floppy_path, con
prefix().set(NULL); // Libera tutti i lock
long max_chunk = ~0;
if (os_is_removable_drive(floppy_path))
if (xvt_fsys_is_removable_drive(floppy_path))
{
message_box(FR("Inserire un disco vuoto nel drive %c:"), floppy_path[0]);
max_chunk = os_get_disk_size(floppy_path) - (1024L*64L);
max_chunk = xvt_fsys_get_disk_size(floppy_path, 'K') - (1024L*64L);
}
_zip_list.destroy();
@ -438,7 +435,7 @@ void TArchive_app::load_zip_files(const TFilename& floppy_path)
if (pi.iscancelled())
break;
if (os_is_removable_drive(floppy_path.left(3)))
if (xvt_fsys_is_removable_drive(floppy_path.left(3)))
{
if (disk != curr_disk)
{
@ -546,7 +543,7 @@ void TArchive_app::interactive_mode()
else
{
TFilename ini_name = floppy_path; ini_name.add("backup.ini");
if (os_is_removable_drive(floppy_path.left(3)))
if (xvt_fsys_is_removable_drive(floppy_path.left(3)))
message_box(FR("Inserire il primo disco del backup nel drive %c"), floppy_path[0]);
if (ini_name.exist())
restore(mode, firm, floppy_path);

View File

@ -601,7 +601,7 @@ void TBenchmark_application::update_bar(long rec)
if (sec > _sec)
{
TString80 msg;
unsigned long mem = os_get_free_memory() / 1024;
unsigned long mem = xvt_sys_get_free_memory_kb();
rec++;
msg.format("%ld record (%ld rec/sec) %lu Kb", rec, long(rec / sec), mem);
xvt_statbar_set(msg);