exec.cpp Cambiata indentazione
isam.cpp Corretto aggiornamento EOX maskfld.cpp Corretta ricerca delle date ANSI msksheet.cpp Tolto commento nell'update globale pagsca.h Aggiunti campi viswin.cpp Usato CONFIG_USER invece di CONFIG_GENERAL per selezionare l'editor git-svn-id: svn://10.65.10.50/trunk@1799 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									dc6ee6cd72
								
							
						
					
					
						commit
						cd05dc4456
					
				@ -45,7 +45,7 @@ bool TExternal_app::can_run() const
 | 
			
		||||
int TExternal_app::run(
 | 
			
		||||
  bool async,  // @parm Per eseguire il processo in parallelo (default FALSE)
 | 
			
		||||
  bool utente) // @parm Permette di inserire il nome dell'utente nella riga 
 | 
			
		||||
  //       di comando(default FALSE)
 | 
			
		||||
  //       di comando(default TRUE)
 | 
			
		||||
 | 
			
		||||
  // @comm Se <p asyn> e' FALSE aspetta che termini il processo in esecuzione prima di iniziare il nuovo
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -100,7 +100,6 @@ void get_idx_names(int logicnum, TToken_string& i_names) // Returns a Token_stri
 | 
			
		||||
 | 
			
		||||
int get_error(int err)
 | 
			
		||||
{   
 | 
			
		||||
  
 | 
			
		||||
  if (err > 0)  
 | 
			
		||||
  { 
 | 
			
		||||
    if (err >= 10)
 | 
			
		||||
@ -117,7 +116,8 @@ int get_error(int err)
 | 
			
		||||
    { 
 | 
			
		||||
      int ierr = DB_get_error();  
 | 
			
		||||
      if (ierr < 0) ierr = -ierr;
 | 
			
		||||
      if (ierr > 340 || error_codes_g[ierr/10]==-1) return (-ierr);
 | 
			
		||||
      if (ierr > 340 || error_codes_g[ierr/10]==-1) 
 | 
			
		||||
        return (-ierr);
 | 
			
		||||
      return (error_codes_g[ierr/10]);
 | 
			
		||||
    }                    
 | 
			
		||||
  DB_zero_error();      
 | 
			
		||||
@ -147,13 +147,12 @@ HIDDEN void getisfd(isfdptr & isfd, int logicnum)
 | 
			
		||||
  isfd->ln = logicnum;
 | 
			
		||||
}                                                  
 | 
			
		||||
 | 
			
		||||
HIDDEN  void relisfd(isfdptr & isfd)
 | 
			
		||||
 | 
			
		||||
HIDDEN  void relisfd(isfdptr & isfd)
 | 
			
		||||
{
 | 
			
		||||
  if (isfd->ln > 0 && isfd->fhnd >= 0)
 | 
			
		||||
  {
 | 
			
		||||
    TDir d;
 | 
			
		||||
    
 | 
			
		||||
    d.get(isfd->ln, _lock, (TDirtype) isfd->ft, _sysdirop);
 | 
			
		||||
    d.eod() = isfd->d->EOD;
 | 
			
		||||
    d.eox() = isfd->d->EOX;
 | 
			
		||||
@ -162,8 +161,13 @@ HIDDEN  void relisfd(isfdptr & isfd)
 | 
			
		||||
  delete isfd->d;
 | 
			
		||||
  delete isfd->r;
 | 
			
		||||
  delete isfd;
 | 
			
		||||
 | 
			
		||||
#ifdef DBG  
 | 
			
		||||
  isfd = NULL;         // Per provocare errori
 | 
			
		||||
#endif  
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
HIDDEN  int CBuildKey(RecDes *recd, int numkey, RecType recin, char *key, bool build_x_cb)
 | 
			
		||||
  /* *recd;       descrittore record               */
 | 
			
		||||
  /* numkey;      numero chiave                    */
 | 
			
		||||
@ -968,15 +972,15 @@ int TBaseisamfile::_open(unsigned int mode)
 | 
			
		||||
    TDir d;
 | 
			
		||||
    // d.get(num());
 | 
			
		||||
    d.get(num(),_nolock,_nordir,_sysdirop);
 | 
			
		||||
    if (d.is_com()) d.get(num(),_nolock,_comdir);
 | 
			
		||||
    if (d.is_com()) d.get(num(),_nolock,_comdir,_sysdirop);
 | 
			
		||||
    if ((filehnd()->d->EOD != n && n > 0) || (n >= d.eox()))
 | 
			
		||||
    {
 | 
			
		||||
      filehnd()->d->EOD = d.eod() = n;
 | 
			
		||||
      filehnd()->d->EOX = d.eox() = (TRecnotype) (n*1.2); 
 | 
			
		||||
      filehnd()->d->EOX = d.eox() = n; 
 | 
			
		||||
      if (d.is_com())
 | 
			
		||||
        d.put(num(),_comdir); 
 | 
			
		||||
        d.put(num(),_comdir,_sysdirop); 
 | 
			
		||||
      else
 | 
			
		||||
        d.put(num());
 | 
			
		||||
        d.put(num(),_nordir,_sysdirop);
 | 
			
		||||
    }
 | 
			
		||||
    filehnd()->ln = num();
 | 
			
		||||
    openf[num() - 1] = filehnd();
 | 
			
		||||
@ -1009,15 +1013,15 @@ int TBaseisamfile::_close()
 | 
			
		||||
      TRecnotype n=DB_reccount(filehnd()->fhnd);
 | 
			
		||||
      //d.get(num());
 | 
			
		||||
      d.get(num(),_nolock,_nordir,_sysdirop);
 | 
			
		||||
      if (d.is_com()) d.get(num(),_nolock,_comdir);
 | 
			
		||||
      if (d.is_com()) d.get(num(),_nolock,_comdir,_sysdirop);
 | 
			
		||||
      if ((filehnd()->d->EOD != n && n > 0) || (n >= d.eox()))
 | 
			
		||||
      {
 | 
			
		||||
        filehnd()->d->EOD=d.eod()=n;             
 | 
			
		||||
        filehnd()->d->EOX = d.eox() = (TRecnotype) (n*1.2);
 | 
			
		||||
        filehnd()->d->EOD = d.eod() = n;             
 | 
			
		||||
        filehnd()->d->EOX = d.eox() = n;
 | 
			
		||||
        if (d.is_com())
 | 
			
		||||
          d.put(num(),_comdir); 
 | 
			
		||||
          d.put(num(),_comdir,_sysdirop); 
 | 
			
		||||
        else
 | 
			
		||||
          d.put(num());
 | 
			
		||||
          d.put(num(),_nordir,_sysdirop);
 | 
			
		||||
      }
 | 
			
		||||
      CHECK(openf[num() - 1] != NULL, "Open file array corrupted");
 | 
			
		||||
      err=DB_close(filehnd()->fhnd);
 | 
			
		||||
@ -1089,17 +1093,18 @@ int TLocalisamfile::close()
 | 
			
		||||
      TDir d;
 | 
			
		||||
      //d.get(num());
 | 
			
		||||
      d.get(num(),_nolock,_nordir,_sysdirop);
 | 
			
		||||
      if (d.is_com()) d.get(num(),_nolock,_comdir);
 | 
			
		||||
      if (d.is_com()) d.get(num(),_nolock,_comdir,_sysdirop);
 | 
			
		||||
      if ((filehnd()->d->EOD!=n  && n > 0) || (n > d.eox()))
 | 
			
		||||
      {
 | 
			
		||||
        filehnd()->d->EOD = d.eod() = n;
 | 
			
		||||
        filehnd()->d->EOX = d.eox() = n;
 | 
			
		||||
        if (d.is_com())
 | 
			
		||||
          d.put(num(),_comdir);
 | 
			
		||||
          d.put(num(),_comdir,_sysdirop);
 | 
			
		||||
        else
 | 
			
		||||
          d.put(num());
 | 
			
		||||
          d.put(num(),_nordir,_sysdirop);
 | 
			
		||||
      }
 | 
			
		||||
      err = DB_close(_isamfile->fhnd);
 | 
			
		||||
      _isamfile->fhnd = -1;
 | 
			
		||||
      if (err != NOERR) err = get_error(err);  
 | 
			
		||||
      relisfd(_isamfile);
 | 
			
		||||
      _isamfile=NULL;
 | 
			
		||||
@ -1285,13 +1290,14 @@ int TIsamtempfile::open(const char* radix, bool create, TRecnotype eod, TRecnoty
 | 
			
		||||
    {                 
 | 
			
		||||
      err = get_error(err);     
 | 
			
		||||
      relisfd(_isamfile);
 | 
			
		||||
      fatal_box("Create temporary file: Error n. %d ", err);
 | 
			
		||||
      fatal_box("Create temporary file: Error n. %d", err);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
    filehnd()->d->EOD = eod;
 | 
			
		||||
  filehnd()->fhnd = DB_open(filehnd()->d->SysName, 0);
 | 
			
		||||
  if (filehnd()->fhnd < 0) err = get_error(filehnd()->fhnd);
 | 
			
		||||
  if (filehnd()->fhnd < 0) 
 | 
			
		||||
    err = get_error(filehnd()->fhnd);
 | 
			
		||||
  if (err != NOERR)
 | 
			
		||||
  {
 | 
			
		||||
    relisfd(_isamfile);
 | 
			
		||||
@ -1300,9 +1306,9 @@ int TIsamtempfile::open(const char* radix, bool create, TRecnotype eod, TRecnoty
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
    filehnd()->ln = -num();
 | 
			
		||||
    filehnd()->knum =  1 ;
 | 
			
		||||
    filehnd()->knum = 1;
 | 
			
		||||
  }
 | 
			
		||||
  //  _current->_i = filehnd();
 | 
			
		||||
 | 
			
		||||
  _recno = -1L;
 | 
			
		||||
  setstatus(err);
 | 
			
		||||
  return err;
 | 
			
		||||
@ -1432,10 +1438,8 @@ int TSystemisamfile::extend(TRecnotype eox)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
long TSystemisamfile::size(TRecnotype eox)
 | 
			
		||||
  
 | 
			
		||||
{
 | 
			
		||||
  const long size = (100 * (unsigned)512); 
 | 
			
		||||
  return size;
 | 
			
		||||
  return 51200L;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifndef FOXPRO
 | 
			
		||||
 | 
			
		||||
@ -1407,7 +1407,15 @@ int TBrowse::do_input(
 | 
			
		||||
      const bool filter_flag = strchr(fld, '@') != NULL;
 | 
			
		||||
      tofilter = filter && filter_flag;
 | 
			
		||||
      val = field(id).get();
 | 
			
		||||
      if (field(id).is_edit() && val.not_empty() && !filter_flag) 
 | 
			
		||||
      
 | 
			
		||||
      const TMask_field& f = field(id);
 | 
			
		||||
      if (f.class_id() == CLASS_DATE_FIELD && f.right_justified())
 | 
			
		||||
      {
 | 
			
		||||
        const TDate d(val);
 | 
			
		||||
        val = d.string(ANSI);
 | 
			
		||||
      }
 | 
			
		||||
      
 | 
			
		||||
      if (f.is_edit() && val.not_empty() && !filter_flag) 
 | 
			
		||||
        ne++;          // Increment not empty fields count
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -2203,9 +2211,9 @@ bool TEdit_field::default_error_box() const
 | 
			
		||||
{                 
 | 
			
		||||
  if (_warning.empty()) 
 | 
			
		||||
  {
 | 
			
		||||
    const TString& p = prompt();
 | 
			
		||||
    const char* p = prompt();
 | 
			
		||||
    if (isalnum(p[0]))
 | 
			
		||||
      error_box("Valore non valido per %s: '%s'", (const char*)p, (const char*)get());
 | 
			
		||||
      error_box("Valore non valido per %s: '%s'", p, (const char*)get());
 | 
			
		||||
    else  
 | 
			
		||||
      error_box("Valore non valido: '%s'", (const char*)get());
 | 
			
		||||
  }    
 | 
			
		||||
 | 
			
		||||
@ -620,7 +620,7 @@ void TSpreadsheet::update(
 | 
			
		||||
  if (row < 0)
 | 
			
		||||
  {                 
 | 
			
		||||
    xi_cell_request(_list);                 // Force updatde
 | 
			
		||||
    //    xi_scroll(_list, XI_SCROLL_FIRST);
 | 
			
		||||
    xi_scroll(_list, XI_SCROLL_FIRST);
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
    update_rec(row);  
 | 
			
		||||
 | 
			
		||||
@ -2,9 +2,11 @@
 | 
			
		||||
#define PAGSCA_NRATA      "NRATA"
 | 
			
		||||
#define PAGSCA_NRIGP      "NRIGP"
 | 
			
		||||
 | 
			
		||||
#define PAGSCA_TIPOPAG    "TIPOPAG"
 | 
			
		||||
#define PAGSCA_IMPORTO    "IMPORTO"
 | 
			
		||||
#define PAGSCA_IMPORTOVAL "IMPORTOVAL"
 | 
			
		||||
#define PAGSCA_RITENUTE   "RITENUTE"
 | 
			
		||||
#define PAGSCA_ACCSAL     "ACCSAL" 
 | 
			
		||||
#define PAGSCA_ABBUONI    "ABBUONI" 
 | 
			
		||||
#define PAGSCA_DIFFCAM    "DIFFCAM" 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2034,8 +2034,8 @@ default:
 | 
			
		||||
 | 
			
		||||
bool TViswin::call_editor ()
 | 
			
		||||
{
 | 
			
		||||
  TConfig cnf (CONFIG_GENERAL, "Link");
 | 
			
		||||
  const TFilename editor (cnf.get ("txt"));
 | 
			
		||||
  TConfig cnf (CONFIG_USER, "Link");
 | 
			
		||||
  const TFilename editor (cnf.get ("txt", NULL, -1, "notepad"));
 | 
			
		||||
 | 
			
		||||
  bool ok = FALSE;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user