See changelog 2000-08-01 21:20 GMT -3
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
* or circual references (a[1]:=b; b[1]:=c; c[1]:=a) that cannot be
|
||||
* properly deallocated by simple reference counting.
|
||||
*
|
||||
* Since all variables in harbour are stored inside some available tables
|
||||
* Since all variables in harbour are stored inside some available tables
|
||||
* (the eval stack, memvars table and array of static variables) then checking
|
||||
* if the reference is still alive is quite easy and don't require any
|
||||
* special treatment during memory allocation. Additionaly the garbage
|
||||
@@ -28,7 +28,7 @@
|
||||
* references. These data are used to initialize class instance variables
|
||||
* and are stored in class shared variables.
|
||||
*
|
||||
* In special cases when the value of harbour variable is stored internally
|
||||
* In special cases when the value of harbour variable is stored internally
|
||||
* in some static area (at C or assembler level), for example SETKEY()
|
||||
* stores codeblocks that will be evaluated when a key is pressed,
|
||||
* the garbage collector will be not able to scan such values since it
|
||||
@@ -39,7 +39,8 @@
|
||||
* harbour item structure is used or hb_gcLock() function if direct memory
|
||||
* pointer is used. The memory block can be unlocked by hb_gcUnlockItem() or
|
||||
* hb_gcUnlock() functions.
|
||||
* Notice however that all variables passed to a low level function are
|
||||
*
|
||||
* Notice however that all variables passed to a low level function are
|
||||
* passed via the eval stack then they don't require locking during the
|
||||
* function call. The locking will be required if passed value is copied
|
||||
* into some static area to make it available for other low-level functions
|
||||
@@ -47,7 +48,7 @@
|
||||
* because the value is removed from the eval stack after function call and
|
||||
* it can be no longer referenced by other variables.
|
||||
*
|
||||
* However scanning of all variables can be a time consuming operation. It
|
||||
* However scanning of all variables can be a time consuming operation. It
|
||||
* requires that all allocated arrays have to be traversed through all its
|
||||
* elements to find more arrays. Also all codeblocks are scanned for detached
|
||||
* local variables they are reffering. For this reason looking for unreferenced
|
||||
@@ -121,15 +122,18 @@
|
||||
* $ONELINER$
|
||||
* Allocates memory that will be collected by the garbage collector.
|
||||
* $SYNTAX$
|
||||
* void *hb_gcAlloc( ULONG ulSize, HB_GARBAGE_FUNC_PTR pCleanupFunc );
|
||||
* #include <hbapi.h>
|
||||
* void *hb_gcAlloc( ULONG ulSize,
|
||||
* HB_GARBAGE_FUNC_PTR pCleanupFunc );
|
||||
* $ARGUMENTS$
|
||||
* ulSize = requested size of memory block
|
||||
* pCleanupFunc = pointer to HB_GARBAGE_FUNC function that will be called
|
||||
* directly before releasing the garbage memory block or NULL. This
|
||||
* function should release all other memory allocated and stored inside
|
||||
* the memory block. For example, it releases all items stored inside
|
||||
* the array. The functions receives a single parameter: the pointer
|
||||
* to memory allocated by hb_gcAlloc().
|
||||
* <ulSize> Requested size of memory block
|
||||
*
|
||||
* <pCleanupFunc> Pointer to HB_GARBAGE_FUNC function that will be called
|
||||
* directly before releasing the garbage memory block or NULL. This
|
||||
* function should release all other memory allocated and stored inside
|
||||
* the memory block. For example, it releases all items stored inside
|
||||
* the array. The functions receives a single parameter: the pointer
|
||||
* to memory allocated by hb_gcAlloc().
|
||||
* $RETURNS$
|
||||
* The pointer to allocated memory or it generates an internal
|
||||
* unrecoverable error.
|
||||
@@ -167,7 +171,7 @@
|
||||
* $SYNTAX$
|
||||
* void hb_gcFree( void *pMemoryPtr );
|
||||
* $ARGUMENTS$
|
||||
* pMemoryPtr = the pointer to memory for release. This memory
|
||||
* <pMemoryPtr> The pointer to memory for release. This memory
|
||||
* pointer have to be allocated with hb_gcAlloc() function.
|
||||
* $RETURNS$
|
||||
* Nothing.
|
||||
|
||||
190
harbour/doc/en/idle.txt
Normal file
190
harbour/doc/en/idle.txt
Normal file
@@ -0,0 +1,190 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* The idle states
|
||||
* $CATEGORY$
|
||||
* Document
|
||||
* $ONELINER$
|
||||
* Read me file for Idle States
|
||||
* $DESCRIPTION$
|
||||
* The idle state is the state of the harbour virtual machine when it
|
||||
* waits for the user input from the keyboard or the mouse. The idle
|
||||
* state is entered during INKEY() calls currently. All applications
|
||||
* that don't use INKEY() function call can signal the idle states with
|
||||
* the call of HB_IDLESTATE() function (or hb_idleState() on C level).
|
||||
*
|
||||
* During idle states the virtual machine calls the garbage collector and
|
||||
* it can call user defined actions (background tasks). It also releases
|
||||
* the CPU time slices for some poor platforms that are not smart enough
|
||||
* (Windows NT).
|
||||
*
|
||||
* For defining the background tasks see the HB_IDLEADD() and HB_IDLEDEL()
|
||||
* functions.
|
||||
*
|
||||
* For direct call for background actions see HB_IDLESTATE() function.
|
||||
*
|
||||
* For signaling the idle state from C code see the hb_idleState()
|
||||
* API function.
|
||||
* $SEEALSO$
|
||||
* HB_IDLEADD(),HB_IDLEDEL()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* HB_IDLEADD()
|
||||
* $CATEGORY$
|
||||
* The idle states
|
||||
* $ONELINER$
|
||||
* Adds the background task.
|
||||
* $SYNTAX$
|
||||
* HB_IDLEADD( <cbAction> ) --> nHandle
|
||||
* $ARGUMENTS$
|
||||
* <cbAction> is an codeblock that will be executed during idle states.
|
||||
* There is no arguments passed to this codeblock during evaluation.
|
||||
* $RETURNS$
|
||||
* <nHandle> The handle (an integer value) that identifies the task. This
|
||||
* handle can be used during deleting the task.
|
||||
* $DESCRIPTION$
|
||||
* HB_IDLEADD() adds a passed codeblock to the list of background
|
||||
* tasks that will be evaluated during the idle states. There is no
|
||||
* limit for the number of tasks.
|
||||
* $EXAMPLES$
|
||||
* nTask := HB_IDLEADD( {|| SayTime()} )
|
||||
* $STATUS$
|
||||
* Harbour
|
||||
* $COMPLIANCE$
|
||||
* Harbour extension simmilar to FT_ONIDLE() function available
|
||||
* in NanForum library.
|
||||
* $PLATFORMS$
|
||||
* All
|
||||
* $FILES$
|
||||
* source/rtl/idle.c
|
||||
* $SEEALSO$
|
||||
* HB_IDLEDEL(),HB_IDLESTATE()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* HB_IDLEDEL()
|
||||
* $CATEGORY$
|
||||
* The idle states
|
||||
* $ONELINER$
|
||||
* Removes the background task from the list of tasks.
|
||||
* $SYNTAX$
|
||||
* HB_IDLEDEL( <nHandle> ) --> xAction
|
||||
* $ARGUMENTS$
|
||||
* <nHandle> is the identifier of the task returned by the
|
||||
* HB_IDLEADD() function.
|
||||
* $RETURNS$
|
||||
* <xAction> NIL if invalid handle is passed or a codeblock that was
|
||||
* passed to HB_IDLEADD() function
|
||||
* $DESCRIPTION$
|
||||
* HB_IDLEDEL() removes the action associated with passed identifier
|
||||
* from the list of background tasks. The identifer should be the
|
||||
* value returned by the previous call of HB_IDLEADD() function.
|
||||
*
|
||||
* If specified task is defined then the codeblock is returned
|
||||
* otherwise the NIL value is returned.
|
||||
* $EXAMPLES$
|
||||
* nTask := HB_IDLEADD( {|| SayTime()} )
|
||||
* INKEY(10)
|
||||
* cbAction := HB_IDLEDEL( nTask )
|
||||
* $STATUS$
|
||||
* Harbour
|
||||
* $COMPLIANCE$
|
||||
* Harbour extension
|
||||
* $PLATFORMS$
|
||||
* All
|
||||
* $FILES$
|
||||
* source/rtl/idle.c
|
||||
* $SEEALSO$
|
||||
* HB_IDLEADD(),HB_IDLESTATE()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* HB_IDLESTATE()
|
||||
* $CATEGORY$
|
||||
* The idle states
|
||||
* $ONELINER$
|
||||
* Evaluates a single background task and calls the garbage collector.
|
||||
* $SYNTAX$
|
||||
* HB_IDLESTATE()
|
||||
* $ARGUMENTS$
|
||||
* None
|
||||
* $RETURNS$
|
||||
* NIL
|
||||
* $DESCRIPTION$
|
||||
* HB_IDLESTATE() requests the garbage collecting and executes a
|
||||
* single background task defined by the codeblock code passed with
|
||||
* HB_IDLEADD() function. Every call for this function evaluates
|
||||
* different task in the order of tasks creation. There is no
|
||||
* arguments passed during a codeblock evaluation.
|
||||
*
|
||||
* This function can be safely called even if there are no background
|
||||
* tasks defined.
|
||||
* $EXAMPLES$
|
||||
* nTask1 := HB_IDLEADD( {|| SayTime()} )
|
||||
* nTask2 := HB_IDLEADD( {|| SaveScreen()} )
|
||||
* DO WHILE( !bFinished )
|
||||
* bFinished :=DOSomethingVeryImportant()
|
||||
* HB_IdleState()
|
||||
* ENDDO
|
||||
* cbAction := HB_IDLEDEL( nTask1 )
|
||||
* HB_IDLEDEL( nTask2 )
|
||||
* $STATUS$
|
||||
* Harbour
|
||||
* $COMPLIANCE$
|
||||
* Harbour extension similar to FT_IAMIDLE() function available
|
||||
* in NanForum library.
|
||||
* $PLATFORMS$
|
||||
* All
|
||||
* $FILES$
|
||||
* source/rtl/idle.c
|
||||
* $SEEALSO$
|
||||
* HB_IDLEADD(),HB_IDLEDEL()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
* $FUNCNAME$
|
||||
* hb_idleState()
|
||||
* $CATEGORY$
|
||||
* The idle states
|
||||
* $ONELINER$
|
||||
* Evaluates a single background task and calls the garbage collector.
|
||||
* $SYNTAX$
|
||||
* void hb_idleState( void );
|
||||
* $ARGUMENTS$
|
||||
* None
|
||||
* $RETURNS$
|
||||
* Nothing
|
||||
* $DESCRIPTION$
|
||||
* hb_idleState() requests the garbage collecting and executes a
|
||||
* single background task defined by the codeblock code passed with
|
||||
* HB_IDLEADD() function. It also releases the CPU time slices for
|
||||
* platforms that require it.
|
||||
*
|
||||
* Every call for this function evaluates different task in the
|
||||
* order of tasks creation. There is no arguments passed during
|
||||
* a codeblock evaluation.
|
||||
*
|
||||
* This function can be safely called even if there are no background
|
||||
* tasks defined.
|
||||
*
|
||||
* This function is automatically called from INKEY() function.
|
||||
* $STATUS$
|
||||
* Harbour
|
||||
* $PLATFORMS$
|
||||
* All
|
||||
* $FILES$
|
||||
* source/rtl/idle.c
|
||||
* $SEEALSO$
|
||||
* HB_IDLEADD(),HB_IDLEDEL(),HB_IDLESTATE()
|
||||
* $END$
|
||||
*/
|
||||
@@ -44,7 +44,11 @@
|
||||
* HUCWI Hungarian CWI-2
|
||||
* HUWIN Hungarian Windows-1
|
||||
* IS85 Icelandic 850
|
||||
* IT Italian 437
|
||||
* IT Italian 437
|
||||
* KR Korean 949
|
||||
* PL852 Polish 852
|
||||
* PLISO Polish ISO-8859-1
|
||||
* PLMAZ Polish Mozowia
|
||||
* PT Portuguese 850
|
||||
* RO Romanian 852
|
||||
* SRISO Serbian ISO-8859-2
|
||||
|
||||
@@ -37,6 +37,6 @@
|
||||
* their web site at http://www.gnu.org/). </par>
|
||||
*
|
||||
* $SEEALSO$
|
||||
* OverView
|
||||
* Overview
|
||||
* $END$
|
||||
*/
|
||||
|
||||
@@ -873,3 +873,36 @@
|
||||
* ALIAS(),SELECT()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
* $COMMANDNAME$
|
||||
* PACK
|
||||
* $CATEGORY$
|
||||
* Command
|
||||
* $ONELINER$
|
||||
* Remove records marked for deletion from a database
|
||||
* $SYNTAX$
|
||||
* PACK
|
||||
* $DESCRIPTION$
|
||||
* This command removes records that were marked for deletion from the
|
||||
* currently selected database.This command does not pack the contents
|
||||
* of a memo field;those files must be packed via low-level fuctions.
|
||||
*
|
||||
* All open index files will be automatically reindexed once PACK command
|
||||
* has completed its operation.On completion,the record pointer is placed
|
||||
* on the first record in the database.
|
||||
* $EXAMPLES$
|
||||
* USE Tests NEW index Tests
|
||||
* DBGOTO(10)
|
||||
* DELETE NEXT 10
|
||||
* PACK
|
||||
* USE
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
* This command is CA Clipper compliant
|
||||
* $SEEALSO$
|
||||
* DBEVAL(),DELETE,DELETED(),ZAP,RECALL
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
* Copyright 1999 David G. Holm <dholm@jsd-llc.com>
|
||||
* Documentation for: DEVOUTPICT()
|
||||
*
|
||||
* Copyright 2000 Luiz Rafael Culik <culik@sl.conex.net>
|
||||
* Documentation for: EJECT
|
||||
*
|
||||
* See doc/license.txt for licensing terms.
|
||||
*
|
||||
*/
|
||||
@@ -672,3 +675,53 @@
|
||||
* ?,??,DEVOUT(),DEVOUTPICT(),DISPOUT(),DISPOUTAT(),OUTSTD(),QOUT(),QQOUT(),STR()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
* $COMMANDNAME$
|
||||
* EJECT
|
||||
* $CATEGORY$
|
||||
* Command
|
||||
* $ONELINER$
|
||||
* Issue an command to advance the printer to the top of the form
|
||||
* $SYNTAX$
|
||||
* EJECT
|
||||
* $ARGUMENTS$
|
||||
* None
|
||||
* $DESCRIPTION$
|
||||
* This command issue an form-feed command to the printer.If the printer
|
||||
* is not properly hooked up to the computer,an error will not be
|
||||
* generated and the command will be ignored.
|
||||
*
|
||||
* Once completed,the values of PROW() and PCOL(),the row and column
|
||||
* indicators to the printer,will be set to 0.Their values,however,may
|
||||
* be manipulated before or after ussuing an EJECT by using the DEVPOS()
|
||||
* function.
|
||||
*
|
||||
* On compile time this command is translated into __EJECT() function.
|
||||
* $EXAMPLES$
|
||||
* Use Clientes New
|
||||
* Set Device to Printer
|
||||
* CurPos:=0
|
||||
* While !Eof()
|
||||
* ? Clientes->nome,Clientes->endereco
|
||||
* Curpos++
|
||||
* if Curpos >59
|
||||
* Curpos:=0
|
||||
* Eject
|
||||
* Endif
|
||||
* Enddo
|
||||
* Set Device to Screen
|
||||
* Use
|
||||
* $TESTS$
|
||||
* See examples
|
||||
* $STATUS$
|
||||
* R
|
||||
* $COMPLIANCE$
|
||||
* This command is Ca-Clipper compliant
|
||||
* $PLATFORMS$
|
||||
* All
|
||||
* $SEEALSO$
|
||||
* DEVPOS(),SET PRINTER,PROW(),PCOL()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user