2009-06-25 13:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* utils/hbformat/hbformac.c
  * examples/superlib/superlib.dif
  * examples/hbsqlit2/hbsqlit2.c
  * examples/uhttpd2/socket.c
    * 'const' cleanup.
This commit is contained in:
Viktor Szakats
2009-06-25 11:59:09 +00:00
parent 69205770d7
commit bd5452a48f
5 changed files with 28 additions and 20 deletions

View File

@@ -17,6 +17,13 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-06-25 13:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbformat/hbformac.c
* examples/superlib/superlib.dif
* examples/hbsqlit2/hbsqlit2.c
* examples/uhttpd2/socket.c
* 'const' cleanup.
2009-06-25 13:40 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbmzip/hbmzip.c
* contrib/hbblat/blatwrp.c

View File

@@ -88,7 +88,7 @@ HB_FUNC( SQLITE_EXECUTE )
/* Execute a query over the passed table */
HB_FUNC( SQLITE_QUERY )
{
char * szSQLcom = hb_parcx( 1 );
const char * szSQLcom = hb_parcx( 1 );
if( hb_sqlite2_db && sqlite_exec( hb_sqlite2_db, szSQLcom, NULL, NULL, &hb_sqlite2_szErrMsg ) == SQLITE_OK )
{
@@ -154,36 +154,36 @@ HB_FUNC( SQLITE_SYSCOLUMNS )
if( hb_sqlite2_db )
{
struct Table * pTable = ( struct Table * ) sqliteFindTable( hb_sqlite2_db, ( const char * ) hb_parcx( 1 ), NULL );
if( pTable )
{
/* dimension rows array:
1 is table name
2 is field number
3 to n cols data */
PHB_ITEM paRows = hb_itemArrayNew( 2 + pTable->nCol );
3 to n cols data */
PHB_ITEM paRows = hb_itemArrayNew( 2 + pTable->nCol );
int iField;
/* the Table structure itself */
hb_arraySetC( paRows, 1, pTable->zName ); /* save name of table */
hb_arraySetNL( paRows, 2, pTable->nCol ); /* save number of cols/fields */
for( iField = 0; iField < pTable->nCol; iField++ )
{
/* it's a multidimensional array */
/* four data columns name, default, type, isprimarykey per field */
PHB_ITEM paCols = hb_itemArrayNew( 4 );
hb_arraySetC( paCols, 1, pTable->aCol[ iField ].zName );
hb_arraySetC( paCols, 2, pTable->aCol[ iField ].zDflt );
hb_arraySetC( paCols, 3, pTable->aCol[ iField ].zType );
hb_arraySetL( paCols, 4, pTable->aCol[ iField ].isPrimKey );
/* put data onto subarray of records */
hb_itemArrayPut( paRows, 3 + iField, paCols );
hb_itemRelease( paCols );
}
hb_itemReturnRelease( paRows );
return;
}
@@ -198,14 +198,14 @@ HB_FUNC( SQLITE_FIELDS )
if( hb_sqlite2_db )
{
struct Table * pTable = ( struct Table * ) sqliteFindTable( hb_sqlite2_db, ( const char * ) hb_parcx( 1 ), NULL );
if( pTable )
{
int i;
/* the Table structure itself */
hb_reta( pTable->nCol );
for( i = 0; i < pTable->nCol; i++ )
hb_storc( pTable->aCol[ i ].zName, -1, 1 + i );

View File

@@ -21,7 +21,7 @@ diff -u superori/between.c superpat/between.c
result[knt] = NIL;
diff -u superori/mline.c superpat/mline.c
--- superori/mline.c 1993-09-14 14:17:34.000000000 +0200
+++ superpat/mline.c 2009-06-10 08:44:26.000000000 +0200
+++ superpat/mline.c 2009-06-25 13:53:22.000000000 +0200
@@ -1,19 +1,19 @@
-#include "extend.api"
-#include "vm.api"
@@ -65,7 +65,7 @@ diff -u superori/mline.c superpat/mline.c
- char *string = _parc(1);
- unsigned int strlen = _parclen(1);
- int linelen = _parni(2);
+ char *string = hb_parc(1);
+ const char *string = hb_parc(1);
+ unsigned int strlen = hb_parclen(1);
+ int linelen = hb_parni(2);
int gotten = 0;

View File

@@ -279,10 +279,10 @@ HB_FUNC( SOCKET_RECV )
HB_FUNC( SOCKET_SEND )
{
SOCKET socket = hb_parsocket( 1 );
char* pBuf = hb_parc( 2 );
ULONG ulLen = hb_parclen( 2 );
int iRet, iFlags = hb_parnidef( 3, 0 );
SOCKET socket = hb_parsocket( 1 );
const char* pBuf = hb_parc( 2 );
ULONG ulLen = hb_parclen( 2 );
int iRet, iFlags = hb_parnidef( 3, 0 );
hb_vmUnlock();
iRet = send( socket, pBuf, ulLen, iFlags );

View File

@@ -56,8 +56,9 @@
/* rf_FileRead( cText, @cEol ) */
HB_FUNC( RF_FILEREAD )
{
char * szText = hb_parcx( 1 );
char * ptr, * ptr1;
const char * szText = hb_parcx( 1 );
const char * ptr;
const char * ptr1;
unsigned long ul, ulLines = 0;
PHB_ITEM arr;