From 5e51a92367dfdd8de55bc682f6f3b45ec69f3dc2 Mon Sep 17 00:00:00 2001 From: Paul Tucker Date: Mon, 26 Jul 1999 09:35:08 +0000 Subject: [PATCH] *** empty log message *** --- harbour/ChangeLog | 7 ++- harbour/source/rtl/gtapi.c | 49 +++++++++++++------ harbour/source/rtl/natmsg/msgita.c | 78 +++++++++++++++--------------- harbour/source/rtl/natmsg/msgpor.c | 78 +++++++++++++++--------------- 4 files changed, 117 insertions(+), 95 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0a25344823..ba7f98f344 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,10 +1,15 @@ +19990726-05:20 EDT Paul Tucker + * source/rtl/gtapi.c + * much improved box drawing speed. + * source/rtl/msgita.c from Matteo Baccan + * source/rtl/msgpor.c from Felipe Coury + 19990725-09:50 CET Felipe Coury + tests/working/hscript/guestbk.ini; tests/working/hscript/guestbk.htm; tests/working/hscript/guestbk.prg; tests/working/hscript/guestbk.txt; tests/working/hscript/bldguest.bat; Harbour guestbook added - 19990725-09:45 CET Eddie Runia * source/runner/runner.c GPL text added diff --git a/harbour/source/rtl/gtapi.c b/harbour/source/rtl/gtapi.c index d102b01865..958bc07e4d 100644 --- a/harbour/source/rtl/gtapi.c +++ b/harbour/source/rtl/gtapi.c @@ -6,7 +6,8 @@ * GTAPI.C: Generic Terminal for Harbour * * Latest mods: - * 1.35 19990723 ptucker Modifed some if statments to test for != 0 + * 1.35 19990726 ptucker Much improved box drawing speed + * Modifed some if statments to test for != 0 * 1.34 19990721 ptucker Corrected _Color mask descriptions * 1.33 19990721 ptucker Improved Clipper color compatibility * 1.31 19990720 ptucker Implimented color selection in gtWrite and @@ -83,8 +84,11 @@ int hb_gtBox (USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, char USHORT uiCol = uiLeft; USHORT height, width, tmp; - if (uiTop > hb_gtMaxRow() || uiBottom > hb_gtMaxRow() || - uiLeft > hb_gtMaxCol() || uiRight > hb_gtMaxCol() || + USHORT uMRow = hb_gtMaxRow(); + USHORT uMCol = hb_gtMaxCol(); + + if (uiTop > uMRow || uiBottom > uMRow || + uiLeft > uMCol || uiRight > uMCol || uiTop > uiBottom || uiLeft > uiRight) { return 1; @@ -118,26 +122,35 @@ int hb_gtBox (USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, char if( height > 1 && width > 1 ) { - hb_gtWriteAt(uiRow, uiCol, pszBox + 0, sizeof(BYTE)); - hb_gtWriteAt(uiRow, uiRight, pszBox + 2, sizeof(BYTE)); - hb_gtWriteAt(uiBottom, uiCol, pszBox + 6, sizeof(BYTE)); + hb_gtWriteAt(uiRow, uiCol, pszBox + 0, sizeof(BYTE)); + hb_gtWriteAt(uiRow, uiRight, pszBox + 2, sizeof(BYTE)); + hb_gtWriteAt(uiBottom, uiCol, pszBox + 6, sizeof(BYTE)); hb_gtWriteAt(uiBottom, uiRight, pszBox + 4, sizeof(BYTE)); } - for (uiCol = (height > 1 ? uiLeft + 1 : uiLeft); uiCol < (height > 1 ? uiRight : uiRight + 1 ); uiCol++) + uiCol = (height > 1 ? uiLeft + 1 : uiLeft); +// for (uiCol = (height > 1 ? uiLeft + 1 : uiLeft); uiCol < (height > 1 ? uiRight : uiRight - 1 ); uiCol++) +// { +// hb_gtWriteAt(uiRow, uiCol, pszBox + 1, sizeof(BYTE)); +// if( height > 1 ) hb_gtWriteAt(uiBottom, uiCol, pszBox + 5, sizeof(BYTE)); + if( uiCol <= (height > 1 ? uiRight : uiRight -1 ) ) { - hb_gtWriteAt(uiRow, uiCol, pszBox + 1, sizeof(BYTE)); - if( height > 1 ) hb_gtWriteAt(uiBottom, uiCol, pszBox + 5, sizeof(BYTE)); + hb_gtRepChar( uiRow, uiCol, pszBox[1], uiRight - uiLeft + (height > 1 ? -1: 1 )); + if( height > 1 ) + hb_gtRepChar( uiBottom, uiCol, pszBox[5], uiRight - uiLeft + (height > 1 ? -1: 1) ); } +// } if( pszBox[8] && height > 2 && width > 2 ) { for (uiRow = uiTop + 1; uiRow < uiBottom; uiRow++) { uiCol = uiLeft; - hb_gtWriteAt(uiRow, uiCol++, pszBox + 7, sizeof(BYTE)); - while (uiCol < uiRight) hb_gtWriteAt(uiRow, uiCol++, pszBox + 8, sizeof(BYTE)); - hb_gtWriteAt(uiRow, uiCol, pszBox + 3, sizeof(BYTE)); + hb_gtWriteAt(uiRow, uiCol++, pszBox + 7, sizeof(BYTE)); +// while (uiCol < uiRight) +// hb_gtWriteAt(uiRow, uiCol++, pszBox + 8, sizeof(BYTE)); + hb_gtRepChar( uiRow, uiCol, pszBox[8], uiRight - uiLeft - 1 ); + hb_gtWriteAt( uiRow, uiRight, pszBox + 3, sizeof(BYTE)); } } else @@ -145,7 +158,8 @@ int hb_gtBox (USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, char for( uiRow = (width > 1 ? uiTop + 1 : uiTop); uiRow < (width > 1 ? uiBottom : uiBottom + 1); uiRow++ ) { hb_gtWriteAt(uiRow, uiLeft, pszBox + 7, sizeof(BYTE)); - if( width > 1 ) hb_gtWriteAt(uiRow, uiRight, pszBox + 3, sizeof(BYTE)); + if( width > 1 ) + hb_gtWriteAt(uiRow, uiRight, pszBox + 3, sizeof(BYTE)); } } @@ -461,9 +475,12 @@ int hb_gtPreExt(void) int hb_gtRectSize(USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, USHORT * uipBuffSize) { - if(uiTop > hb_gtMaxRow() || uiBottom > hb_gtMaxRow() || - uiLeft > hb_gtMaxCol() || uiRight > hb_gtMaxCol() || - uiTop > uiBottom || uiLeft > uiRight) + USHORT uMRow = hb_gtMaxRow(); + USHORT uMCol = hb_gtMaxCol(); + + if( uiTop > uMRow || uiBottom > uMRow || + uiLeft > uMCol || uiRight > uMCol || + uiTop > uiBottom || uiLeft > uiRight ) { return(1); } diff --git a/harbour/source/rtl/natmsg/msgita.c b/harbour/source/rtl/natmsg/msgita.c index 4106eda940..0dc0cfa5a3 100644 --- a/harbour/source/rtl/natmsg/msgita.c +++ b/harbour/source/rtl/natmsg/msgita.c @@ -20,56 +20,56 @@ char *hb_daysname[ 7 ] = { static char *genericErrors[] = { - "Unknown error", - "Argument error", + "Errore sconosciuto", + "Errore di parametri", "Bound error", - "String overflow", - "Numeric overflow", - "Divide by zero", - "Numeric error", - "Syntax error", - "Operation too complex", + "Overflow di stringa", + "Overflow numerico", + "Divisione per zero", + "Errore numerico", + "Errore si sintassi", + "Operazione troppo complessa", "", "", - "Memory low", - "Undefined function", - "No exported method", - "Variable does not exists", - "Alias does not exists", - "No exported variable", - "Incorrect alias name", - "Duplicated alias name", + "Memoria bassa", + "Funzione sconosciuta", + "Metodo non esportato", + "Variabile sconosciuta", + "Alias sconosciuto", + "Variabile non esportata", + "Alias scorretto", + "Alias duplicato", "", - "Create error", - "Open error", - "Close error", - "Read error", - "Write error", - "Print error", + "Errore di creazione", + "Errore d'apertura", + "Errore di chiusura", + "Errore di lettura", + "Errore di scrittura", + "Errore di stampa", "", "", "", "", - "Unsupported operation", - "Limit exeeded", - "Index corruption detected", - "Incorrect type of data", - "Data width too long", - "Workarea not in use", - "Workarea not indexed", - "Exclusive use required", - "Lock required", - "Write not allowed", - "Append lock failed", - "Lock failure", + "Operazione non supportata", + "Limite superato", + "Indice corrotto", + "Dato di tipo scorretto", + "Larghezza troppo grande di dato", + "Workarea non in uso", + "Workarea non indicizzata", + "E' richiesto l'uso esclusivo", + "Lock richiesto", + "Scrittura non permessa", + "Append con lock fallito", + "Lock fallito", "", "", "", - "Incorrect number of arguments", - "array access", - "array assign", - "not an array", - "conditional" + "Numero scorretto di argomenti", + "accesso ad array", + "assegnazione ad array", + "non e' un array", + "condizione" }; char *hb_ErrorNatDescription( ULONG ulGenError ) diff --git a/harbour/source/rtl/natmsg/msgpor.c b/harbour/source/rtl/natmsg/msgpor.c index 1d66abdeb6..e65a6f55e3 100644 --- a/harbour/source/rtl/natmsg/msgpor.c +++ b/harbour/source/rtl/natmsg/msgpor.c @@ -18,56 +18,56 @@ char *hb_daysname[ 7 ] = { static char *genericErrors[] = { - "Unknown error", - "Argument error", - "Bound error", - "String overflow", - "Numeric overflow", - "Divide by zero", - "Numeric error", - "Syntax error", - "Operation too complex", + "Erro desconhecido", + "Erro nos parâmetros", + "Erro de limite", + "Overflow de string", + "Overflow numérico", + "Divizao por zero", + "Erro numérico", + "Erro de sintaxe", + "Operação muito complexa", "", "", - "Memory low", - "Undefined function", - "No exported method", - "Variable does not exists", - "Alias does not exists", - "No exported variable", - "Incorrect alias name", - "Duplicated alias name", + "Memória insuficiente", + "Função indefinida", + "Método não exportado", + "Variável não existe", + "Alias não existe", + "Nenhuma variável exportada", + "Nome de alias incorreto", + "Nome de alias duplicado", "", - "Create error", - "Open error", - "Close error", - "Read error", - "Write error", - "Print error", + "Erro de criação", + "Erro de abertura", + "Erro ao fechar", + "Erro de leitura", + "Erro de escrita", + "Erro de impressão", "", "", "", "", - "Unsupported operation", - "Limit exeeded", - "Index corruption detected", - "Incorrect type of data", - "Data width too long", - "Workarea not in use", - "Workarea not indexed", - "Exclusive use required", - "Lock required", - "Write not allowed", - "Append lock failed", - "Lock failure", + "Operação não suportada", + "Limite excedido", + "Detectado índice corrompido", + "Tipo incorreto de dado", + "Tamanho do dato muito longo", + "Workarea não está em uso", + "Workarea não indexada", + "Uso exclusivo requerido", + "Travamento requerido", + "Escrita não permitida", + "Falha no travamento do Append", + "Falha no travamento", "", "", "", - "Incorrect number of arguments", - "array access", + "Numero de parâmetros incorretos", + "acesso de array", "array assign", - "not an array", - "conditional" + "não é um array", + "condicional" }; char *hb_ErrorNatDescription( ULONG ulGenError )