From 7df0d4b1533809ffd4cf524139aaf1297154528a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 14 Jul 2010 12:57:05 +0000 Subject: [PATCH] 2010-07-14 14:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbnf/acctyear.prg * contrib/hbnf/byteneg.prg * contrib/hbnf/isshare.prg * contrib/hbnf/sinkey.prg * contrib/hbnf/kspeed.c * contrib/hbnf/prtscr.c * contrib/hbnf/descendn.c * contrib/hbnf/peek.c * contrib/hbnf/scancode.prg * contrib/hbnf/vidmode.prg * contrib/hbnf/nwsem.prg * contrib/hbnf/acctadj.prg * contrib/hbnf/week.prg * contrib/hbnf/vidcur.prg * contrib/hbnf/iamidle.c * contrib/hbnf/miltime.prg * contrib/hbnf/prtesc.prg * contrib/hbnf/acctmnth.prg * contrib/hbnf/proper.c * contrib/hbnf/savearr.prg * contrib/hbnf/madd.prg * contrib/hbnf/rand1.prg * contrib/hbnf/dispmsg.prg * contrib/hbnf/fttext.c * contrib/hbnf/mouse1.prg * contrib/hbnf/settime.prg * contrib/hbnf/page.prg * contrib/hbnf/restsets.prg * contrib/hbnf/byt2bit.prg * contrib/hbnf/setkeys.c * contrib/hbnf/month.prg * contrib/hbnf/byt2hex.prg * contrib/hbnf/findith.prg * contrib/hbnf/at2.prg * contrib/hbnf/acctweek.prg * contrib/hbnf/dispc.c * contrib/hbnf/gcd.prg * contrib/hbnf/pegs.prg * contrib/hbnf/min2dhm.prg * contrib/hbnf/acctqtr.prg * contrib/hbnf/numlock.c * contrib/hbnf/dosver.prg * contrib/hbnf/nooccur.prg * contrib/hbnf/dayofyr.prg * contrib/hbnf/metaph.prg * contrib/hbnf/ontick.c * contrib/hbnf/menu1.prg * contrib/hbnf/byteand.prg * contrib/hbnf/sqzn.prg * contrib/hbnf/bytexor.prg * contrib/hbnf/ftidle.c * contrib/hbnf/workdays.prg * contrib/hbnf/byteor.prg * contrib/hbnf/asum.prg * contrib/hbnf/shift.c * contrib/hbnf/sleep.prg * contrib/hbnf/wda.prg * contrib/hbnf/woy.prg * contrib/hbnf/aavg.prg * contrib/hbnf/any2any.prg * contrib/hbnf/origin.c * contrib/hbnf/mouse.c * contrib/hbnf/chdir.c * contrib/hbnf/adessort.prg * contrib/hbnf/setdate.prg * contrib/hbnf/netpv.prg * contrib/hbnf/amedian.prg * contrib/hbnf/blink.prg * contrib/hbnf/stod.c * contrib/hbnf/vertmenu.prg * contrib/hbnf/linked.prg * contrib/hbnf/qtr.prg * contrib/hbnf/aredit.prg * contrib/hbnf/n2color.c * contrib/hbnf/alt.c * contrib/hbnf/xbox.prg * contrib/hbnf/ftround.prg * contrib/hbnf/hex2dec.prg * contrib/hbnf/getver.c * contrib/hbnf/nwuid.prg * contrib/hbnf/dectobin.prg * contrib/hbnf/aemaxlen.prg * contrib/hbnf/bitset.prg * contrib/hbnf/nwlstat.prg * contrib/hbnf/invclr.prg * contrib/hbnf/ctrl.c * contrib/hbnf/popadder.prg * contrib/hbnf/lastday.prg * contrib/hbnf/tempfile.prg * contrib/hbnf/diskfunc.prg * contrib/hbnf/scregion.prg * contrib/hbnf/d2e.prg * contrib/hbnf/mouse2.prg * contrib/hbnf/ftisprn.c * contrib/hbnf/pickday.prg * contrib/hbnf/firstday.prg * contrib/hbnf/daytobow.prg * contrib/hbnf/anomatch.prg * contrib/hbnf/menutonf.prg * contrib/hbnf/ftattr.c * contrib/hbnf/pvid.prg * contrib/hbnf/isbiton.prg * contrib/hbnf/color2n.c * contrib/hbnf/isbit.prg * contrib/hbnf/datecnfg.prg * contrib/hbnf/cntryset.prg * contrib/hbnf/putkey.c * contrib/hbnf/getenvrn.c * contrib/hbnf/easter.prg * contrib/hbnf/bytenot.prg * contrib/hbnf/ntow.prg * contrib/hbnf/aeminlen.prg * contrib/hbnf/poke.c * contrib/hbnf/floptst.prg * contrib/hbnf/pchr.prg * contrib/hbnf/savesets.prg * contrib/hbnf/tbwhile.prg * contrib/hbnf/mkdir.c * contrib/hbnf/year.prg * contrib/hbnf/caplock.c * contrib/hbnf/rmdir.c * contrib/hbnf/calendar.prg * contrib/hbnf/e2d.prg * contrib/hbnf/elapsed.prg * contrib/hbnf/sysmem.prg * contrib/hbnf/bitclr.prg * contrib/hbnf/eltime.prg * contrib/hbnf/aading.prg * contrib/hbnf/dfile.prg * contrib/hbnf/elapmil.prg * contrib/hbnf/setlastk.c * contrib/hbnf/pending.prg * contrib/hbnf/clrsel.prg - Stripped NFDOC/HBDOC from source code. --- harbour/ChangeLog | 138 ++++- harbour/contrib/hbnf/aading.prg | 50 -- harbour/contrib/hbnf/aavg.prg | 38 -- harbour/contrib/hbnf/acctadj.prg | 58 -- harbour/contrib/hbnf/acctmnth.prg | 54 -- harbour/contrib/hbnf/acctqtr.prg | 54 -- harbour/contrib/hbnf/acctweek.prg | 54 -- harbour/contrib/hbnf/acctyear.prg | 45 -- harbour/contrib/hbnf/adessort.prg | 35 -- harbour/contrib/hbnf/aemaxlen.prg | 47 -- harbour/contrib/hbnf/aeminlen.prg | 44 -- harbour/contrib/hbnf/alt.c | 28 - harbour/contrib/hbnf/amedian.prg | 42 -- harbour/contrib/hbnf/anomatch.prg | 44 -- harbour/contrib/hbnf/any2any.prg | 41 -- harbour/contrib/hbnf/aredit.prg | 75 --- harbour/contrib/hbnf/asum.prg | 36 -- harbour/contrib/hbnf/at2.prg | 81 --- harbour/contrib/hbnf/bitclr.prg | 46 -- harbour/contrib/hbnf/bitset.prg | 48 -- harbour/contrib/hbnf/blink.prg | 29 - harbour/contrib/hbnf/byt2bit.prg | 43 -- harbour/contrib/hbnf/byt2hex.prg | 40 -- harbour/contrib/hbnf/byteand.prg | 41 -- harbour/contrib/hbnf/byteneg.prg | 39 -- harbour/contrib/hbnf/bytenot.prg | 39 -- harbour/contrib/hbnf/byteor.prg | 39 -- harbour/contrib/hbnf/bytexor.prg | 39 -- harbour/contrib/hbnf/calendar.prg | 76 --- harbour/contrib/hbnf/caplock.c | 30 -- harbour/contrib/hbnf/chdir.c | 31 -- harbour/contrib/hbnf/clrsel.prg | 102 ---- harbour/contrib/hbnf/cntryset.prg | 32 -- harbour/contrib/hbnf/color2n.c | 29 - harbour/contrib/hbnf/ctrl.c | 28 - harbour/contrib/hbnf/d2e.prg | 36 -- harbour/contrib/hbnf/datecnfg.prg | 77 --- harbour/contrib/hbnf/dayofyr.prg | 60 --- harbour/contrib/hbnf/daytobow.prg | 37 -- harbour/contrib/hbnf/dectobin.prg | 22 - harbour/contrib/hbnf/descendn.c | 24 - harbour/contrib/hbnf/dfile.prg | 96 ---- harbour/contrib/hbnf/diskfunc.prg | 52 -- harbour/contrib/hbnf/dispc.c | 113 ---- harbour/contrib/hbnf/dispmsg.prg | 102 ---- harbour/contrib/hbnf/dosver.prg | 36 -- harbour/contrib/hbnf/e2d.prg | 31 -- harbour/contrib/hbnf/easter.prg | 28 - harbour/contrib/hbnf/elapmil.prg | 27 - harbour/contrib/hbnf/elapsed.prg | 43 -- harbour/contrib/hbnf/eltime.prg | 27 - harbour/contrib/hbnf/findith.prg | 37 -- harbour/contrib/hbnf/firstday.prg | 29 - harbour/contrib/hbnf/floptst.prg | 54 -- harbour/contrib/hbnf/ftattr.c | 72 --- harbour/contrib/hbnf/ftidle.c | 41 -- harbour/contrib/hbnf/ftisprn.c | 63 --- harbour/contrib/hbnf/ftround.prg | 67 --- harbour/contrib/hbnf/fttext.c | 827 ----------------------------- harbour/contrib/hbnf/gcd.prg | 29 - harbour/contrib/hbnf/getenvrn.c | 64 --- harbour/contrib/hbnf/getver.c | 1 - harbour/contrib/hbnf/hex2dec.prg | 25 - harbour/contrib/hbnf/iamidle.c | 38 -- harbour/contrib/hbnf/invclr.prg | 24 - harbour/contrib/hbnf/isbit.prg | 46 -- harbour/contrib/hbnf/isbiton.prg | 33 -- harbour/contrib/hbnf/isshare.prg | 31 -- harbour/contrib/hbnf/kspeed.c | 65 --- harbour/contrib/hbnf/lastday.prg | 29 - harbour/contrib/hbnf/linked.prg | 49 -- harbour/contrib/hbnf/madd.prg | 47 -- harbour/contrib/hbnf/menu1.prg | 178 ------- harbour/contrib/hbnf/menutonf.prg | 196 ------- harbour/contrib/hbnf/metaph.prg | 34 -- harbour/contrib/hbnf/miltime.prg | 141 ----- harbour/contrib/hbnf/min2dhm.prg | 25 - harbour/contrib/hbnf/mkdir.c | 32 -- harbour/contrib/hbnf/month.prg | 58 -- harbour/contrib/hbnf/mouse.c | 2 - harbour/contrib/hbnf/mouse1.prg | 855 ------------------------------ harbour/contrib/hbnf/mouse2.prg | 556 ------------------- harbour/contrib/hbnf/n2color.c | 25 - harbour/contrib/hbnf/netpv.prg | 45 -- harbour/contrib/hbnf/nooccur.prg | 36 -- harbour/contrib/hbnf/ntow.prg | 56 -- harbour/contrib/hbnf/numlock.c | 44 -- harbour/contrib/hbnf/nwlstat.prg | 32 -- harbour/contrib/hbnf/nwsem.prg | 370 ------------- harbour/contrib/hbnf/nwuid.prg | 45 -- harbour/contrib/hbnf/ontick.c | 48 -- harbour/contrib/hbnf/origin.c | 36 -- harbour/contrib/hbnf/page.prg | 60 --- harbour/contrib/hbnf/pchr.prg | 91 ---- harbour/contrib/hbnf/peek.c | 31 -- harbour/contrib/hbnf/pegs.prg | 25 - harbour/contrib/hbnf/pending.prg | 51 -- harbour/contrib/hbnf/pickday.prg | 21 - harbour/contrib/hbnf/poke.c | 34 -- harbour/contrib/hbnf/popadder.prg | 211 -------- harbour/contrib/hbnf/proper.c | 38 -- harbour/contrib/hbnf/prtesc.prg | 31 -- harbour/contrib/hbnf/prtscr.c | 29 - harbour/contrib/hbnf/putkey.c | 45 -- harbour/contrib/hbnf/pvid.prg | 59 --- harbour/contrib/hbnf/qtr.prg | 58 -- harbour/contrib/hbnf/rand1.prg | 31 -- harbour/contrib/hbnf/restsets.prg | 29 - harbour/contrib/hbnf/rmdir.c | 32 -- harbour/contrib/hbnf/savearr.prg | 109 ---- harbour/contrib/hbnf/savesets.prg | 29 - harbour/contrib/hbnf/scancode.prg | 48 -- harbour/contrib/hbnf/scregion.prg | 160 ------ harbour/contrib/hbnf/setdate.prg | 44 -- harbour/contrib/hbnf/setkeys.c | 37 -- harbour/contrib/hbnf/setlastk.c | 37 -- harbour/contrib/hbnf/settime.prg | 41 -- harbour/contrib/hbnf/shift.c | 28 - harbour/contrib/hbnf/sinkey.prg | 35 -- harbour/contrib/hbnf/sleep.prg | 48 -- harbour/contrib/hbnf/sqzn.prg | 77 --- harbour/contrib/hbnf/stod.c | 24 - harbour/contrib/hbnf/sysmem.prg | 27 - harbour/contrib/hbnf/tbwhile.prg | 92 ---- harbour/contrib/hbnf/tempfile.prg | 47 -- harbour/contrib/hbnf/vertmenu.prg | 45 -- harbour/contrib/hbnf/vidcur.prg | 82 --- harbour/contrib/hbnf/vidmode.prg | 66 --- harbour/contrib/hbnf/wda.prg | 45 -- harbour/contrib/hbnf/week.prg | 58 -- harbour/contrib/hbnf/workdays.prg | 31 -- harbour/contrib/hbnf/woy.prg | 92 ---- harbour/contrib/hbnf/xbox.prg | 85 --- harbour/contrib/hbnf/year.prg | 49 -- 134 files changed, 137 insertions(+), 9166 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a3818e7c32..d896214577 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,142 @@ The license applies to all entries newer than 2009-04-28. */ +2010-07-14 14:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbnf/acctyear.prg + * contrib/hbnf/byteneg.prg + * contrib/hbnf/isshare.prg + * contrib/hbnf/sinkey.prg + * contrib/hbnf/kspeed.c + * contrib/hbnf/prtscr.c + * contrib/hbnf/descendn.c + * contrib/hbnf/peek.c + * contrib/hbnf/scancode.prg + * contrib/hbnf/vidmode.prg + * contrib/hbnf/nwsem.prg + * contrib/hbnf/acctadj.prg + * contrib/hbnf/week.prg + * contrib/hbnf/vidcur.prg + * contrib/hbnf/iamidle.c + * contrib/hbnf/miltime.prg + * contrib/hbnf/prtesc.prg + * contrib/hbnf/acctmnth.prg + * contrib/hbnf/proper.c + * contrib/hbnf/savearr.prg + * contrib/hbnf/madd.prg + * contrib/hbnf/rand1.prg + * contrib/hbnf/dispmsg.prg + * contrib/hbnf/fttext.c + * contrib/hbnf/mouse1.prg + * contrib/hbnf/settime.prg + * contrib/hbnf/page.prg + * contrib/hbnf/restsets.prg + * contrib/hbnf/byt2bit.prg + * contrib/hbnf/setkeys.c + * contrib/hbnf/month.prg + * contrib/hbnf/byt2hex.prg + * contrib/hbnf/findith.prg + * contrib/hbnf/at2.prg + * contrib/hbnf/acctweek.prg + * contrib/hbnf/dispc.c + * contrib/hbnf/gcd.prg + * contrib/hbnf/pegs.prg + * contrib/hbnf/min2dhm.prg + * contrib/hbnf/acctqtr.prg + * contrib/hbnf/numlock.c + * contrib/hbnf/dosver.prg + * contrib/hbnf/nooccur.prg + * contrib/hbnf/dayofyr.prg + * contrib/hbnf/metaph.prg + * contrib/hbnf/ontick.c + * contrib/hbnf/menu1.prg + * contrib/hbnf/byteand.prg + * contrib/hbnf/sqzn.prg + * contrib/hbnf/bytexor.prg + * contrib/hbnf/ftidle.c + * contrib/hbnf/workdays.prg + * contrib/hbnf/byteor.prg + * contrib/hbnf/asum.prg + * contrib/hbnf/shift.c + * contrib/hbnf/sleep.prg + * contrib/hbnf/wda.prg + * contrib/hbnf/woy.prg + * contrib/hbnf/aavg.prg + * contrib/hbnf/any2any.prg + * contrib/hbnf/origin.c + * contrib/hbnf/mouse.c + * contrib/hbnf/chdir.c + * contrib/hbnf/adessort.prg + * contrib/hbnf/setdate.prg + * contrib/hbnf/netpv.prg + * contrib/hbnf/amedian.prg + * contrib/hbnf/blink.prg + * contrib/hbnf/stod.c + * contrib/hbnf/vertmenu.prg + * contrib/hbnf/linked.prg + * contrib/hbnf/qtr.prg + * contrib/hbnf/aredit.prg + * contrib/hbnf/n2color.c + * contrib/hbnf/alt.c + * contrib/hbnf/xbox.prg + * contrib/hbnf/ftround.prg + * contrib/hbnf/hex2dec.prg + * contrib/hbnf/getver.c + * contrib/hbnf/nwuid.prg + * contrib/hbnf/dectobin.prg + * contrib/hbnf/aemaxlen.prg + * contrib/hbnf/bitset.prg + * contrib/hbnf/nwlstat.prg + * contrib/hbnf/invclr.prg + * contrib/hbnf/ctrl.c + * contrib/hbnf/popadder.prg + * contrib/hbnf/lastday.prg + * contrib/hbnf/tempfile.prg + * contrib/hbnf/diskfunc.prg + * contrib/hbnf/scregion.prg + * contrib/hbnf/d2e.prg + * contrib/hbnf/mouse2.prg + * contrib/hbnf/ftisprn.c + * contrib/hbnf/pickday.prg + * contrib/hbnf/firstday.prg + * contrib/hbnf/daytobow.prg + * contrib/hbnf/anomatch.prg + * contrib/hbnf/menutonf.prg + * contrib/hbnf/ftattr.c + * contrib/hbnf/pvid.prg + * contrib/hbnf/isbiton.prg + * contrib/hbnf/color2n.c + * contrib/hbnf/isbit.prg + * contrib/hbnf/datecnfg.prg + * contrib/hbnf/cntryset.prg + * contrib/hbnf/putkey.c + * contrib/hbnf/getenvrn.c + * contrib/hbnf/easter.prg + * contrib/hbnf/bytenot.prg + * contrib/hbnf/ntow.prg + * contrib/hbnf/aeminlen.prg + * contrib/hbnf/poke.c + * contrib/hbnf/floptst.prg + * contrib/hbnf/pchr.prg + * contrib/hbnf/savesets.prg + * contrib/hbnf/tbwhile.prg + * contrib/hbnf/mkdir.c + * contrib/hbnf/year.prg + * contrib/hbnf/caplock.c + * contrib/hbnf/rmdir.c + * contrib/hbnf/calendar.prg + * contrib/hbnf/e2d.prg + * contrib/hbnf/elapsed.prg + * contrib/hbnf/sysmem.prg + * contrib/hbnf/bitclr.prg + * contrib/hbnf/eltime.prg + * contrib/hbnf/aading.prg + * contrib/hbnf/dfile.prg + * contrib/hbnf/elapmil.prg + * contrib/hbnf/setlastk.c + * contrib/hbnf/pending.prg + * contrib/hbnf/clrsel.prg + - Stripped NFDOC/HBDOC from source code. + 2010-07-14 14:41 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbextern.ch * src/rtl/hbdoc.prg @@ -310,7 +446,7 @@ * contrib/hbnf/rmdir.c * contrib/hbnf/setlastk.c ! Fixed NFDOC formatting. - ; TODO: Strip docs. + ; TODO: Strip docs. [DONE] 2010-07-14 12:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbct/screen2.c diff --git a/harbour/contrib/hbnf/aading.prg b/harbour/contrib/hbnf/aading.prg index 5fd5119fce..9b4f4e404c 100644 --- a/harbour/contrib/hbnf/aading.prg +++ b/harbour/contrib/hbnf/aading.prg @@ -22,54 +22,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_AADDITION() - * $CATEGORY$ - * Array - * $ONELINER$ - * Add elements unique of source array to target array - * $SYNTAX$ - * FT_AADDITION( , [, [, ] ] ) ; - * -> aNewArray - * $ARGUMENTS$ - * is the primary array. - * - * is the secondary array. - * - * is a logical value denoting whether leading or - * trailing spaces should be included in the - * comparison. If .T., then ignores spaces in - * comparison, defaults to .T., .F. includes spaces. - * - * is a logical value denoting case sensitivity. - * If .T., then comparison is sensitive to case, - * defaults to .T., .F. ignores case. - * $RETURNS$ - * An array of the union of aList1 and aList2. - * $DESCRIPTION$ - * This function will add the elements unique of aList2 with aList1. - * It returns a new array including all the elements of aList1 - * plus the unique elements of aList2. - * $EXAMPLES$ - * aList1 := {"apple", "orange", "pear"} - * aList2 := {"apple ", "banana", "PEAR"} - * - * FT_AADDITION( aList1, aList2 ) - * // ignores spaces, sensitive to case - * // returns {"apple","orange","pear","banana","PEAR"} - * - * FT_AADDITION( aList1, aList2, , .F. ) - * // ignores spaces, not sensitive to case - * // returns {"apple","orange","pear","banana"} - * - * FT_AADDITION( aList1, aList2, .F., .F. ) - * // sensitive to spaces, not sensitive to case - * // returns {"apple","orange","pear","apple ","banana"} - * $END$ - */ - #ifdef FT_TEST FUNCTION MAIN() @@ -109,7 +61,6 @@ FUNCTION MAIN() #endif - FUNCTION FT_AADDITION( aList1, aList2, lTrimmer, lCaseSens ) LOCAL nElement, nPos, bScanCode @@ -148,7 +99,6 @@ FUNCTION FT_AADDITION( aList1, aList2, lTrimmer, lCaseSens ) ENDIF ENDIF - // Add the unique elements of aList2 to aList1. FOR nElement := 1 TO LEN( aList2 ) diff --git a/harbour/contrib/hbnf/aavg.prg b/harbour/contrib/hbnf/aavg.prg index f2df1d6795..a57d037f5e 100644 --- a/harbour/contrib/hbnf/aavg.prg +++ b/harbour/contrib/hbnf/aavg.prg @@ -24,42 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_AAVG() - * $CATEGORY$ - * Array - * $ONELINER$ - * Average numeric values in an array - * $SYNTAX$ - * FT_AAVG( [, [, ] ] ) -> nAverage - * $ARGUMENTS$ - * is the array containing the elements to be averaged. - * - * is the first array item to include, - * defaults to first element. - * - * is the last array element to include, - * defaults to all elements. - * $RETURNS$ - * The average of the specified array elements. - * $DESCRIPTION$ - * This function is used to get a numeric average of selected or all - * elements of an array. - * - * This routine requires FT_ASUM(). - * $EXAMPLES$ - * FT_AAVG(aSubTotals) // Get Average of Entire Array - * - * FT_AAVG(aSubTotals, 5) // Get Average of 5th Element On - * - * FT_AAVG(aSubTotals, , 10) // Get Average of 1st 10 Elements - * - * FT_AAVG(aSubTotals, 5, 10) // Get Average of Elements 5-10 - * $END$ - */ - #define FORCE_BETWEEN(x,y,z) (y := MAX(MIN(y,z),x)) #define IS_NOT_ARRAY(x) (VALTYPE(x) != "A") @@ -68,8 +32,6 @@ := iif( == NIL,,) ; [; := iif( == NIL,,)] - - FUNCTION FT_AAVG(aArray, nStartIndex, nEndIndex) DEFAULT nStartIndex TO 1, ; diff --git a/harbour/contrib/hbnf/acctadj.prg b/harbour/contrib/hbnf/acctadj.prg index 0a80e48930..f791fe5670 100644 --- a/harbour/contrib/hbnf/acctadj.prg +++ b/harbour/contrib/hbnf/acctadj.prg @@ -31,64 +31,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ACCTADJ() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Adjust beginning or ending fiscal pd. dates to acctg. dates - * $SYNTAX$ - * FT_ACCTADJ( [ ], [ ] ) -> dDate - * $ARGUMENTS$ - * is any valid date in any valid format. - * Defaults to DATE() if not supplied. - * - * is a logical variable. .F. = adjust for beginning of - * period mode, .T. = adjust for end of period mode. Defaults to - * beginning of period mode. - * $RETURNS$ - * An adjusted date dependent upon mode and work week start day. - * $DESCRIPTION$ - * Called by other FT_ACCT.. functions. The algorithm is: - * - * Beginning of period mode: - * - * If dGivenDate is in last 3 days of work week - * Return next week's start date - * Else - * Return this week's start date - * Endif - * - * End of period mode: - * - * If dGivenDate is in last 4 days of work week - * Return this week's end date - * Else - * Return prior week's end date - * Endif - * $EXAMPLES$ - * Beginning of period mode (lIsEnd == .F.) - * - * dDate := Ctod( "01/31/91" ) // In last 3 days of work week - * ? FT_ACCTADJ( dDate ) // 02/03/91 (next week's start) - * - * dDate := Ctod( "03/31/91" ) // Not in last 3 days of work week - * ? FT_ACCTADJ( dDate ) // 03/31/91 (this week's start) - * - * End of period mode (lIsEnd == .T.) - * - * dDate := Ctod( "01/31/91" ) // In last 4 days of work week - * ? FT_ACCTADJ( dDate, .T. ) // 02/02/91 (this week's end) - * - * dDate := Ctod( "03/31/91" ) // Not in last 4 days of work week - * ? FT_ACCTADJ( dDate, .T. ) // 03/30/91 (prior week's end) - * $SEEALSO$ - * FT_DATECNFG() FT_DAYTOBOW() - * $END$ -*/ - FUNCTION FT_ACCTADJ(dGivenDate, lIsEnd) LOCAL nTemp diff --git a/harbour/contrib/hbnf/acctmnth.prg b/harbour/contrib/hbnf/acctmnth.prg index 6af0a520ae..a4d4f0cf65 100644 --- a/harbour/contrib/hbnf/acctmnth.prg +++ b/harbour/contrib/hbnf/acctmnth.prg @@ -27,60 +27,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_ACCTMONTH() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Return accounting month data - * $SYNTAX$ - * FT_ACCTMONTH( [ ], [ ] ) -> aDateInfo - * $ARGUMENTS$ - * is any valid date in any date format. Defaults - * to current system date if not supplied. - * - * is a number from 1 to 12 signifying a month. - * Defaults to current month if not supplied. - * $RETURNS$ - * A three element array containing the following data: - * - * aDateInfo[1] - The year and month as a character string "YYYYMM" - * aDateInfo[2] - The beginning date of the accounting month - * aDateInfo[3] - The ending date of the accounting month - * $DESCRIPTION$ - * FT_ACCTMONTH() creates an array containing data about the - * accounting month containing the given date. - * - * An accounting period has the following characteristics: - * - * If the first week of the period contains 4 or more 'work' - * days, it is included in the period; otherwise, the first - * week was included in the prior period. - * - * If the last week of the period contains 4 or more 'work' - * days it is included in the period; otherwise, the last week - * is included in the next period. This results in 13 week - * 'quarters' and 4 or 5 week 'months'. Every 5 or 6 years, a - * 'quarter' will contain 14 weeks and the year will contain 53 - * weeks. - * $EXAMPLES$ - * // get info about accounting month containing 9/15/90 - * aDateInfo := FT_ACCTMONTH( Ctod("09/15/90") ) - * ? aDateInfo[1] // 199009 (9th month) - * ? aDateInfo[2] // 09/02/90 beginning of month 9 - * ? aDateInfo[3] // 09/29/90 end of month 9 - * - * // get info about accounting month 5 in year containing 9/15/90 - * aDateInfo := FT_ACCTMONTH( Ctod("09/15/90"), 5 ) - * ? aDateInfo[1] // 199005 - * ? aDateInfo[2] // 04/29/89 beginning of month 5 - * ? aDateInfo[3] // 06/02/90 end of month 5 - * $SEEALSO$ - * FT_DATECNFG() FT_ACCTWEEK() FT_ACCTQTR() FT_ACCTYEAR() - * $END$ -*/ - FUNCTION FT_ACCTMONTH(dGivenDate,nMonthNum) LOCAL nYTemp, nMTemp, lIsMonth, aRetVal diff --git a/harbour/contrib/hbnf/acctqtr.prg b/harbour/contrib/hbnf/acctqtr.prg index 5aa43be9b3..30d5248a9a 100644 --- a/harbour/contrib/hbnf/acctqtr.prg +++ b/harbour/contrib/hbnf/acctqtr.prg @@ -27,60 +27,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_ACCTQTR() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Return accounting quarter data - * $SYNTAX$ - * FT_ACCTQTR( [ ], [ ] ) -> aDateinfo - * $ARGUMENTS$ - * is any valid date in any date format. Defaults - * to current system date if not supplied. - * - * is a number from 1 to 4 signifying a quarter. - * Defaults to current quarter if not supplied. - * $RETURNS$ - * A three element array containing the following data: - * - * aDateInfo[1] - The year and qtr. as a character string "YYYYQQ" - * aDateInfo[2] - The beginning date of the accounting quarter - * aDateInfo[3] - The ending date of the accounting quarter - * $DESCRIPTION$ - * FT_ACCTQTR() creates an array containing data about the - * accounting quarter containing the given date. - * - * An accounting period has the following characteristics: - * - * If the first week of the period contains 4 or more 'work' - * days, it is included in the period; otherwise, the first - * week was included in the prior period. - * - * If the last week of the period contains 4 or more 'work' - * days it is included in the period; otherwise, the last week - * is included in the next period. This results in 13 week - * 'quarters' and 4 or 5 week 'months'. Every 5 or 6 years, a - * 'quarter' will contain 14 weeks and the year will contain 53 - * weeks. - * $EXAMPLES$ - * // get info about accounting month containing 9/15/90 - * aDateInfo := FT_ACCTQTR( CTOD("09/15/90") ) - * ? aDateInfo[1] // 199003 (3rd quarter) - * ? aDateInfo[2] // 07/01/90 beginning of quarter 3 - * ? aDateInfo[3] // 09/29/90 end of quarter 3 - * - * // get info about accounting qtr. 2 in year containing 9/15/90 - * aDateInfo := FT_ACCTQTR( CTOD("09/15/90"), 2 ) - * ? aDateInfo[1] // 199002 - * ? aDateInfo[2] // 04/01/89 beginning of quarter 2 - * ? aDateInfo[3] // 06/30/90 end of quarter 2 - * $SEEALSO$ - * FT_DATECNFG() FT_ACCTWEEK() FT_ACCTMONTH() FT_ACCTYEAR() - * $END$ -*/ - FUNCTION FT_ACCTQTR(dGivenDate,nQtrNum) LOCAL nYTemp, nQTemp, lIsQtr, aRetVal diff --git a/harbour/contrib/hbnf/acctweek.prg b/harbour/contrib/hbnf/acctweek.prg index 21c6c71e4c..ec90efe02a 100644 --- a/harbour/contrib/hbnf/acctweek.prg +++ b/harbour/contrib/hbnf/acctweek.prg @@ -27,60 +27,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_ACCTWEEK() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Return accounting week data - * $SYNTAX$ - * FT_ACCTWEEK( [ ], [ ] ) -> aDateInfo - * $ARGUMENTS$ - * is any valid date in any date format. Defaults - * to current system date if not supplied. - * - * is a number from 1 to 52 signifying a week. - * Defaults to current week if not supplied. - * $RETURNS$ - * A three element array containing the following data: - * - * aDateInfo[1] - The year and week as a character string "YYYYWW" - * aDateInfo[2] - The beginning date of the accounting week - * aDateInfo[3] - The ending date of the accounting week - * $DESCRIPTION$ - * FT_ACCTWEEK() returns an array containing data about the - * accounting week containing the given date. - * - * An accounting period has the following characteristics: - * - * If the first week of the period contains 4 or more 'work' - * days, it is included in the period; otherwise, the first - * week was included in the prior period. - * - * If the last week of the period contains 4 or more 'work' - * days it is included in the period; otherwise, the last week - * is included in the next period. This results in 13 week - * 'quarters' and 4 or 5 week 'months'. Every 5 or 6 years, a - * 'quarter' will contain 14 weeks and the year will contain 53 - * weeks. - * $EXAMPLES$ - * // get info about accounting week containing 9/15/90 - * aDateInfo := FT_ACCTWEEK( CTOD("09/15/90") ) - * ? aDateInfo[1] // 199037 (37th week) - * ? aDateInfo[2] // 09/09/90 beginning of week 37 - * ? aDateInfo[3] // 09/15/90 end of week 37 - * - * // get info about accounting week 25 in year containing 9/15/90 - * aDateInfo := FT_ACCTWEEK( CTOD("09/15/90"), 25 ) - * ? aDateInfo[1] // 199025 - * ? aDateInfo[2] // 06/17/89 beginning of week 25 - * ? aDateInfo[3] // 06/23/90 end of week 25 - * $SEEALSO$ - * FT_DATECNFG() FT_ACCTMONTH() FT_ACCTQTR() FT_ACCTYEAR() - * $END$ -*/ - FUNCTION FT_ACCTWEEK(dGivenDate,nWeekNum) LOCAL nTemp, lIsWeek, aRetVal diff --git a/harbour/contrib/hbnf/acctyear.prg b/harbour/contrib/hbnf/acctyear.prg index d9841fce40..072fee0885 100644 --- a/harbour/contrib/hbnf/acctyear.prg +++ b/harbour/contrib/hbnf/acctyear.prg @@ -27,51 +27,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_ACCTYEAR() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Return accounting year data - * $SYNTAX$ - * FT_ACCTYEAR( [ ] ) -> aDateInfo - * $ARGUMENTS$ - * is any valid date in any date format. Defaults - * to current system date if not supplied. - * $RETURNS$ - * A three element array containing the following data: - * - * aDateInfo[1] - The year as a character string "YYYY" - * aDateInfo[2] - The beginning date of the accounting year - * aDateInfo[3] - The ending date of the accounting year - * $DESCRIPTION$ - * FT_ACCTYEAR() creates an array containing data about the - * accounting year containing the given date. - * - * An accounting period has the following characteristics: - * - * If the first week of the period contains 4 or more 'work' - * days, it is included in the period; otherwise, the first - * week was included in the prior period. - * - * If the last week of the period contains 4 or more 'work' - * days it is included in the period; otherwise, the last week - * is included in the next period. This results in 13 week - * 'quarters' and 4 or 5 week 'months'. Every 5 or 6 years, a - * 'quarter' will contain 14 weeks and the year will contain 53 - * weeks. - * $EXAMPLES$ - * // get info about accounting year containing 9/15/90 - * aDateInfo := FT_ACCTYEAR( CTOD("09/15/90") ) - * ? aDateInfo[1] // 1990 - * ? aDateInfo[2] // 12/31/89 beginning of year - * ? aDateInfo[3] // 12/29/90 end of year - * $SEEALSO$ - * FT_DATECNFG() FT_ACCTWEEK() FT_ACCTMONTH() FT_ACCTQTR() - * $END$ -*/ - FUNCTION FT_ACCTYEAR(dGivenDate) LOCAL nYTemp, aRetVal diff --git a/harbour/contrib/hbnf/adessort.prg b/harbour/contrib/hbnf/adessort.prg index e669c6ca38..da268d742d 100644 --- a/harbour/contrib/hbnf/adessort.prg +++ b/harbour/contrib/hbnf/adessort.prg @@ -24,40 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ADESSORT() - * $CATEGORY$ - * Array - * $ONELINER$ - * Sort an array in descending order - * $SYNTAX$ - * FT_ADESSORT( [, [, ] ] ) -> aSorted - * $ARGUMENTS$ - * is the array to be sorted - * - * is the first array item to include in the sort, - * defaults to first element - * - * is the last array element to include in the sort, - * defaults to all elements - * $RETURNS$ - * The array, sorted in descending order. - * $DESCRIPTION$ - * This function is used to sort an array in descending order, i.e., Z-A - * $EXAMPLES$ - * FT_ADESSORT(aNames) // Sort the Entire Array - * - * FT_ADESSORT(aNames, 5) // Sort from the 5th Element On - * - * FT_ADESSORT(aNames, , 10) // Sort the 1st 10 Elements - * - * FT_ADESSORT(aNames, 5, 10) // Sort Elements 5-10 - * $END$ - */ - - #command DEFAULT TO [, TO ] ; => ; := iif( == NIL,,) ; @@ -69,7 +35,6 @@ := iif(VALTYPE() == ,,) ; [; := iif(VALTYPE() == ,,)] - #define FORCE_BETWEEN(x,y,z) (y := MAX(MIN(y,z),x)) FUNCTION FT_ADESSORT(aArray, nStartIndex, nEndIndex) diff --git a/harbour/contrib/hbnf/aemaxlen.prg b/harbour/contrib/hbnf/aemaxlen.prg index 1d64db59e7..9ae8bf0c60 100644 --- a/harbour/contrib/hbnf/aemaxlen.prg +++ b/harbour/contrib/hbnf/aemaxlen.prg @@ -22,52 +22,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_AEMAXLEN() - * $CATEGORY$ - * Array - * $ONELINER$ - * Find longest element within an array - * $SYNTAX$ - * FT_AEMAXLEN( [, [, [, ] ] ] ) ; - * -> nMaxlen - * $ARGUMENTS$ - * is the array containing the elements to be measured. - * - * is the array dimension to be measured, - * defaults to first dimension. - * - * is the starting array element to include, - * defaults to first array element. - * - * is the number of array elements to process from - * from , defaults to remaining elements - * in array. - * $RETURNS$ - * The length of the longest size element of an array. - * $DESCRIPTION$ - * This function will measure each element of an array - * dimension and return the longest element. - * $EXAMPLES$ - * FT_AEMAXLEN(aArray) // Measure the 1st dimension of an Array - * - * FT_AEMAXLEN(aArray,2) // Measure the 2nd dimension of an Array - * - * FT_AEMAXLEN(aArray,2,,9) // Measure Elements 1-9 of the - * 2nd dimension or subarray - * - * FT_AEMAXLEN(aArray,3,5,9) // Measure Elements 5-9 of the - * 3rd dimension or subarray - * - * FT_AEMAXLEN(aArray,3,5) // Measure Elements 5 to last in the - * 3rd dimension or subarray - * $SEEALSO$ - * FT_AEMINLEN() - * $END$ - */ - #ifdef FT_TEST FUNCTION MAIN() @@ -97,7 +51,6 @@ FUNCTION MAIN() #endif - FUNCTION FT_AEmaxlen( aArray, nDimension, nStart, nCount ) LOCAL i, nLast, cType, nMaxlen := 0 diff --git a/harbour/contrib/hbnf/aeminlen.prg b/harbour/contrib/hbnf/aeminlen.prg index f026a9477b..36cefa5e43 100644 --- a/harbour/contrib/hbnf/aeminlen.prg +++ b/harbour/contrib/hbnf/aeminlen.prg @@ -22,49 +22,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_AEMINLEN() - * $CATEGORY$ - * Array - * $ONELINER$ - * Find shortest element within an array - * $SYNTAX$ - * FT_AEMINLEN( [, [, [, ] ] ] ) - * -> nMinlen - * $ARGUMENTS$ - * is the array containing the elements to be measured. - * - * is the array dimension to be measured, - * defaults to first dimension. - * - * is the starting array element to include, - * defaults to first array element. - * - * is the number of array elements to process from - * from , defaults to remaining elements - * in array. - * $RETURNS$ - * The length of the shortest size element of an array. - * $DESCRIPTION$ - * This function will measure each element of an array - * dimension and return the shortest element. - * $EXAMPLES$ - * FT_AEMINLEN(aArray) // Measure the 1st dimension of an Array - * - * FT_AEMINLEN(aArray,2) // Measure the 2nd dimension of an Array - * - * FT_AEMINLEN(aArray,2,,9) // Measure Elements 1-9 of 2nd dimension - * - * FT_AEMINLEN(aArray,3,5,9) // Measure Elements 5-9 of 3rd dimension - * - * FT_AEMINLEN(aArray,3,5) // Measure Elements 5 to end of 3rd dimension - * $SEEALSO$ - * FT_AEMAXLEN() - * $END$ - */ - #ifdef FT_TEST FUNCTION MAIN() @@ -97,7 +54,6 @@ FUNCTION MAIN() #endif - FUNCTION FT_AEminlen( aArray, nDimension, nStart, nCount ) LOCAL i, nLast, cType, nMinlen := 65519 diff --git a/harbour/contrib/hbnf/alt.c b/harbour/contrib/hbnf/alt.c index 1f2c0c34c2..ddb4238243 100644 --- a/harbour/contrib/hbnf/alt.c +++ b/harbour/contrib/hbnf/alt.c @@ -34,34 +34,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ALT() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Determine status of the Alt key - * $SYNTAX$ - * FT_ALT() -> lValue - * $ARGUMENTS$ - * None - * $RETURNS$ - * .T. if Alt key is pressed, .F. if otherwise. - * $DESCRIPTION$ - * This function is useful for times you need to know whether or not the - * Alt key is pressed, such as during a MemoEdit(). - * $EXAMPLES$ - * IF FT_ALT() - * @24, 0 say "Alt" - * ELSE - * @24, 0 say " " - * ENDIF - * $SEEALSO$ - * FT_CAPLOCK() FT_CTRL() FT_NUMLOCK() FT_PRTSCR() FT_SHIFT() - * $END$ - */ - #include "hbapigt.h" #include "hbapiitm.h" diff --git a/harbour/contrib/hbnf/amedian.prg b/harbour/contrib/hbnf/amedian.prg index 5ed5585ca7..b5f98891d7 100644 --- a/harbour/contrib/hbnf/amedian.prg +++ b/harbour/contrib/hbnf/amedian.prg @@ -24,46 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_AMEDIAN() - * $CATEGORY$ - * Array - * $ONELINER$ - * Find middle value in array, or average of two middle values - * $SYNTAX$ - * FT_AMEDIAN( [, [, ] ] ) - * -> nMedian - * $ARGUMENTS$ - * is the array containing the elements to be averaged. - * - * is the first array element to include, - * defaults to first element. - * - * is the last array element to include, - * defaults to last element. - * $RETURNS$ - * The median average of the array elements - * $DESCRIPTION$ - * This function sorts the elements of a numeric array and - * then returns the value in the middle element of the sorted - * array. If there is no exact middle value, then it returns - * the average of the two middle values. Half of the elements - * are > median and half are < median. A median average may - * more reflect a more useful average when there are extreme - * values in the set. - * $EXAMPLES$ - * FT_AMEDIAN( aArray ) // Return Median for entire array - * - * FT_AMEDIAN( aArray, 2) // Return Median for elements from 2 to end - * - * FT_AMEDIAN( aArray, ,9) // Return Median for 1st 9 elements - * - * FT_AMEDIAN( aArray,8,40 ) // Return Median for elements 8 to 40 - * $END$ - */ - #ifdef FT_TEST #include "directry.ch" @@ -94,7 +54,6 @@ FUNCTION MAIN() #endif - #define FORCE_BETWEEN(x,y,z) (y := MAX(MIN(y,z),x)) #command DEFAULT TO [, TO ] ; @@ -102,7 +61,6 @@ FUNCTION MAIN() := iif( == NIL,,) ; [; := iif( == NIL,,)] - FUNCTION FT_AMEDIAN( aArray, nStart, nEnd ) LOCAL nTemplen, aTemparray, nMiddle1, nMiddle2, nMedian diff --git a/harbour/contrib/hbnf/anomatch.prg b/harbour/contrib/hbnf/anomatch.prg index 406cb9fb34..e0a39e1460 100644 --- a/harbour/contrib/hbnf/anomatch.prg +++ b/harbour/contrib/hbnf/anomatch.prg @@ -24,50 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ANOMATCHES() - * $CATEGORY$ - * Array - * $ONELINER$ - * Find the number of array elements meeting a condition - * $SYNTAX$ - * FT_ANOMATCHES( , ; - * [, [, ] ] ) -> nNoOfMatches - * $ARGUMENTS$ - * is the array to be searched - * - * is a code block containing the expression for - * the array elements to be tested with. Each element is passed - * as a parameter to the block. If the block returns .T., the - * number of matches will be incremented by one. - * - * is the first array item to include in the search, - * defaults to first element. - * - * is the last array element to include in the search, - * defaults to all elements. - * $RETURNS$ - * The number of elements that cause the code block to return .T. - * $DESCRIPTION$ - * This function returns the number of array elements that, when passed - * to the supplied code block, cause that code block to return a .T. value. - * $EXAMPLES$ - * // Search the Entire Array - * FT_ANOMATCHES(aTries, { | x | x <= 100 } ) - * - * // Search from the 5th Element On - * FT_ANOMATCHES(aCodes, { | x | UPPER(x) == cCurrentCode }, 5) - * - * // Search the 1st 10 Elements - * FT_ANOMATCHES(aDates, { | x | IS_BETWEEN(DATE()-7,x,DATE() + 7) }, 10) - * - * // Search Elements 5-10 - * FT_ANOMATCHES(aNames, { | x | x <= cLastGoodName }, 5, 10) - * $END$ - */ - #define FORCE_BETWEEN(x,y,z) (y := MAX(MIN(y,z),x)) #command DEFAULT TO [, TO ] ; diff --git a/harbour/contrib/hbnf/any2any.prg b/harbour/contrib/hbnf/any2any.prg index 40e6d3ae56..5798b48b34 100644 --- a/harbour/contrib/hbnf/any2any.prg +++ b/harbour/contrib/hbnf/any2any.prg @@ -24,41 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_XTOY() - * $CATEGORY$ - * Conversion - * $ONELINER$ - * Convert from any data type to any other data type - * $SYNTAX$ - * FT_XTOY( , ; - * [, ] ) -> xResult - * $ARGUMENTS$ - * is the value to convert. - * - * is the type of value to convert to - * ("C","D","L","N","A" or "B"). - * - * is a logical to signal if 'Y' or 'N' is to be returned - * if Converting a logical, otherwise '.T.' or '.F.' will be returned - * for logicals. - * $RETURNS$ - * The original value converted to the new type. - * $DESCRIPTION$ - * This function converts a value of character, date, numeric, logical, - * array or code block type to any of the other type. While it is - * guaranteed to return a value of the correct type, that value may not - * be meaningful (i.e., converting from a code block returns an EMPTY() - * value of the desired type). - * $EXAMPLES$ - * nNumericValue := FT_XTOY(cInputValue, "N") - * IF (FT_XTOY(nInputValue, "L")) - * $END$ - */ - - #define BLOCKIFY(x) { || x } #define IS_CHAR(x) (VALTYPE(x) == "C") #define IS_DATE(x) (VALTYPE(x) == "D") @@ -95,7 +60,6 @@ := iif( == NIL,,) ; [; := iif( == NIL,,)] - FUNCTION FT_XTOY(xValueToConvert, cTypeToConvertTo, lWantYesNo) DEFAULT lWantYesNo TO FALSE @@ -110,7 +74,6 @@ FUNCTION FT_XTOY(xValueToConvert, cTypeToConvertTo, lWantYesNo) CASE cTypeToConvertTo == "D" .AND.; // They Want a Date IS_NOT_DATE(xValueToConvert) - xValueToConvert := iif(IS_CHAR(xValueToConvert), ; ; // Convert from a Character CTOD(xValueToConvert), ; @@ -126,7 +89,6 @@ FUNCTION FT_XTOY(xValueToConvert, cTypeToConvertTo, lWantYesNo) CASE cTypeToConvertTo == "N" .AND.; // They Want a Number IS_NOT_NUMERIC(xValueToConvert) - xValueToConvert := iif(IS_CHAR(xValueToConvert), ; ; // Convert from a Character VAL(xValueToConvert), ; @@ -142,7 +104,6 @@ FUNCTION FT_XTOY(xValueToConvert, cTypeToConvertTo, lWantYesNo) CASE cTypeToConvertTo == "L" .AND.; // They Want a Logical IS_NOT_LOGICAL(xValueToConvert) - xValueToConvert := iif(IS_CHAR(xValueToConvert), ; ; // Convert from a Character UPPER(xValueToConvert) == iif(lWantYesNo,"Y",".T."), ; @@ -158,13 +119,11 @@ FUNCTION FT_XTOY(xValueToConvert, cTypeToConvertTo, lWantYesNo) CASE cTypeToConvertTo == "A" .AND.; // They Want an Array IS_NOT_ARRAY(xValueToConvert) - xValueToConvert := { xValueToConvert } CASE cTypeToConvertTo == "B" .AND.; // They Want a Code Block IS_NOT_CODE_BLOCK(xValueToConvert) - xValueToConvert := BLOCKIFY(xValueToConvert) ENDCASE diff --git a/harbour/contrib/hbnf/aredit.prg b/harbour/contrib/hbnf/aredit.prg index 9815449b53..d7b3d9dd67 100644 --- a/harbour/contrib/hbnf/aredit.prg +++ b/harbour/contrib/hbnf/aredit.prg @@ -25,8 +25,6 @@ * */ - - /* Some notes: @@ -42,79 +40,6 @@ */ - -/* $DOC$ - * $FUNCNAME$ - * FT_AREDIT() - * $CATEGORY$ - * Array - * $ONELINER$ - * 2 dimensional array editing function using TBrowse - * $SYNTAX$ - * FT_AREDIT( , , , , , ; - * , , [, ] ) -> xElement - * $ARGUMENTS$ - * , , , are coordinates for TBrowse - * - * is name of 2 dimensional to array edit - * - * is pointer for element in array - * - * is array of column headings - * - * is array of blocks describing each array element - * - * [ ] is get editing function for handling individual elements - * $RETURNS$ - * Value of element positioned on when exit FT_AREDIT() - * The type of this value depends on what is displayed. - * $DESCRIPTION$ - * This function allows you to position yourself in an array, - * add and delete rows with the and keys, - * and pass a UDF with information to edit the individual gets. - * $EXAMPLES$ - * FT_AREDIT(3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks) - * - * This example will allow you to browse a 2 dimensional array - * But you can't edit it since there is no GetBlock UDF - * It allows the user to hit ENTER to select an element or ESC to - * return 0 - * - * * This second example shows how to edit a 2 dimensional array - * * as might be done to edit an invoice - * - * LOCAL i, ar[3, 26], aBlocks[3], aHeadings[3] - * LOCAL nElem := 1, bGetFunc - * - * * Set up two dimensional array "ar" - * - * FOR i = 1 TO 26 - * ar[1, i] := i // 1 -> 26 Numeric - * ar[2, i] := CHR(i+64) // "A" -> "Z" Character - * ar[3, i] := CHR(91-i) // "Z" -> "A" Character - * NEXT i - * - * * SET UP aHeadings Array for column headings - * - * aHeadings := { "Numbers", "Letters", "Reverse" } - * - * * Need to set up individual array blocks for each TBrowse column - * - * aBlocks[1] := {|| STR(ar[1, nElem], 2) } // prevent default 10 spaces - * aBlocks[2] := {|| ar[2, nElem] } - * aBlocks[3] := {|| ar[3, nElem] } - * - * * set up TestGet() as the passed Get Function so FT_ArEdit knows how - * * to edit the individual gets. - * - * bGetFunc := { | b, ar, nDim, nElem | TestGet(b, ar, nDim, nElem) } - * SetColor( "N/W, W/N, , , W/N" ) - * CLEAR SCREEN - * FT_AREDIT(3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks, bGetFunc) - * - * $END$ - */ - #include "inkey.ch" * Default heading, column, footer separators diff --git a/harbour/contrib/hbnf/asum.prg b/harbour/contrib/hbnf/asum.prg index d8eb6b6a51..18e52770e3 100644 --- a/harbour/contrib/hbnf/asum.prg +++ b/harbour/contrib/hbnf/asum.prg @@ -24,41 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ASUM() - * $CATEGORY$ - * Array - * $ONELINER$ - * Sum the elements of an array - * $SYNTAX$ - * FT_ASUM( [, [, ] ] ) -> nSum - * $ARGUMENTS$ - * is the array containing the elements to be summed. - * - * is the first array item to include, - * defaults to first element. - * - * is the last array element to include, - * defaults to all elements. - * $RETURNS$ - * The sum of the elements of the array or the lengths of the elements. - * $DESCRIPTION$ - * This function is to sum the elements of a numeric array or to sum the - * lengths of a character array. - * $EXAMPLES$ - * - * FT_ASUM(aSubTotals) // Sum the Entire Array - * - * FT_ASUM(aSubTotals, 5) // Sum from the 5th Element On - * - * FT_ASUM(aSubTotals, , 10) // Sum the 1st 10 Elements - * - * FT_ASUM(aSubTotals, 5, 10) // Sum Elements 5-10 - * $END$ - */ - #define CASE_AT(x,y,z) z[AT(x,y)+1] #define FORCE_BETWEEN(x,y,z) (y := MAX(MIN(y,z),x)) #define IS_CHAR(x) (VALTYPE(x) == "C") @@ -68,7 +33,6 @@ := iif( == NIL,,) ; [; := iif( == NIL,,)] - FUNCTION FT_ASUM(aArray, nStartIndex, nEndIndex) LOCAL nSumTotal := 0 // Array Sum diff --git a/harbour/contrib/hbnf/at2.prg b/harbour/contrib/hbnf/at2.prg index ec51deba44..b278d3a1b7 100644 --- a/harbour/contrib/hbnf/at2.prg +++ b/harbour/contrib/hbnf/at2.prg @@ -27,46 +27,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_AT2() - * $CATEGORY$ - * String - * $ONELINER$ - * Find position of the nth occurrence of a substring - * $SYNTAX$ - * FT_AT2( , [, [, ] ] ) -> nPos - * $ARGUMENTS$ - * is the character substring to search for. - * - * is the character string to search. - * - * is the occurrence of cSearch to look for, - * defaults to 1. - * - * is a logical value denoting case sensitivity. - * If .F., then search is NOT sensitive to case, - * defaults to .T. - * $RETURNS$ - * The position of the nth occurrence of a substring - * $DESCRIPTION$ - * This function will find the nth occurrence of a substring - * within a string. - * $EXAMPLES$ - * cSearch := "t" - * cTarget := "This is the day that the Lord has made." - * - * FT_AT2( cSearch, cTarget ) // Returns ( 9 ) - * - * FT_AT2( cSearch, cTarget, 2 ) // Returns ( 17 ) - * - * FT_AT2( cSearch, cTarget, 2, .F. ) // Returns ( 9 ) - * $SEEALSO$ - * FT_FINDITH(), FT_RAT2() - * $END$ - */ - #ifdef FT_TEST FUNCTION MAIN() @@ -95,7 +55,6 @@ FUNCTION MAIN() #endif - FUNCTION FT_AT2( cSearch, cTarget, nOccurs, lCaseSens ) LOCAL nCount, nPos, nPos2 := 0 @@ -133,50 +92,10 @@ FUNCTION FT_AT2( cSearch, cTarget, nOccurs, lCaseSens ) EXIT ENDIF - NEXT RETURN nPos2 -/* $DOC$ - * $FUNCNAME$ - * FT_RAT2() - * $CATEGORY$ - * String - * $ONELINER$ - * Find position of the reversed nth occurrence of a substring - * $SYNTAX$ - * FT_RAT2( , [, [, ] ] ) -> nPos - * $ARGUMENTS$ - * is the character substring to search for. - * - * is the character string to search. - * - * is the occurrence of cSearch to look for, - * defaults to 1. - * - * is a logical value denoting case sensitivity. - * If .F., then search is NOT sensitive to case, - * defaults to .T. - * $RETURNS$ - * The position of the nth occurrence of a reversed substring - * $DESCRIPTION$ - * This function will find the nth occurrence of a reversed - * substring within a string. - * $EXAMPLES$ - * cSearch := "t" - * cTarget := "This is the day that the Lord has made." - * - * FT_RAT2( cSearch, cTarget ) // Returns ( 22 ) - * - * FT_RAT2( cSearch, cTarget, 2 ) // Returns ( 20 ) - * - * FT_RAT2( cSearch, cTarget, 2, .F. ) // Returns ( 22 ) - * $SEEALSO$ - * FT_FINDITH(), FT_AT2() - * $END$ - */ - FUNCTION FT_RAT2( cSearch, cTarget, nOccurs, lCaseSens ) LOCAL nCount, nPos, nPos2 := 0 LOCAL cSubstr := cTarget diff --git a/harbour/contrib/hbnf/bitclr.prg b/harbour/contrib/hbnf/bitclr.prg index c73044484d..07f1fbbf3b 100644 --- a/harbour/contrib/hbnf/bitclr.prg +++ b/harbour/contrib/hbnf/bitclr.prg @@ -24,52 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_BITCLR() - * $CATEGORY$ - * String - * $ONELINER$ - * Clear (reset) selected bit in a byte - * $SYNTAX$ - * FT_BITCLR( , ) -> cByte - * $ARGUMENTS$ - * is a character from CHR(0) to CHR(255). - * - * is a number from 0 to 7 conforming to standard - * right-to-left bit numbering convention and representing the - * position of the bit within the byte. - * $RETURNS$ - * Returns new byte, with designated bit cleared (reset). - * If parameters are faulty, returns NIL. - * $DESCRIPTION$ - * In effect, ANDs argument byte with a byte that has all bits set except - * the target bit. If bit is already clear (0), it remains clear. - * Note: Calls FT_ISBIT() which is also in this Library. - * - * This function is presented to illustrate that bit-wise operations - * are possible with Clipper code. For greater speed, write .c or - * .asm versions and use the Clipper Extend system. - * $EXAMPLES$ - * This code would clear bit 4 in a byte represented by CHR(115): - * - * cNewByte := FT_BITCLR( CHR(115), 4 ) - * ? ASC( cNewbyte ) // result: 99 - * ? cNewByte // result: 'c' - * - * This code would clear bit 5 in the byte represented by letter 'A': - * - * FT_BITCLR( 'A', 5 ) // result: 'A', since - * // bit 5 already clear - * - * For a demonstration of Clipper bit manipulations, compile and - * link the program bittest.prg in the Nanforum Toolkit source code. - * $SEEALSO$ - * FT_BITSET() FT_ISBIT() - * $END$ - */ - FUNCTION FT_BITCLR(cInbyte, nBitpos) LOCAL cByte diff --git a/harbour/contrib/hbnf/bitset.prg b/harbour/contrib/hbnf/bitset.prg index 2b4f2e7425..fde21fd3e4 100644 --- a/harbour/contrib/hbnf/bitset.prg +++ b/harbour/contrib/hbnf/bitset.prg @@ -24,54 +24,6 @@ * */ - - -/* $DOC$ - * $FUNCNAME$ - * FT_BITSET() - * $CATEGORY$ - * String - * $ONELINER$ - * Set selected bit in a byte - * $SYNTAX$ - * FT_BITSET( , ) -> cByte - * $ARGUMENTS$ - * is a character from CHR(0) to CHR(255). - * - * is a number from 0 to 7 conforming to standard right-to-left - * bit numbering convention and representing the position of the bit - * within the byte. - * $RETURNS$ - * Returns new byte, with designated bit set. If parameters are faulty, - * returns NIL. - * $DESCRIPTION$ - * In effect, ORs argument byte with a byte that has only the target bit - * set. If bit is already set, it remains set. - * Note: Calls FT_ISBIT() which is also in this Library. - * - * This function is presented to illustrate that bit-wise operations - * are possible with Clipper code. For greater speed, write .c or - * .asm versions and use the Clipper Extend system. - * $EXAMPLES$ - * This code would set bit 4 in a byte represented by CHR(107): - * - * cNewbyte := FT_BITSET( CHR(107), 4 ) - * ? ASC( cNewbyte ) // result: 123 - * ? cNewbyte // result: '{' - * - * - * This code would set bit 5 in the byte represented by the letter 'A'. - * - * ? FT_BITSET( 'A', 5 ) // result: 'a' - * // bit 5 set - * - * For a demonstration of Clipper bit manipulations, compile and - * link the program bittest.prg in the Nanforum Toolkit source code. - * $SEEALSO$ - * FT_BITCLR() FT_ISBIT() - * $END$ - */ - FUNCTION FT_BITSET(cInByte, nBitpos) LOCAL cByte diff --git a/harbour/contrib/hbnf/blink.prg b/harbour/contrib/hbnf/blink.prg index d229496ffc..bd60d191cd 100644 --- a/harbour/contrib/hbnf/blink.prg +++ b/harbour/contrib/hbnf/blink.prg @@ -24,35 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_BLINK() - * $CATEGORY$ - * Menus/Prompts - * $ONELINER$ - * Display a blinking message on the screen - * $SYNTAX$ - * FT_BLINK( , [ ], [ ] ) -> NIL - * $ARGUMENTS$ - * is the string to blink. - * - * is an optional screen row for @...SAY, default current. - * - * is an optional screen col for @...say, default current. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * A quick way to blink a msg on screen in the CURRENT colors. - * Restores colors on return. - * $EXAMPLES$ - * FT_BLINK( "WAIT", 5, 10 ) // Blinks "WAIT" in current colors @ 5,10 - * - * @5,10 SAY "WAIT - Printing Report" - * FT_BLINK( "..." ) // Blink "..." after wait message... - * $END$ - */ - #ifdef FT_TEST FUNCTION MAIN() FT_BLINK( "WAIT", 5, 10 ) diff --git a/harbour/contrib/hbnf/byt2bit.prg b/harbour/contrib/hbnf/byt2bit.prg index 7947d7cfe6..81391d8695 100644 --- a/harbour/contrib/hbnf/byt2bit.prg +++ b/harbour/contrib/hbnf/byt2bit.prg @@ -24,49 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_BYT2BIT() - * $CATEGORY$ - * Conversion - * $ONELINER$ - * Convert byte to string of 1's and 0's - * $SYNTAX$ - * FT_BYT2BIT( ) -> cBitPattern - * $ARGUMENTS$ - * is the byte to convert. - * $RETURNS$ - * 9-character string, consisting of 1's and 0's, representing bits 0 - * through 7 of parameter byte, with space between bits 3 and 4. Returns - * NIL if parameters are faulty. - * $DESCRIPTION$ - * Can be used to show results of bit manipulation, both before and after. - * Binary representation follows right-to-left convention of bit position - * numbering, 0 through 7. Space between high and low nibbles for clarity - * and easy comparison to hexadecimal notation. - * - * This function is presented to illustrate that bit-wise operations - * are possible with Clipper code. For greater speed, write .c or - * .asm versions and use the Clipper Extend system. - * $EXAMPLES$ - * These three code lines perform a bitwise AND on bytes with values of - * CHR(20) and CHR(36), and deliver the result as a string in binary (bit) - * format. - * - * ? FT_BYT2BIT(CHR(20)) // byte1: '0001 0100' - * ? FT_BYT2BIT(CHR(36)) // byte2: '0010 0100' - * - * ? FT_BYT2BIT(FT_BYTEAND(CHR(20), CHR(36))) - * // result: '0000 0100' - * - * For a demonstration of Clipper bit manipulations, compile and - * link the program bittest.prg in the Nanforum Toolkit source code. - * $SEEALSO$ - * FT_BYT2HEX() - * $END$ - */ - FUNCTION FT_BYT2BIT(cByte) local nCounter, xBitstring diff --git a/harbour/contrib/hbnf/byt2hex.prg b/harbour/contrib/hbnf/byt2hex.prg index dc1f2b1805..eb0d6f8184 100644 --- a/harbour/contrib/hbnf/byt2hex.prg +++ b/harbour/contrib/hbnf/byt2hex.prg @@ -24,46 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_BYT2HEX() - * $CATEGORY$ - * Conversion - * $ONELINER$ - * Convert byte to hexadecimal version of its binary value - * $SYNTAX$ - * FT_BYT2HEX( cByte ) -> cHexValue - * $ARGUMENTS$ - * is the byte to convert. - * $RETURNS$ - * Three-character string, consisting of two digits of hexadecimal - * notation and letter 'h' to signify hex. Returns NIL if parameters are - * faulty. - * $DESCRIPTION$ - * Can be used to show results of bit manipulation, both before and after. - * - * This function is presented to illustrate that bit-wise operations - * are possible with Clipper code. For greater speed, write .c or - * .asm versions and use the Clipper Extend system. - * $EXAMPLES$ - * These three code lines perform a bitwise AND on bytes with values of - * CHR(20) and CHR(36), and deliver the result as a string in hexadecimal - * format, using 'h' to signify hexadecimal. - * - * ? FT_BYT2HEX(CHR(20)) // byte1: '14h' - * ? FT_BYT2HEX(CHR(36)) // byte2: '24h' - * - * ? FT_BYT2HEX(FT_BYTEAND(CHR(20), CHR(36))) - * // result: '04h' - * - * For a demonstration of Clipper bit manipulations, compile and - * link the program bittest.prg in the Nanforum Toolkit source code. - * $SEEALSO$ - * FT_BYT2BIT() - * $END$ - */ - FUNCTION FT_BYT2HEX(cByte) local cHexTable := "0123456789ABCDEF" diff --git a/harbour/contrib/hbnf/byteand.prg b/harbour/contrib/hbnf/byteand.prg index 05d17f7c01..232be62308 100644 --- a/harbour/contrib/hbnf/byteand.prg +++ b/harbour/contrib/hbnf/byteand.prg @@ -24,47 +24,6 @@ * */ - - -/* $DOC$ - * $FUNCNAME$ - * FT_BYTEAND() - * $CATEGORY$ - * String - * $ONELINER$ - * Perform bit-wise AND on two ASCII characters (bytes) - * $SYNTAX$ - * FT_BYTEAND( , ) -> cByte - * $ARGUMENTS$ - * and are characters from CHR(0) TO CHR(255). - * May be passed in CHR() form, as character literals, or as expressions - * evaluating to CHR() values. - * $RETURNS$ - * Returns resulting byte, in CHR() form. If parameters are faulty, - * returns NIL. - * $DESCRIPTION$ - * Can be used for any bit-wise masking operation. In effect, this is a - * bit-by-bit AND operation. Equivalent to AND assembler instruction. - * - * This function is presented to illustrate that bit-wise operations - * are possible with Clipper code. For greater speed, write .c or - * .asm versions and use the Clipper Extend system. - * $EXAMPLES$ - * This code would mask out the high nibble (four most significant bits) - * of the byte represented by chr(123) and leave the low nibble bits as in - * the parameter byte. - * - * cNewbyte := FT_BYTEAND( CHR(123), CHR(15) ) - * ? asc(cNewByte) // result: 11 - * ? cNewByte // result: non-printable character - * - * For a demonstration of Clipper bit manipulations, compile and - * link the program bittest.prg in the Nanforum Toolkit source code. - * $SEEALSO$ - * FT_BYTEOR() FT_BYTEXOR() FT_BYTENOT() FT_BYTENEG() - * $END$ - */ - FUNCTION FT_BYTEAND(cByte1, cByte2) LOCAL nCounter, cNewByte diff --git a/harbour/contrib/hbnf/byteneg.prg b/harbour/contrib/hbnf/byteneg.prg index f623622650..c2c8fedd0b 100644 --- a/harbour/contrib/hbnf/byteneg.prg +++ b/harbour/contrib/hbnf/byteneg.prg @@ -24,44 +24,5 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_BYTENEG() - * $CATEGORY$ - * String - * $ONELINER$ - * Perform bit-wise negation on an ASCII character - * $SYNTAX$ - * FT_BYTENEG( ) -> cNewByte - * $ARGUMENTS$ - * is a character from CHR(0) to CHR(255). - * May be passed in CHR() form, as character literal, or - * as expression evaluating to CHR() value. - * $RETURNS$ - * Returns resulting byte, in CHR() form. If parameters are faulty, - * returns NIL. - * $DESCRIPTION$ - * Can be used for bit-wise byte manipulation. In effect, this is a - * bit-by-bit NEG (two's complement) operation. Equivalent to NEG - * assembler instruction. - * - * This function is presented to illustrate that bit-wise operations - * are possible with Clipper code. For greater speed, write .c or - * .asm versions and use the Clipper Extend system. - * $EXAMPLES$ - * This code performs a bit-wise NEG on byte represented by CHR(32): - * - * cNewByte := FT_BYTENOT(CHR(32)) - * ? asc(cNewByte) // result: 224 - * - * For a demonstration of Clipper bit manipulations, compile and - * link the program bittest.prg in the Nanforum Toolkit source code. - * $SEEALSO$ - * FT_BYTEOR() FT_BYTEXOR() FT_BYTENOT() FT_BYTEAND() - * $END$ - */ - - FUNCTION FT_BYTENEG(cByte) RETURN iif(valtype(cByte) != "C", NIL, chr((256 - asc(cByte)) % 256)) diff --git a/harbour/contrib/hbnf/bytenot.prg b/harbour/contrib/hbnf/bytenot.prg index 99b059c1f2..1fe9b699c2 100644 --- a/harbour/contrib/hbnf/bytenot.prg +++ b/harbour/contrib/hbnf/bytenot.prg @@ -25,45 +25,6 @@ * */ - - -/* $DOC$ - * $FUNCNAME$ - * FT_BYTENOT() - * $CATEGORY$ - * String - * $ONELINER$ - * Perform bit-wise NOT on an ASCII character (byte) - * $SYNTAX$ - * FT_BYTENOT( ) -> cNewByte - * $ARGUMENTS$ - * is a character from CHR(0) to CHR(255). - * May be passed in CHR() form, as character literal, or - * as expression evaluating to CHR() value. - * $RETURNS$ - * Returns resulting byte, in CHR() form. If parameters are faulty, - * returns NIL. - * $DESCRIPTION$ - * Can be used for bitwise byte manipulation. In effect, this is a - * bit-by-bit NOT (one's complement) operation. Equivalent to the - * NOT assembler instruction. - * - * This function is presented to illustrate that bit-wise operations - * are possible with Clipper code. For greater speed, write .c or - * .asm versions and use the Clipper Extend system. - * $EXAMPLES$ - * This code performs a bitwise NOT on byte represented by CHR(32): - * - * cNewByte := FT_BYTENOT( CHR(32) ) - * ? ASC( cNewByte ) // result: 223 - * - * For a demonstration of Clipper bit manipulations, compile and - * link the program bittest.prg in the Nanforum Toolkit source code. - * $SEEALSO$ - * FT_BYTEOR() FT_BYTEXOR() FT_BYTENEG() FT_BYTEAND() - * $END$ - */ - FUNCTION FT_BYTENOT(cByte) LOCAL nCounter, cNewByte diff --git a/harbour/contrib/hbnf/byteor.prg b/harbour/contrib/hbnf/byteor.prg index 789ae9f99b..da3c11c54d 100644 --- a/harbour/contrib/hbnf/byteor.prg +++ b/harbour/contrib/hbnf/byteor.prg @@ -24,45 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_BYTEOR() - * $CATEGORY$ - * String - * $ONELINER$ - * Perform bit-wise OR on two ASCII characters (bytes) - * $SYNTAX$ - * FT_BYTEOR( , ) -> cNewByte - * $ARGUMENTS$ - * and are characters from CHR(0) TO CHR(255). - * May be passed in CHR() form, as character literals, or as - * expressions evaluating to CHR() values. - * $RETURNS$ - * Returns resulting byte, in CHR() form. If parameters are faulty, - * returns NIL. - * $DESCRIPTION$ - * Can be used for bit-wise byte manipulation. In effect, this is a - * bit-by-bit OR operation. Equivalent to OR assembler instruction. - * - * This function is presented to illustrate that bit-wise operations - * are possible with Clipper code. For greater speed, write .c or - * .asm versions and use the Clipper Extend system. - * $EXAMPLES$ - * This code performs a bit-wise OR on two bytes represented - * by CHR(20) and CHR(10): - * - * cNewByte := FT_BYTEOR( CHR(20), CHR(10) ) - * ? ASC( cNewByte ) // result: 30 - * ? cNewByte // result: non-printable character - * - * For a demonstration of Clipper bit manipulations, compile and - * link the program bittest.prg in the Nanforum Toolkit source code. - * $SEEALSO$ - * FT_BYTEXOR() FT_BYTENOT() FT_BYTENEG() FT_BYTEAND() - * $END$ - */ - FUNCTION FT_BYTEOR(cByte1, cByte2) LOCAL nCounter, cNewByte diff --git a/harbour/contrib/hbnf/bytexor.prg b/harbour/contrib/hbnf/bytexor.prg index 8088683803..fc85d02f7d 100644 --- a/harbour/contrib/hbnf/bytexor.prg +++ b/harbour/contrib/hbnf/bytexor.prg @@ -27,45 +27,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_BYTEXOR() - * $CATEGORY$ - * String - * $ONELINER$ - * Perform bit-wise XOR on two ASCII characters (bytes) - * $SYNTAX$ - * FT_BYTEXOR( , ) -> cNewByte - * $ARGUMENTS$ - * and are characters from CHR(0) to CHR(255). - * May be passed in CHR() form, as character literals, or - * as expressions evaluating to CHR() values. - * $RETURNS$ - * Returns resulting byte, in CHR() form. If parameters are faulty, - * returns NIL. - * $DESCRIPTION$ - * Can be used for bit-wise byte manipulation. In effect, this is a - * bit-by-bit XOR operation. Equivalent to XOR assembler instruction. - * - * This function is presented to illustrate that bit-wise operations - * are possible with Clipper code. For greater speed, write .c or - * .asm versions and use the Clipper Extend system. - * $EXAMPLES$ - * This code performs a bit-wise XOR on two bytes represented - * by CHR(32) and CHR(55): - * - * cNewByte := FT_BYTEXOR( CHR(32), CHR(55) ) - * ? ASC( cNewByte ) // result: 23 - * ? cNewByte // result: non-printable character - * - * For a demonstration of Clipper bit manipulations, compile and - * link the program bittest.prg in the Nanforum Toolkit source code. - * $SEEALSO$ - * FT_BYTEOR() FT_BYTENOT() FT_BYTENEG() FT_BYTEAND() - * $END$ - */ - FUNCTION FT_BYTEXOR(cByte1, cByte2) LOCAL nCounter, cNewByte diff --git a/harbour/contrib/hbnf/calendar.prg b/harbour/contrib/hbnf/calendar.prg index 66d151e230..785c67cee2 100644 --- a/harbour/contrib/hbnf/calendar.prg +++ b/harbour/contrib/hbnf/calendar.prg @@ -21,81 +21,6 @@ * */ - - -/* $DOC$ - * $FUNCNAME$ - * FT_CALENDAR() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Display date/time calendar, find a date, return calendar data. - * $SYNTAX$ - * FT_CALENDAR ( [ ], [ ], [ ], [ ] , - * [ ] ) -> aRetVal - * $ARGUMENTS$ - * - * is an optional screen row for calendar display, - * default row 1. - * - * is an optional screen col for calendar display, - * default col 63. - * - * is an optional color string for displayed messages, - * default is bright white text over green background. - * - * is an optional logical variable. If true (.T.), - * it uses FT_SHADOW() to add a transparent shadow - * to the display, default (.F.). - * - * is an optional logical variable. If true, uses - * FT_XBOX to display a four line help message - * if the F1 key is pressed, default (.F.). - * - * $RETURNS$ - * aRetVal is an 8 element array containing date, month, day, year, - * month (in character format), day of the week, julian day - * and current time. - * - * $DESCRIPTION$ - * FT_CALENDAR() simply displays today's date, time and julian - * day in a two line display with an optional box shadow. Cursor keys may - * be used to page through the calendar by day, week, month or year - * increments. Returns an 8 element array of calendar data: - * - * Element Value - * [1] Date in current date format. - * [2] Numeric month number. - * [3] Numeric day number. - * [4] Numeric year number. - * [5] Month in character format. - * [6] Day of the week in character format. - * [7] Numeric Julian day. - * [8] Current time in time format. - * - * WARNING: FT_CALENDAR uses FT_SHADOW and FT_XBOX - * from the Nanforum Toolkit! - * - * $EXAMPLES$ - * - * LOCAL aRetVal[8] - * CLS - * aRetVal := FT_CALENDAR (10,40,'W+/RB',.T.,.T.) - * ?aRetVal[1] // Result: 04/20/91 - * ?aRetVal[2] // Result: 4 - * ?aRetVal[3] // Result: 20 - * ?aRetVal[4] // Result: 1991 - * ?aRetVal[5] // Result: April - * ?aRetVal[6] // Result: Saturday - * ?aRetVal[7] // Result: 110 - * ?aRetVal[8] // Result: 12:45:20 - * - * $SEEALSO$ - * FT_DAYOFYR() - * - * $END$ - */ - #include "setcurs.ch" #ifdef FT_TEST @@ -119,7 +44,6 @@ RETURN NIL #endif - #include "inkey.ch" FUNCTION FT_CALENDAR (nRow, nCol, cColor, lShadow, lShowHelp) diff --git a/harbour/contrib/hbnf/caplock.c b/harbour/contrib/hbnf/caplock.c index 85cee25671..795fd6361a 100644 --- a/harbour/contrib/hbnf/caplock.c +++ b/harbour/contrib/hbnf/caplock.c @@ -32,36 +32,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_CAPLOCK() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Determine and optionally change the status of CapLock key - * $SYNTAX$ - * FT_CAPLOCK([ ]) -> lCurrentSetting - * $ARGUMENTS$ - * is optional and if supplied is the new setting - * for the CapLock key. Specify .T. to turn CapLock on, or .F. to - * turn it off. - * $RETURNS$ - * .T. if CapLock is set, .F. if it isn't set. The value returned - * represents the setting in effect prior to any changes that might - * by made by . - * $DESCRIPTION$ - * This function is useful if you need to know or set the status of the - * CapLock key for some reason. - * $EXAMPLES$ - * IF FT_CAPLOCK() - * Qout( "CapLock is active" ) - * ENDIF - * $SEEALSO$ - * FT_ALT() FT_CTRL() FT_NUMLOCK() FT_PRTSCR() FT_SHIFT() - * $END$ - */ - #include "hbapigt.h" #include "hbapiitm.h" diff --git a/harbour/contrib/hbnf/chdir.c b/harbour/contrib/hbnf/chdir.c index aaa3c30d43..b1598f9c39 100644 --- a/harbour/contrib/hbnf/chdir.c +++ b/harbour/contrib/hbnf/chdir.c @@ -23,37 +23,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_CHDIR() - * $CATEGORY$ - * DOS/BIOS - * $ONELINER$ - * Change the current directory - * $SYNTAX$ - * FT_CHDIR( ) -> nResult - * $ARGUMENTS$ - * is the name of the desired directory. - * $RETURNS$ - * 0 if successful - * 3 if path not found - * 99 if invalid parameters passed - * $DESCRIPTION$ - * Use this function if you prefer to change the active directory - * instead of relying on the SET PATH command. - * - * The source code is written to adhere to Turbo Assembler's IDEAL mode. - * To use another assembler, you will need to rearrange the PROC and - * SEGMENT directives, and also the ENDP and ENDS directives (a very - * minor task). - * $EXAMPLES$ - * FT_CHDIR( "C:\clipper" ) - * FT_CHDIR( "\" ) - * FT_CHDIR( "..\source" ) - * $END$ - */ - /*This is the Original FT_CHDIR() code IDEAL MODEL HUGE diff --git a/harbour/contrib/hbnf/clrsel.prg b/harbour/contrib/hbnf/clrsel.prg index 68f1cc6528..31c040c395 100644 --- a/harbour/contrib/hbnf/clrsel.prg +++ b/harbour/contrib/hbnf/clrsel.prg @@ -24,108 +24,6 @@ * */ - - -/* $DOC$ - * $FUNCNAME$ - * FT_ClrSel() - * $CATEGORY$ - * Menus/Prompts - * $ONELINER$ - * User Selectable Colour Routine - * $SYNTAX$ - * FT_ClrSel( , [ ], [ ] -> aClrData - * $ARGUMENTS$ - * - * is an array of subarrays, with each subarray containing - * information about the colour settings. - * - * The subarray has the following structure: - * - * [1] cName is the name of this colour setting i.e. "Pick List" - * Maximum length is 20 bytes - * - * [2] cClrStr is the current colour string - * Default is "W/N,N/W,N/N,N/N,N/W" - * - * If Setting type is "M" (Menu) the colours are... - * 1. Prompt Colour - * 2. Message Colour - * 3. HotKey Colour - * 4. LightBar Colour - * 5. LightBar HotKey Colour - * - * Note: While there are many ways to code the individual - * colour combinations, they should be in the same - * format that gets returned from SETCOLOR(), so - * the defaults can be found in the colour palette. - * - * foreground [+] / background [*] - * i.e. "GR+/BG*, N/W*, N+/N, , W/N" - * - * [3] cType is the type of colour setting - * Default is "W" (Window) - * - * T = Title Only 1 colour element - * D = Desktop Background colour and character - * M = Menu For FT_Menuto() style menus - * W = Window Windows with radio buttons - * G = Get For use with @ SAY... - * B = Browse For tBrowse() and *dbEdit() - * A = aChoice Pick-lists etc... - * - * W/G/B/A are functionally the same but will provide - * a more appropriate test display. - * - * [4] cFillChar is the character (for desktop background only) - * Default is CHR(177) "±±±±±±±±±±±±±±" - * - * - * .T. use colour palette - * .F. use monochrome palette - * - * Default is the ISCOLOR() setting - * - * 2 Byte character string for colour test display - * - * Default is the CHR(254)+CHR(254) "þþ" - * - * $RETURNS$ - * An array identical to the one passed, with new selected colours - * $DESCRIPTION$ - * This function allows users to select their own colour combinations - * for all the different types of screen I/O in a typical application. - * This facilitates an easy implementation of Ted Means' replacement - * of the @..PROMPT/MENU TO found in the NanForum Toolkit. If you are - * not using FT_MENUTO(), you can specify "A" for setting type and have - * a normal colour string returned. - * $EXAMPLES$ - * LOCAL aClrs := {} - * LOCAL lColour := ISCOLOR() - * LOCAL cChr := CHR(254) + CHR(254) - * - * SET SCOREBOARD Off - * SETBLINK( .F. ) // Allow bright backgrounds - * - * *.... a typical application might have the following different settings - * * normally these would be stored in a .dbf/.dbv - * aClrs := {; - * { "Desktop", "N/BG", "D", "±" }, ; - * { "Title", "N/W", "T" }, ; - * { "Top Menu", "N/BG,N/W,W+/BG,W+/N,GR+/N", "M" }, ; - * { "Sub Menu", "W+/N*,GR+/N*,GR+/N*,W+/R,G+/R","M" }, ; - * { "Standard Gets", "W/B, W+/N,,, W/N", "G" }, ; - * { "Nested Gets", "N/BG, W+/N,,, W/N", "G" }, ; - * { "Help", "N/G, W+/N,,, W/N", "W" }, ; - * { "Error Messages", "W+/R*,N/GR*,,,N/R*", "W" }, ; - * { "Database Query", "N/BG, N/GR*,,,N+/BG", "B" }, ; - * { "Pick List", "N/GR*,W+/B,,, BG/GR*", "A" } ; - * } - * - * aClrs := FT_ClrSel( aClrs, lColour, cChr ) - * $END$ - */ - /* * File Contents * diff --git a/harbour/contrib/hbnf/cntryset.prg b/harbour/contrib/hbnf/cntryset.prg index 11aa6530f2..f5bb8f04ac 100644 --- a/harbour/contrib/hbnf/cntryset.prg +++ b/harbour/contrib/hbnf/cntryset.prg @@ -24,38 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_SETCENTURY() - * $CATEGORY$ - * Environment - * $ONELINER$ - * Check/Set the CENTURY Setting - * $SYNTAX$ - * FT_SETCENTURY( [ ] ) -> - * $ARGUMENTS$ - * lNewSetState - Boolean to Set CENTURY - * .F. - Toggle CENTURY off - * .T. - Toggle CENTURY on - * If not specified, leave CENTURY as is - * $RETURNS$ - * The state of the CENTURY setting upon entry to the routine - * $DESCRIPTION$ - * This function returns the state (ON/OFF, TRUE/FALSE) of the CENTURY - * and optionally sets it ON or OFF. - * $EXAMPLES$ - * lOldState := FT_SETCENTURY() // Get current CENTURY Setting - * - * lOldState := FT_SETCENTURY(.T.) // Get the current CENTURY Setting - * // and turn it on (set it to TRUE) - * - * lOldState := FT_SETCENTURY(.F.) // Get the current CENTURY Setting - * // and turn it off (set it to FALSE) - * $END$ - */ - - #define IS_LOGICAL(x) (VALTYPE(x) == "L") FUNCTION FT_SETCENTURY(lNewSetState) diff --git a/harbour/contrib/hbnf/color2n.c b/harbour/contrib/hbnf/color2n.c index 81fcb0a67c..ec9254213a 100644 --- a/harbour/contrib/hbnf/color2n.c +++ b/harbour/contrib/hbnf/color2n.c @@ -22,35 +22,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_COLOR2N() - * $CATEGORY$ - * String - * $ONELINER$ - * Returns the numeric complement of a Clipper color string - * $SYNTAX$ - * FT_COLOR2N( ) -> nValue - * $ARGUMENTS$ - * is a Clipper color string - * $RETURNS$ - * The numeric complement of a color string or 0 if passed color - * is invalid. - * $DESCRIPTION$ - * This function is useful when calling other functions that expect - * a numeric color parameter. It is often more convenient to pass - * a converted color string than having to calculate or look up the - * corresponding number. - * $EXAMPLES$ - * nColor := FT_COLOR2N( "gr+/b" ) // returns 30 - * - * FT_SETATTR( 0, 0, 10, 10, nColor ) - * $SEEALSO$ - * FT_N2COLOR() - * $END$ - */ - #include "hbapi.h" #include "hbapigt.h" diff --git a/harbour/contrib/hbnf/ctrl.c b/harbour/contrib/hbnf/ctrl.c index 9e876f4d5a..2182ae7f95 100644 --- a/harbour/contrib/hbnf/ctrl.c +++ b/harbour/contrib/hbnf/ctrl.c @@ -31,34 +31,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_CTRL() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Determine status of the Ctrl key - * $SYNTAX$ - * FT_CTRL() -> lValue - * $ARGUMENTS$ - * None - * $RETURNS$ - * .T. if Ctrl key is pressed, .F. if otherwise. - * $DESCRIPTION$ - * This function is useful for times you need to know whether or not - * the Ctrl key is pressed, such as during a MemoEdit(). - * $EXAMPLES$ - * IF FT_CTRL() - * @24, 0 say "Ctrl" - * ELSE - * @24, 0 say " " - * ENDIF - * $SEEALSO$ - * FT_CAPLOCK() FT_NUMLOCK() FT_PRTSCR() FT_SHIFT() FT_ALT() - * $END$ - */ - #include "hbapigt.h" #include "hbapiitm.h" diff --git a/harbour/contrib/hbnf/d2e.prg b/harbour/contrib/hbnf/d2e.prg index dcffd418ee..a627fc6972 100644 --- a/harbour/contrib/hbnf/d2e.prg +++ b/harbour/contrib/hbnf/d2e.prg @@ -24,42 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_D2E() - * $CATEGORY$ - * Conversion - * $ONELINER$ - * Convert decimal to scientific notation - * $SYNTAX$ - * FT_D2E( , ) -> - * $ARGUMENTS$ - * Decimal number to convert - * - * Number of decimal places in result. - * Defaults to 6 decimal places. - * $RETURNS$ - * A string representing a number in - * scientific notation - * $DESCRIPTION$ - * Given a decimal number and the desired precision, - * a string representing the equivalent in scientific - * notation is returned. - * $EXAMPLES$ - * ? FT_D2E( 12.345, 2 ) - * -> 1.23E1 - * - * ? FT_D2E( -12.345, 3 ) - * -> -1.235E1 - * - * ? FT_D2E( 0.00000543, 2 ) - * -> 5.43E-6 - * $SEEALSO$ - * FT_E2D() - * $END$ - */ - #define log10( num ) log( num ) / log( 10 ) #define DEFAULT_PRECISION 6 #command DEFAULT

TO =>

:= iif(

== NIL, ,

) diff --git a/harbour/contrib/hbnf/datecnfg.prg b/harbour/contrib/hbnf/datecnfg.prg index 91ac2dd1ed..c2caa9fd41 100644 --- a/harbour/contrib/hbnf/datecnfg.prg +++ b/harbour/contrib/hbnf/datecnfg.prg @@ -27,7 +27,6 @@ * */ - #ifdef FT_TEST ******************************************************************** * @@ -168,7 +167,6 @@ RETURN NIL - * DEMO Monthly Calendar function. * nType : 0 = FT_MONTH, 1 = FT_ACCTMONTH * @@ -231,81 +229,6 @@ #endif -/* $DOC$ - * $FUNCNAME$ - * FT_DATECNFG() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Set beginning of year/week for FT_ date functions - * $SYNTAX$ - * FT_DATECNFG( [ ], [ ] ) -> aDateInfo - * $ARGUMENTS$ - * is a character date string in the user's system date - * format, i.e., the same as the user would enter for CTOD(). If - * this argument is NIL, the current value is unchanged. - * - * Note: The year portion of the date string must be present and - * be a valid year; however, it has no real meaning. - * - * is a number from 1 to 7 (1 = Sunday) indicating the - * desired start of a work week. If this argument is NIL, - * the current value is unchanged. - * - * $RETURNS$ - * A 2-element array containing the following information: - * - * aDateInfo[1] - an ANSI date string indicating the beginning - * date of the year. Only the month and day are - * meaningful. - * - * aDateInfo[2] - the number of the first day of the week - * (1 = Sunday) - * - * $DESCRIPTION$ - * FT_DATECNFG() is called internally by many of the date functions - * in the library to determine the beginning of year date and - * beginning of week day. - * - * The default beginning of the year is January 1st and the default - * beginning of the week is Sunday (day 1). Either or both of these - * settings may be changed by calling FT_DATECNFG() with the proper - * arguments. They will retain their values for the duration of the - * program or until they are changed again by a subsequent call to - * FT_DATECNFG(). - * - * It is not necessary to call FT_DATECNFG() unless you need to - * change the defaults. - * - * FT_DATECNFG() affects the following library functions: - * - * FT_WEEK() FT_ACCTWEEK() FT_DAYTOBOW() - * FT_MONTH() FT_ACCTMONTH() FT_DAYOFYR() - * FT_QTR() FT_ACCTQTR() FT_ACCTADJ() - * FT_YEAR() FT_ACCTYEAR() - * $EXAMPLES$ - * // Configure library date functions to begin year on - * // July 1st. - * - * FT_DATECNFG("07/01/80") // year is insignificant - * - * // Examples of return values: - * - * // System date format: American aArray[1] aArray[2] - * - * aArray := FT_DATECNFG() // '1980.01.01' 1 (Sun.) - * aArray := FT_DATECNFG('07/01/80') // '1980.07.01' 1 (Sun.) - * aArray := FT_DATECNFG('07/01/80', 2) // '1980.07.01' 2 (Mon.) - * aArray := FT_DATECNFG( , 2 ) // '1980.01.01' 2 (Mon.) - * - * // System date format: British - * - * aArray := FT_DATECNFG('01/07/80', 2) // '1980.07.01' 2 (Mon.) - * $SEEALSO$ - * FT_ACCTADJ() - * $END$ -*/ - FUNCTION FT_DATECNFG( cFYStart ,nDow ) STATIC aDatePar := { "1980.01.01", 1 } diff --git a/harbour/contrib/hbnf/dayofyr.prg b/harbour/contrib/hbnf/dayofyr.prg index 4c1eef36db..0a8ece8ec8 100644 --- a/harbour/contrib/hbnf/dayofyr.prg +++ b/harbour/contrib/hbnf/dayofyr.prg @@ -27,66 +27,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_DAYOFYR() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Return calendar, fiscal or accounting day data - * $SYNTAX$ - * FT_DAYOFYR( [ ], [ ], [ ] ) - * -> aDateInfo - * $ARGUMENTS$ - * is any valid date in any valid format. Defaults - * to current system date if not supplied. - * - * is a number from 1 to 371, signifying a day of a year. - * Defaults to current day if not supplied. - * - * is a logical which specifies the type of year to base - * the return value on: .F. = calendar or fiscal year, - * .T. = accounting year. - * $RETURNS$ - * A three element array containing the following data: - * - * If is specified: - * - * aDateInfo[1] - The date of the specified day number - * aDateInfo[2] - The beginning date of the year - * aDateInfo[3] - The ending date of the year - * - * If is not specified: - * - * aDateInfo[1] - The year and day as a character string "YYYYDDD" - * aDateInfo[2] - The beginning date of the year - * aDateInfo[3] - The ending date of the year - * $DESCRIPTION$ - * FT_DAYOFYR() returns an array containing data about a day in the - * calendar or fiscal year containing the given date. - * - * The beginning of year date defaults to January 1st but may be - * changed with FT_DATECNFG(). - * $EXAMPLES$ - * aDateInfo := FT_DAYOFYR( CTOD("03/31/91") ) - * ? aDateInfo[1] // 1991090 (90th day of year 1991) - * ? aDateInfo[2] // 01/01/91 - * ? aDateInfo[3] // 12/31/91 - * - * aDateInfo := FT_DAYOFYR( , 90 ) // assume current date is 3/31/91 - * ? aDateInfo[1] // 03/31/91 (90th day of year) - * ? aDateInfo[2] // 01/01/91 - * ? aDateInfo[3] // 12/31/91 - * - * aDateInfo := FT_DAYOFYR( , 90, .T. ) - * ? aDateInfo[1] // 03/29/91 (90th day of accounting year) - * ? aDateInfo[2] // 12/30/90 (1st day of accounting year) - * ? aDateInfo[3] // 12/28/91 (last day of accounting year) - * $SEEALSO$ - * FT_DATECNFG() - * $END$ -*/ - FUNCTION FT_DAYOFYR( dGivenDate, nDayNum, lIsAcct) LOCAL lIsDay, nTemp, aRetVal diff --git a/harbour/contrib/hbnf/daytobow.prg b/harbour/contrib/hbnf/daytobow.prg index 09053cdea1..488bcfc25f 100644 --- a/harbour/contrib/hbnf/daytobow.prg +++ b/harbour/contrib/hbnf/daytobow.prg @@ -27,43 +27,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_DAYTOBOW() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Calculate no. of days between date and beginning of week - * $SYNTAX$ - * FT_DAYTOBOW( [ ] ) -> nDays - * $ARGUMENTS$ - * is any valid date in any valid date format. - * Defaults to current date if not supplied. - * $RETURNS$ - * A positive number of days to beginning of week, range 0 to 6. - * $DESCRIPTION$ - * FT_DAYTOBOW() returns the number of days to the beginning of the - * week. Normally this will be one less than the value that - * would be returned by the Clipper function DOW(), unless the - * day for the beginning of the week has been changed with - * FT_DATECNFG(). - * $EXAMPLES$ - * dDate := CTOD( "09/15/90" ) - * - * ? DOW( dDate ) // 7 - * ? CDOW( dDate ) // Saturday - * ? FT_DAYTOBOW( dDate ) // 6 - * - * // change beginning of week to Friday (yeah!) - * FT_DATECNFG( , 6 ) - * ? DOW( dDate ) // 7 - * ? CDOW( dDate ) // Saturday - * ? FT_DAYTOBOW( dDate ) // 1 - * $SEEALSO$ - * FT_DATECNFG() FT_ACCTWEEK() FT_WEEK() - * $END$ -*/ - FUNCTION FT_DAYTOBOW( dGivenDate ) LOCAL nRetVal, nDOW_Start diff --git a/harbour/contrib/hbnf/dectobin.prg b/harbour/contrib/hbnf/dectobin.prg index e3182dc529..ccef5eb642 100644 --- a/harbour/contrib/hbnf/dectobin.prg +++ b/harbour/contrib/hbnf/dectobin.prg @@ -24,28 +24,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_DEC2BIN() - * $CATEGORY$ - * Conversion - * $ONELINER$ - * Convert decimal to binary - * $SYNTAX$ - * FT_DEC2BIN( ) -> cBinaryNumber - * $ARGUMENTS$ - * is the numeric expression to be converted. - * $RETURNS$ - * A character string representing in binary format. - * $DESCRIPTION$ - * This function can be used in conjunction with any bit-wise - * operations. - * $EXAMPLES$ - * QOut( FT_DEC2BIN(255) ) // "11111111" - * QOut( FT_DEC2BIN(2) ) // "00000010" - * $END$ - */ - #ifdef FT_TEST FUNCTION MAIN diff --git a/harbour/contrib/hbnf/descendn.c b/harbour/contrib/hbnf/descendn.c index 64b6515e64..605e4d1dbc 100644 --- a/harbour/contrib/hbnf/descendn.c +++ b/harbour/contrib/hbnf/descendn.c @@ -21,30 +21,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_Descend() - * $CATEGORY$ - * Conversion - * $ONELINER$ - * Create a descending index key value - * $SYNTAX$ - * FT_Descend( ) -> - * $ARGUMENTS$ - * is any expression of character, numeric, date, or logical type. - * $RETURNS$ - * The inverse of - * $DESCRIPTION$ - * This function is a replacement for CA-Cl*pper's Descend() function, - * which is known to produce memory corruption occassionally. - * $EXAMPLES$ - * ? FT_Descend( 1 ) // Returns -1 - * $SEEALSO$ - * FT_XTOY() - * $END$ - */ - #include "hbapi.h" #include "hbapiitm.h" diff --git a/harbour/contrib/hbnf/dfile.prg b/harbour/contrib/hbnf/dfile.prg index cfe3aa94fb..1c0979b173 100644 --- a/harbour/contrib/hbnf/dfile.prg +++ b/harbour/contrib/hbnf/dfile.prg @@ -27,8 +27,6 @@ * */ - - THREAD static nHandle := 0 #ifdef FT_TEST @@ -83,64 +81,6 @@ THREAD static nHandle := 0 #endif - - - -/* $DOC$ - * $FUNCNAME$ - * FT_DFSETUP() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Set up parameters for FT_DISPFILE() - * $SYNTAX$ - * FT_DFSETUP( , , , , , ; - * , , , , ; - * , , , ) -> nResult - * $ARGUMENTS$ - * - text file to display (full path and filename) - * - upper row of window - * - left col of window - * - lower row of window - * - right col of window - * - line to place highlight at startup - * - normal text color (numeric attribute) - * - text highlight color (numeric attribute) - * - terminating key list (each byte of string is a - * key code) - * - act-like-a-browse-routine flag - * - col increment for left/right arrows - * - right margin - anything to right is truncated - * - size of the paging buffer - * $RETURNS$ - * 0 if successful, FError() code if not - * $DESCRIPTION$ - * Note: make sure you allocate a buffer large enough to hold enough - * data for the number of lines that you have in the window. Use the - * following formula as a guideline: - * - * buffer size = (# of line) + 1 * RMargin - * - * This is the smallest you should make the buffer. For normal use, - * 4096 bytes is recommended - * $EXAMPLES$ - * @ 4,9 TO 11,71 - * - * FT_DFSETUP("test.txt", 5, 10, 10, 70, 1, 7, 15,; - * "AaBb" + Chr(143), .T., 5, 132, 4096) - * - * cKey = FT_DISPFILE() - * - * FT_DFCLOSE() - * - * @ 20,0 SAY "Key that terminated FT_DISPFILE() was: " + '[' + cKey + ']' - * $SEEALSO$ - * FT_DISPFILE() FT_DFCLOSE() - * $END$ - */ - - - function FT_DFSETUP(cInFile, nTop, nLeft, nBottom, nRight,; nStart, nCNormal, nCHighlight, cExitKeys,; lBrowse, nColSkip, nRMargin, nBuffSize ) @@ -182,42 +122,6 @@ function FT_DFSETUP(cInFile, nTop, nLeft, nBottom, nRight,; return (rval) - - -/* $DOC$ - * $FUNCNAME$ - * FT_DFCLOSE() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Close file displayed by FT_DISPFILE() - * $SYNTAX$ - * FT_DFCLOSE() -> NIL - * $ARGUMENTS$ - * None - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Closes the file opened by FT_DFSETUP() - * $EXAMPLES$ - * @ 4,9 TO 11,71 - * - * FT_DFSETUP("test.txt", 5, 10, 10, 70, 1, 7, 15,; - * "AaBb" + Chr(143), .T., 5, 132, 4096) - * - * cKey = FT_DISPFILE() - * - * FT_DFCLOSE() - * - * @ 20,0 SAY "Key that terminated FT_DISPFILE() was: " + '[' + cKey + ']' - * $SEEALSO$ - * FT_DFSETUP() FT_DISPFILE() - * $END$ - */ - - - - function FT_DFCLOSE() if ( nHandle > 0 ) diff --git a/harbour/contrib/hbnf/diskfunc.prg b/harbour/contrib/hbnf/diskfunc.prg index 3148aa3074..4b145ae3d0 100644 --- a/harbour/contrib/hbnf/diskfunc.prg +++ b/harbour/contrib/hbnf/diskfunc.prg @@ -39,66 +39,14 @@ RETURN NIL #endif -/* $DOC$ - * $FUNCNAME$ - * FT_DSKSIZE() - * $CATEGORY$ - * DOS/BIOS - * $ONELINER$ - * Return the maximum capacity of a fixed disk - * $SYNTAX$ - * FT_DSKSIZE( [ ] ) -> nMaxCapacity - * $ARGUMENTS$ - * is the fixed disk to query. If no drive is sent, the - * operation will be performed on the default drive. Send without - * the ":". - * $RETURNS$ - * An integer representing the maximum disk capacity in bytes. - * $DESCRIPTION$ - * Function utilizing FT_INT86() to return Maximum Disk Size. - * Uses FT_INT86() through the internal function _ftDiskInfo(). - * $EXAMPLES$ - * ? FT_DSKSIZE() // Maximum capacity for default drive - * ? FT_DSKSIZE( "D" ) // Maximum capacity for Drive D: - * $END$ - */ - FUNCTION FT_DSKSIZE( cDrive ) local nDrive nDrive := iif( cDrive == NIL, 0, at( upper(cDrive), DRVTABLE ) ) Return DISKSPACE(nDrive,3) - -/* $DOC$ - * $FUNCNAME$ - * FT_DSKFREE() - * $CATEGORY$ - * DOS/BIOS - * $ONELINER$ - * Return the amount of available disk space - * $SYNTAX$ - * FT_DSKFREE( [ ] ) -> nSpaceAvail - * $ARGUMENTS$ - * is the fixed disk to query. If no parameter is passed - * the operation will be performed on the default drive. Do not - * include the ":". - * $RETURNS$ - * Integer representing the available disk space in bytes. - * $DESCRIPTION$ - * Function to return the available space on the passed - * drive letter or the default drive if no drive is passed. - * - * Uses FT_INT86() through the internal function _ftDiskInfo(). - * $EXAMPLES$ - * ? FT_DSKFREE() // Returns free space on default drive. - * $END$ - */ - - FUNCTION FT_DSKFREE( cDrive ) local nDrive nDrive := iif( cDrive == NIL, 0, at( upper(cDrive), DRVTABLE ) ) - RETURN DISKSPACE(nDrive,1) diff --git a/harbour/contrib/hbnf/dispc.c b/harbour/contrib/hbnf/dispc.c index e93f87d1eb..01d4d171d9 100644 --- a/harbour/contrib/hbnf/dispc.c +++ b/harbour/contrib/hbnf/dispc.c @@ -101,7 +101,6 @@ char *vseg; /* video segment variable */ /* prototypes */ - static void chattr(int x, int y, int len, int attr); static HB_FOFFSET getblock( HB_FOFFSET offset ); static void buff_align(void); @@ -114,8 +113,6 @@ static void lineup(void); static void filetop(void); static void filebot(void); - - /* * chattr() replace the color attribute with a new one starting at * location x, y and going for length len. @@ -134,9 +131,6 @@ static void chattr(int x, int y, int len, int attr) *vmem = (char) attr; } - - - /* * function getblock() reads the text file and returns the a block. * the variables offset and buffsize tell it where to start reading and @@ -183,11 +177,6 @@ static HB_FOFFSET getblock( HB_FOFFSET offset ) return hb_fsSeekLarge( infile, 0, FS_RELATIVE ) - buffbot; } - - - - - /* * buff_align makes sure the buffer top and bottom variables point * to actual complete lines of text. @@ -239,10 +228,6 @@ static void buff_align() } } - - - - /* * win_align takes the value for wintop and then figures out where * winbot would be. if winbot would extend past the end of the @@ -286,10 +271,6 @@ static void win_align() } } - - - - /* * this routine displays the actual text in the window. This is done * by taking each line and placing it in a string. the screen line @@ -304,7 +285,6 @@ static void disp_update(int offset) int line, col, pos, i; char *vmem; - bRefresh = HB_FALSE; line = 0; @@ -353,10 +333,6 @@ static void disp_update(int offset) hb_gtRest( sline, scol, eline, ecol, vseg ); } - - - - /* * move the window pointers so that a new window's worth of information * is visible. it adjusts the pointers within the buffer and if necessary @@ -404,10 +380,6 @@ static void winup() } } - - - - /* * move the window pointers so that a new window's worth of information * is visible. it adjusts the pointers within the buffer and if necessary @@ -457,10 +429,6 @@ static void windown() } } - - - - /* move the cursor one line down */ static void linedown() @@ -471,10 +439,6 @@ static void linedown() windown(); } - - - - /* move the cursor one line up */ static void lineup() @@ -485,10 +449,6 @@ static void lineup() winup(); } - - - - /* go to the top of the file */ static void filetop() @@ -508,10 +468,6 @@ static void filetop() win_align(); } - - - - /* goto the bottom of the file */ static void filebot() @@ -531,7 +487,6 @@ static void filebot() win_align(); } - HB_FUNC( _FT_DFINIT ) { int rval; @@ -560,7 +515,6 @@ HB_FUNC( _FT_DFINIT ) buffer = (char *) hb_xalloc(buffsize); /* allocate memory */ lbuff = (char *) hb_xalloc(maxlin + 1); /* for buffers */ - bIsAllocated = !(buffer == NULL || lbuff == NULL || vseg == NULL); /* memory allocated? */ if (!bIsAllocated) @@ -599,8 +553,6 @@ HB_FUNC( _FT_DFINIT ) colinc = hb_parni(11); /* column skip value */ - - bufftop = 0; /* init buffer top pointer */ buffbot = buffsize; /* init buffer bottom pointer */ buffoffset = 0; /* curr line offset into buffer */ @@ -609,8 +561,6 @@ HB_FUNC( _FT_DFINIT ) wintop = 0; /* init window top pointer */ winbot = 0; /* init window bottom pointer */ - - /* get file size */ fsize = hb_fsSeek( infile, 0, FS_END ) - 1; @@ -655,67 +605,6 @@ HB_FUNC ( _FT_DFCLOS ) } } -/* $DOC$ - * $FUNCNAME$ - * FT_DISPFILE() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Browse a text file - * $SYNTAX$ - * FT_DISPFILE() -> cExitkey - * $ARGUMENTS$ - * None - * $RETURNS$ - * The ASCII keystroke that terminated FT_DISPFILE() - * $DESCRIPTION$ - * This routine displays a text file within a defined window using as - * little memory as possible. The text file to display has to be - * present or an error value of 0 is returned (as a character.) - * - * Assumptions: The routine assumes that all lines are terminated - * with a CR/LF sequence (0x0d and 0x0a). - * - * Note: Make sure you allocate a buffer large enough to hold - * enough data for the number of lines that you have - * in the window. Use the following formula as a - * guideline - buffer size = (# of line) + 1 * RMargin - * this is the smallest you should make the buffer and - * for normal use I recommend 4096 bytes. - * - * Cursor Keys: Up, Down - moves the highlight line - * Left, Right - moves the window over nColSkip col's - * Home - moves the window to the far left - * End - moves the window to the nRMargin column - * PgUp, PgDn - moves the highlight one page - * Ctrl-PgUp - moves the highlight to the file top - * Ctrl-PgDn - moves the highlight to the file bottom - * Ctrl-Right - moves the window 16 col's to the right - * Ctrl-Left - moves the window 16 col's to the left - * - * Esc, Return - terminates the function - * - * All other keys are ignored unless they are specified - * within cExitKeys parameter. This list will tell the - * routine what keys terminate the function. Special - * keys must be passed by a unique value and that value - * can be found by looking in the keys.h file. - * $EXAMPLES$ - * @ 4,9 TO 11,71 - * - * FT_DFSETUP("test.txt", 5, 10, 10, 70, 1, 7, 15,; - * "AaBb" + Chr(143), .T., 5, 132, 4096) - * - * cKey = FT_DISPFILE() - * - * FT_DFCLOSE() - * - * @ 20,0 SAY "Key that terminated FT_DISPFILE() was: " + '[' + cKey + ']' - * $SEEALSO$ - * FT_DFSETUP() FT_DFCLOSE() - * $END$ - */ - HB_FUNC( FT_DISPFILE ) { int i; @@ -724,7 +613,6 @@ HB_FUNC( FT_DISPFILE ) int ch; - /* make sure buffers were allocated and file was opened */ if (bIsAllocated && infile > 0) { @@ -870,7 +758,6 @@ HB_FUNC( FT_DISPFILE ) else ch = 0; - /* store the key pressed as a character to be returned */ /* return key value to caller */ diff --git a/harbour/contrib/hbnf/dispmsg.prg b/harbour/contrib/hbnf/dispmsg.prg index 5745a51bc8..ee46eee141 100644 --- a/harbour/contrib/hbnf/dispmsg.prg +++ b/harbour/contrib/hbnf/dispmsg.prg @@ -27,100 +27,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_DISPMSG() - * $CATEGORY$ - * Menus/Prompts - * $ONELINER$ - * Display a message and optionally waits for a keypress - * $SYNTAX$ - * FT_DISPMSG( , [ ], - * [ ], [ ], - * [ ], [ ] ) -> lKeyMatch - * $ARGUMENTS$ - * is a multidimensional array of messages to be - * displayed and the color attributes for each message. - * - * The first dimension of the array contains one or more elements, - * each representing one line in the message box, up to the maximum - * number of rows on the screen. - * - * Within each line of the message individual characters or groups - * of characters may be delimited with braces ([]). The braces will - * be stripped out and the character(s) inside those braces will be - * highlighted. - * - * The second dimension of the array contains a color attribute for - * the corresponding element in dimension one, plus one additional - * element for the color of the box border. Dimension two will - * always contain one more element than dimension one. If an - * attribute is omitted, the last color selected will be used. - * - * is a character string of one or more keys to check - * for. If omitted, the message is displayed and control is returned - * to the calling procedure. If one character is specified, - * FT_DISPMSG() waits for one keypress, restores the screen and - * returns. If multiple characters are specified, FT_DISPMSG() - * remains in a loop until one of the specified keys has been - * pressed, then restores the screen and returns. - * - * is the upper row for the message box. If omitted, the - * box is centered vertically. - * - * is the leftmost column for the box. If omitted, the - * box is centered horizontally. - * - * is a string of characters or a variable for the box - * border. See the DISPBOX() function. If omitted, a double box is - * drawn. - * - * is a logical variable. If true (.T.) or omitted, it - * uses FT_SHADOW() to add a transparent shadow to the box. If - * false (.F.), the box is drawn without the shadow. - * $RETURNS$ - * If is not specified, FT_DISPMSG() will return false - * (.F.). - * - * If is a one-character string, FT_DISPMSG() will return - * true (.T.) if the user presses that key, or false (.F.) if any - * other key is pressed. - * - * If consists of multiple characters, it will lock the - * user in a loop until one of those keys are pressed and return the - * INKEY() value of the keypress. - * $DESCRIPTION$ - * FT_DISPMSG() is a multi-purpose pop-up for user messages. - * Multiple lines may be displayed, each with a different attribute. - * The box will be automatically centered on the screen, or the row - * and/or column can be specified by the programmer. It also centers - * each line of the message within the box. - * $EXAMPLES$ - * The following example displays a simple two-line message - * and returns immediately to the calling routine. - * - * FT_DISPMSG( { { "Printing Report" , ; - * "Press [ESC] To Interrupt" } , ; - * { "W+/B*", "W/B", "GR+/B" } } ) - * - * The next example displays a message and waits for a key press. - * - * FT_DISPMSG( { { "Press [D] To Confirm Deletion" , ; - * "Or Any Other Key To Abort" } , ; - * { "W+/B", "W+/B", "GR+/B" } } , ; - * "D" ) - * - * The next example displays a one-line message centered on row 5 - * and returns to the calling procedure. - * - * FT_DISPMSG( { { "Please Do Not Interrupt" } , ; - * { "W+/B", "GR+/B" } } , ; - * , 5, ) - * $END$ - */ - - #include "inkey.ch" #include "setcurs.ch" @@ -140,7 +46,6 @@ PROCEDURE Main( cCmdLine ) nMaxRow, ; nType - // main routine starts here SET SCOREBOARD OFF @@ -190,9 +95,6 @@ PROCEDURE Main( cCmdLine ) #endif // end of demo program - - - FUNCTION FT_DispMsg( aInfo, cKey, nBoxTop, nBoxLeft, cnBoxString, lShadow ) LOCAL xRtnVal := .F., ; @@ -277,7 +179,6 @@ FUNCTION FT_DispMsg( aInfo, cKey, nBoxTop, nBoxLeft, cnBoxString, lShadow ) FT_Shadow( nBoxTop, nBoxLeft, nBoxBottom, nBoxRight ) ENDIF - /* fill array with left positions for each row */ aLeft := ARRAY( LEN( aInfo[1] ) ) FOR i := 1 TO LEN( aInfo[1] ) @@ -295,13 +196,11 @@ FUNCTION FT_DispMsg( aInfo, cKey, nBoxTop, nBoxLeft, cnBoxString, lShadow ) ENDIF NEXT - /* display messages */ FOR i := 1 TO LEN( aInfo[1] ) @ nBoxTop+i, aLeft[i] SAY aInfo[1,i] COLOR aInfo[2,i] NEXT - /* highlight characters */ FOR i := 1 TO LEN( aPos ) FOR j := 1 TO LEN( aPos[i] ) @@ -314,7 +213,6 @@ FUNCTION FT_DispMsg( aInfo, cKey, nBoxTop, nBoxLeft, cnBoxString, lShadow ) NEXT NEXT - IF cKey != NIL IF LEN( cKey ) == 1 nOption := FT_SInkey(0) diff --git a/harbour/contrib/hbnf/dosver.prg b/harbour/contrib/hbnf/dosver.prg index 6632cc89f2..602771aa47 100644 --- a/harbour/contrib/hbnf/dosver.prg +++ b/harbour/contrib/hbnf/dosver.prg @@ -25,47 +25,11 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_DOSVER - * $CATEGORY$ - * DOS/BIOS - * $ONELINER$ - * Return the current DOS major and minor version as a string - * $SYNTAX$ - * FT_DOSVER() -> - * $ARGUMENTS$ - * None - * $RETURNS$ - * A character string with the major version number first, a - * period ("."), then the minor version number (e.g., "3.30") - * $DESCRIPTION$ - * - * FT_DOSVER() invokes DOS interrupt 21h, service 30 in order to - * return the current DOS version. It does this by setting up - * an array corresponding to machine registers and then calling - * the toolkit function FT_INT86(). - * - * It returns a character string corresponding to the DOS - * version, as follows: The major version, a period ("."), then - * the minor version. - * - * - * $EXAMPLES$ - * - * FUNCTION main() - * RETURN QOut( "Dos version: " + FT_DOSVER() ) - * - * $END$ - */ - #include "ftint86.ch" #define DOS 33 #define DOSVER 48 - #ifdef FT_TEST FUNCTION MAIN() QOut( "Dos version: " + FT_DOSVER() ) diff --git a/harbour/contrib/hbnf/e2d.prg b/harbour/contrib/hbnf/e2d.prg index 91b3ad0bbb..fdeee5af34 100644 --- a/harbour/contrib/hbnf/e2d.prg +++ b/harbour/contrib/hbnf/e2d.prg @@ -24,37 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_E2D() - * $CATEGORY$ - * Conversion - * $ONELINER$ - * Convert scientific notation string to a decimal - * $SYNTAX$ - * FT_E2D( ) -> - * $ARGUMENTS$ - * Scientific notation string to convert - * $RETURNS$ - * Decimal number - * $DESCRIPTION$ - * Given a string in the format x.yEz, the decimal - * equivalent is returned. - * $EXAMPLES$ - * ? FT_E2D( "1.23E1" ) - * -> 12.3 - * - * ? FT_E2D( "-1.235E1" ) - * -> -12.35 - * - * ? ft_d2e( "5.43E-6" ) - * -> 0.0000543 - * $SEEALSO$ - * FT_D2E() - * $END$ - */ - #ifdef FT_TEST function main( sNumE ) return qout( FT_E2D( sNumE ) ) diff --git a/harbour/contrib/hbnf/easter.prg b/harbour/contrib/hbnf/easter.prg index 6e4945ae1b..6e99fd28de 100644 --- a/harbour/contrib/hbnf/easter.prg +++ b/harbour/contrib/hbnf/easter.prg @@ -26,34 +26,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_EASTER() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Return the date of Easter - * $SYNTAX$ - * FT_EASTER( ) -> dEdate - * $ARGUMENTS$ - * xYear can be a character, date or numeric describing the year - * for which you wish to receive the date of Easter. - * $RETURNS$ - * The actual date that Easter occurs. - * $DESCRIPTION$ - * Returns the date of Easter for any year after 1582 up to Clipper's - * limit which the manual states is 9999, but the Guide agrees with - * the actual imposed limit of 2999. - * - * This function can be useful in calender type programs that indicate - * when holidays occur. - * $EXAMPLES$ - * dEdate := FT_EASTER( 1990 ) // returns 04/15/1990 - * $END$ - */ - - FUNCTION FT_EASTER (nYear) local nGold, nCent, nCorx, nCorz, nSunday, nEpact, nMoon,; nMonth := 0, nDay := 0 diff --git a/harbour/contrib/hbnf/elapmil.prg b/harbour/contrib/hbnf/elapmil.prg index c881f8e2ba..3c66267cdc 100644 --- a/harbour/contrib/hbnf/elapmil.prg +++ b/harbour/contrib/hbnf/elapmil.prg @@ -24,33 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ELAPMIN() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Return difference, in minutes, between two mil format times. - * $SYNTAX$ - * FT_ELAPMIN( , ) -> nMINUTES - * $ARGUMENTS$ - * character strings of military form "hhmm", - * where 0<=hh<24. - * $RETURNS$ - * - * $DESCRIPTION$ - * Finds the arithmetic difference between time two times - * (time 2 - time 1). - * If time 2 is smaller than time 1, a NEGATIVE value is returned. - * $EXAMPLES$ - * FT_ELAPMIN( "1718", "2040" ) -> 322 - * FT_ELAPMIN( "2040", "1718" ) -> -322 - * $SEEALSO$ - * FT_ELTIME() FT_MIL2MIN() FT_MIN2MIL() - * $END$ - */ - function FT_ELAPMIN(cTIME1,cTIME2) return ((VAL(LEFT(cTIME2,2))*60) + (VAL(RIGHT(cTIME2,2)))) - ; ((VAL(LEFT(cTIME1,2))*60) + (VAL(RIGHT(cTIME1,2)))) diff --git a/harbour/contrib/hbnf/elapsed.prg b/harbour/contrib/hbnf/elapsed.prg index b539069735..987868e51c 100644 --- a/harbour/contrib/hbnf/elapsed.prg +++ b/harbour/contrib/hbnf/elapsed.prg @@ -27,7 +27,6 @@ * */ - #ifdef FT_TEST FUNCTION DEMO() @@ -47,48 +46,6 @@ #endif -/* $DOC$ - * $FUNCNAME$ - * FT_ELAPSED() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Return elapsed time between two days and/or times - * $SYNTAX$ - * FT_ELAPSED([ ], [ ], ; - * , ) -> aTimedata - * $ARGUMENTS$ - * is any valid date in any date format. Defaults to DATE(). - * - * is any valid date in any date format. Defaults to DATE(). - * - * is a valid Time string of the format 'hh:mm:ss' where - * hh is hours in 24-hour format. - * - * is a valid Time string of the format 'hh:mm:ss' where - * hh is hours in 24-hour format. - * $RETURNS$ - * A two-dimensional array containing elapsed time data. - * $DESCRIPTION$ - * FT_ELAPSED() calculates the elapsed time between two Date/Time events. - * - * It returns an array which contains the following data: - * - * aRetVal[1,1] Integer Days aRetVal[1,2] Total Days (nn.nnnn) - * aRetVal[2,1] Integer Hours aRetVal[2,2] Total Hours (nn.nnnn) - * aRetVal[3,1] Integer Minutes aRetVal[3,2] Total Minutes (nn.nnnn) - * aRetVal[4,1] Integer Seconds aRetVal[4,2] Total Seconds (nn) - * $EXAMPLES$ - * FT_ELAPSED(CTOD('11/28/90'), CTOD('11/30/90'), '08:00:00', '12:10:30') - * will return: - * - * aRetVal[1,1] -> 2 (Days) aRetVal[1,2] -> 2.1740 Days - * aRetVal[2,1] -> 4 (Hours) aRetVal[2,2] -> 52.1750 Hours - * aRetVal[3,1] -> 10 (Minutes) aRetVal[3,2] -> 3130.5000 Minutes - * aRetVal[4,1] -> 30 (Seconds) aRetVal[4,2] -> 187830 Seconds - * $END$ - */ - FUNCTION FT_ELAPSED(dStart, dEnd, cTimeStart, cTimeEnd) LOCAL nTotalSec, nCtr, nConstant, nTemp, aRetVal[4,2] diff --git a/harbour/contrib/hbnf/eltime.prg b/harbour/contrib/hbnf/eltime.prg index e8d8ed9603..923c9e5c01 100644 --- a/harbour/contrib/hbnf/eltime.prg +++ b/harbour/contrib/hbnf/eltime.prg @@ -24,33 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ELTIME() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Compute difference between times in hours, minutes, seconds. - * $SYNTAX$ - * FT_ELTIME( , ) -> cDiff - * $ARGUMENTS$ - * character strings representing times in - * hh:mm:ss format. - * $RETURNS$ - * character string representing time difference in - * hh:mm:ss format. - * $DESCRIPTION$ - * Return the absolute difference between two times in hh:mm:ss format - * in character hours, minutes and seconds (hh:mm:ss). - * $EXAMPLES$ - * FT_ELTIME( "22:40:12", "23:55:17" ) -> 01:15:05 - * FT_ELTIME( "23:55:17", "22:40:12" ) -> 01:15:05 - * $SEEALSO$ - * FT_ELAPMIN() FT_MIL2MIN() FT_MIN2MIL() - * $END$ - */ - function FT_ELTIME(cTIME1,cTIME2) local nDELSECS, nHRS, nMINS, nSECS, nSECS1, nSECS2 diff --git a/harbour/contrib/hbnf/findith.prg b/harbour/contrib/hbnf/findith.prg index aeee2f6d97..9ef4ba5769 100644 --- a/harbour/contrib/hbnf/findith.prg +++ b/harbour/contrib/hbnf/findith.prg @@ -24,43 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_FINDITH() - * $CATEGORY$ - * String - * $ONELINER$ - * Find the "ith" occurrence of a substring within a string - * $SYNTAX$ - * FT_FINDITH( , , ; - * [, ] ) -> - * $ARGUMENTS$ - * is the string to search for. - * - * is the string to search. - * - * is the number of the occurrence to find. - * - * is a logical indicating if the search is to be case - * sensitive. The default is no case sensitivity (.F.). - * $RETURNS$ - * The position in the string cCheckIn of the ith occurrence of cCheckFor. - * $DESCRIPTION$ - * This function finds the position in a string of the "ith" time another - * string appears in it. - * $EXAMPLES$ - * // Find the Position in cMemoString of - * // the 10th Occurrence of "the", case - * // insensitive - * - * nNextPosition := FT_FINDITH("the", cMemoString, 10) - * $SEEALSO$ - * FT_AT2() - * $END$ - */ - - #define IS_NOT_LOGICAL(x) (VALTYPE(x) != "L") #define MAKE_UPPER(cString) (cString := UPPER(cString)) #define NULL "" diff --git a/harbour/contrib/hbnf/firstday.prg b/harbour/contrib/hbnf/firstday.prg index 49f4e099ed..39863f592d 100644 --- a/harbour/contrib/hbnf/firstday.prg +++ b/harbour/contrib/hbnf/firstday.prg @@ -24,35 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_FDAY() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Return first day of the month - * $SYNTAX$ - * FT_FDAY( [ ] ) -> dFirstDay - * $ARGUMENTS$ - * is a date within a month for which you want to find - * the first date of that month. If not passed or is an incorrect type, - * defaults to current system date. - * $RETURNS$ - * A Clipper date value representing the first date of the month. - * $DESCRIPTION$ - * This function will return the first day of the month of the date - * passed, or the first day of the current month if no argument is - * supplied. - * $EXAMPLES$ - * dDate := CTOD( "09/15/90" ) - * ? FT_FDAY( dDate ) // 09/01/90 - * ? FT_FDAY() // 03/01/91 (current month) - * $SEEALSO$ - * FT_LDAY() - * $END$ - */ - FUNCTION FT_FDAY(dDateToChk) IF Valtype(dDatetoChk) # "D" diff --git a/harbour/contrib/hbnf/floptst.prg b/harbour/contrib/hbnf/floptst.prg index 75adf002d0..7db7081153 100644 --- a/harbour/contrib/hbnf/floptst.prg +++ b/harbour/contrib/hbnf/floptst.prg @@ -36,56 +36,6 @@ * File header changed to conform to Toolkit standard. */ -/* $DOC$ - * $FUNCNAME$ - * FT_FLOPTST() - * $CATEGORY$ - * DOS/BIOS - * $ONELINER$ - * Test diskette drive status - * $SYNTAX$ - * FT_FLOPTST( ) -> nStatus - * $ARGUMENTS$ - * is the diskette drive number, 0 = A:, 1 = B: - * $RETURNS$ - * -1 - Wrong Parameters - * 0 - Drive Loaded and ready to read or write - * 1 - Drive Door Open or Diskette inserted upside down - * 2 - Diskette is unformatted - * 3 - Write protected - * 4 - Undetermined - * $DESCRIPTION$ - * FT_FLOPTST() is designed as a full replacement for ISDRIVE(). Where - * ISDRIVE() returns just .T. or .F. depending if the diskette drive is - * ready or not, FT_FLOPTST() returns a numeric code designating the - * diskette drive's status. - * - * FT_FLOPTST() is particularly useful in backup and restore programs - * that need to test the floppy drive before writing/reading from a - * floppy disk. - * - * No testing has been performed on systems with more than 2 floppy - * drives. If the third drive is "C" and the fourth "D" then there - * should be no problems. - * - * This function does not currently check subst'd drives. So if you - * have SUBST E: A:\ then FT_FLOPTST( ASC("E")-ASC("A") ) == 4 - * Any suggestions to fix this limitation are appreciated. - * - * $EXAMPLES$ - * iStatus := FT_FLOPTST( 0 ) - * DO CASE - * CASE iStatus == 1 - * Qout( "The door to drive A is open." ) - * CASE iStatus == 2 - * Qout( "The diskette in drive A is not formatted." ) - * CASE iStatus == 3 - * Qout( "The diskette in drive A is write-protected." ) - * CASE iStatus == 4 - * Qout( "Something is wrong with drive A, but I don't know what." ) - * ENDCASE - * $END$ - * */ #include "ftint86.ch" @@ -116,7 +66,6 @@ RETURN #ENDIF - FUNCTION FT_FLOPTST( ; // error code defined by ERR_* nDriveNum_i ; // letter of floppy drive. ) @@ -183,7 +132,6 @@ STATIC FUNCTION _GetDisketteNum( ; // returns false if no floppy drive RETURN lRetCode - STATIC PROCEDURE _ResetDisketteSystem() LOCAL aRegs[INT86_MAX_REGS] @@ -220,7 +168,6 @@ STATIC FUNCTION _ReadBootSector( ; RETURN lSuccess - STATIC FUNCTION _WriteBootSector( ; nDriveNum, ; cBuffer_i, ; @@ -244,7 +191,6 @@ STATIC FUNCTION _WriteBootSector( ; RETURN lSuccess - STATIC FUNCTION _CallInt13hRetry( ; // logical: did the interrupt succeed? aRegs_io, ; // registers values for INT 13h lCarrySet_o, ; // status of carry flag if return code is true. diff --git a/harbour/contrib/hbnf/ftattr.c b/harbour/contrib/hbnf/ftattr.c index dfdd40ef5f..d0fa51476e 100644 --- a/harbour/contrib/hbnf/ftattr.c +++ b/harbour/contrib/hbnf/ftattr.c @@ -23,41 +23,6 @@ * Initial revision. * - * $DOC$ - * $FUNCNAME$ - * FT_SAVEATT() - * $CATEGORY$ - * Video - * $ONELINER$ - * Save the attribute bytes of a specified screen region. - * $SYNTAX$ - * FT_SAVEATT( , , , ) -> cAttributes - * $ARGUMENTS$ - * , , , and define the screen region. - * $RETURNS$ - * A character string containing the screen attribute bytes for the - * specified region. If the memory to store the return value could - * not be allocated, the function returns NIL. - * $DESCRIPTION$ - * This function is similar to Clipper's SaveScreen(), except that it only - * saves the attribute bytes. This is useful if you want to change the - * screen color without affecting the text. - * - * *** INTERNALS ALERT *** - * - * This function calls the Clipper internal __gtMaxCol to obtain the - * maximum column value for the current video mode. If you're too gutless - * to use internals, then this function isn't for you. - * $EXAMPLES$ - * // Save attributes of row 4 - * cBuffer := FT_SAVEATT( 4, 0, 4, maxcol()) - * - * // Save attributes from middle of screen - * cBuffer := FT_SAVEATT(10,20,14,59) - * $SEEALSO$ - * FT_RESTATT() - * $END$ - * */ /* This is the original FT_SAVEATT() code @@ -239,43 +204,6 @@ HB_FUNC( FT_SAVEATT ) * Initial revision. * - * $DOC$ - * $FUNCNAME$ - * FT_RESTATT() - * $CATEGORY$ - * Video - * $ONELINER$ - * Restore the attribute bytes of a specified screen region. - * $SYNTAX$ - * FT_RESTATT( , , , , ) -> NIL - * $ARGUMENTS$ - * , , , and define the screen region. - * is a character string containing the attribute bytes - * for the screen region. This will most often be a string - * previously returned by FT_SAVEATT(), but any character - * string may be used (provided it is of the proper size). - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * This function is similar to Clipper's RestScreen(), except that it only - * restores the attribute bytes. This is useful if you want to change the - * screen color without affecting the text. - * - * *** INTERNALS ALERT *** - * - * This function calls the Clipper internals __gtSave and __gtRest to - * manipulate the the screen image. If you're too gutless to use - * internals, then this function isn't for you. - * $EXAMPLES$ - * // Restore attributes of row 4 - * FT_RESTATT( 4, 0, 4, maxcol(), cBuffer) - * - * // Restore attributes to middle of screen - * FT_RESTATT(10,20,14,59,cBuffer) - * $SEEALSO$ - * FT_SAVEATT() - * $END$ - * */ /* This is the Original FT_RESTATT() code diff --git a/harbour/contrib/hbnf/ftidle.c b/harbour/contrib/hbnf/ftidle.c index 97d7eb9ad8..6ca68c5b4d 100644 --- a/harbour/contrib/hbnf/ftidle.c +++ b/harbour/contrib/hbnf/ftidle.c @@ -21,47 +21,6 @@ #include "hbdefs.h" #include "hbapi.h" -/* $DOC$ - * $FUNCNAME$ - * FT_Idle() - * $CATEGORY$ - * Event - * $ONELINER$ - * Generate an idle event to allow incremental garbage collection. - * $SYNTAX$ - * FT_Idle() - * $ARGUMENTS$ - * None - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * During memory-intensive operations that do not generate much in - * the way of idle states, the Clipper runtime may not get a chance to - * perform garbage collection of discarded memory. This can eventually - * lead to any of a variety of memory-related internal errors. - * - * This function attempts to alleviate the problem by providing a - * mechanism by which an idle event can be artifically generated at - * will. The idle event will cause the CA-Cl*pper runtime to perform - * an incremental memory scavenge. - * - * This function makes use of an undocumented interal routine. If this - * this fact makes you uncomfortable then don't use this function, you - * miserable jello-spined lump of human debris. - * $EXAMPLES$ - * - * while Whatever // Some batch process - * - * Something() // Create 'n' discard a bunch of stuff - * - * FT_Idle() // Take out the garbage - * - * end - * $SEEALSO$ - * FT_OnIdle() - * $END$ - */ - HB_FUNC(FT_Idle) { hb_idleState(); diff --git a/harbour/contrib/hbnf/ftisprn.c b/harbour/contrib/hbnf/ftisprn.c index 51f9ac50c1..bdea26cb4e 100644 --- a/harbour/contrib/hbnf/ftisprn.c +++ b/harbour/contrib/hbnf/ftisprn.c @@ -76,69 +76,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ISPRINT() - * $CATEGORY$ - * DOS/BIOS - * $ONELINER$ - * Check printer status - * $SYNTAX$ - * FT_ISPRINT( [ ] ) -> lResult - * $ARGUMENTS$ - * is optional and is the device to test (LPT2, COM1, etc.). - * If omitted, the function will default to the PRN device. - * $RETURNS$ - * .T. if device is ready for output. - * .F. if one of the following conditions occurs: - * 1) The device is not ready. - * 2) The device does not exist. - * 3) DOS couldn't open the device for some reason - * (such as no file handles available). - * $DESCRIPTION$ - * The Clipper IsPrinter() function is somewhat limited because it only - * works with LPT1. Furthermore, it talks directly to the hardware, so - * if you have redirected LPT1 via the DOS MODE command, the IsPrinter() - * function will return erroneous results. - * - * This function offers a better alternative. Instead of talking to the - * hardware, it issues a DOS call that checks to see if the device is - * ready or not. That gives DOS an opportunity to deal with any - * redirections, and since you pass the device name as a parameter, you - * can test any device, not just LPT1 (note that the function defaults - * to PRN if you fail to pass a valid parameter). - * - * The function also temporarily traps the DOS critical error handler so - * you don't get any nasty error messages if the device isn't ready. It - * restores the old critical error handler before exiting. - * - * Note that although this function is mainly designed for testing - * printers, you can also check to see if a drive is ready. Since DOS - * thinks the NUL device exists on every drive, you can pass a drive - * letter followed by NUL as a parameter. If DOS is able to open the - * NUL device, then the drive is ready, otherwise the door is open or - * something else is wrong. - * - * The source code is written to adhere to Turbo Assembler's IDEAL mode. - * To use another assembler, you will need to rearrange the PROC and - * SEGMENT directives, and also the ENDP and ENDS directives (a very - * minor task). - * $EXAMPLES$ - * IF ! FT_ISPRINT() - * Qout( "PRN is not ready!" ) - * ENDIF - * - * IF ! FT_ISPRINT( "COM2" ) - * Qout( "Check the device on COM2. Something is wrong." ) - * ENDIF - * - * IF ! FT_ISPRINT( "A:\nul" ) - * Qout( "Oops, better check drive A!" ) - * ENDIF - * $END$ - */ - #include "hbapi.h" /* TOFIX: Has different behaviour depending on platform/parameter. [vszakats] */ diff --git a/harbour/contrib/hbnf/ftround.prg b/harbour/contrib/hbnf/ftround.prg index 09a219088c..94262e343f 100644 --- a/harbour/contrib/hbnf/ftround.prg +++ b/harbour/contrib/hbnf/ftround.prg @@ -24,71 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ROUND() - * $CATEGORY$ - * Math - * $ONELINER$ - * Rounds a number to a specific place - * $SYNTAX$ - * FT_ROUND( [, ; - * [, [, ; - * [, ] ] ] ] ) -> nNumber - * $ARGUMENTS$ - * is the number to round - * - * is the fraction to round to or the number of places, - * default is 2. - * - * is the type of rounding desired - * - * "D" for Decimal (3 for thousandth, 1/1000) (default) - * "F" for Fraction (3 for thirds, 1/3) - * "W" for Whole numbers (3 for thousand, 1000) - * - * is the direction to round the number toward - * - * "U" to round Up 1.31 -> 1.4 - * -1.31 -> -1.4 - * "D" to round Down 1.36 -> 1.3 - * -1.36 -> -1.3 - * "N" to round Normal 1.5 -> 2 - * -1.5 -> -2 - * 1.49 -> 1 - * -1.49 -> -1 - * - * is the amount that is considered acceptable - * to be within, i.e., if you're within this amount of the number - * you don't need to round - * $RETURNS$ - * The number, rounded as specified. - * $DESCRIPTION$ - * This function will allow you to round a number. The following can - * be specified: - * a. Direction (up, down or normal - normal is 4/5 convention) - * b. Type (whole, decimal, fraction) - * c. Amount (100's, 5 decimals, 16th, etc.) - * $EXAMPLES$ - * // round normal to 2 decimal places - * nDollars := FT_ROUND(nDollars) - * - * // round normal to 6 decimal places - * nIntRate := FT_ROUND(nIntRate, 6) - * - * // round to nearest thousands - * nPrice := FT_ROUND(nPrice, 3, NEAREST_WHOLE_NUMBER) - * - * // round Up to nearest third - * nAmount := FT_ROUND(nAmount, 3, NEAREST_FRACTION, ROUND_UP) - * - * // round down to 3 decimals Within .005 - * nAvg := FT_ROUND(nAvg, 3, , ROUND_DOWN, .005) - * $END$ - */ - - #define IS_NEGATIVE(x) ((x) < 0) #define NEAREST_DECIMAL "D" @@ -109,8 +44,6 @@ := iif(VALTYPE() == ,,) ; [; := iif(VALTYPE() == ,,)] - - FUNCTION FT_ROUND(nNumber, nRoundToAmount, cRoundType, cRoundDirection, ; nAcceptableError) diff --git a/harbour/contrib/hbnf/fttext.c b/harbour/contrib/hbnf/fttext.c index 02a7e1a0f9..3e424ec303 100644 --- a/harbour/contrib/hbnf/fttext.c +++ b/harbour/contrib/hbnf/fttext.c @@ -152,7 +152,6 @@ enddo ft_fuse() - */ /* @@ -173,7 +172,6 @@ faster reads) */ #define BUFFSIZE 4096 - #include "hbapi.h" #include "hbapifs.h" @@ -229,73 +227,6 @@ HB_FUNC( FT_FOFFSET ) #define FT_CHR_LF 10 #define FT_CHR_EOF 26 - - - - -/* $DOC$ - * $FUNCNAME$ - * FT_FUSE() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Open or close a text file for use by the FT_F* functions - * $SYNTAX$ - * - * FT_FUSE( [ ] [, ] ) -> nHandle | 0 - * - * $ARGUMENTS$ - * - * ^b^n is the text file you want to open. If not specified, - * the file currently open, if any, will be closed. - * - * ^b^n is the open mode for the file. Please refer to the - * discussion of open modes under FOPEN() in the Clipper manual - * and fileio.ch for a list of allowable open modes. If not - * specified, the file will be opened with a mode of - * FO_READ + FO_SHARED (64). - * - * $RETURNS$ - * - * If ^b^n is passed and the file is opened successfully, an - * integer containing the text file's workarea. If the file cannot be - * opened, -1 will be returned. In this case, check the return value - * of ^bft_fError()^n for the cause of the error. - * - * If FT_FUSE() is called without any arguments, it will close the - * text file in the current "text area" and return 0. - * - * If a read error occurs ^ft_fError()^n will contain the error code. - * - * $DESCRIPTION$ - * - * The FT_F*() file functions are for reading text files, that is, - * files where each line (record) is delimited by a CRLF pair. - * - * Each file is opened in its own "workarea", similar to the concept - * use by dbf files. As provided, a maximum of 10 files (in 10 - * workareas) can be opened (assuming there are sufficient file - * handles available). That number may be increased by modifying - * the #define TEXT_WORKAREAS in the C source code and recompiling. - * - * $EXAMPLES$ - * - * #include "fileio.ch" - * - * // open a text file for reading - * ft_fUse( "text.txt" ) - * - * // open a text file for reading and writing - * ft_fUse( "text.txt", FO_READWRITE + FO_SHARED ) - * - * // close file - * ft_fUse() - * - * $SEEALSO$ - * FT_FUSE() FT_FSELECT() - * $END$ - */ - HB_FUNC( FT_FUSE ) { int attr = hb_parnidef( 2, FO_READWRITE | FO_DENYNONE ); @@ -330,66 +261,6 @@ HB_FUNC( FT_FUSE ) } } - -/* $DOC$ - * $FUNCNAME$ - * FT_FSELECT() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Select a text file workarea - * $SYNTAX$ - * - * FT_FSELECT( [ ] ) -> nPreviousArea - * - * $ARGUMENTS$ - * - * ^b^n is the text file workarea to select. - * - * $RETURNS$ - * - * The current selected text file area. - * - * $DESCRIPTION$ - * - * This function selects a text file "workarea" from 1 to 10. A - * file may or may not be open in the selected area. - * - * Passing 0 for ^b^n selects the next available workarea, - * similar to Clipper's SELECT 0 command. If no more workareas are - * available the current workarea is not changed. - * - * Each file is opened in its own "workarea", similar to the concept - * used by dbf files. As provided, a maximum of 10 files (in 10 - * workareas) can be opened (assuming there are sufficient file - * handles available). That number may be increased by modifying - * the #define TEXT_WORKAREAS in the C source code and recompiling. - * - * All the FT_F*() file functions operate on the file in the currently - * selected text file workarea. - * - * Text file workareas are separate from and independent of Clipper's - * database workareas. - * - * $EXAMPLES$ - * - * FT_FSELECT(1) - * - * nFile1 := FT_FUSE( "temp.c" ) - * - * ? FT_FLASTRE() // no. of lines in temp.c - * - * FT_FSELECT(2) - * - * nFile2 := FT_FUSE( "temp.h" ) - * - * ? FT_FLASTRE() // no. of lines in temp.h - * - * $SEEALSO$ - * FT_FUSE() - * $END$ - */ - HB_FUNC( FT_FSELECT ) { int oldarea = area + 1; @@ -418,53 +289,6 @@ HB_FUNC( FT_FSELECT ) hb_retni( oldarea ); } -/* $DOC$ - * $FUNCNAME$ - * FT_FGOTOP() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Go to the first record in a text file - * $SYNTAX$ - * - * FT_FGOTOP() -> NIL - * - * $ARGUMENTS$ - * - * None - * - * $RETURNS$ - * - * NIL - * - * $DESCRIPTION$ - * - * This function moves the record pointer to the first record - * in the currently selected text file workarea. - * - * A text file "record" is a line of text terminated by a CRLF pair. - * - * $EXAMPLES$ - * - * FT_FUSE( "text.c" ) // open text file - * - * DO WHILE !FT_FEOF() - * - * ? FT_FREADLN() // read thru file - * - * FT_FSKIP() - * - * ENDDO - * - * FT_FGOTOP() // go back to top - * - * ? FT_FRECNO() // 1 - * - * $SEEALSO$ - * FT_FSELECT() FT_FUSE() FT_FRECNO() FT_FGOBOT() - * $END$ - */ - HB_FUNC( FT_FGOTOP ) { error[area] = 0; @@ -474,153 +298,16 @@ HB_FUNC( FT_FGOTOP ) isEof[area] = HB_FALSE; } - -/* $DOC$ - * $FUNCNAME$ - * FT_FERROR() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Return the error code for a text file operation - * $SYNTAX$ - * - * FT_FERROR() -> nErrorNo - * - * $ARGUMENTS$ - * - * None - * - * $RETURNS$ - * - * The DOS error code if one occurred. See a reference on DOS error - * codes for an explanation of what the code means. - * - * $DESCRIPTION$ - * - * This function returns the DOS error code associated with a file - * operation on the currently selected text file. - * - * Errors could stem from any open, create, read or write operation, - * among others. - * - * $EXAMPLES$ - * - * if ft_fUse( "text.c" ) < 0 // open text file - * err := ft_fError(); - * QOUT( 'Error opening file "Text.c", error code (' + ; - * LTRIM( STR( err ) ) + ')' ) - * endif - * - * $SEEALSO$ - * - * $END$ - */ - - HB_FUNC( FT_FERROR ) { hb_retni( error[area] ); } - - -/* $DOC$ - * $FUNCNAME$ - * FT_FRECNO() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Return the current record number of a text file - * $SYNTAX$ - * - * FT_FRECNO() -> nRecNo - * - * $ARGUMENTS$ - * - * None - * - * $RETURNS$ - * - * The current record number of a text file or 0 if no file is open. - * - * $DESCRIPTION$ - * - * This function returns the current record number of the file open - * in the currently selected text file workarea. - * - * A text file "record" is a line of text terminated by a CRLF pair. - * - * $EXAMPLES$ - * - * FT_FUSE( "text.c" ) // open text file - * - * DO WHILE !FT_FEOF() - * - * ? FT_FREADLN() // read thru file - * - * FT_FSKIP() - * - * ENDDO - * - * FT_FGOTOP() // go back to top - * - * ? FT_FRECNO() // 1 - * - * $SEEALSO$ - * FT_FSELECT() FT_FUSE() FT_FGOTOP() FT_FGOBOT() - * $END$ - */ - - HB_FUNC( FT_FRECNO ) { hb_retnl( recno[area] ); } - -/* $DOC$ - * $FUNCNAME$ - * FT_FGOBOT() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Go to the last record in a text file - * $SYNTAX$ - * - * FT_FGOBOT() -> NIL - * - * $ARGUMENTS$ - * - * None - * - * $RETURNS$ - * - * NIL - * - * $DESCRIPTION$ - * - * This function moves the record pointer to the last record of the - * file in the currently selected text file workarea. - * - * If a read error occurs ^ft_fError()^n will contain the error code. - * - * A text file "record" is a line of text terminated by a CRLF pair. - * - * $EXAMPLES$ - * - * // read last line - * FT_FUSE( "text.c" ) - * - * FT_FGOBOT() - * - * ? FT_FREADLN() - * - * $SEEALSO$ - * FT_FSELECT() FT_FUSE() FT_FGOTOP() FT_FRECNO() FT_FREADLN() - * $END$ - */ - - HB_FUNC( FT_FGOBOT ) { @@ -638,62 +325,6 @@ HB_FUNC( FT_FGOBOT ) } - -/* $DOC$ - * $FUNCNAME$ - * FT_FSKIP() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Move the record pointer to a new position in a text file - * $SYNTAX$ - * - * FT_FSKIP( [ ] ) -> nLinesSkipped - * - * $ARGUMENTS$ - * - * is the number of lines to skip. Defaults to 1 if - * not specified. - * - * $RETURNS$ - * - * The number of lines actually skipped. If the file's EOF or - * BOF was encountered before ^b^n could be skipped, the - * return value will be less than ^b^n. - * - * $DESCRIPTION$ - * - * This function moves the text file record pointer, similar to - * the CLIPPER SKIP command. - * - * Use the return value to determine how many records were actually - * skipped, for example to write a custom skipper function for - * TBrowse'g text files. - * - * If a read error occurs ^ft_fError()^n will contain the error code. - * - * A text file "record" is a line of text terminated by a CRLF pair. - * - * $EXAMPLES$ - * - * // display each record of a text file - * - * FT_FUSE( "text.c" ) - * - * DO WHILE ! FT_FEOF() - * - * ? FT_FREADLN() - * - * FT_FSKIP() - * - * ENDDO - * - * - * $SEEALSO$ - * FT_FRECNO() FT_FGOTOP() - * $END$ - */ - HB_FUNC( FT_FSKIP ) { if ( HB_ISNUM(1) ) @@ -707,7 +338,6 @@ HB_FUNC( FT_FSKIP ) hb_retnl( _ft_skip(1L) ); } - /* internal routine to do buffer skips. Passing a positive value performs a downward skip, a negative number does an upward skip. Passing 0 skips to the end of file. @@ -896,62 +526,6 @@ static long _ft_skip( long iRecs ) return iSkipped; } - -/* $DOC$ - * $FUNCNAME$ - * FT_FREADLN() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Read a line from the currently selected text file - * $SYNTAX$ - * - * FT_FREADLN() -> cLine - * - * $ARGUMENTS$ - * - * None - * - * $RETURNS$ - * - * A string containing the current record in a text file. - * - * $DESCRIPTION$ - * - * This function returns a line of text read from the file in the - * currently selected text file workarea. Text lines are delimited - * with a CRLF pair. The record pointer is not moved. - * - * Currently the maximum record size is 4096 characters. You may - * increase the maximum record size by changing the value of ^b#define - * ^bBUFFSIZE^n in the C source and recompiling, however you should - * consider the performance implications if you do (all read and writes - * use this buffer size, including ft_fSkip()'s and ft_fGoto()'s). - * - * If a read error occurs ^ft_fError()^n will contain the error code. - * - * A text file "record" is a line of text terminated by a CRLF pair. - * - * $EXAMPLES$ - * - * // display each record of a text file - * - * FT_FUSE( "text.c" ) - * - * DO WHILE ! FT_FEOF() - * - * ? FT_FREADLN() - * - * FT_FSKIP() - * - * ENDDO - * - * $SEEALSO$ - * FT_FUSE() FT_FWRITELN() FT_FRECNO() FT_FGOTOP() - * $END$ - */ - - HB_FUNC( FT_FREADLN ) { @@ -977,49 +551,6 @@ HB_FUNC( FT_FREADLN ) hb_xfree( cPtr ); } -/* $DOC$ - * $FUNCNAME$ - * FT_FDELETE() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Deletes a line from the currently selected text file - * $SYNTAX$ - * - * FT_FDELETE( [ < nLines > ] ) -> lSuccess - * - * $ARGUMENTS$ - * - * ^b^n is the number of lines to be eliminated, beginning with - * the current record position. - * - * If ^b^n is omitted, the current record is deleted only. - * - * $RETURNS$ - * - * TRUE if successful, otherwise check ^ft_fError()^n for error code. - * - * $DESCRIPTION$ - * - * This function deletes one or several lines of text from the file - * in the currently selected text file workarea. Text lines are - * delimited with a CRLF pair. The record pointer is not moved, - * unless the deleted lines occur at the end of the file, in which - * case ^bft_fRecno()^n will equal ^bft_fLastRe()^n and ^bft_fEOF()^n - * will be set to TRUE. - * - * $EXAMPLES$ - * - * // delete the next 4 lines from a file - * FT_FUSE( "test.txt" ) - * - * FT_FDELETE( 4 ) - * - * $SEEALSO$ - * FT_FAPPEND() FT_FRECNO() FT_FINSERT() - * $END$ - */ - HB_FUNC( FT_FDELETE ) { int iBytesRead; @@ -1046,7 +577,6 @@ HB_FUNC( FT_FDELETE ) destPtr += hb_fsWriteLarge( handles[area], Buff, iBytesRead ); } while( iBytesRead > 0 ); - /* move DOS EOF marker */ hb_fsSeekLarge( handles[area], srcPtr, FS_SET ); hb_fsWrite( handles[area], Buff, 0 ); @@ -1074,55 +604,6 @@ HB_FUNC( FT_FDELETE ) hb_retl( error[area] ? 0 : 1 ); } - -/* $DOC$ - * $FUNCNAME$ - * FT_FINSERT() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Inserts a line in the currently selected text file - * $SYNTAX$ - * - * FT_FINSERT( [ < nLines > ] ) -> lSuccess - * - * $ARGUMENTS$ - * - * ^b^n is the number of lines that should be inserted at the - * current record position. - * - * If ^b^n is omitted, one record is inserted. - * - * $RETURNS$ - * - * ^blSuccess^n is TRUE if the insert succeeded, FALSE if not. If - * false check the return value of ^bft_fError()^n for the reason. - * - * $DESCRIPTION$ - * - * This function inserts a line of text in the file in the currently - * selected text file workarea. Text lines are delimited with a - * CRLF pair. - * - * The record pointer is not moved. - * - * A text file "record" is a line of text terminated by a CRLF pair. - * Each line inserted with this function will be empty. - * - * $EXAMPLES$ - * - * // add a couple of blank lines of text to a file - * ft fUse( "test.txt" ) - * - * ft_fGoTo( 10 ) - * - * ft_fInsert( 5 ) - * - * $SEEALSO$ - * FT_FAPPEND() FT_FRECNO() FT_FDELETE() FT_FLASTRE() - * $END$ - */ - HB_FUNC( FT_FINSERT ) { int no_lines = hb_parnidef( 1, 1 ); @@ -1145,66 +626,6 @@ HB_FUNC( FT_FINSERT ) hb_retl( err ); } - - -/* $DOC$ - * $FUNCNAME$ - * FT_FAPPEND() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Appends a line to the currently selected text file - * $SYNTAX$ - * - * FT_FAPPEND( [ < nLines > ] ) -> NIL - * - * $ARGUMENTS$ - * - * is the number of lines that should be appended to the - * end of the currently selected text file. - * - * If is omitted, one record is appended. - * - * $RETURNS$ - * - * lSuccess. If FALSE, check ^bft_fError()^n for the error code. - * - * $DESCRIPTION$ - * - * This function appends a line of text to the file in the currently - * selected text file workarea. Text lines are delimited with a - * CRLF pair. The record pointer is moved to the last appended - * record. - * - * Multiple lines may be appended with one call to FT_FAPPEND(). - * - * A text file "record" is a line of text terminated by a CRLF pair. - * Each line appended with this function will be empty. - * - * NOTE: Occasionally a text file may contain a non-CRLF terminated - * line, at the end of the file ("stragglers"). This function assumes - * these stragglers to be the last line of the file, and begins - * appending the new lines after this line. In other words, if the - * last line in the text file is not terminated with a CRLF pair prior - * to calling FT_FAPPEND(), the function will terminate that last line - * before appending any new lines. - * - * $EXAMPLES$ - * - * // add a blank line of text to a file - * FT_FUSE( "test.txt" ) - * - * ?FT_FRECNO() // displays 5 - * - * FT_FAPPEND() - * - * ?FT_FRECNO() // displays 6 - * - * $SEEALSO$ - * FT_FRECNO() FT_FDELETE() FT_FINSERT() FT_FLASTRE() - * $END$ - */ - HB_FUNC( FT_FAPPEND ) { int no_lines = hb_parnidef( 1, 1 ); @@ -1265,68 +686,6 @@ HB_FUNC( FT_FAPPEND ) } -/* $DOC$ - * $FUNCNAME$ - * FT_FWRITELN() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Write a line to the currently selected text file - * $SYNTAX$ - * - * FT_FWRITELN( < cData >, [ < lInsert > ] ) -> lSuccess - * - * $ARGUMENTS$ - * - * is a string of data to write to the file at the current - * record position. - * - * is a logical indicating whether the contents - * of the current record are to be preserved, that is, if lInsert - * evaluates to .T., the a new record is inserted at the current - * position. The current record then is pushed down to FT_FRECNO()+1. - * - * If lInsert is .F. or omitted, the current record is replaced by - * cData. - * - * $RETURNS$ - * - * TRUE if successful, otherwise check ^ft_fError()^n for error code. - * - * $DESCRIPTION$ - * - * This function writes a line of text to the file in the currently - * selected text file workarea. Text lines are delimited with a - * CRLF pair. The record pointer is not moved. - * - * The contents of the current record are updated to reflect the new - * new line written, unless the Insert option is selected. - * - * Writing a null string has the effect of clearing the current line - * if in overstrike mode, else inserting a new line (same as - * FT_FINSERT()). - * - * A text file "record" is a line of text terminated by a CRLF pair. - * - * $EXAMPLES$ - * - * // write a line of text to a file - * - * FT_FUSE( "config.sys" ) - * - * DO WHILE UPPER( FT_FREADLN() ) != "FILES=" .AND. !F_FEOF() - * - * FT_FSKIP() - * - * ENDDO - * - * FT_FWRITELN( "FILES=30", FT_FEOF() ) - * - * $SEEALSO$ - * FT_FREADLN() FT_FRECNO() FT_FINSERT() FT_FDELETE() - * $END$ - */ - HB_FUNC( FT_FWRITELN ) { const char * theData = hb_parc( 1 ); @@ -1338,7 +697,6 @@ HB_FUNC( FT_FWRITELN ) char * buffer; - /* position file pointer to insertion point */ hb_fsSeekLarge( handles[area], offset[area], FS_SET ); @@ -1403,44 +761,6 @@ HB_FUNC( FT_FWRITEL ) HB_FUNC_EXEC( FT_FWRITELN ); } -/* $DOC$ - * $FUNCNAME$ - * FT_FLASTRE() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Get the no. of records in the currently selected text file - * $SYNTAX$ - * - * FT_FLASTRE() -> nLastRecordNum - * - * $ARGUMENTS$ - * - * None - * - * $RETURNS$ - * - * An integer containing the number of records in the text file in - * the currently selected text file workarea, or zero if no file - * is currently open in the workarea. - * - * $DESCRIPTION$ - * - * This function returns the number of the last record in a text file. - * - * A text file "record" is a line of text terminated by a CRLF pair. - * - * $EXAMPLES$ - * - * FT_FUSE( "text.c" ) - * - * ? FT_FLASTRE() - * - * $SEEALSO$ - * FT_FUSE() FT_FRECNO() - * $END$ - */ - HB_FUNC( FT_FLASTRE ) { long cur_rec; @@ -1456,158 +776,16 @@ HB_FUNC( FT_FLASTRE ) offset[area] = cur_offset; } -/* $DOC$ - * $FUNCNAME$ - * FT_FEOF() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Determine if end of text file has been encountered - * $SYNTAX$ - * - * FT_FEOF() -> lResult - * - * $ARGUMENTS$ - * - * None - * - * $RETURNS$ - * - * .T. if an attempt was made to skip past the last record of - * the currently selected text file, otherwise .F. - * - * $DESCRIPTION$ - * - * This function is similar to the CLIPPER Eof() function. - * - * A text file "record" is a line of text terminated by a CRLF pair. - * - * $EXAMPLES$ - * - * FT_FUSE( "fttext.c" ) - * - * ? FT_FEOF() // .F. - * - * FT_FSKIP() - * - * ? FT_FEOF() // .T. - * - * $SEEALSO$ - * FT_FUSE() FT_FSKIP() - * $END$ - */ - - HB_FUNC( FT_FEOF ) { hb_retl( isEof[area] ); } - -/* $DOC$ - * $FUNCNAME$ - * FT_FBOF() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Determine if attempt to skip past beginning of text file - * $SYNTAX$ - * - * FT_FBOF() -> lResult - * - * $ARGUMENTS$ - * - * None - * - * $RETURNS$ - * - * .T. if an attempt was made to skip past the first record of - * the currently selected text file, otherwise .F. - * - * $DESCRIPTION$ - * - * This function is similar to the CLIPPER Bof() function. - * - * A text file "record" is a line of text terminated by a CRLF pair. - * - * $EXAMPLES$ - * - * FT_FUSE( "fttext.c" ) - * - * FT_FGOTOP() - * - * ? FT_FBOF() // .F. - * - * FT_FSKIP(-1) - * - * ? FT_FBOF() // .T. - * - * $SEEALSO$ - * FT_FSKIP() FT_EOF() FT_GOTOP() - * $END$ - */ - - HB_FUNC( FT_FBOF ) { hb_retl( isBof[area] ); } - -/* $DOC$ - * $FUNCNAME$ - * FT_FGOTO() - * $CATEGORY$ - * File I/O - * $ONELINER$ - * Move record pointer to specific record in a text file - * $SYNTAX$ - * - * FT_FGOTO( nLine ) -> NIL - * - * $ARGUMENTS$ - * - * is the record number to go to. - * - * $RETURNS$ - * - * NIL - * - * $DESCRIPTION$ - * - * This function moves the record pointer to a specific record - * in the file in the currently selected text file workarea. If - * the record number requested is greater than the number of records - * in the file, the record pointer will be positioned at the last - * record. - * - * Internally, the function operates differently depending on how - * you invoke it. Passing a value for ^b^n results in what - * is effectively a skip operation, which is fairly quick. However - * if you pass 0 for ^b^n, e.g. ft_fGoTo( 0 ), the function - * internally goes to the top of the file, then skips down the - * required number of records. Hence if your file is relatively - * large and the current record is a high number, you may see some - * delay as ft_fGoTo(0) skips through the file. - * - * A text file "record" is a line of text terminated by a CRLF pair. - * - * $EXAMPLES$ - * - * // read 5th line of text from file - * - * ft_fUse( "fttext.c" ) - * - * ft_fGoTo(5) - * - * cText := ft_fReadLN() - * - * $SEEALSO$ - * - * FT_FRECNO() FT_FGOTOP() FT_FREADLN() - * $END$ - */ - HB_FUNC( FT_FGOTO ) { long target = hb_parnl(1); @@ -1697,7 +875,6 @@ _feoldone: */ } /* end _findeol() */ - /*---------------------------------------------------------------------- _findbol() - In-line assembler routine to parse a buffer @@ -1897,8 +1074,6 @@ static int _ins_buff( HB_ISIZ iLen ) } /* _ins_buff */ - - /*--------------------------------------------------------------------------*/ /* deletes xxx bytes from the current file, beginning at the current record */ static int _del_buff( HB_ISIZ iLen ) @@ -1941,7 +1116,6 @@ static int _del_buff( HB_ISIZ iLen ) fpRead += WriteLen; } - /* store length in bytes, set EOF marker for DOS */ lastbyte[area] = hb_fsSeekLarge( handles[area], fpWrite, FS_SET ); hb_fsWrite( handles[area], WriteBuff, 0 ); @@ -1956,7 +1130,6 @@ static int _del_buff( HB_ISIZ iLen ) } /* _del_buff */ - /*--------------------------------------------------------------------------*/ /* writes a line of data to the file, including the terminating CRLF */ static int _writeLine( const char * theData, HB_SIZE iDataLen ) diff --git a/harbour/contrib/hbnf/gcd.prg b/harbour/contrib/hbnf/gcd.prg index 8c02602250..c6677b8cf1 100644 --- a/harbour/contrib/hbnf/gcd.prg +++ b/harbour/contrib/hbnf/gcd.prg @@ -24,35 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_GCD() - * $CATEGORY$ - * Math - * $ONELINER$ - * Calculate greatest common divisor of two numbers - * $SYNTAX$ - * FT_GCD( , ) -> nGCD - * $ARGUMENTS$ - * is the first number to find the GCD of. - * - * is the second number to find the GCD of. - * $RETURNS$ - * The greatest common divisor of the 2 numbers, or 0 if either is 0. - * $DESCRIPTION$ - * This function calculates the greatest common divisor between 2 numbers, - * i.e., the largest number that will divide into both numbers evenly. It - * will return zero (0) if either number is zero. - * $EXAMPLES$ - * ? FT_GCD(10,15) // Result: 5 - * ? FT_GCD(108,54) // Result: 54 - * ? FT_GCD(102,54) // Result: 6 - * ? FT_GCD(111,17) // Result: 1 - * $END$ - */ - - #command REPEAT ; => ; DO WHILE .T. diff --git a/harbour/contrib/hbnf/getenvrn.c b/harbour/contrib/hbnf/getenvrn.c index 6deeec916f..42a338321b 100644 --- a/harbour/contrib/hbnf/getenvrn.c +++ b/harbour/contrib/hbnf/getenvrn.c @@ -27,70 +27,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_GETE() - * $CATEGORY$ - * Environment - * $ONELINER$ - * Return the entire current environment - * $SYNTAX$ - * FT_GETE( [ @ ] ) -> nNumStrings - * $ARGUMENTS$ - * is the variable to receive the environment data. - * - * can be a character type variable, in which case - * the function will place all environment strings in the variable - * separated by carriage return/line feeds (chr 13 + chr(10)). - * - * can be an array type, in which case the function - * will place each string in an array element. The array MUST be - * declared with the proper number of elements prior to passing it - * to the function. This can be done by calling FT_GETE() without - * parameters first to get the number of strings in the environment. - * - * Note that the argument MUST be passed by reference. Since arrays - * are by nature passed by reference, the "@" symbol is optional when - * passing an array. - * - * If no argument is passed, FT_GETE() merely returns the number - * of strings in the environment. - * $RETURNS$ - * FT_GETE() returns the total number of strings found in the - * current program's environment. - * $DESCRIPTION$ - * This function stores ALL of the current program's environment - * variables in either a block of text lines or in an array. It is - * useful for looking at the entire environment at once, or recording - * a snapshot of it to a file for later inspection, such as when a - * program error occurs. If the value of ONE SPECIFIC variable is - * desired, use Clipper's built-in GETE() function. - * $EXAMPLES$ - * Get the environment in text form and browse it: - * - * cEnvBlock := "" - * nNumStrings := FT_GETE(@cEnvBlock) - * @ 0, 0 to MAXROW() - 1, MAXCOL() - * @ MAXROW(), 0 say 'Browse strings, press ESC to exit...' - * MEMOWRIT(cEnvBlock, 1, 1, MAXROW() - 2,MAXCOL() - 1, .F.) - * - * Get the environment in text form and write it to a file: - * - * cEnvBlock := "" - * FT_GETE(@cEnvBlock) - * MEMOWRIT("environ.txt", cEnvBlock) - * - * Get the environment in Array form: - * - * aEnvArray := ARRAY(FT_GETE()) - * FT_GETE(aEnvArray) - * ? aEnvArray[1] // "COMSPEC=C:\command.com" - * ? aEnvArray[2] // "PATH=C:\;C:\windows;C:\util;C:\harbour" - * ... etc ... - * $END$ - */ - #include "hbapi.h" #if defined( HB_OS_UNIX ) diff --git a/harbour/contrib/hbnf/getver.c b/harbour/contrib/hbnf/getver.c index 6760319269..2dc7d4beeb 100644 --- a/harbour/contrib/hbnf/getver.c +++ b/harbour/contrib/hbnf/getver.c @@ -96,7 +96,6 @@ HB_FUNC( _FT_ISSHARE ) hb_retni( iShare ); } - HB_FUNC( _FT_NWKSTAT ) { int iConnect; diff --git a/harbour/contrib/hbnf/hex2dec.prg b/harbour/contrib/hbnf/hex2dec.prg index 27699a73e2..aaebe58cf2 100644 --- a/harbour/contrib/hbnf/hex2dec.prg +++ b/harbour/contrib/hbnf/hex2dec.prg @@ -27,31 +27,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_HEX2DEC() - * $CATEGORY$ - * Conversion - * $ONELINER$ - * Convert a hex number to decimal - * $SYNTAX$ - * FT_HEX2DEC( ) -> nDecNum - * $ARGUMENTS$ - * is a character string representing a hex number. - * $RETURNS$ - * A decimal number. - * $DESCRIPTION$ - * Converts a hexadecimal number to a BASE 10 decimal number. - * Useful for using FT_INT86(). - * $EXAMPLES$ - * FT_INT86( HEX2DEC( "21" ), aRegs ) - * - * Converts 21h, the Dos Interrupt, to its decimal equivalent, - * 33, for use by FT_INT86(). - * $END$ - */ - #define HEXTABLE "0123456789ABCDEF" #ifdef FT_TEST diff --git a/harbour/contrib/hbnf/iamidle.c b/harbour/contrib/hbnf/iamidle.c index dd3c7f4ed9..2af0680d9c 100644 --- a/harbour/contrib/hbnf/iamidle.c +++ b/harbour/contrib/hbnf/iamidle.c @@ -66,44 +66,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_IAmIdle() - * $CATEGORY$ - * DOS/BIOS - * $ONELINER$ - * Inform the operating system that the application is idle. - * $SYNTAX$ - * FT_IAmIdle() -> lSuccess - * $ARGUMENTS$ - * None - * $RETURNS$ - * .T. if supported, .F. otherwise. - * $DESCRIPTION$ - * Some multitasking operating environments (e.g. Windows or OS/2) can - * function more efficiently when applications release the CPU during - * idle states. This function allows you "announce" to the operating - * system that your application is idle. - * - * Note that if you use this function in conjunction with FT_OnIdle(), - * you can cause Clipper to automatically release the CPU whenever - * Clipper itself detects an idle state. - * $EXAMPLES$ - * while inkey() != K_ESC - * FT_IAmIdle() // Wait for ESC and announce idleness - * end - * - * * Here's another way to do it: - * - * FT_OnIdle( {|| FT_IAmIdle()} ) - * - * Inkey( 0 ) // Automatically reports idleness until key - * // is pressed! - * $SEEALSO$ - * FT_OnIdle() - * $END$ - */ - #include "hbapi.h" HB_FUNC( FT_IAMIDLE ) diff --git a/harbour/contrib/hbnf/invclr.prg b/harbour/contrib/hbnf/invclr.prg index 3f6ef674b4..8156119f17 100644 --- a/harbour/contrib/hbnf/invclr.prg +++ b/harbour/contrib/hbnf/invclr.prg @@ -24,30 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_INVCLR() - * $CATEGORY$ - * Conversion - * $ONELINER$ - * Get the inverse of a color - * $SYNTAX$ - * FT_INVCLR( [ ] ) -> cColor - * $ARGUMENTS$ - * is the color to get the inverse of. Defaults to - * current color. - * $RETURNS$ - * The inverse of the passed color. - * $DESCRIPTION$ - * This function inverts a passed color (in the Clipper format: ??/??), - * e.g., "W/N" is converted to "N/W". - * $EXAMPLES$ - * cInverse := FT_INVCLR() // Get Inverse of Current Color - * cInvErr := FT_INVCLR( cErrColor ) // Get Inverse of cErrorColor - * $END$ - */ - #Command DEFAULT TO [, TO ] ; => ; := iif( == NIL,,) ; diff --git a/harbour/contrib/hbnf/isbit.prg b/harbour/contrib/hbnf/isbit.prg index 5e7b4c8ab5..6766c533b1 100644 --- a/harbour/contrib/hbnf/isbit.prg +++ b/harbour/contrib/hbnf/isbit.prg @@ -24,52 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ISBIT() - * $CATEGORY$ - * String - * $ONELINER$ - * Test the status of an individual bit - * $SYNTAX$ - * FT_ISBIT( , ) -> lResult - * $ARGUMENTS$ - * is a character from CHR(0) to CHR(255) - * - * is a number from 0 to 7 conforming to standard right-to-left - * bit-numbering convention and representing the position of the - * bit within the byte. - * $RETURNS$ - * .T. if designated bit is set (1), .F. if not set (0), NIL if - * invalid parameters. - * $DESCRIPTION$ - * Tests for status of any selected bit in the byte passed as a parameter. - * Byte must be presented in CHR() form, as a literal constant, or as the - * one-byte character result of an expression. - * - * This function is presented to illustrate that bit-wise operations - * are possible with Clipper code. For greater speed, write .c or - * .asm versions and use the Clipper Extend system. - * $EXAMPLES$ - * This code tests whether bit 3 is set in the byte represented by - * CHR(107): - * - * lBitflag := FT_ISBIT(CHR(107), 3) - * ? lBitflag // result: .T. - * - * This code tests whether bit 5 is set in the byte represented by ASCII - * 65 (letter 'A') - * - * ? FT_ISBIT('A', 5) // result: .F. - * - * For a demonstration of Clipper bit manipulations, compile and - * link the program bittest.prg in the Nanforum Toolkit source code. - * $SEEALSO$ - * FT_BITSET() FT_BITCLR() - * $END$ - */ - FUNCTION FT_ISBIT(cInbyte,nBitPos) LOCAL lBitStat diff --git a/harbour/contrib/hbnf/isbiton.prg b/harbour/contrib/hbnf/isbiton.prg index b8d9b386ac..fbb1fd1399 100644 --- a/harbour/contrib/hbnf/isbiton.prg +++ b/harbour/contrib/hbnf/isbiton.prg @@ -27,39 +27,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ISBITON() - * $CATEGORY$ - * String - * $ONELINER$ - * Determine the state of individual bits in a number - * $SYNTAX$ - * FT_ISBITON( , ) -> lResult - * $ARGUMENTS$ - * is an integer for which a bit state needs to be checked. - * - * is a number from 0 to 15 that indicates which bit to test. - * $RETURNS$ - * .T. if the specified bit was on., .F. if off. - * $DESCRIPTION$ - * This function is useful when dealing with binary integers. It will - * come in very handy if you use the FT_INT86() function, because the - * CPU flags are returned as a series of bits. Using this function, you - * can determine the state of each CPU flag. - * $EXAMPLES$ - * if FT_ISBITON( nCPUFlags, 0 ) - * Qout( "The carry flag was set." ) - * endif - * - * if FT_ISBITON( nCPUFlags, 7 ) - * Qout( "The sign flag was set." ) - * endif - * $END$ - */ - - function FT_ISBITON( nWord, nBit ) nWord := iif(nWord < 0, nWord + 65536, nWord) diff --git a/harbour/contrib/hbnf/isshare.prg b/harbour/contrib/hbnf/isshare.prg index be03246e35..dff0155e2b 100644 --- a/harbour/contrib/hbnf/isshare.prg +++ b/harbour/contrib/hbnf/isshare.prg @@ -28,36 +28,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_ISSHARE() - * $CATEGORY$ - * DOS/BIOS - * $ONELINER$ - * Determine if DOS "Share" is installed - * $SYNTAX$ - * FT_ISSHARE() -> nRetCode - * $ARGUMENTS$ - * None - * $RETURNS$ - * nRetcode will be set as follows on exit: - * - * 0 if SHARE not loaded but ok to load - * 1 if SHARE not loaded and not ok to load - * 255 if SHARE loaded - * $DESCRIPTION$ - * Uses DOS interrupt 2Fh (MultiPlex interrupt), service 10h - * to determine if DOS SHARE.COM is loaded. - * $EXAMPLES$ - * IF FT_ISSHARE() != 255 - * Qout("SHARE must be loaded!") - * ENDIF - * $SEEALSO$ - * FT_INT86() - * $END$ - */ - #include "ftint86.ch" #ifdef FT_TEST @@ -87,7 +57,6 @@ FUNCTION ft_isshare() FT_Int86( 47, aRegs) // multiplex interrupt - RETURN lowbyte( aRegs[AX] ) */ RETURN _ft_isshare() diff --git a/harbour/contrib/hbnf/kspeed.c b/harbour/contrib/hbnf/kspeed.c index db617ab6e1..66afe1828e 100644 --- a/harbour/contrib/hbnf/kspeed.c +++ b/harbour/contrib/hbnf/kspeed.c @@ -24,71 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_SETRATE() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Set the keyboard delay and repeat rate on PC/AT & PS/2 - * $SYNTAX$ - * FT_SETRATE( [ ] [, ] ) -> NIL - * $ARGUMENTS$ - * is the keyboard delay time. - * - * is the keyboard repeat rate. - * - * ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ - * ³ nDelayTime DELAY ³ ³ RepeatRate SPEED ³ - * ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ - * ³ 0 250ms ³ ³ 0 30.0cps ³ - * ³ 1 (default) 500ms ³ ³ 1 26.7cps ³ - * ³ 2 750ms ³ ³ 2 24.0cps ³ - * ³ 3 1000ms ³ ³ 3 21.8cps ³ - * ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ 4 20.0cps ³ - * ³ 5 18.5cps ³ - * ³ 6 17.1cps ³ - * ³ 7 16.0cps ³ - * ³ 8 15.0cps ³ - * ³ 9 13.3cps ³ - * ³ 10 12.0cps ³ - * ³ 11 10.9cps ³ - * ³ 12 (default) 10.0cps ³ - * ³ 13 9.2cps ³ - * ³ 14 8.6cps ³ - * ³ 15 8.0cps ³ - * ³ 16 7.5cps ³ - * ³ 17 6.7cps ³ - * ³ 18 6.0cps ³ - * ³ 19 5.5cps ³ - * ³ 20 5.0cps ³ - * ³ 21 4.6cps ³ - * ³ 22 4.3cps ³ - * ³ 23 4.0cps ³ - * ³ 24 3.7cps ³ - * ³ 25 3.3cps ³ - * ³ 26 3.0cps ³ - * ³ 27 2.7cps ³ - * ³ 28 2.5cps ³ - * ³ 29 2.3cps ³ - * ³ 30 2.1cps ³ - * ³ 31 2.0cps ³ - * ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * This routine is used to adjust the IBM PC/AT and PS/2 "typematic" - * repeat and delay feature. This is used to allow the users of your - * application to adjust these speeds to the most comfortable level. - * - * This source code is written for Microsoft Assembler v5.1. - * $EXAMPLES$ - * FT_SETRATE(0,0) // Set keyboard to fastest possible settings - * FT_SETRATE() // Set keyboard to AT defaults (10.9cps,500ms delay) - * FT_SETRATE(11,1) // Set keyboard to PS/2 defaults (10cps,500ms delay) - * $END$ - */ /*This is the Original FT_SETRATE() code PUBLIC FT_SETRATE * MAKE ROUTINE VISIBLE diff --git a/harbour/contrib/hbnf/lastday.prg b/harbour/contrib/hbnf/lastday.prg index 58a55c21c9..c46b84c57f 100644 --- a/harbour/contrib/hbnf/lastday.prg +++ b/harbour/contrib/hbnf/lastday.prg @@ -22,41 +22,12 @@ * */ - /* Librarian's note: The toolkit's original ft_lday() function was submitted by Jeff Bryant. Mike saw it and optimized it. Thanks to you both for your great code! */ -/* $DOC$ - * $FUNCNAME$ - * FT_LDAY() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Return last day of the month - * $SYNTAX$ - * FT_LDAY( [ ] ) -> dLastDay - * $ARGUMENTS$ - * is a date within a month for which you want to find - * the last date of that month. If not passed or is an incorrect - * type, defaults to current system date. - * $RETURNS$ - * A Clipper date value representing the last date of the month. - * $DESCRIPTION$ - * This function will return the last day of the month of the date - * passed, or the last day of the current month if no argument is - * supplied. - * $EXAMPLES$ - * dDate := CTOD( "09/15/90" ) - * ? FT_LDAY( dDate ) // 09/30/90 - * ? FT_LDAY() // 03/31/91 (current month) - * $SEEALSO$ - * FT_FDAY() - * $END$ - */ - FUNCTION ft_lday( dDate ) LOCAL d:= dDate IF dDate == NIL diff --git a/harbour/contrib/hbnf/linked.prg b/harbour/contrib/hbnf/linked.prg index 3698e34e7b..4026f8f7f1 100644 --- a/harbour/contrib/hbnf/linked.prg +++ b/harbour/contrib/hbnf/linked.prg @@ -24,54 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_LINKED() - * $CATEGORY$ - * Environment - * $ONELINER$ - * Determine if a function was linked in - * $SYNTAX$ - * FT_LINKED( ) -> lResult - * $ARGUMENTS$ - * is a character string containing one or more function - * calls - * $RETURNS$ - * .T. if all functions within the string are currently linked into - * the application, .F. if one or more aren't. See below for a - * definition of "function." - * $DESCRIPTION$ - * - * This function would be used in data driven application to determine - * whether or not a macro compiled function was linked in. - * - * Several functions can be passed, and nested, in . - * - * Caveat: Some function calls are converted by the preprocessor - * into other function calls. You cannot have these types of - * functions in a macro compiled string as they never exist at - * runtime. FT_LINKED will correctly tell you that they are invalid. - * - * For instance: there is no function called SORT() in any of the - * Nantucket LIBraries, but it is a valid CLIPPER command because the - * preprocessor will convert it to other function calls. - * - * - * $EXAMPLES$ - * - * cString := "FT_GoodFunc(BadFunc(3,2))" - * IF FT_LINKED(cString) - * EVAL( &("{||"+cString+"}") ) - * ELSE - * ALERT("Error: "+cString+" was not linked in. Called by FT_LINKED()") - * ENDIF - * - * - * $END$ - */ - - #ifdef FT_TEST FUNCTION Main @@ -99,7 +51,6 @@ *------------------------------------------------ - FUNCTION FT_Linked( cFuncs ) // A function is detected by the left parenthesis, "(", and it begins diff --git a/harbour/contrib/hbnf/madd.prg b/harbour/contrib/hbnf/madd.prg index 30985a4551..633db49320 100644 --- a/harbour/contrib/hbnf/madd.prg +++ b/harbour/contrib/hbnf/madd.prg @@ -27,53 +27,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_MADD() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Add or subtract months to/from a date - * $SYNTAX$ - * FT_MADD( [ ], [ ], [ ] ) - * -> dDate - * $ARGUMENTS$ - * is any valid date in any date format. Defaults to - * current system date if not supplied. - * - * is the number of months to be added or subtracted. - * Defaults to 0 if not supplied. - * - * is a logical variable indicating whether or not to - * force the returned date to the last date of the month. It only - * affects the returned date if is an end-of-month date. - * $RETURNS$ - * A date. - * $DESCRIPTION$ - * FT_MADD() adds or subtracts months to/from a given date. - * - * If MakeEOM is passed and dGivenDate is the last day of a month, - * it will return the EOM of calculated month. Otherwise it will - * return the same day as the day of the passed date. - * $EXAMPLES$ - * dDate := CTOD( "09/15/90" ) - * ? FT_MADD( dDate, 1 ) // 10/15/90 - * ? FT_MADD( dDate, -2 ) // 07/15/90 - * - * // force EOM - * dDate := CTOD( "04/30/91" ) - * ? FT_MADD( dDate, 1 ) // 05/30/91 - * ? FT_MADD( dDate, 1, .T. ) // 05/31/91 <- forced EOM - * ? FT_MADD( dDate, 2 ) // 06/30/91 - * ? FT_MADD( dDate, 2, .T. ) // 06/30/91 <- June only has 30 days - * ? FT_MADD( dDate, 3 ) // 07/30/91 - * ? FT_MADD( dDate, 3, .T. ) // 07/31/91 <- forced EOM - * - * $SEEALSO$ - * FT_DAYOFYR() FT_DAYTOBOW() - * $END$ -*/ - FUNCTION FT_MADD( dGivenDate, nAddMonths, lMakeEOM) LOCAL nAdjDay, dTemp, i diff --git a/harbour/contrib/hbnf/menu1.prg b/harbour/contrib/hbnf/menu1.prg index fe640058e0..2045e43eca 100644 --- a/harbour/contrib/hbnf/menu1.prg +++ b/harbour/contrib/hbnf/menu1.prg @@ -24,122 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_MENU1() - * $CATEGORY$ - * Menus/Prompts - * $ONELINER$ - * Pulldown menu system - * $SYNTAX$ - * FT_MENU1( , , , - * [, ], [ ] ) -> NIL - * $ARGUMENTS$ - * is a character array containing the names to appear - * on the menu bar. - * - * is a multi-dimensional array with one element for each - * selection to appear on the pulldown menus. - * - * is an array containing the colors for the menu groups. - * - * is a numeric value that determines the row for the menu - * bar. If omitted, it defaults to 0. - * - * is a logical variable. If true (.T.) or omitted, it - * uses FT_SHADOW() to add a transparent shadow to the each - * pulldown menu. If false (.F.), the menu is drawn without - * the shadow. - * - * All arguments except nTopRow and lShadow are required. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * FT_MENU1() is a function that displays a pulldown menu for each item - * on the menu bar and executes the corresponding function for the item - * selected. When a called function returns false, FT_MENU1 returns - * control to the calling program. - * - * Valid keystrokes and their corresponding actions: - * - * Home - Activates Pulldown for first item on the menu bar - * End - Activates Pulldown for last item on the menu bar - * Left Arrow - Activates next Pulldown to the left - * Right Arrow - Activates next Pulldown to the right - * Tab - Same as Right Arrow - * Shift-Tab - Same as Left Arrow - * Page Up - Top item on current Pulldown menu - * Page Down - Bottom item on current Pulldown menu - * Enter - Selects current item - * Alpha Character - Moves to closest match and selects - * Alt- - Moves to corresponding menu bar item - * Escape - Prompts for confirmation and either returns to - * the calling routine or resumes - * $EXAMPLES$ - * // Declare arrays - * LOCAL aColors := {} - * LOCAL aBar := { " ENTER/EDIT ", " REPORTS ", " DISPLAY " } - * - * // Include the following two lines of code in your program, as is. - * // The first creates aOptions with the same length as aBar. The - * // second assigns a three-element array to each element of aOptions. - * LOCAL aOptions[ LEN( aBar ) ] - * AEVAL( aBar, { |x,i| aOptions[i] := { {},{},{} } } ) - * - * // fill color array - * // Box Border, Menu Options, Menu Bar, Current Selection, Unselected - * aColors := iif( lColor, {"W+/G", "N/G", "N/G", "N/W", "N+/G"}, ; - * {"W+/N", "W+/N", "W/N", "N/W","W/N"} ) - * - * // array for first pulldown menu - * FT_FILL( aOptions[1], 'A. Execute A Dummy Procedure' , {|| fubar()}, .t. ) - * FT_FILL( aOptions[1], 'B. Enter Daily Charges' , {|| .t.}, .f. ) - * FT_FILL( aOptions[1], 'C. Enter Payments On Accounts', {|| .t.}, .t. ) - * - * // array for second pulldown menu - * FT_FILL( aOptions[2], 'A. Print Member List' , {|| .t.}, .t. ) - * FT_FILL( aOptions[2], 'B. Print Active Auto Charges' , {|| .t.}, .t. ) - * - * // array for third pulldown menu - * FT_FILL( aOptions[3], 'A. Transaction Totals Display', {|| .t.}, .t. ) - * FT_FILL( aOptions[3], 'B. Display Invoice Totals' , {|| .t.}, .t. ) - * FT_FILL( aOptions[3], 'C. Exit To DOS' , {|| .f.}, .t. ) - * - * Call FT_FILL() once for each item on each pulldown menu, passing it - * three parameters: - * - * FT_FILL( , , - * - * is a character string which will be displayed on - * the pulldown menu. - * - * should contain one of the following: - * - * A function name to execute, which in turn should return .T. or .F. - * FT_MENU1 WILL RETURN CONTROL TO THE CALLING PROGRAM IF .F. IS - * RETURNED OR CONTINUE IF .T. IS RETURNED. - * - * .F. WHICH WILL CAUSE FT_MENU1 TO RETURN CONTROL TO THE CALLING - * PROGRAM. - * - * .T. WHICH WILL DO NOTHING. THIS ALLOWS THE DEVELOPER TO DESIGN A - * SKELETON MENU STRUCTURE PRIOR TO COMPLETING ALL OF THE SUBROUTINES. - * - * // CALL FT_MENU1 - * FT_MENU1( aBar, aOptions, aColors, 0 ) - * - * NOTE: FT_MENU1() disables Alt-C and Alt-D in order to make them - * available for the menu bar. It enables Alt-D and resets - * Alt-C to its previous state prior to calling each function. - * $SEEALSO$ - * FT_FILL() - * $END$ - */ - - - - /* For the sample program: @@ -152,7 +36,6 @@ PASS "VGA" OR "VGA" AS A COMMAND LINE PARAMETER FOR 50-LINE MODE. */ - #include "common.ch" #define LEFTARROW 19 @@ -310,7 +193,6 @@ STATIC NHPOS, NVPOS, NMAXROW, NMAXCOL #endif // end of demo program - FUNCTION FT_MENU1( aBar, aOptions, aColors, nTopRow, lShadow ) LOCAL nTtlUsed LOCAL sMainScrn, lCancMode, lLooping := .t. @@ -481,66 +363,6 @@ STATIC FUNCTION _ftValKeys( nNum,aChoices,aValidkeys ) AEVAL( aChoices[nNum,1], {|x| aValidKeys[nNum] += LEFT( x, 1)} ) RETURN NIL -/* $DOC$ - * $FUNCNAME$ - * FT_FILL() - * $CATEGORY$ - * Menus/Prompts - * $ONELINER$ - * Declare menu options for FT_MENU1() - * $SYNTAX$ - * FT_FILL( , , , - * ) -> NIL - * $ARGUMENTS$ - * is a sub-array of in FT_MENU1() - * denoting the group in which to include the selection -- - * e.g., acOptions[1] - * - * is the character string that will appear on - * the menu. - * - * is the code block to be executed when that menu - * option is selected. i.e. {|| MyFunction() } would execute - * the function called MyFunction(). {|| .f.} would exit the - * FT_MENU1 and return to the calling routine. {|| .T.} would - * do nothing. - * - * is a logical variable that determines whether - * the corresponding menu option is selectable or not. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * FT_FILL() is a function used to set up the menu options prior - * to calling FT_MENU1(). - * $EXAMPLES$ - * FT_FILL( aOptions[1], 'A. Execute A Dummy Procedure' , {|| fubar()}, .t. ) - * - * The above would be added to the sub-menu associated with the first menu - * bar item, would execute the function FUBAR() when that option was - * selected, and would be selectable. - * - * - * FT_FILL( aOptions[3], 'B. Enter Daily Charges' , {|| .t.}, .f. ) - * - * The above would be added to the sub-menu associated with the third menu - * bar item, and would be unselectable. - * - * - * FT_FILL( aOptions[2], 'C. Enter Payments On Accounts', {|| .t.}, .t. ) - * - * The above would be added to the sub-menu associated with the second menu - * bar item, and would be selectable, but would do nothing when selected. - * - * - * FT_FILL( aOptions[4], 'C. Exit' , {|| .f.}, .t. ) - * - * The above would be added to the sub-menu associated with the fourth menu - * bar item, and would be selectable, and would exit FT_MENU1() when chosen. - * $SEEALSO$ - * FT_MENU1() - * $END$ - */ - FUNCTION FT_FILL( aArray, cMenuOption, bBlock, lAvailable ) AADD( aArray[1], cMenuOption ) AADD( aArray[2], bBlock ) diff --git a/harbour/contrib/hbnf/menutonf.prg b/harbour/contrib/hbnf/menutonf.prg index fa4d2cee18..de16266757 100644 --- a/harbour/contrib/hbnf/menutonf.prg +++ b/harbour/contrib/hbnf/menutonf.prg @@ -34,154 +34,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_Prompt() - * $CATEGORY$ - * Menus/Prompts - * $ONELINER$ - * Define a menu item for use with FT_MenuTo() - * $SYNTAX$ - * #include "ftmenuto.ch" - * - * @ , PROMPT ; - * [COLOR ] ; - * [MESSAGE ] ; - * [MSGROW ] ; - * [MSGCOL ] ; - * [MSGCOLOR ] ; - * [TRIGGER ] ; - * [TRIGGERCOLOR ] ; - * [HOME ] ; - * [END ] ; - * [UP ] ; - * [DOWN ] ; - * [LEFT ] ; - * [RIGHT ] ; - * [EXECUTE ] ; - * - * $ARGUMENTS$ - * is the row at which the prompt is to appear. - * - * is the column at which the prompt will appear. - * - * is the menu item string. - * - * is optional and is the color attribute of the prompt. Note - * that two colors are required; one for the standard setting and one - * for the enhanced setting (i.e. the light bar color). See the example - * below if this isn't clear. If is not specified then the - * current SetColor() value is used by default. - * - * is optional and is the message associated with the - * prompt. If not specified, then no message will be displayed. - * - * is optional and is the row at which the message, if any, - * will appear. If not specified, the default is the current setting - * of the SET MESSAGE TO command. - * - * is optional and is the column at which the message, if - * any, will appear. If not specified, the default is either zero or - * centered, depending on the current setting of the CENTER option of - * the SET MESSAGE TO command. - * - * is optional and is the color attribute of the message. - * If not specified, the default is the same as the prompt color. - * - * is optional and is the position within the prompt string - * where the trigger character is located. If not specified, the - * default is one. - * - * is optional and is the color attribute of the trigger - * character. Note that two colors are required; one for the standard - * setting and one for the enhanced setting (i.e. the light bar color). - * See the example below if this isn't clear. If is not - * specified then the default is the same color as the rest of the - * prompt. - * - * is optional and specifies which prompt becomes active - * when the home key is pressed. If not specified, the default is - * the first prompt. - * - * is optional and specifies which prompt becomes active - * when the end key is pressed. If not specified, the default is - * the last prompt. - * - * is optional and specifies which prompt becomes active - * when the up arrow key is pressed. If not specified, the - * default is the previous prompt. The current setting of SET - * WRAP TO is obeyed. - * - * is optional and specifies which prompt becomes - * active when the down arrow key is pressed. If not - * specified, the default is the next prompt. The current - * setting of SET WRAP TO is obeyed. - * - * is optional and specifies which prompt becomes - * active when the right arrow key is pressed. If not - * specified, the default is the next prompt. The current - * setting of SET WRAP TO is obeyed. - * - * is optional and specifies which prompt becomes - * active when the left arrow is pressed. If not specified, - * the default is the previous prompt. The current setting of - * SET WRAP TO is obeyed. - * - * is optional and is a code block to evaluate whenever - * the menu item to which it belongs is selected. - * $DESCRIPTION$ - * Clipper's @...PROMPT and MENU TO commands are fine as far as - * they go. But many times you need more flexibility. As - * you'll no doubt notice if you read the argument list, this - * function is almost completely flexible. You can adjust - * locations and colors for every part of the prompt and its - * associated message. In addition, since you can control the - * effect of the arrow keys, you can allow both horizontal and - * vertical movement, or even disable certain arrow keys if you - * so desire. Support for nested menus is also available, since - * the prompts are stored in stack-based static arrays. - * - * Note that this command can also be called using function-style - * syntax. See the entry for FT_PROMPT() for further details. - * - * This enhanced version of @...PROMPT requires the inclusion of - * the header file ftmenuto.ch in any source file that uses it. - * It is may be used in place of the standard Clipper @...PROMPT - * command. However, in the interests of functionality it is NOT - * 100% compatible. No whining! If compatibility is such a big - * deal then use the standard Clipper commands. - * - * $EXAMPLES$ - * #include "ftmenuto.ch" - * - * // Simple prompt - * @ 1, 1 PROMPT "Menu choice #1" - * - * // Prompt with color - * @ 3, 1 PROMPT "Menu choice #2" COLOR "W+/R,W+/B" - * - * // Prompt with a message - * @ 5, 1 PROMPT "Menu choice #3" MESSAGE "Go to lunch" - * - * // Prompt with pinpoint message control - * @ 7, 1 PROMPT "Menu choice #4" MESSAGE "Drop Dead" ; - * MSGROW 22 MSGCOL 4 MSGCOLOR "GR+/N" - * - * // Prompt with a trigger character ("#" character) - * @11, 1 PROMPT "Menu choice #6" TRIGGER 13 - * - * // Prompt with trigger character color control - * @13, 1 PROMPT "Menu Choice #7" TRIGGER 13 TRIGGERCOLOR "R+/BG,G+/N" - * - * // Prompt with right and left arrow keys disabled - * @15, 1 PROMPT "Menu Choice #8" RIGHT 8 LEFT 8 - * $INCLUDE$ - * ftmenuto.ch - * $SEEALSO$ - * - * $END$ - */ - #include "setcurs.ch" #include "inkey.ch" @@ -299,53 +151,6 @@ dispend() return NIL - - -/* $DOC$ - * $FUNCNAME$ - * FT_MenuTo() - * $CATEGORY$ - * Menus/Prompts - * $ONELINER$ - * Execute light bar menu using prompts created with @...PROMPT - * $SYNTAX$ - * #include "ftmenuto.ch" - * - * MENU TO [COLD] - * $ARGUMENTS$ - * is the name of the variable to which the result of the menu - * selection should be assigned. - * - * [COLD] is optional and if specified indicates that trigger characters - * should be treated as "cold," i.e. rather than causing the menu item - * to be selected it only causes the light bar to move to that selection. - * $DESCRIPTION$ - * This enhanced version of MENU TO requires the inclusion of the header - * file ftmenuto.ch in any source file that uses it. It may be used in - * place of the standard Clipper MENU TO command. However, in the - * interests of functionality it is NOT 100% compatible (in particular, - * you should make sure that the target memvar exists before executing - * the menu -- the Clipper version will create a PRIVATE memvar for you - * if it does not already exist, but this version does not). No whining! - * If compatibility is such a big deal then use the standard Clipper - * command. - * - * Note that this command can also be called using function-style - * syntax. See the entry for FT_MENUTO() for further details. - * $EXAMPLES$ - * #include "ftmenuto.ch" - * - * // Simple command - * - * MENU TO memvar - * - * $INCLUDE$ - * ftmenuto.ch - * $SEEALSO$ - * FT_Prompt() - * $END$ - */ - function FT_MenuTo( bGetSet, cReadVar, lCold ) local nMenu := nLevel++ @@ -535,7 +340,6 @@ while .not. lChoice substr( aPrompt[ nLast ], aTrigger[ nLast ], 1 ), ; aTriggerColor[ nLast ] ) - if cScreen != NIL then restscreen( aMsgRow[ nLast ], ; aMsgCol[ nLast ], ; aMsgRow[ nLast ], ; diff --git a/harbour/contrib/hbnf/metaph.prg b/harbour/contrib/hbnf/metaph.prg index 476118e6e2..addde84bdb 100644 --- a/harbour/contrib/hbnf/metaph.prg +++ b/harbour/contrib/hbnf/metaph.prg @@ -24,40 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_METAPH() - * $CATEGORY$ - * String - * $ONELINER$ - * Convert a character string to MetaPhone format - * $SYNTAX$ - * FT_METAPH( [, ] ) -> cMetaPhone - * $ARGUMENTS$ - * is the character string to convert - - * is the length of the character string to be returned. - * If not specified the default length is 4 bytes. - * $RETURNS$ - * A phonetically spelled character string - * $DESCRIPTION$ - * This function is a character function use to index and search for - * sound-alike or phonetic matches. It is an alternative to - * the SOUNDEX() function, and addresses some basic pronunciation - * rules, by looking at surrounding letters to determine how parts of - * the string are pronounced. FT_METAPH() will group sound-alikes - * together, and forgive shortcomings in spelling ability. - * $EXAMPLES$ - * USE Persons - * INDEX ON FT_METAPH( LastName ) TO LastName - * SEEK FT_METAPH( "Philmore" ) - * ? FOUND(), LastName // Result: .T. Philmore - * SEEK FT_METAPH( "Fillmore" ) - * ? FOUND(), LastName // Result: .T. Philmore - * $END$ - */ - /* * File Contents * diff --git a/harbour/contrib/hbnf/miltime.prg b/harbour/contrib/hbnf/miltime.prg index 3ed112d0a1..fe10f56dc9 100644 --- a/harbour/contrib/hbnf/miltime.prg +++ b/harbour/contrib/hbnf/miltime.prg @@ -24,10 +24,6 @@ * */ - - - - #ifdef FT_TEST function main() @@ -66,94 +62,14 @@ #endif - - -/* $DOC$ - * $FUNCNAME$ - * FT_MIL2MIN() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Convert time in military format to number of minute of day. - * $SYNTAX$ - * FT_MIL2MIN( ) -> nMINUTE - * $ARGUMENTS$ - * character string of form hhmm, where 0<=hh<24. - * $RETURNS$ - * numeric value representing minute of day. - * $DESCRIPTION$ - * Converts time in military format to number of minute of the day. - * $EXAMPLES$ - * FT_MIL2MIN( "1729" ) -> 1049 - * $SEEALSO$ - * FT_MIN2MIL() FT_CIV2MIL() FT_MIL2CIV() FT_SYS2MIL() - * $END$ - */ - function FT_MIL2MIN(cMILTIME) return int(val(left(cMILTIME,2))*60 + val(right(cMILTIME,2))) - -/* $DOC$ - * $FUNCNAME$ - * FT_MIN2MIL() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Convert minute of day to military format time. - * $SYNTAX$ - * FT_MIN2MIL( ) -> cMILTIME - * $ARGUMENTS$ - * numeric integer representing minute of day. - * $RETURNS$ - * character string of form hhmm, where 0<=hh<24. - * $DESCRIPTION$ - * Converts minute of the day to military format time. - * $EXAMPLES$ - * FT_MIN2MIL( 279 ) -> 0439 - * $SEEALSO$ - * FT_MIL2MIN() FT_MIL2CIV() FT_CIV2MIL() FT_SYS2MIL() - * $END$ - */ - function FT_MIN2MIL(nMIN) nMIN := nMIN%1440 return right("00" + ltrim(str(INT(nMIN/60))),2) + ; right("00" + ltrim(str(INT(nMIN%60))),2) - - -/* $DOC$ - * $FUNCNAME$ - * FT_MIL2CIV() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Convert time in military format to civilian format. - * $SYNTAX$ - * FT_MIL2CIV( ) -> dMILTIME - * $ARGUMENTS$ - * character string of form hhmm, where 0<=hh<24. - * $RETURNS$ - * character string of form hh:mm (am,pm,n or m), - * where 0 4:40 pm - * - * FT_MIL2CIV( "0440" ) -> 4:40 am - * - * FT_MIL2CIV( "1200" ) -> 12:00 n - * - * FT_MIL2CIV( "0000" ) and FT_MIL2CIV( "2400" ) -> 12:00 m - * - * Caution: leading blanks are irrelevant. - * $SEEALSO$ - * FT_CIV2MIL() FT_SYS2MIL() FT_MIL2MIN() FT_MIN2MIL() - * $END$ - */ - function FT_MIL2CIV(cMILTIME) local cHRS,cMINS,nHRS,cCIVTIME @@ -184,40 +100,6 @@ function FT_MIL2CIV(cMILTIME) return cCIVTIME - - -/* $DOC$ - * $FUNCNAME$ - * FT_CIV2MIL() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Convert usual civilian format time to military time. - * $SYNTAX$ - * FT_CIV2MIL( ) -> cMILTIME - * $ARGUMENTS$ - * character string of form hh:mm (am,pm,n or m), - * where 0 character string of form hhmm, where 0<=hh<24. - * $DESCRIPTION$ - * Converts time from 12-hour civilian format to military. - * $EXAMPLES$ - * FT_CIV2MIL( " 5:40 pm" ) -> 1740 - * - * FT_CIV2MIL( " 5:40 am" ) -> 0540 - * - * FT_CIV2MIL( "12:00 n" ) -> 1200 - * - * FT_CIV2MIL( "12:00 m" ) -> 0000 - * - * Caution: leading blanks are irrelevant; p,a,n,m must be preceded by - * one and only one space. - * $SEEALSO$ - * FT_MIL2CIV() FT_SYS2MIL() FT_MIL2MIN() FT_MIN2MIL() - * $END$ - */ - function FT_CIV2MIL(cTIME) local cKEY, cMILTIME @@ -257,28 +139,5 @@ endcase return cMILTIME - -/* $DOC$ - * $FUNCNAME$ - * FT_SYS2MIL() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Convert system time to military time format. - * $SYNTAX$ - * FT_SYS2MIL() -> cMILTIME - * $ARGUMENTS$ - * none - * $RETURNS$ - * character string of form hhmm, where 0<=hh<24. - * $DESCRIPTION$ - * Return current system time as character string in military format. - * $EXAMPLES$ - * FT_SYS2MIL() -> 1623 - * $SEEALSO$ - * FT_MIL2CIV() FT_CIV2MIL() - * $END$ - */ - function FT_SYS2MIL() return left(stuff(time(),3,1,""),4) diff --git a/harbour/contrib/hbnf/min2dhm.prg b/harbour/contrib/hbnf/min2dhm.prg index c56c733a58..3ec7becd87 100644 --- a/harbour/contrib/hbnf/min2dhm.prg +++ b/harbour/contrib/hbnf/min2dhm.prg @@ -27,31 +27,6 @@ * */ - - -/* $DOC$ - * $FUNCNAME$ - * FT_MIN2DHM() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Convert numeric minutes to days, hours and minutes. - * $SYNTAX$ - * FT_MIN2DHM( ) -> aDHM_ - * $ARGUMENTS$ - * the number of minutes. - * $RETURNS$ - * - * where: - * aDHM_[1] = cDAYS, aDHM_[2] = cHours, aDHM_[3] = cMinutes - * $DESCRIPTION$ - * Converts numeric minutes into a character array containing - * days, hours & minutes. - * $EXAMPLES$ - * aDHM_ = MIN2DHM(16789) -> aDHM_[1] = 11, aDHM_[2] = 15, aDHM_[3] = 49 - * $END$ - */ - function FT_MIN2DHM(nMINS) local aDHM_[3] diff --git a/harbour/contrib/hbnf/mkdir.c b/harbour/contrib/hbnf/mkdir.c index 1bf3b60239..77ea375519 100644 --- a/harbour/contrib/hbnf/mkdir.c +++ b/harbour/contrib/hbnf/mkdir.c @@ -25,38 +25,6 @@ ; */ -/* $DOC$ - * $FUNCNAME$ - * FT_MKDIR() - * $CATEGORY$ - * DOS/BIOS - * $ONELINER$ - * Create a subdirectory - * $SYNTAX$ - * FT_MKDIR( ) -> nResult - * $ARGUMENTS$ - * is the name of the directory to create. - * $RETURNS$ - * 0 if successful - * 3 if Path Not Found - * 5 if Access Denied or directory already exists - * 99 if invalid parameters passed - * $DESCRIPTION$ - * Use this function to create the subdirectories needed by your - * application. It might be especially useful in an installation - * program. - * - * The source code is written to adhere to Turbo Assembler's IDEAL mode. - * To use another assembler, you will need to rearrange the PROC and - * SEGMENT directives, and also the ENDP and ENDS directives (a very - * minor task). - * $EXAMPLES$ - * FT_MKDIR( "C:\clipper" ) - * FT_MKDIR( "\example" ) - * FT_MKDIR( "..\source" ) - * $END$ - */ - /*This is the Original FT_CHDIR() code IDEAL MODEL HUGE diff --git a/harbour/contrib/hbnf/month.prg b/harbour/contrib/hbnf/month.prg index 232968d520..f925eae209 100644 --- a/harbour/contrib/hbnf/month.prg +++ b/harbour/contrib/hbnf/month.prg @@ -27,64 +27,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_MONTH() - * $CATEGORY$ - * Date/Time - * $ONELINER$ - * Return Calendar or Fiscal Month Data - * $SYNTAX$ - * FT_MONTH( [ ], [nMonthNum] ) -> aDateInfo - * $ARGUMENTS$ - * is any valid date in any date format. Defaults - * to current system date if not supplied. - * - * is a number from 1 to 12 signifying a month. - * Defaults to current month if not supplied. - * $RETURNS$ - * A three element array containing the following data: - * - * aDateInfo[1] - The year and month as a character string "YYYYMM" - * aDateInfo[2] - The beginning date of the month - * aDateInfo[3] - The ending date of the month - * $DESCRIPTION$ - * FT_MONTH() returns an array containing data about the month - * containing the given date. - * - * Normally the return data will be based on a year beginning - * on January 1st with weeks beginning on Sunday. - * - * The beginning of year date and/or beginning of week day can be - * changed by using FT_DATECNFG(), which will affect all subsequent - * calls to FT_MONTH() until another call to FT_DATECNFG(). - * - * The beginning of year date and beginning of week day may be reset - * to January 1 and Sunday by calling FT_DATECNFG() with no - * parameters. - * $EXAMPLES$ - * // get info about month containing 9/15/90 - * aDateInfo := FT_MONTH( CTOD("09/15/90") ) - * ? aDateInfo[1] // 199009 (9th month) - * ? aDateInfo[2] // 09/01/90 beginning of month 9 - * ? aDateInfo[3] // 09/30/90 end of week month 9 - * - * // get info about month 5 in year containing 9/15/90 - * aDateInfo := FT_MONTH( CTOD("09/15/90"), 5 ) - * ? aDateInfo[1] // 199005 - * ? aDateInfo[2] // 05/01/90 beginning of month 5 - * ? aDateInfo[3] // 05/31/90 end of month 5 - * - * // get info about month 5 in current year (1991) - * aDateInfo := FT_MONTH( , 5 ) - * ? aDateInfo[1] // 199105 - * ? aDateInfo[2] // 05/01/91 beginning of month 5 - * ? aDateInfo[3] // 05/31/91 end of month 5 - * $SEEALSO$ - * FT_DATECNFG() FT_WEEK() FT_QTR() FT_YEAR() - * $END$ -*/ - FUNCTION FT_MONTH( dGivenDate, nMonthNum ) LOCAL lIsMonth, nTemp, aRetVal diff --git a/harbour/contrib/hbnf/mouse.c b/harbour/contrib/hbnf/mouse.c index d3504b0e38..7c696cd211 100644 --- a/harbour/contrib/hbnf/mouse.c +++ b/harbour/contrib/hbnf/mouse.c @@ -240,7 +240,6 @@ HB_FUNC( _MGET_MICS ) } } - HB_FUNC( _M_RESET ) { int iMouse; @@ -390,7 +389,6 @@ HB_FUNC( _M_MXLIMIT ) #endif } - HB_FUNC( _M_MYLIMIT ) { #if defined( HB_OS_DOS ) diff --git a/harbour/contrib/hbnf/mouse1.prg b/harbour/contrib/hbnf/mouse1.prg index 694f4043e4..06f7227c87 100644 --- a/harbour/contrib/hbnf/mouse1.prg +++ b/harbour/contrib/hbnf/mouse1.prg @@ -194,35 +194,8 @@ static s_lMinit:=.F. RETURN nil - #endif - -/* $DOC$ - * $FUNCNAME$ - * FT_MMICKEYS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get mickeys - * $SYNTAX$ - * FT_MMICKEYS( @, @ ) -> NIL - * $ARGUMENTS$ - * is a variable that will receive the vertical mickey count. - * - * is a variable that will receive the horizontal mickey count. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * and must be passed by reference to receive - * the mouse position in Mickeys. - * $EXAMPLES$ - * FT_MMICKEYS( @nX, @nY ) - * ? nX - * ? nY - * $END$ - */ - FUNCTION FT_MMICKEYS( nX, nY ) // read mouse motion counters /* aReg[AX] = 11 // set mouse function call 11 @@ -235,66 +208,6 @@ FUNCTION FT_MMICKEYS( nX, nY ) // read mouse motion counters RETURN NIL // no function output - -/* $DOC$ - * $FUNCNAME$ - * FT_MDBLCLK() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Return true if a double click was detected - * $SYNTAX$ - * FT_MDBLCLK( [ [, [, [, [, ; - * [, ] ] ] ] ] ] ) -> lIsDoubleClk - * $ARGUMENTS$ - * is a numeric value. If it is zero FT_MDBLCLK() will not - * check for the first press but rather will simply wait the - * specified period for a single press. This is useful if this - * routine is called from one which in turn responded to a button - * press. If it is not present or not equal to 0, then FT_MDBLCLK() - * will wait for two presses of the specified button. - * - * is the mouse button number - * 0 - Left Button - * 1 - Right Button - * 2 - Middle Button [if applicable] - * - * is the interval to wait for the first click if requested - * and the time to wait for the second. If not present then defaults - * to 0.5 second. - * - * is the row number for the mouse cursor location for a double click - * to be valid. If not present then the current position is taken as - * the valid location. - * - * is the column number for the mouse cursor location for a double - * click to be valid. If not present, then the current position is - * taken as the valid location. - * - * is an optional start time for the waiting period for the first - * click (of either one or two requested). If not given then the - * time is set at entry into this routine. This is useful when this - * routine is called from another routine which was called in - * response to a mouse click but needs to know if a double click - * has occurred - * $RETURNS$ - * .T. if a double click was detected. - * $DESCRIPTION$ - * This is a mouse meta function that checks for the presence - * of a double click. - * $EXAMPLES$ - * IF FT_MISREGION( 10, 10, 11, 20 ) .AND.; - * FT_MDBLCLK(0,1,,FT_MGETX(),FT_MGETY()) // double click, right button - * // at current location with - * // default interval - * - * MnuItem1() - * ENDIF - * $SEEALSO$ - * FT_MBUTPRS() FT_MBUTREL() - * $END$ - */ - FUNCTION FT_MDBLCLK( nClick, nButton, nInterval, nRow, nCol, nStart ) LOCAL nVert, nHorz // local row and col coordinates @@ -380,37 +293,8 @@ LOCAL nPrs // number of presses which occurred endif - RETURN lDouble -/* $DOC$ - * $FUNCNAME$ - * FT_MCONOFF() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Turn mouse cursur off if in specified region - * $SYNTAX$ - * FT_MCONOFF( , , , ) - * $ARGUMENTS$ - * , are the four corners of the - * screen region in row and column coordinates. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * This function tells the mouse driver to hide the cursor if it is in - * the given region. The driver hides the cursor by decrementing the cursor - * flag. A call to FT_MSHOWCRS is required to turn the cursor back on. - * Calling FT_MSHOWCRS also disables this function. - * - * See FT_MSHOWCRS for a discussion of the cursor display flag. - * $EXAMPLES$ - * FT_MCONOFF( 10, 10, 11, 20 ) - * $SEEALSO$ - * FT_MSHOWCRS() FT_MHIDECRS() FT_MXLIMIT() FT_MYLIMIT() FT_MINREGION() - * $END$ - */ - FUNCTION FT_MCONOFF( nTop, nLeft, nBottom, nRight ) * Fill the registers @@ -426,98 +310,10 @@ FUNCTION FT_MCONOFF( nTop, nLeft, nBottom, nRight ) _mse_conoff(nTop*8,nLeft*8,nBottom*8,nRight*8) RETURN NIL -/* $DOC$ - * $FUNCNAME$ - * FT_MINREGION() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Test if the mouse cursor is in the passed region - * $SYNTAX$ - * FT_MINREGION( , , , ) -> lInRegion - * $ARGUMENTS$ - * , are the four corners of the screen region. - * $RETURNS$ - * .T. if mouse is in specified region. - * $DESCRIPTION$ - * This function will check to see if the mouse cursor is - * within the confines of the specified region. - * $EXAMPLES$ - * IF FT_MINREGION( 10, 10, 11, 20 ) - * nChoice := 1 - * ENDIF - * $SEEALSO$ - * FT_MXLIMIT() FT_MYLIMIT() FT_MINREGION() - * $END$ - */ - FUNCTION FT_MINREGION( nTR, nLC, nBR, nRC ) RETURN ( FT_MGETX() >= nTR .and. FT_MGETX() <= nBR .and. ; FT_MGETY() >= nLC .and. FT_MGETY() <= nRC ) - -/* $DOC$ - * $FUNCNAME$ - * FT_MSETSENS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Set the mouse sensitivity parameters - * $SYNTAX$ - * FT_MSETSENS( , , ) -> NIL - * $ARGUMENTS$ - * is the sensitivity of the mouse on the horizontal axis. This - * value is the integer percentage of highest sensitivity and - * thus has a range of 1 to 100. The default value is 50 and at - * this setting about 3.2 inches of mouse movement will move - * the mouse cursor across the screen. If NIL, the current - * value is used. - * is the relative sensitivity of the mouse on the vertical axis. - * The value is an integer percentage of the highest sensitivity - * and thus has a range of 1 to 100. The default value is 50 and - * requires about 2 inches of mouse movement will move from top - * to bottom of the screen.If NIL, the current value is used. - * is the relative sensitivity of the mouse to doubling the ratio - * of cursor movement to mouse movement. The default - * value is 50. If NIL, the current value is used. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * This function allows one to control the mouse movement sensitivity. The - * first two arguments control the amount of movement necessary to move - * the cursor a given amount. The values are the percentage of full - * sensitivity and the default values after installing the mouse driver - * is 50 which represents approximately 3.2 inches of horizontal - * and 2 inches of vertical mouse movement to cover the entire screen. - * A value of 100 requires about 0.9 inches of horizontal mouse movement to - * cover the screen from one side to the other. - * - * The third argument changes the threshold above which the mouse moves at - * twice the normal speed. The value is a percentage of full sensitivity - * with the default (50) providing doubling at 64 mickeys per second. - * - * NOTE: These values are NOT restored after resetting the mouse driver/ - * hardware. A well behaved application should reset them to the - * original value upon exiting. - * - * NOTE: The above description is counter to all of the documentation - * I have available. However, it does not work the way it is documented - * with Microsoft drivers versions 6.16, 6.24, 7.04 and 8.20. The above - * movement values are documented to be the number of mickeys per 8 - * pixels and the double speed value as the number mickeys per second - * required to double the speed. Each of these values should range from 1 - * to 32K but the driver forces a maximum of 100. Also the documentation - * states that resetting the mouse will reset these values. This is not - * the case. - * - * - * $EXAMPLES$ - * FT_MSETSENS( 75,75,50 ) // a little less mouse movement necessary. - * $SEEALSO$ - * FT_MGETSENS() - * $END$ - */ - FUNCTION FT_MSETSENS(nHoriz, nVert, nDouble) LOCAL nCurHoriz, nCurVert, nCurDouble @@ -544,38 +340,6 @@ _mset_sensitive(nHoriz,nVert,nDouble) RETURN nil - -/* $DOC$ - * $FUNCNAME$ - * FT_MGETSENS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get the mouse sensitivity parameters - * $SYNTAX$ - * FT_MGETSENS( <@nHoriz>, <@nVert>, <@nDouble> ) -> NIL - * $ARGUMENTS$ - * is the percentage of maximum horizontal sensitivity. PASSED - * BY REFERENCE. - * is the percentage of maximum vertical sensitivity. PASSED BY - * REFERENCE. - * is the percentage of maximum sensitivity for doubling the - * mouse cursor's speed on the screen. PASSED BY REFERENCE. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * This function returns the current values of the mouse movement - * sensitivity parameters. The first two arguments control the amount of - * movement necessary to move the cursor a given amount. The third argument - * determines the threshold above which the mouse moves at twice the normal - * speed. For further discussion of these values see FT_MSETSENS() - * $EXAMPLES$ - * FT_MGETSENS( @nHoriz, @nVert, @nDouble ) - * $SEEALSO$ - * FT_MSETSENS() - * $END$ - */ - FUNCTION FT_MGETSENS(nHoriz, nVert, nDouble) /* * Fill the register @@ -595,50 +359,6 @@ nDouble:= _mget_doublespeed() RETURN NIL - -/* $DOC$ - * $FUNCNAME$ - * FT_MVERSION() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get the mouse driver version - * $SYNTAX$ - * FT_MVERSION( <@nMinor>, <@nType>, <@nIRQ> ) -> - * $ARGUMENTS$ - * is the Minor version number. PASSED BY REFERENCE. - * is the Mouse type. PASSED BY REFERENCE. - * 1 = Bus Mouse - * 2 = Serial Mouse - * 3 = InPort Mouse - * 4 = PS/2 Mouse - * 5 = HP Mouse - * is the IRQ number used for the mouse. PASSED BY REFERENCE. - * 0 = PS/2 - * 2,3,4,5 or 7 = IRQ number - * $RETURNS$ - * which is the major version number of the mouse driver. - * $DESCRIPTION$ - * This function returns the current values of the mouse driver version - * number and type. The major version would be 6 and the minor version - * would be 10 if the driver were version 6.10. The mouse type and IRQ - * numbers are also returned. - * - * NOTE: It appears that the values reported when one starts the mouse - * driver actually have the minor version in hexadecimal! Thus on bootup - * my screen showed 6.24 but this routine returned 30 for the minor version - * number! - * $EXAMPLES$ - * nMajor:=FT_MVERSION( @nMinor ) - * IF (nMajor+nMinor/100)<7.2 - * ? "Sorry mouse driver version too old" - * RETURN - * ENDIF - * $SEEALSO$ - * FT_MSETSENS() - * $END$ - */ - FUNCTION FT_MVERSION(nMinor, nType, nIRQ) Local aReturn // Set up register @@ -660,31 +380,6 @@ nIRQ := areturn[3] RETURN areturn[4] - -/* $DOC$ - * $FUNCNAME$ - * FT_MSETPAGE() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Set the display page for the mouse pointer - * $SYNTAX$ - * FT_MSETPAGE( <@nPage> ) -> NIL - * $ARGUMENTS$ - * is the desired display page. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * This function sets the display page for the mouse cursor. The valid - * values of nPage is dependent upon the display mode. See FT_SETVPG() - * for changing the current video page - * $EXAMPLES$ - * FT_MSETPAGE( 1 ) // Sets the mouse cursor to page 1 - * $SEEALSO$ - * FT_MGETPAGE() - * $END$ - */ - FUNCTION FT_MSETPAGE(nPage) // Set up register @@ -699,31 +394,6 @@ FT_INT86( 51, aReg) _mset_page(nPage) RETURN NIL -/* $DOC$ - * $FUNCNAME$ - * FT_MGETPAGE() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get the display page for the mouse pointer - * $SYNTAX$ - * FT_MGETPAGE() -> - * $ARGUMENTS$ - * None - * $RETURNS$ - * is the display page on which the mouse is currently being - * displayed - * $DESCRIPTION$ - * This function gets the display page for the mouse cursor. The valid - * values of nPage is dependent upon the display mode. See FT_SETVPG() - * for changing the current video page - * $EXAMPLES$ - * nPage = FT_MGETPAGE( ) // Gets the mouse cursor display page - * $SEEALSO$ - * FT_MSETPAGE() - * $END$ - */ - FUNCTION FT_MGETPAGE() // Set up register @@ -736,9 +406,6 @@ FT_INT86( 51, aReg) */ RETURN _mget_page() - - - FUNCTION FT_MINIT() * If not previously initialized then try @@ -752,41 +419,8 @@ FUNCTION FT_MINIT() FT_MXLIMIT(0,8*80) ENDIF - RETURN s_lMinit -/* $DOC$ - * $FUNCNAME$ - * FT_MRESET() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Reset mouse driver and return status of mouse - * $SYNTAX$ - * FT_MRESET() -> nMouseStatus - * $ARGUMENTS$ - * NONE - * $RETURNS$ - * An integer representing the mouse status (0 == mouse not installed) - * $DESCRIPTION$ - * Resets the mouse driver and returns mouse status. Use FT_MSHOWCRS() - * to display the mouse cursor. The mouse is set to allow it to cover the - * complete screen (as defined by MAXCOL() and MAXROW()). This is necessary - * because at least some versions of the mouse drivers do not operate - * according to the documentation when confronted with a 43 or 50 line - * screen. - * - * Normally, FT_MINIT() should be used to initialize the mouse since it - * will not reinitialize if already done. - * $EXAMPLES$ - * IF Empty( FT_MRESET() ) - * ? "No mouse driver is installed" - * ENDIF - * $SEEALSO$ - * FT_MINIT() FT_MSHOWCRS() - * $END$ - */ - FUNCTION FT_MRESET() LOCAL lStatus /* @@ -802,33 +436,6 @@ lStatus:=_m_reset() RETURN lStatus // return status code - -/* $DOC$ - * $FUNCNAME$ - * FT_MCURSOR() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Set the mouse cursor - * $SYNTAX$ - * FT_MCURSOR( [ ] ) -> lCursorState - * $ARGUMENTS$ - * is a logical indicating whether to set the mouse cursor on. - * .T. - set mouse cursor on - * .F. - set mouse cursor off - * If omitted, no change is made to cursor state - * $RETURNS$ - * A logical indicating the previous mouse cursor state. - * $DESCRIPTION$ - * This function works like most Clipper state functions. If no value - * is sent to FT_MCURSOR() it will return the state of the mouse cursor. - * $EXAMPLES$ - * IF !( FT_MCURSOR() ) - * FT_MCURSOR( .T. ) - * ENDIF - * $END$ - */ - FUNCTION FT_MCURSOR( lState ) local lSavState := s_lCrsState @@ -842,41 +449,6 @@ FUNCTION FT_MCURSOR( lState ) RETURN lSavState - -/* $DOC$ - * $FUNCNAME$ - * FT_MSHOWCRS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Increment internal cursor flag and display mouse cursor - * $SYNTAX$ - * FT_MSHOWCRS() -> NIL - * $ARGUMENTS$ - * NONE - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Displays the mouse cursor. Make sure to turn the mouse cursor off - * when redrawing screens. The mouse cursor dutifully saves the screen - * under it, so if you draw over the mouse cursor it will create a "hole" - * in your screen when you move the mouse cursor. - * - * Note: A call to FT_MHIDECRS() decrements a mouse driver variable - * which indicates whether the cursor is shown. The cursor is visible - * only when the variable = 0. Thus multiple calls to FT_MHIDECRS() - * require an equal number of calls to FT_MSHOWCRS() before the cursor - * will again be visible. Once the variable is 0 calls to FT_MSHOWCRS() - * does not increment the variable above 0. - * $EXAMPLES$ - * IF Empty( FT_MRESET() ) - * FT_MSHOWCRS() - * ENDIF - * $SEEALSO$ - * FT_MHIDECRS() FT_MCONOFF() - * $END$ - */ - FUNCTION FT_MSHOWCRS() /* aReg[AX] := 1 // set mouse function call 1 @@ -887,44 +459,6 @@ FUNCTION FT_MSHOWCRS() RETURN NIL // no output from function - - -/* $DOC$ - * $FUNCNAME$ - * FT_MHIDECRS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Decrement internal mouse cursor flag and hide mouse cursor - * $SYNTAX$ - * FT_MHIDECRS() -> NIL - * $ARGUMENTS$ - * NONE - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Hides the mouse cursor. Make sure to turn the mouse cursor off when - * redrawing screens. The mouse cursor dutifully saves the screen - * under it, so if you draw over the mouse cursor it will create a - * "hole" in your screen when you move the mouse cursor. - * - * Note: A call to FT_MHIDECRS() decrements a mouse driver variable - * which indicates whether the cursor is shown. The cursor is visible - * only when the variable = 0. Thus multiple calls to FT_MHIDECRS() - * require an equal number of calls to FT_MSHOWCRS() before the cursor - * will again be visible. Once the variable is 0 calls to FT_MSHOWCRS() - * does not increment the varaible above 0. - * $EXAMPLES$ - * FT_MHIDECRS() - * @ 10, 10 to 20, 20 - * FT_MSHOWCRS() - * $SEEALSO$ - * FT_MSHOWCRS() FT_MCONOFF() - * $END$ - */ - - - FUNCTION FT_MHIDECRS() // decrement internal cursor flag and hide cursor /* aReg[AX] := 2 // set mouse function call 2 @@ -934,53 +468,6 @@ FUNCTION FT_MHIDECRS() // decrement internal cursor flag and hide cursor s_lCrsState := .f. RETURN NIL // no output from function -/* $DOC$ - * $FUNCNAME$ - * FT_MGETPOS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get mouse cursor position and button status - * $SYNTAX$ - * FT_MGETPOS( @, @ ) -> nButtonStatus - * $ARGUMENTS$ - * is a variable that will receive the mouse X position in virtual - * screen coordinates. It must be passed by reference. - * - * is a variable that will receive the mouse Y position in virtual - * screen coordinates. It must be passed by reference. - * $RETURNS$ - * an integer representing button status - * - * - 0 for no button pressed - * - 1 for left pressed - * - 2 for right pressed - * - 3 for left and right pressed - * - 4 for middle pressed - * - 5 for left and middle pressed - * - 6 for right and middle pressed - * - 7 for all three buttons pressed - * $DESCRIPTION$ - * Loads cursor position into x and y coordinates passed by reference and - * returns the button status. The coordinate system in text mode has - * eight virtual coordinates per character cell. Thus x=16 means that you - * are in the Row 2. The values returned by this routine when in text mode - * and with mouse driver versions 6 and above are multiples of 8. We have - * experience with drivers prior to that version - * $EXAMPLES$ - * LOCAL nX, nY - * LOCAL nButton := FT_MGETPOS( @nX, @nY ) - * ? "Mouse Row :", nX - * ? "Mouse Column :", nY - * ? "Button Status:", nButton - * $SEEALSO$ - * FT_MGETCOORD() FT_MSETPOS() FT_MDEFCRS() FT_MGETX() FT_MGETY() - * $END$ - */ - - - - FUNCTION FT_MGETPOS( nX, nY ) Local amse nX := iif( nX == NIL, 0, nX ) @@ -996,33 +483,6 @@ FUNCTION FT_MGETPOS( nX, nY ) RETURN amse[3] // return button status - - -/* $DOC$ - * $FUNCNAME$ - * FT_MGETX() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get mouse cursor row position - * $SYNTAX$ - * FT_MGETX() -> nRowPos - * $ARGUMENTS$ - * NONE - * $RETURNS$ - * which is the row position of mouse in virtual screen - * coordinates. - * $DESCRIPTION$ - * Retrieves mouse's row position in virtual screen coordinates. The - * values returned are multiples of 8 when in text mode and with at least - * Microsoft drivers 6 and above. - * $EXAMPLES$ - * ? FT_MGETX() - * $SEEALSO$ - * FT_MGETCOORD() FT_MDEFCRS() FT_MGETPOS() FT_MGETY() - * $END$ - */ - FUNCTION FT_MGETX() * Duplicated code from FT_MGETPOS() for speed reasons @@ -1032,30 +492,6 @@ FUNCTION FT_MGETX() */ RETURN( _m_getx()/8 ) // return x-coordinate -/* $DOC$ - * $FUNCNAME$ - * FT_MGETY() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get mouse cursor column position - * $SYNTAX$ - * FT_MGETY() -> nColPos - * $ARGUMENTS$ - * NONE - * $RETURNS$ - * Column position of mouse in virtual screen coordinates - * $DESCRIPTION$ - * Retrieves mouse's column position in virtual screen coordinates. The - * values returned are multiples of 8 when in text mode and with at least - * Microsoft drivers 6 and above. - * $EXAMPLES$ - * ? FT_MGETY() - * $SEEALSO$ - * FT_MGETCOORD() FT_MDEFCRS() FT_MGETPOS() FT_MGETX() - * $END$ - */ - FUNCTION FT_MGETY() * Duplicated code from FT_MGETPOS() for speed reasons @@ -1065,33 +501,6 @@ FUNCTION FT_MGETY() */ RETURN( _m_gety()/8) // return y-coordinate -/* $DOC$ - * $FUNCNAME$ - * FT_MSETPOS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Position the mouse cursor using virtual screen coordinates - * $SYNTAX$ - * FT_MSETPOS( , ) -> NIL - * $ARGUMENTS$ - * is the desired mouse row. - * - * is the desired mouse column. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Positions mouse cursor on screen. The virtual coordinate system in text - * mode has eight virtual coordinates per character cell. Thus x=16 means - * that you are in the Row 2. - * $EXAMPLES$ - * FT_MSETPOS( 10, 20 ) // position mouse cursor at row 10, col 20 - * // in virtual screen coordinates - * $SEEALSO$ - * FT_MGETPOS() FT_MGETCOORD() FT_MSETCOORD() FT_MGETX() FT_MGETY() - * $END$ - */ - FUNCTION FT_MSETPOS( nX, nY ) // set mouse cursor location /* aReg[AX] := 4 // set mouse function call 4 @@ -1102,33 +511,6 @@ FUNCTION FT_MSETPOS( nX, nY ) // set mouse cursor location _m_msetpos(nY,nX) RETURN NIL // no function output - -/* $DOC$ - * $FUNCNAME$ - * FT_MSETCOORD() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Position the mouse cursor using text screen coordinates - * $SYNTAX$ - * FT_MSETPOS( , ) -> NIL - * $ARGUMENTS$ - * is the desired mouse row. - * - * is the desired mouse column. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Positions mouse cursor on screen using text (normal row and column) - * coordinates. - * $EXAMPLES$ - * FT_MSETCOORD( 10, 20 ) // position mouse cursor at row 10, col 20 - * // in text screen coordinates - * $SEEALSO$ - * FT_MGETPOS() FT_MGETCOORD() FT_MSETPOS() FT_MDEFCRS() FT_MGETX() FT_MGETY() - * $END$ - */ - FUNCTION FT_MSETCOORD( nX, nY ) // set mouse cursor location /* aReg[AX] := 4 // set mouse function call 4 @@ -1139,30 +521,6 @@ FUNCTION FT_MSETCOORD( nX, nY ) // set mouse cursor location _m_MSETCOORD(nY*8,nX*8) RETURN NIL // no function output -/* $DOC$ - * $FUNCNAME$ - * FT_MXLIMIT() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Set vertical bounds of mouse using virtual screen coord. - * $SYNTAX$ - * FT_MXLIMIT( , ) -> NIL - * $ARGUMENTS$ - * is the top row limit. - * - * is the bottom row limit. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Set maximum vertical bounds of mouse using virtual screen coordinates. - * $EXAMPLES$ - * FT_MXLIMIT( 10, 20 ) - * $SEEALSO$ - * FT_MYLIMIT() FT_MINREGION() - * $END$ - */ - FUNCTION FT_MXLIMIT( nXMin, nXMax ) // set vertical minimum and maximum coordinates /* aReg[AX] := 7 // set mouse function call 7 @@ -1173,30 +531,6 @@ FUNCTION FT_MXLIMIT( nXMin, nXMax ) // set vertical minimum and maximum coordi _m_mxlimit(nXMin,nXMAX) RETURN NIL -/* $DOC$ - * $FUNCNAME$ - * FT_MYLIMIT() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Set horiz. bounds of mouse using virtual screen coordinates - * $SYNTAX$ - * FT_MYLIMIT( , ) -> NIL - * $ARGUMENTS$ - * is the left column limit. - * - * is the right column limit. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Set maximum horizontal bounds of mouse using virtual screen coordinates. - * $EXAMPLES$ - * FT_MYLIMIT( 10, 20 ) - * $SEEALSO$ - * FT_MXLIMIT() FT_MINREGION() - * $END$ - */ - FUNCTION FT_MYLIMIT( nYMin, nYMax ) // set horizontal minimum and maximum coordinates /* aReg[AX] := 8 // set mouse function call 8 @@ -1207,52 +541,6 @@ FUNCTION FT_MYLIMIT( nYMin, nYMax ) // set horizontal minimum and maximum coord _m_mYlimit(nYMin,nYMAX) RETURN NIL // no function output -/* $DOC$ - * $FUNCNAME$ - * FT_MBUTPRS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Retrieve button press status - * $SYNTAX$ - * FT_MBUTPRS( [, @nButPrs [, @nX [, @nY] ] ] ) -> nButStatus - * $ARGUMENTS$ - * is the mouse button number: - * - * 0 - Left Button - * 1 - Right Button - * 2 - Middle Button [if applicable] - * - * is the number of times the specified button was pressed - * since the last call to this routine. PASSED BY REFERENCE. - * is the X position of the cursor when the last press occurred. - * PASSED BY REFERENCE. - * is the Y position of the cursor when the last press occurred. - * PASSED BY REFERENCE. - * - * $RETURNS$ - * An integer representing the button status: - * - * 0 - no buttons pressed - * 1 - left button pressed - * 2 - right button pressed - * 3 - left and right pressed - * 4 - middle pressed - * 5 - left and middle pressed - * 6 - middle and right buttons pressed - * 7 - all 3 buttons pressed - * $DESCRIPTION$ - * Retrieves the mouse button status and the position of the cursor when - * a button was last pressed. - * $EXAMPLES$ - * IF Empty( FT_MBUTPRS(1) ) - * ? "No Item selected" - * ENDIF - * $SEEALSO$ - * FT_MBUTREL() FT_MDBLCLK() - * $END$ - */ - FUNCTION FT_MBUTPRS( nButton, nButPrs, nX, nY ) // get button press information local aReg:={} /* @@ -1267,49 +555,6 @@ local aReg:={} _m_MBUTPRS(nButton) RETURN aReg[4] // return button status -/* $DOC$ - * $FUNCNAME$ - * FT_MBUTREL() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get mouse button release information - * $SYNTAX$ - * FT_MBUTREL( nButton [, @nButRel [, @nX [, @nY] ] ]) -> nBStat - * $ARGUMENTS$ - * is the mouse button number - * 0 - Left Button - * 1 - Right Button - * 2 - Middle Button [if applicable] - * - * is the number of times the specified button was released - * since the last call to this routine. PASSED BY REFERENCE. - * - * is the X position of the cursor when the last release occurred. - * PASSED BY REFERENCE. - * - * is the Y position of the cursor when the last release occurred. - * PASSED BY REFERENCE. - * $RETURNS$ - * - an integer representing button release status - * 0 - None - * 1 - Left - * 2 - Right - * 3 - Middle - * $DESCRIPTION$ - * This function returns the release status of the mouse buttons and the - * coordinates of the last release. - * $EXAMPLES$ - * IF FT_MBUTREL( 0 ) == 1 - * ? "Left button released" - * ENDIF - * $SEEALSO$ - * FT_MBUTPRS() FT_MDBLCLK() - * $END$ - */ - - - FUNCTION FT_MBUTREL( nButton, nButRel, nX, nY ) // get button release information local areg Local iButton @@ -1321,65 +566,6 @@ Local iButton RETURN iButton - -/* $DOC$ - * $FUNCNAME$ - * FT_MDEFCRS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Define the mouse cursor - * $SYNTAX$ - * FT_MDEFCRS( , , ) -> NIL - * $ARGUMENTS$ - * is the cursor type. A value of 0 indicates the software cursor - * (the default) and a value of 1 indicates the hardware cursor. - * - * is the screen mask for the software cursor or the first scan - * line of the hardware cursor. See the description for more - * information. - * - * is the cursor mask for the software cursor of the last scan - * line of the hardware cursor. See the description for more - * information. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * In text mode the mouse cursor can either be a software generated or - * the actual hardware cursor. This routine allows one choose between them. - * The software cursor is the default and its effect on the character it - * covers is determined by the screen mask and the cursor mask. Both of - * these masks are 16 bit values (which in Clipper are passed as standard - * numerical values). The 16 bit masks are arranged in a manner identical - * to the way information is stored for each character cell on the screen. - * The low order 8 bits represent the actual character displayed while the - * high order bits represent the display atributes such as blinking, - * intensity and forground and background colors. The mask is represented in - * the diagram below: - * - * Bit: ³15 ³14 12³11 ³10 8³7 0³ - * Function:³blink ³background³intensity³foreground³character³ - * - * Blinking and high intensity are on when the bit is 1. The background and - * foreground indicate which colors are used for each. The software mouse - * cursor uses these two values by taking the mask from the screen cell it - * is on and performing a logical AND on each bit with the screen mask - * value. The result is then logically XOR'ed with the cursor mask value. - * Thus to keep the character the same but invert the foreground and - * background colors the following values would be used: - * - * Bit: ³15 ³14 12³11 ³10 8³7 0³ - * Function:³blink ³background³intensity³foreground³character³ - * screen: ³ 0 ³ 111 ³ 0 ³ 111 ³11111111 ³ =30719 - * cursor: ³ 0 ³ 111 ³ 0 ³ 111 ³00000000 ³ =30464 - * - * The hardware cursor is the text cursor provided by the video board. One - * specifies the range of scan lines which are on using and - * . The range of values is dependant upon the type of monitor. - * The first scan line is 0. - * $END$ - */ - FUNCTION FT_MDEFCRS( nCurType, nScrMask, nCurMask ) // define text cursor type and masks /* aReg[AX] := 10 // set mouse function call 10 @@ -1391,47 +577,6 @@ FUNCTION FT_MDEFCRS( nCurType, nScrMask, nCurMask ) // define text cursor type _m_mdefcrs(nCurType, nScrMask, nCurMask ) RETURN NIL // no function output - -/* $DOC$ - * $FUNCNAME$ - * FT_MGETCOORD() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get mouse cursor position (text coord.) and button status - * $SYNTAX$ - * FT_MGETPOS( @, @ ) -> nButtonStatus - * $ARGUMENTS$ - * is a variable that will receive the mouse X position in text - * screen coordinates. It must be passed by reference. - * - * is a variable that will receive the mouse Y position in text - * screen coordinates. It must be passed by reference. - * $RETURNS$ - * an integer representing button status - * - * - 0 for no button pressed - * - 1 for left pressed - * - 2 for right pressed - * - 3 for left and right pressed - * - 4 for middle pressed - * - 5 for left and middle pressed - * - 6 for right and middle pressed - * - 7 for all three buttons pressed - * $DESCRIPTION$ - * Loads cursor position into x and y coordinates passed by reference and - * returns the button status. - * $EXAMPLES$ - * LOCAL nX, nY - * LOCAL nButton := FT_MGETCOORD( @nX, @nY ) - * ? "Mouse Row :", nX - * ? "Mouse Column :", nY - * ? "Button Status:", nButton - * $SEEALSO$ - * FT_MGETPOS() FT_MSETPOS() FT_MDEFCRS() FT_MGETX() FT_MGETY() - * $END$ - */ - FUNCTION FT_MGETCOORD( nX, nY ) * Duplicated code from FT_MGETPOS() for speed reasons diff --git a/harbour/contrib/hbnf/mouse2.prg b/harbour/contrib/hbnf/mouse2.prg index 65428b2be2..77c911a7aa 100644 --- a/harbour/contrib/hbnf/mouse2.prg +++ b/harbour/contrib/hbnf/mouse2.prg @@ -60,12 +60,10 @@ * */ - // The original mouse routines were written by Robert diFalco but // Leo Letendre has made such major additions and modifications // and fixes that I've given him sole credit. -- G. Scott - #include "ftint86.ch" static aReg[10] @@ -267,39 +265,8 @@ static lMinit:=.F. RETURN nil - #endif - - -/* $DOC$ - * $FUNCNAME$ - * FT_MINIT() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Initialize the mouse driver, vars and return status of mouse - * $SYNTAX$ - * FT_MINIT() -> lMouseStatus - * $ARGUMENTS$ - * NONE - * $RETURNS$ - * An logical representing the mouse status (.F. == mouse not installed) - * $DESCRIPTION$ - * Initializes the mouse drive, associated variables and returns mouse - * status. It checks to see if the mouse has been previously initialized - * and if so it does not reinitialize. The row and column limits of mouse - * movement is set to the maximum for the current video mode. - * Use FT_MSHOWCRS() to display the mouse cursor. - * $EXAMPLES$ - * IF .NOT. FT_MINIT() - * ? "No mouse driver is installed" - * ENDIF - * $SEEALSO$ - * FT_MRESET() - * $END$ - */ - FUNCTION FT_MINIT() * If not previously initialized then try @@ -313,41 +280,8 @@ FUNCTION FT_MINIT() FT_MXLIMIT(0,8*MAXCOL()) ENDIF - RETURN lMinit -/* $DOC$ - * $FUNCNAME$ - * FT_MRESET() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Reset mouse driver and return status of mouse - * $SYNTAX$ - * FT_MRESET() -> nMouseStatus - * $ARGUMENTS$ - * NONE - * $RETURNS$ - * An integer representing the mouse status (0 == mouse not installed) - * $DESCRIPTION$ - * Resets the mouse driver and returns mouse status. Use FT_MSHOWCRS() - * to display the mouse cursor. The mouse is set to allow it to cover the - * complete screen (as defined by MAXCOL() and MAXROW()). This is necessary - * because at least some versions of the mouse drivers do not operate - * according to the documentation when confronted with a 43 or 50 line - * screen. - * - * Normally, FT_MINIT() should be used to initialize the mouse since it - * will not reinitialize if already done. - * $EXAMPLES$ - * IF Empty( FT_MRESET() ) - * ? "No mouse driver is installed" - * ENDIF - * $SEEALSO$ - * FT_MINIT() FT_MSHOWCRS() - * $END$ - */ - FUNCTION FT_MRESET() aReg[AX] := 0 // set mouse function call 0 @@ -361,33 +295,6 @@ FUNCTION FT_MRESET() RETURN aReg[AX] // return status code - -/* $DOC$ - * $FUNCNAME$ - * FT_MCURSOR() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Set the mouse cursor - * $SYNTAX$ - * FT_MCURSOR( [ ] ) -> lCursorState - * $ARGUMENTS$ - * is a logical indicating whether to set the mouse cursor on. - * .T. - set mouse cursor on - * .F. - set mouse cursor off - * If omitted, no change is made to cursor state - * $RETURNS$ - * A logical indicating the previous mouse cursor state. - * $DESCRIPTION$ - * This function works like most Clipper state functions. If no value - * is sent to FT_MCURSOR() it will return the state of the mouse cursor. - * $EXAMPLES$ - * IF !( FT_MCURSOR() ) - * FT_MCURSOR( .T. ) - * ENDIF - * $END$ - */ - FUNCTION FT_MCURSOR( lState ) local lSavState := lCrsState @@ -401,41 +308,6 @@ FUNCTION FT_MCURSOR( lState ) RETURN lSavState - -/* $DOC$ - * $FUNCNAME$ - * FT_MSHOWCRS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Increment internal cursor flag and display mouse cursor - * $SYNTAX$ - * FT_MSHOWCRS() -> NIL - * $ARGUMENTS$ - * NONE - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Displays the mouse cursor. Make sure to turn the mouse cursor off - * when redrawing screens. The mouse cursor dutifully saves the screen - * under it, so if you draw over the mouse cursor it will create a "hole" - * in your screen when you move the mouse cursor. - * - * Note: A call to FT_MHIDECRS() decrements a mouse driver variable - * which indicates whether the cursor is shown. The cursor is visible - * only when the variable = 0. Thus multiple calls to FT_MHIDECRS() - * require an equal number of calls to FT_MSHOWCRS() before the cursor - * will again be visible. Once the variable is 0 calls to FT_MSHOWCRS() - * does not increment the variable above 0. - * $EXAMPLES$ - * IF Empty( FT_MRESET() ) - * FT_MSHOWCRS() - * ENDIF - * $SEEALSO$ - * FT_MHIDECRS() FT_MCONOFF() - * $END$ - */ - FUNCTION FT_MSHOWCRS() aReg[AX] := 1 // set mouse function call 1 @@ -444,44 +316,6 @@ FUNCTION FT_MSHOWCRS() RETURN NIL // no output from function - - -/* $DOC$ - * $FUNCNAME$ - * FT_MHIDECRS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Decrement internal mouse cursor flag and hide mouse cursor - * $SYNTAX$ - * FT_MHIDECRS() -> NIL - * $ARGUMENTS$ - * NONE - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Hides the mouse cursor. Make sure to turn the mouse cursor off when - * redrawing screens. The mouse cursor dutifully saves the screen - * under it, so if you draw over the mouse cursor it will create a - * "hole" in your screen when you move the mouse cursor. - * - * Note: A call to FT_MHIDECRS() decrements a mouse driver variable - * which indicates whether the cursor is shown. The cursor is visible - * only when the variable = 0. Thus multiple calls to FT_MHIDECRS() - * require an equal number of calls to FT_MSHOWCRS() before the cursor - * will again be visible. Once the variable is 0 calls to FT_MSHOWCRS() - * does not increment the varaible above 0. - * $EXAMPLES$ - * FT_MHIDECRS() - * @ 10, 10 to 20, 20 - * FT_MSHOWCRS() - * $SEEALSO$ - * FT_MSHOWCRS() FT_MCONOFF() - * $END$ - */ - - - FUNCTION FT_MHIDECRS() // decrement internal cursor flag and hide cursor aReg[AX] := 2 // set mouse function call 2 @@ -489,54 +323,6 @@ FUNCTION FT_MHIDECRS() // decrement internal cursor flag and hide cursor lCrsState := .f. RETURN NIL // no output from function - -/* $DOC$ - * $FUNCNAME$ - * FT_MGETPOS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get mouse cursor position and button status - * $SYNTAX$ - * FT_MGETPOS( @, @ ) -> nButtonStatus - * $ARGUMENTS$ - * is a variable that will receive the mouse X position in virtual - * screen coordinates. It must be passed by reference. - * - * is a variable that will receive the mouse Y position in virtual - * screen coordinates. It must be passed by reference. - * $RETURNS$ - * an integer representing button status - * - * - 0 for no button pressed - * - 1 for left pressed - * - 2 for right pressed - * - 3 for left and right pressed - * - 4 for middle pressed - * - 5 for left and middle pressed - * - 6 for right and middle pressed - * - 7 for all three buttons pressed - * $DESCRIPTION$ - * Loads cursor position into x and y coordinates passed by reference and - * returns the button status. The coordinate system in text mode has - * eight virtual coordinates per character cell. Thus x=16 means that you - * are in the Row 2. The values returned by this routine when in text mode - * and with mouse driver versions 6 and above are multiples of 8. We have - * experience with drivers prior to that version - * $EXAMPLES$ - * LOCAL nX, nY - * LOCAL nButton := FT_MGETPOS( @nX, @nY ) - * ? "Mouse Row :", nX - * ? "Mouse Column :", nY - * ? "Button Status:", nButton - * $SEEALSO$ - * FT_MGETCOORD() FT_MSETPOS() FT_MDEFCRS() FT_MGETX() FT_MGETY() - * $END$ - */ - - - - FUNCTION FT_MGETPOS( nX, nY ) nX := iif( nX == NIL, 0, nX ) @@ -549,46 +335,6 @@ FUNCTION FT_MGETPOS( nX, nY ) RETURN aReg[BX] // return button status -/* $DOC$ - * $FUNCNAME$ - * FT_MGETCOORD() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get mouse cursor position (text coord.) and button status - * $SYNTAX$ - * FT_MGETPOS( @, @ ) -> nButtonStatus - * $ARGUMENTS$ - * is a variable that will receive the mouse X position in text - * screen coordinates. It must be passed by reference. - * - * is a variable that will receive the mouse Y position in text - * screen coordinates. It must be passed by reference. - * $RETURNS$ - * an integer representing button status - * - * - 0 for no button pressed - * - 1 for left pressed - * - 2 for right pressed - * - 3 for left and right pressed - * - 4 for middle pressed - * - 5 for left and middle pressed - * - 6 for right and middle pressed - * - 7 for all three buttons pressed - * $DESCRIPTION$ - * Loads cursor position into x and y coordinates passed by reference and - * returns the button status. - * $EXAMPLES$ - * LOCAL nX, nY - * LOCAL nButton := FT_MGETCOORD( @nX, @nY ) - * ? "Mouse Row :", nX - * ? "Mouse Column :", nY - * ? "Button Status:", nButton - * $SEEALSO$ - * FT_MGETPOS() FT_MSETPOS() FT_MDEFCRS() FT_MGETX() FT_MGETY() - * $END$ - */ - FUNCTION FT_MGETCOORD( nX, nY ) * Duplicated code from FT_MGETPOS() for speed reasons @@ -603,32 +349,6 @@ FUNCTION FT_MGETCOORD( nX, nY ) RETURN aReg[BX] // return button status - -/* $DOC$ - * $FUNCNAME$ - * FT_MGETX() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get mouse cursor row position - * $SYNTAX$ - * FT_MGETX() -> nRowPos - * $ARGUMENTS$ - * NONE - * $RETURNS$ - * which is the row position of mouse in virtual screen - * coordinates. - * $DESCRIPTION$ - * Retrieves mouse's row position in virtual screen coordinates. The - * values returned are multiples of 8 when in text mode and with at least - * Microsoft drivers 6 and above. - * $EXAMPLES$ - * ? FT_MGETX() - * $SEEALSO$ - * FT_MGETCOORD() FT_MDEFCRS() FT_MGETPOS() FT_MGETY() - * $END$ - */ - FUNCTION FT_MGETX() * Duplicated code from FT_MGETPOS() for speed reasons @@ -638,30 +358,6 @@ FUNCTION FT_MGETX() RETURN( INT(aReg[DX]/8) ) // return x-coordinate -/* $DOC$ - * $FUNCNAME$ - * FT_MGETY() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get mouse cursor column position - * $SYNTAX$ - * FT_MGETY() -> nColPos - * $ARGUMENTS$ - * NONE - * $RETURNS$ - * Column position of mouse in virtual screen coordinates - * $DESCRIPTION$ - * Retrieves mouse's column position in virtual screen coordinates. The - * values returned are multiples of 8 when in text mode and with at least - * Microsoft drivers 6 and above. - * $EXAMPLES$ - * ? FT_MGETY() - * $SEEALSO$ - * FT_MGETCOORD() FT_MDEFCRS() FT_MGETPOS() FT_MGETX() - * $END$ - */ - FUNCTION FT_MGETY() * Duplicated code from FT_MGETPOS() for speed reasons @@ -671,33 +367,6 @@ FUNCTION FT_MGETY() RETURN( INT(aReg[CX]/8)) // return y-coordinate -/* $DOC$ - * $FUNCNAME$ - * FT_MSETPOS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Position the mouse cursor using virtual screen coordinates - * $SYNTAX$ - * FT_MSETPOS( , ) -> NIL - * $ARGUMENTS$ - * is the desired mouse row. - * - * is the desired mouse column. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Positions mouse cursor on screen. The virtual coordinate system in text - * mode has eight virtual coordinates per character cell. Thus x=16 means - * that you are in the Row 2. - * $EXAMPLES$ - * FT_MSETPOS( 10, 20 ) // position mouse cursor at row 10, col 20 - * // in virtual screen coordinates - * $SEEALSO$ - * FT_MGETPOS() FT_MGETCOORD() FT_MSETCOORD() FT_MGETX() FT_MGETY() - * $END$ - */ - FUNCTION FT_MSETPOS( nX, nY ) // set mouse cursor location aReg[AX] := 4 // set mouse function call 4 @@ -707,33 +376,6 @@ FUNCTION FT_MSETPOS( nX, nY ) // set mouse cursor location RETURN NIL // no function output - -/* $DOC$ - * $FUNCNAME$ - * FT_MSETCOORD() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Position the mouse cursor using text screen coordinates - * $SYNTAX$ - * FT_MSETPOS( , ) -> NIL - * $ARGUMENTS$ - * is the desired mouse row. - * - * is the desired mouse column. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Positions mouse cursor on screen using text (normal row and column) - * coordinates. - * $EXAMPLES$ - * FT_MSETCOORD( 10, 20 ) // position mouse cursor at row 10, col 20 - * // in text screen coordinates - * $SEEALSO$ - * FT_MGETPOS() FT_MGETCOORD() FT_MSETPOS() FT_MDEFCRS() FT_MGETX() FT_MGETY() - * $END$ - */ - FUNCTION FT_MSETCOORD( nX, nY ) // set mouse cursor location aReg[AX] := 4 // set mouse function call 4 @@ -743,30 +385,6 @@ FUNCTION FT_MSETCOORD( nX, nY ) // set mouse cursor location RETURN NIL // no function output -/* $DOC$ - * $FUNCNAME$ - * FT_MXLIMIT() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Set vertical bounds of mouse using virtual screen coord. - * $SYNTAX$ - * FT_MXLIMIT( , ) -> NIL - * $ARGUMENTS$ - * is the top row limit. - * - * is the bottom row limit. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Set maximum vertical bounds of mouse using virtual screen coordinates. - * $EXAMPLES$ - * FT_MXLIMIT( 10, 20 ) - * $SEEALSO$ - * FT_MYLIMIT() FT_MINREGION() - * $END$ - */ - FUNCTION FT_MXLIMIT( nXMin, nXMax ) // set vertical minimum and maximum coordinates aReg[AX] = 7 // set mouse function call 7 @@ -776,30 +394,6 @@ FUNCTION FT_MXLIMIT( nXMin, nXMax ) // set vertical minimum and maximum coordi RETURN NIL -/* $DOC$ - * $FUNCNAME$ - * FT_MYLIMIT() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Set horiz. bounds of mouse using virtual screen coordinates - * $SYNTAX$ - * FT_MYLIMIT( , ) -> NIL - * $ARGUMENTS$ - * is the left column limit. - * - * is the right column limit. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Set maximum horizontal bounds of mouse using virtual screen coordinates. - * $EXAMPLES$ - * FT_MYLIMIT( 10, 20 ) - * $SEEALSO$ - * FT_MXLIMIT() FT_MINREGION() - * $END$ - */ - FUNCTION FT_MYLIMIT( nYMin, nYMax ) // set horizontal minimum and maximum coordinates aReg[AX] = 8 // set mouse function call 8 @@ -809,53 +403,6 @@ FUNCTION FT_MYLIMIT( nYMin, nYMax ) // set horizontal minimum and maximum coord RETURN NIL // no function output - -/* $DOC$ - * $FUNCNAME$ - * FT_MBUTPRS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Retrieve button press status - * $SYNTAX$ - * FT_MBUTPRS( [, @nButPrs [, @nX [, @nY] ] ] ) -> nButStatus - * $ARGUMENTS$ - * is the mouse button number: - * - * 0 - Left Button - * 1 - Right Button - * 2 - Middle Button [if applicable] - * - * is the number of times the specified button was pressed - * since the last call to this routine. PASSED BY REFERENCE. - * is the X position of the cursor when the last press occurred. - * PASSED BY REFERENCE. - * is the Y position of the cursor when the last press occurred. - * PASSED BY REFERENCE. - * - * $RETURNS$ - * An integer representing the button status: - * - * 0 - no buttons pressed - * 1 - left button pressed - * 2 - right button pressed - * 3 - left and right pressed - * 4 - middle pressed - * 5 - left and middle pressed - * 6 - middle and right buttons pressed - * 7 - all 3 buttons pressed - * $DESCRIPTION$ - * Retrieves the mouse button status and the position of the cursor when - * a button was last pressed. - * $EXAMPLES$ - * IF Empty( FT_MBUTPRS(1) ) - * ? "No Item selected" - * ENDIF - * $SEEALSO$ - * FT_MBUTREL() FT_MDBLCLK() - * $END$ - */ - FUNCTION FT_MBUTPRS( nButton, nButPrs, nX, nY ) // get button press information aReg[AX] := 5 // set mouse function call 5 @@ -867,51 +414,6 @@ FUNCTION FT_MBUTPRS( nButton, nButPrs, nX, nY ) // get button press information RETURN aReg[AX] // return button status - - -/* $DOC$ - * $FUNCNAME$ - * FT_MBUTREL() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Get mouse button release information - * $SYNTAX$ - * FT_MBUTREL( nButton [, @nButRel [, @nX [, @nY] ] ]) -> nBStat - * $ARGUMENTS$ - * is the mouse button number - * 0 - Left Button - * 1 - Right Button - * 2 - Middle Button [if applicable] - * - * is the number of times the specified button was released - * since the last call to this routine. PASSED BY REFERENCE. - * - * is the X position of the cursor when the last release occurred. - * PASSED BY REFERENCE. - * - * is the Y position of the cursor when the last release occurred. - * PASSED BY REFERENCE. - * $RETURNS$ - * - an integer representing button release status - * 0 - None - * 1 - Left - * 2 - Right - * 3 - Middle - * $DESCRIPTION$ - * This function returns the release status of the mouse buttons and the - * coordinates of the last release. - * $EXAMPLES$ - * IF FT_MBUTREL( 0 ) == 1 - * ? "Left button released" - * ENDIF - * $SEEALSO$ - * FT_MBUTPRS() FT_MDBLCLK() - * $END$ - */ - - - FUNCTION FT_MBUTREL( nButton, nButRel, nX, nY ) // get button release information aReg[AX] := 6 // set mouse function call 6 @@ -923,64 +425,6 @@ FUNCTION FT_MBUTREL( nButton, nButRel, nX, nY ) // get button release informatio RETURN aReg[AX] // return button status - -/* $DOC$ - * $FUNCNAME$ - * FT_MDEFCRS() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Define the mouse cursor - * $SYNTAX$ - * FT_MDEFCRS( , , ) -> NIL - * $ARGUMENTS$ - * is the cursor type. A value of 0 indicates the software cursor - * (the default) and a value of 1 indicates the hardware cursor. - * - * is the screen mask for the software cursor or the first scan - * line of the hardware cursor. See the description for more - * information. - * - * is the cursor mask for the software cursor of the last scan - * line of the hardware cursor. See the description for more - * information. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * In text mode the mouse cursor can either be a software generated or - * the actual hardware cursor. This routine allows one choose between them. - * The software cursor is the default and its effect on the character it - * covers is determined by the screen mask and the cursor mask. Both of - * these masks are 16 bit values (which in Clipper are passed as standard - * numerical values). The 16 bit masks are arranged in a manner identical - * to the way information is stored for each character cell on the screen. - * The low order 8 bits represent the actual character displayed while the - * high order bits represent the display atributes such as blinking, - * intensity and forground and background colors. The mask is represented in - * the diagram below: - * - * Bit: ³15 ³14 12³11 ³10 8³7 0³ - * Function:³blink ³background³intensity³foreground³character³ - * - * Blinking and high intensity are on when the bit is 1. The background and - * foreground indicate which colors are used for each. The software mouse - * cursor uses these two values by taking the mask from the screen cell it - * is on and performing a logical AND on each bit with the screen mask - * value. The result is then logically XOR'ed with the cursor mask value. - * Thus to keep the character the same but invert the foreground and - * background colors the following values would be used: - * - * Bit: ³15 ³14 12³11 ³10 8³7 0³ - * Function:³blink ³background³intensity³foreground³character³ - * screen: ³ 0 ³ 111 ³ 0 ³ 111 ³11111111 ³ =30719 - * cursor: ³ 0 ³ 111 ³ 0 ³ 111 ³00000000 ³ =30464 - * - * The hardware cursor is the text cursor provided by the video board. One - * specifies the range of scan lines which are on using and - * . The range of values is dependant upon the type of monitor. - * The first scan line is 0. - * $END$ - */ /* FUNCTION FT_MDEFCRS( nCurType, nScrMask, nCurMask ) // define text cursor type and masks diff --git a/harbour/contrib/hbnf/n2color.c b/harbour/contrib/hbnf/n2color.c index 6e3f8c54c8..914617d017 100644 --- a/harbour/contrib/hbnf/n2color.c +++ b/harbour/contrib/hbnf/n2color.c @@ -26,31 +26,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_N2COLOR() - * $CATEGORY$ - * String - * $ONELINER$ - * Returns the string complement of a Clipper color number - * $SYNTAX$ - * FT_COLOR2N( ) -> cColor - * $ARGUMENTS$ - * a number representing a Clipper color - * $RETURNS$ - * The string complement of a number representing a Clipper or a - * null string if the parameter is invalid - * $DESCRIPTION$ - * This function is useful for converting a number to a Clipper color - * string. - * $EXAMPLES$ - * cColor := FT_COLOR2N( 239 ) // returns "*+w/gr" - * $SEEALSO$ - * FT_N2COLOR() - * $END$ - */ - #include "hbapi.h" #include "hbapigt.h" diff --git a/harbour/contrib/hbnf/netpv.prg b/harbour/contrib/hbnf/netpv.prg index a6ad8eb8a8..268f336a38 100644 --- a/harbour/contrib/hbnf/netpv.prg +++ b/harbour/contrib/hbnf/netpv.prg @@ -24,57 +24,12 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_NETPV() - * $CATEGORY$ - * Math - * $ONELINER$ - * Calculate net present value - * $SYNTAX$ - * FT_NETPV( , , ; - * [, ] ) -> nNetPV - * $ARGUMENTS$ - * is the amount of cash invested for purposes - * of generating the cash flows. - * - * is the annual interest rate used to discount - * expected cash flows (10.5% = 10.5, not .105). - * - * is an array of the expected cash receipts each year. - * - * is the number of years cash flows are expected - * (optional, Len( aCashFlow ) ). - * $RETURNS$ - * The difference between the initial investment and the discounted - * cash flow in dollars. - * $DESCRIPTION$ - * This function calculates the net present value, the difference - * between the cost of an initial investment and the present value - * of the expected cash flow(s) from the investment. The present - * value of the expected cashflow(s) is calculated at the specified - * interest rate, which is often referred to as the "cost of capital". - * - * This function can be used to evaluate alternative investments. - * The larger the NPV, the more profitable the investment. See - * also the FutureValue and PresentValue for further explanations. - * The formula to calculate the net present value is: - * - * NetPresentValue = SUM(CashFlow[i] / ((1 + InterestRate) ** i)) - * FOR i = 1 TO NoOfCashFlows - * $EXAMPLES$ - * nNetPresentValue := FT_NETPV(10000, 10, { 10000,15000,16000,17000 } ) - * $END$ - */ - #ifdef FT_TEST FUNCTION MAIN() ? FT_NETPV( 10000, 10, { 10000,15000,16000,17000 } ) RETURN ( nil ) #endif - FUNCTION FT_NETPV(nInitialInvestment, nInterestRate, aCashFlow, nNoOfCashFlows) LOCAL nNetPresentValue := 0 diff --git a/harbour/contrib/hbnf/nooccur.prg b/harbour/contrib/hbnf/nooccur.prg index e21ea19a05..0ad7cd3091 100644 --- a/harbour/contrib/hbnf/nooccur.prg +++ b/harbour/contrib/hbnf/nooccur.prg @@ -24,42 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_NOOCCUR() - * $CATEGORY$ - * String - * $ONELINER$ - * Find the number of times one string occurs in another - * $SYNTAX$ - * FT_NOOCCUR( , ; - * [, ] ) -> - * $ARGUMENTS$ - * is the string to search for - * - * is the string to search - * - * is a boolean variable to force case sensitivity - * (optional, defaults to .F.). - * $RETURNS$ - * The number of times appears in - * $DESCRIPTION$ - * This function finds the number of times a string occurs in a - * second string. - * $EXAMPLES$ - * // Find the number of times "the" appears in cMemoString, case - * // insensitive - * - * nNoOfOccurrences := FT_NOOCCUR( "the", cMemoString ) - * - * // Find the number of times "the" appears in cMemoString, case - * // sensitive - * - * nNoOfOccurrences := FT_NOOCCUR( "the", cMemoString, .T. ) - * $END$ - */ - #define IS_NOT_LOGICAL(x) (VALTYPE(x) != "L") #define MAKE_UPPER(x) (x := UPPER(x)) diff --git a/harbour/contrib/hbnf/ntow.prg b/harbour/contrib/hbnf/ntow.prg index 0fb2318b77..7d39360098 100644 --- a/harbour/contrib/hbnf/ntow.prg +++ b/harbour/contrib/hbnf/ntow.prg @@ -21,57 +21,6 @@ * */ - - - -/* $DOC$ - * $FUNCNAME$ - * FT_NTOW() - * $CATEGORY$ - * Conversion - * $ONELINER$ - * Translate numeric value to words - * $SYNTAX$ - * FT_NTOW( ) -> cWords - * $ARGUMENTS$ - * An integer to translate - * $RETURNS$ - * A text string representing - * $DESCRIPTION$ - * Translates numeric input to a text string. - * - * FT_NTOW is intended to be used with integers only. Since I don't - * know what your application will be, I can't assume the type of - * fraction you want returned (ninety nine cents, 99/100, .99, etc). - * If you want the fraction in words, just pass it as an integer. - * - * Do not pass a negative number! Handle negative numbers any way - * you need to in your code. (ie: CR, DB, Negative, Minus, etc.) - * - * Also, numeric 0 is returned as a null string. You will need to - * make a decision how to output it (zero dollars, no dollars, etc). - * $EXAMPLES$ - * ? FT_NTOW( 999 ) -> Nine Hundred Ninety Nine - * - * ? FT_NTOW( 1000 ) -> One Thousand - * - * ? FT_NTOW( 23 ) + " Dollars and " + FT_NTOW( 99 ) + " Cents" - * -> Twenty Three Dollars and Ninety Nine Cents - * - * ? FT_NTOW( 23 ) + " Dollars and " + "99/100" - * -> Twenty Three Dollars and 99/100 - * - * x := -23.99 - * cents := str( (x - int( x )) * 100, 2, 0 ) + "/100" - * x := int( x ) - * string := iif( x < 0, "Credit of ", "Debit of " ) - * ? string + FT_NTOW( abs(x) ) + " Dollars and " + "99/100" - * -> Credit of Twenty Three Dollars and 99/100 - * $END$ - */ - - - static ones := { "", " One", " Two", " Three", " Four", " Five", ; " Six", " Seven", " Eight", " Nine" ; } @@ -87,14 +36,11 @@ static tens := { "", "", " Twenty", " Thirty", " Forty", " Fifty", ; static qualifiers := { "", " Thousand", " Million", " Billion", " Trillion" } - #ifdef FT_TEST function main( cNum ) return qout( ft_ntow( val( cNum ) ) ) #endif - - function ft_ntow(nAmount) local nTemp, sResult := " ", nQualNo local nDiv := 10 ^ ( int( sol10(nAmount) / 3 ) * 3 ) @@ -111,7 +57,6 @@ function ft_ntow(nAmount) endif return ltrim(sResult) - static function grp_to_words(nGrp, sQual) local sResult := "", nTemp @@ -130,7 +75,6 @@ static function grp_to_words(nGrp, sQual) endcase return sResult + sQual - static function sol10( nNumber ) local sTemp diff --git a/harbour/contrib/hbnf/numlock.c b/harbour/contrib/hbnf/numlock.c index 8d2f3903f7..40a38dcc78 100644 --- a/harbour/contrib/hbnf/numlock.c +++ b/harbour/contrib/hbnf/numlock.c @@ -29,50 +29,6 @@ * */ - - - -/* $DOC$ - * $FUNCNAME$ - * FT_NUMLOCK() - * $CATEGORY$ - * Keyboard/Mouse - * $ONELINER$ - * Return status of NumLock key - * $SYNTAX$ - * FT_NUMLOCK( [ ] ) -> lCurrentSetting - * $ARGUMENTS$ - * is optional and if supplied is the new setting - * for the CapLock key. Specify .T. to turn CapLock on, or .F. to - * turn it off. - * $RETURNS$ - * lValue is .T. if NumLock is set, .F. if it isn't set. The value - * returned represents the setting in effect prior to any changes that - * might by made by . - * $DESCRIPTION$ - * This function is useful if you need to know or set the status of the - * NumLock key for some reason. - * $EXAMPLES$ - * IF FT_NUMLOCK() - * Qout( "NumLock is active" ) - * ENDIF - * - * Another one, slightly strange, courtesy of Glenn Scott: - * - * - * function numBlink() - * local lOldNum := ft_numlock() - * - * while inkey( .5 ) != 27 - * ft_numlock( !ft_numlock() ) - * end - * - * return ft_numlock( lOldNum ) - * $SEEALSO$ - * FT_CAPLOCK() FT_CTRL() FT_PRTSCR() FT_SHIFT() FT_ALT() - * $END$ - */ - #include "hbapigt.h" #include "hbapiitm.h" diff --git a/harbour/contrib/hbnf/nwlstat.prg b/harbour/contrib/hbnf/nwlstat.prg index 756b879a1e..5519e2f9c2 100644 --- a/harbour/contrib/hbnf/nwlstat.prg +++ b/harbour/contrib/hbnf/nwlstat.prg @@ -25,38 +25,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_NWLSTAT() - * $CATEGORY$ - * NetWare - * $ONELINER$ - * Return the current Novell NetWare logical station number - * $SYNTAX$ - * FT_NWLSTAT() -> nStatNum - * $ARGUMENTS$ - * None - * $RETURNS$ - * A numeric corresponding to the current logical station number - * assigned by NetWare. - * $DESCRIPTION$ - * In order to find out information about a particular node logged - * in to a NetWare server, you will need the logical - * station number, also known as a "connection number." This - * function will return that number. This will be a number from 1 to 100 - * under NetWare 286, or from 1 to 250 under NetWare 386. This is *not* - * the same as a physical station number. - * - * This function requires FT_INT86(). - * - * This function does NOT test for the existence of the NetWare shell. - * The behavior is undefined if no shell is loaded. - * $EXAMPLES$ - * QOut( "Logical station: " + str( FT_NWLSTAT() ) ) - * $END$ - */ - #include "ftint86.ch" #define DOS 33 diff --git a/harbour/contrib/hbnf/nwsem.prg b/harbour/contrib/hbnf/nwsem.prg index 9508f19cde..86ec896afe 100644 --- a/harbour/contrib/hbnf/nwsem.prg +++ b/harbour/contrib/hbnf/nwsem.prg @@ -33,12 +33,10 @@ * */ - // -------------------------------------------------------------- // Semaphore Package for Novell NetWare // -------------------------------------------------------------- - #include "ftint86.ch" #define INT21 33 @@ -102,99 +100,6 @@ #endif - -/* $DOC$ - * $FUNCNAME$ - * FT_NWSEMOPEN() - * $CATEGORY$ - * NetWare - * $ONELINER$ - * Open or create a NetWare semaphore - * $SYNTAX$ - * FT_NWSEMOPEN( , , <@nHandle>, <@nOpenCnt> ) -> nRc - * $ARGUMENTS$ - * is the semaphore name, maximum length is 127 characters. - * - * is the initial value for the semaphore. It must start - * as a positive number, to a maximum of 127. - * - * <@nHandle> is the semaphore handle. THIS MUST BE PASSED BY - * REFERENCE! On exit, will contain a numeric value that - * refers to the opened semaphore. You will need it to pass to - * other semaphore functions! PASS IT BY REFERENCE! - * - * <@nOpenCnt> is the number of stations that have opened the - * semaphore. THIS MUST BE PASSED BY REFERENCE! On exit, - * will contain a numeric value. - * $RETURNS$ - * nRc, a numeric result code, as follows: - * - * 0 - success - * 254 - Invalid semaphore name length - * 255 - Invalid semaphore value - * - * will contain the semaphore handle, and - * will contain the number of stations that have opened - * the semaphore. - * $DESCRIPTION$ - * A semaphore is simply a label that indirectly controls network - * activity. There is a semaphore name, which can be up to 127 - * characters, and an associated value, which can range from 0 to - * 127. - * - * A semaphore can be used for many things, but is most often used - * to limit the number of users in an application, and to control - * access to a network resource. - * - * A semaphore essentially allows you to place locks on resources - * other than files. - * - * An application begins the process by calling FT_NWSEMOPEN(). - * If the semaphore doesn't exist, NetWare will create it. - * FT_NWSEMOPEN() returns a handle that is used in other semaphore - * calls. - * - * Applications use FT_NWSEMWAIT() to wait for a semaphore to - * become available. FT_NWSEMWAIT() decrements the semaphore's - * value by 1. If the value > 0, then the application should - * be allowed to access the semaphore's resource. If the value - * goes negative, then the application is placed in a queue. - * How long your app is in the queue is determined by how you - * set the timeout parameter. If you can't get the resource in - * the time you allot, you're let out of the queue and the - * value increments by 1 again. - * - * When an application finishes with a semaphore, it should - * call FT_NWSEMSIG() to increment the value, and then - * FT_NWSEMCLOSE() to close the semaphore. When the semaphore's - * open count goes to 0, NetWare deletes it. - * - * FT_NWSEMEX() can be used to examine the value and open count - * without affecting them. - * - * For an interesting discussion on the operating system aspects - * of semaphores, check "Operating Systems Design and Implementation" - * by A. Tanenbaum, page 60. For more details on NetWare's - * semaphore facilities, refer to Charles Rose's "Programmer's - * Guide to NetWare". The "Programmer's Guide" will make an - * excellent companion guide to the source code for all NetWare - * functions in the Nanforum Toolkit. - * $EXAMPLES$ - * LOCAL nInitVal, nRc, nHandle, nOpenCnt - * - * nInitVal := 2 - * nRc := FT_NWSEMOPEN( "Semaphore Test", nInitVal, ; - * @nHandle, @nOpenCnt ) - * - * IF nRc != 0 - * QOUT =: "Error: " + STR( nRc ) ) - * QUIT - * ENDIF - * $SEEALSO$ - * FT_NWSEMEX() FT_NWSEMWAIT() FT_NWSEMSIG() FT_NWSEMCLOSE() FT_NWSEMLOCK() - * $END$ - */ - function ft_nwSemOpen( cName, nInitVal, nHandle, nOpenCnt ) local aRegs[ INT86_MAX_REGS ], cRequest, nRet @@ -203,7 +108,6 @@ function ft_nwSemOpen( cName, nInitVal, nHandle, nOpenCnt ) nHandle to 0, ; nOpenCnt to 0 - cName := iif( len( cName ) > 127, substr( cName, 1, 127 ), cName ) cRequest := chr( len( cName ) ) + cName @@ -221,63 +125,6 @@ function ft_nwSemOpen( cName, nInitVal, nHandle, nOpenCnt ) return iif( nRet < 0, nRet + 256, nRet ) - - - -/* $DOC$ - * $FUNCNAME$ - * FT_NWSEMEX() - * $CATEGORY$ - * NetWare - * $ONELINER$ - * Examine a NetWare semaphore's value and open count - * $SYNTAX$ - * FT_NWSEMEX( , <@nValue>, <@nOpenCnt> ) -> nRc - * $ARGUMENTS$ - * is the semaphore handle, returned from a previous call - * to FT_NWSEMOPEN(). - * - * <@nValue> will get the current semaphore value. THIS NUMERIC - * ARGUMENT MUST BE PASSED BY REFERENCE! - * - * <@nOpenCnt> will get the current number of workstations - * that have opened the semaphore. THIS NUMERIC ARGUMENT MUST BE - * PASSED BY REFERENCE! - * $RETURNS$ - * nRc, a numeric, as follows: - * - * 0 - success - * 255 - invalid semaphore handle - * - * In addition, nValue will be set to the semaphore's current value, - * and nOpenCnt will be set to the number of stations that have - * opened the semaphore. - * $DESCRIPTION$ - * See the description for FT_NWSEMOPEN(). - * $EXAMPLES$ - * nInitVal := 2 - * nHandle := 0 - * nOpenCnt := 0 - * - * FT_NWSEMOPEN( "Semaphore Test", nInitVal, @nHandle, @nOpenCnt ) - * - * nRc := FT_NWSEMWAIT( nHandle ) - * IF nRc == 254 - * QOUT( "All slots for this resource are currently in use" ) - * QUIT - * ENDIF - * - * FT_NWSEMEX( nHandle, @nValue, @nOpenCnt ) - * QOUT( "Semaphore test -> Open at [" + ; - * ALLTRIM(STR(nOpenCnt)) + ; - * "] stations, value is [" + ; - * ALLTRIM(STR(nValue)) + "]" ) - * $SEEALSO$ - * FT_NWSEMOPEN() FT_NWSEMWAIT() FT_NWSEMSIG() FT_NWSEMCLOSE() FT_NWSEMLOCK() - * $END$ - */ - - function ft_nwSemEx( nHandle, nValue, nOpenCnt ) local aRegs[ INT86_MAX_REGS ], nRet @@ -304,120 +151,15 @@ function ft_nwSemEx( nHandle, nValue, nOpenCnt ) return iif( nRet < 0, nRet + 256, nRet ) - -/* $DOC$ - * $FUNCNAME$ - * FT_NWSEMWAIT() - * $CATEGORY$ - * NetWare - * $ONELINER$ - * Wait on a NetWare semaphore (decrement) - * $SYNTAX$ - * FT_NWSEMWAIT( [, nTimeout ] ) -> nRc - * $ARGUMENTS$ - * is the semaphore handle, returned from a previous call - * to FT_NWSEMOPEN(). - * - * is an optional parameter telling how long you wish to - * wait on this semaphore. This is a numeric indicating the number - * of clock ticks (approx 1/18 sec ) to wait. A zero (the default) - * means "don't wait." - * $RETURNS$ - * nRc, a numeric, as follows: - * - * 0 - success - * 254 - timeout failure - * 255 - invalid semaphore handle - * $DESCRIPTION$ - * See the description for the FT_NWSEMOPEN() function. - * $EXAMPLES$ - * FT_NWSEMOPEN( "Semaphore Test", nInitVal, @nHandle, @nOpenCnt ) - * - * nRc := FT_NWSEMWAIT( nHandle ) - * IF nRc == 254 - * QOUT( "All slots for this resource are currently in use" ) - * QUIT - * ENDIF - * $SEEALSO$ - * FT_NWSEMOPEN() FT_NWSEMEX() FT_NWSEMSIG() FT_NWSEMCLOSE() FT_NWSEMLOCK() - * $END$ - */ - - - function ft_nwSemWait( nHandle, nTimeout ) return _ftnwsem( WAIT_SEMAPHORE, nHandle, nTimeout ) - - -/* $DOC$ - * $FUNCNAME$ - * FT_NWSEMSIG() - * $CATEGORY$ - * NetWare - * $ONELINER$ - * Signal a NetWare semaphore (increment) - * $SYNTAX$ - * FT_NWSEMSIG( nHandle ) -> nRc - * $ARGUMENTS$ - * is the semaphore handle, returned from a previous call - * to FT_NWSEMOPEN(). - * $RETURNS$ - * nRc, a numeric, as follows - * - * 0 - success - * 1 - semaphore overflow ( value > 127 ) - * 255 - invalid semaphore handle - * $DESCRIPTION$ - * Use FT_NWSEMSIG() when your app has finished with the resource - * locked by a semaphore. This will increase the value (thus - * making a slot available to another app). - * - * For more information, see the description under FT_NWSEMOPEN(). - * $EXAMPLES$ - * QOUT( "Signal returns: " + STR( FT_NWSEMSIG( nHandle ) ) ) - * $SEEALSO$ - * FT_NWSEMOPEN() FT_NWSEMEX() FT_NWSEMWAIT() FT_NWSEMCLOSE() FT_NWSEMLOCK() - * $END$ - */ - - function ft_nwSemSig( nHandle ) return _ftnwsem( SIGNAL_SEMAPHORE, nHandle ) - -/* $DOC$ - * $FUNCNAME$ - * FT_NWSEMCLOSE() - * $CATEGORY$ - * NetWare - * $ONELINER$ - * Close a NetWare semaphore - * $SYNTAX$ - * FT_NWSEMCLOSE( ) -> nRc - * $ARGUMENTS$ - * is the semaphore handle, returned from a previous call - * to FT_NWSEMOPEN(). - * $RETURNS$ - * nRc, a numeric, as follows: - * - * 0 - success - * 255 - invalid semaphore handle - * $DESCRIPTION$ - * Call FT_NWSEMCLOSE() when the app is finished. This decrements - * the open count for the semaphore. If the open count hits zero, - * the semaphore is deleted by NetWare. - * $EXAMPLES$ - * QOUT( "Close returns: " + STR( FT_NWSEMCLOSE( nHandle ) ) ) - * $SEEALSO$ - * FT_NWSEMOPEN() FT_NWSEMEX() FT_NWSEMWAIT() FT_NWSEMSIG() FT_NWSEMLOCK() - * $END$ - */ - function ft_nwSemClose( nHandle ) return _ftnwsem( CLOSE_SEMAPHORE, nHandle ) - // --------------------------------------------------------- // _ftnwsem() - internal for the semaphore package // --------------------------------------------------------- @@ -435,81 +177,12 @@ static function _ftnwsem( nOp, nHandle, nTimeout ) aRegs[ DX ] := bin2i( substr( l2bin( nHandle ), 3, 2 ) ) aRegs[ BP ] := nTimeout - ft_int86( INT21, aRegs ) nRet := lowbyte( aRegs[AX] ) nRet := iif( nRet < 0, nRet + 256, nRet ) return nRet - - -/* $DOC$ - * $FUNCNAME$ - * FT_NWSEMLOCK() - * $CATEGORY$ - * NetWare - * $ONELINER$ - * Perform a semaphore "lock" - * $SYNTAX$ - * FT_NWSEMLOCK ( , <@nHandle> ) -> lRet - * $ARGUMENTS$ - * is the name of a semaphore you want to "lock." - * is the semaphore's handle, if you get the lock. - * THIS MUST BE PASSED BY REFERENCE! - * $RETURNS$ - * lRet == .t. if you get the lock, .f. if you don't. - * If the lock succeeds, will contain the semaphore - * handle. If it fails, the value of is undefined. - * - * $DESCRIPTION$ - * FT_NWSEMLOCK() uses the Nanforum Toolkit's NetWare Semaphore API - * functions in order to provide a general purpose "lock" you can use in - * a NetWare environment. - * - * An interesting byproduct of NetWare's semaphore functions is - * the "open count" which tells you how many connections have this - * semaphore open. This is different from the semaphore's _value_, - * which is set when the semaphore is opened and changed with - * signal() and wait(). - * - * The point of semaphores is that you don't care how many users - * are using the resource; you merely wait on a semaphore until - * the resource becomes available or you give up. When you're done, - * you signal it and off you go. - * - * Back to the open count. FT_NWSEMLOCK() opens the semaphore - * as named in . After it is opened, the open count - * is checked. If it is anything other than 1, that means someone - * else has it (or you failed in your open) so the semaphore is - * closed and the "lock" is refused. If the value is 1, then your - * app is that 1 station so the "lock" is granted. - * - * You can use a semaphore lock to control access to anything - * that Clipper's RLOCK() and FLOCK() can't help you with, such - * as text files written with the low level file i/o functions, - * etc. - * $EXAMPLES$ - * LOCAL nHandle := 0 - * IF FT_NWSEMLOCK( "k:\apps\error.log", @nHandle ) - * // Note, you aren't actually LOCKING this file, you are - * // just locking a semaphore by the same name. As long as - * // all apps that might be using this file are cooperating - * // with the same kind of semaphore lock, you can effectively - * // control access to the file. - * ELSE - * QOUT("Couldn't lock file.") - * ENDIF - * * Processing, then: - * FT_NWSEMUNLOCK( nHandle ) - * - * $SEEALSO$ - * FT_NWSEMOPEN() FT_NWSEMEX() FT_NWSEMWAIT() FT_NWSEMSIG() FT_NWSEMUNLOCK() - * $END$ - */ - - - function ft_nwSemLock( cSemaphore, nHandle ) local nRc local nOpenCnt := 0 @@ -524,48 +197,5 @@ function ft_nwSemLock( cSemaphore, nHandle ) return ( nOpenCnt == 1 ) - -/* $DOC$ - * $FUNCNAME$ - * FT_NWSEMUNLOCK() - * $CATEGORY$ - * NetWare - * $ONELINER$ - * "Unlock" a semaphore locked by FT_NWSEMLOCK() - * $SYNTAX$ - * FT_NWSEMUNLOCK( ) -> lRet - * $ARGUMENTS$ - * is the semaphore handle returned from FT_NWSEMLOCK() - * $RETURNS$ - * lRet == .t. if you successfully unlock the semaphore, .f. if - * you don't. If this call fails, it could be that you're passing - * an invalid semaphore handle. - * $DESCRIPTION$ - * - * This call unlocks a semaphore prevsiously locked via FT_NWSEMLOCK(). - * It is important that you get a valid semaphore handle from - * FT_NWSEMLOCK() before you use this call. Make sure when you call - * FT_NWSEMLOCK() that you pass a numeric parameter in for the handle - * BY REFERENCE. - * $EXAMPLES$ - * LOCAL nHandle := 0 - * IF FT_NWSEMLOCK( "k:\apps\error.log", @nHandle ) - * // Note, you aren't actually LOCKING this file, you are - * // just locking a semaphore by the same name. As long as - * // all apps that might be using this file are cooperating - * // with the same kind of semaphore lock, you can effectively - * // control access to the file. - * ELSE - * QOUT("Couldn't lock file.") - * ENDIF - * * Processing, then: - * FT_NWSEMUNLOCK( nHandle ) - * - * $SEEALSO$ - * FT_NWSEMOPEN() FT_NWSEMEX() FT_NWSEMWAIT() FT_NWSEMSIG() FT_NWSEMLOCK() - * $END$ - */ - - function ft_nwSemUnLock( nHandle ) return ( ft_nwSemClose( nHandle ) == 0 ) diff --git a/harbour/contrib/hbnf/nwuid.prg b/harbour/contrib/hbnf/nwuid.prg index fd22437a28..08471fa108 100644 --- a/harbour/contrib/hbnf/nwuid.prg +++ b/harbour/contrib/hbnf/nwuid.prg @@ -32,51 +32,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_NWUID() - * $CATEGORY$ - * NetWare - * $ONELINER$ - * Return the current Novell NetWare User ID - * $SYNTAX$ - * FT_NWUID( [ ] ) -> cUid - * $ARGUMENTS$ - * is a connection number, or logical station number, - * to find a userid for. Under NetWare 286, this number can be from - * 1 to 100. Under NetWare 386, 1-250. If not supplied, FT_NWUID() - * defaults to the current connection (i.e., the connection running - * the application). - * $RETURNS$ - * A string containing the userid, or "login name." - * The maximum length of this string, as defined by current - * versions of Novell NetWare, is 48 characters. - * $DESCRIPTION$ - * FT_NWUID() returns the current NetWare userid, or "login - * name." This is useful for implementing security or audit - * trail procedures within your programs. - * - * There is no simple way a user can "fool" this function into - * retrieving an incorrect value, provided a NetWare shell is loaded. - * - * This function requires FT_INT86() and FT_NWLSTAT() - * - * This function does NOT test for the existence of the NetWare shell. - * The behavior is undefined if no shell is loaded. You'll usually get - * garbage. This function has not been tested on NetWare 386. - * $EXAMPLES$ - * QOut( "I am: " + FT_NWUID() ) - * - * FOR x := 1 TO 100 - * cUid := FT_NWUID( x ) - * IF .NOT Empty( cUid ) - * QOut( Str( x, 3 ) + Space(3) + cUid ) - * ENDIF - * NEXT - * $END$ - */ - #include "ftint86.ch" #define DOS 33 diff --git a/harbour/contrib/hbnf/ontick.c b/harbour/contrib/hbnf/ontick.c index 4e7fcc3018..870a080d6e 100644 --- a/harbour/contrib/hbnf/ontick.c +++ b/harbour/contrib/hbnf/ontick.c @@ -17,53 +17,6 @@ * Initial release */ - -/* $DOC$ - * $FUNCNAME$ - * FT_OnTick() - * $CATEGORY$ - * Event - * $ONELINER$ - * Evaluate a designated code block at a designated interval. - * $SYNTAX$ - * FT_OnTick( bCode, nInterval ) - * $ARGUMENTS$ - * is the code block to evaluate. - * is the number of clock ticks to wait between - * evaluations of the code block. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * This function effectively allows you to run tasks in the background - * by transparently and periodically calling a designated routine. - * - * To halt the execution of the background function, call FT_OnTick() - * with no arguments. - * - * This function makes heavy use of several undocumented internal - * routines. If this fact makes you uncomfortable then don't use - * this function, you quivering sack of cowardly slime. - * $EXAMPLES$ - * - * // Set up a self-updating on-screen clock - * - * FT_OnTick( "CLOCK", 9 ) - * - * procedure Clock - * - * local nRow := Row() - * local nCol := Col() - * - * @ 0, 0 say Time() - * - * SetPos( nRow, nCol ) - * - * return - * - * $SEEALSO$ - * $END$ - */ - #include "hbapi.h" #include "hbapiitm.h" @@ -123,7 +76,6 @@ static void cdecl TickTock( void ) return; } - CLIPPER FT_OnTick( void ) { if ( hb_itemType( codeBlock ) == BLOCK ) hb_itemRelease( codeBlock ); diff --git a/harbour/contrib/hbnf/origin.c b/harbour/contrib/hbnf/origin.c index ccacb30a15..bf61ed6962 100644 --- a/harbour/contrib/hbnf/origin.c +++ b/harbour/contrib/hbnf/origin.c @@ -22,42 +22,6 @@ * */ -/* $DOC$ - * $FUNCNAME$ - * FT_ORIGIN() - * $CATEGORY$ - * Environment - * $ONELINER$ - * Report the drive, path and filename of the current program - * $SYNTAX$ - * FT_ORIGIN() -> cString - * $ARGUMENTS$ - * None - * $RETURNS$ - * A string containing the full drive/directory/filename of - * the currently executing file. - * $DESCRIPTION$ - * Often users will install multiple copies of application software, - * especially on networks and in situations where the user is trying - * to get around a copy protection scheme. - * - * This function enables you to learn the name and source location - * of the currently executing file, so that you may take whatever - * action you need to. - * - * Requires DOS v3.xx and above. - * $EXAMPLES$ - * cMyFile := FT_ORIGIN() - * - * IF cMyFile != "C:\appdir\myfile.exe" - * ?"Incorrect startup file. Please remove/rename and start again" - * QUIT - * ENDIF - * $SEEALSO$ - * FT_WHEREIS() FT_TREE() - * $END$ - */ - #include "hbapi.h" HB_FUNC( FT_ORIGIN ) diff --git a/harbour/contrib/hbnf/page.prg b/harbour/contrib/hbnf/page.prg index c14317377f..1d1b97a0ba 100644 --- a/harbour/contrib/hbnf/page.prg +++ b/harbour/contrib/hbnf/page.prg @@ -31,35 +31,6 @@ #define VIDEO 16 -/* $DOC$ - * $FUNCNAME$ - * FT_SETVPG() - * $CATEGORY$ - * Video - * $ONELINER$ - * Set the current video page - * $SYNTAX$ - * FT_SETVPG( ) -> NIL - * $ARGUMENTS$ - * is a valid video page. - * $RETURNS$ - * NIL - * $DESCRIPTION$ - * Selects the video page. - * - * For more information on graphics programming and video pages, - * consult a reference such as "Programmer's Guide to PC and PS/2 - * Video Systems" (Microsoft Press). - * $EXAMPLES$ - * // The following sets the current video page to 1 - * - * FT_SETVPG( 1 ) - * $SEEALSO$ - * FT_GETVPG() - * $END$ - */ - - FUNCTION FT_SETVPG( nPage ) /* LOCAL aRegs[ INT86_MAX_REGS ] @@ -71,37 +42,6 @@ FUNCTION FT_SETVPG( nPage ) RETURN NIL - - -/* $DOC$ - * $FUNCNAME$ - * FT_GETVPG() - * $CATEGORY$ - * Video - * $ONELINER$ - * Get the currently selected video page - * $SYNTAX$ - * FT_GETVPG() -> - * $ARGUMENTS$ - * None. - * $RETURNS$ - * The video page, as a numeric. - * $DESCRIPTION$ - * Get the currently selected video page - * - * For more information on graphics programming and video pages, - * consult a reference such as _Programmer's Guide to PC and PS/2 - * Video Systems_ (Microsoft Press). - * - * $EXAMPLES$ - * nPage := FT_GETVPG() - * $SEEALSO$ - * FT_SETVPG() - * $END$ - */ - - - FUNCTION FT_GETVPG() /* LOCAL aRegs[ INT86_MAX_REGS ] diff --git a/harbour/contrib/hbnf/pchr.prg b/harbour/contrib/hbnf/pchr.prg index 5536354eb4..dc5db25b42 100644 --- a/harbour/contrib/hbnf/pchr.prg +++ b/harbour/contrib/hbnf/pchr.prg @@ -24,97 +24,6 @@ * */ - -/* $DOC$ - * $FUNCNAME$ - * FT_PCHR() - * $CATEGORY$ - * String - * $ONELINER$ - * Convert printer control codes - * $SYNTAX$ - * FT_PCHR( ) -> - * $ARGUMENTS$ - * is the representation of the printer control codes in - * text, numeric, hexadecimal, Epson command format, or any combination - * separated by commas. - * $RETURNS$ - * A character string of printer control codes. - * $DESCRIPTION$ - * This function is useful for allowing the user to enter printer - * control codes in text (enclosed in double quotes), numeric, - * hexadecimal, or Epson commands preceded by a slash and returns - * the printer control code equivalent. - * - * NOTES" - * - * - Combinations of text, numbers, hex, and commands must be - * separated by commas ("A",27,&1B,/RESET). - * - Text must be enclosed in double quotes ("x"). - * - Hexadecimal must be preceded by an ampersand (&1B). - * - Epson commands, listed below, must be preceded by a forward - * slash (/RESET). - * - * Epson commands: (slash commands are specific to the Epson) - * - * Job Control: - * - * /RESET or /INIT Reset or initialize the printer - * /BELL or /BEEP Cause the printer's speaker to beep (not HS) - * /CAN Clear print buffers (not MX) - * /SLOW Set low speed mode (not CR, HS, MX) - * /FAST Cancel low speed mode (not CR, HS, MX) - * /ONE Select Unidirectional mode - * /TWO Select Directional mode - * /ON Activate printer - * /OFF Turn off printer - * - * /FF or /EJECT Form Feed - * - * Page Control: - * - * /1/6 Set 6 lines per inch - * /1/8 Set 8 lines per inch - * /SKIP Set Skip perforation ON - * /SKIPOFF Set Skip perforation OFF - * - * Font Selection and Manipulation: - * - * /ITALIC Select italic char. set (only FX86, EX, LX, - * no LQ-1500, SX) - * /GRAPHIC Select graphic char. set (only FX86, EX, LX, - * no LQ-1500, SX) - * /ROMAN Choose Roman font - * /SANS Choose Sans Serif font - * /DRAFT Choose draft - * /NLQ Choose near letter quality - * /PICA Choose 10 chars per inch - * /ELITE Choose 12 chars per inch - * /COND or /SI Choose 15 chars per inch - * /EMPH Turn emphasize on - * /EMPHOFF Turn emphasize off - * /SPANISH Select spanish international char set - * /USA Select USA international char set - * - * $EXAMPLES$ - * cSetUp := '27,116,1' - * Set Print ON - * ? FT_PCHR( cSetUp ) -> (CHR(27)+CHR(116)+CHR(1)) - *