From 9e9e5129f8ea3886180bb3ba0bd94b5261c23501 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 14 Jul 2010 12:48:39 +0000 Subject: [PATCH] 2010-07-14 14:41 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbextern.ch * src/rtl/hbdoc.prg + Added __HBDOC_FROMSOURCE( ) -> + tests/stripdoc.hbs + Strips NFDOC/HBDOC from .c/.prg sources. + tests/hbdocext.prg + Extracts NFDOC/HBDOC from source code. * contrib/hbct/bitnum.c * contrib/hbct/strdiff.c * contrib/hbct/token2.c * contrib/hbct/charlist.c * contrib/hbct/ctnet.c * contrib/hbct/charonly.c * contrib/hbct/atadjust.c * contrib/hbct/ctmath.c * contrib/hbct/ctset.c * contrib/hbct/ctwin.c + contrib/hbct/doc + contrib/hbct/doc/en + contrib/hbct/doc/en/strdiff.txt + contrib/hbct/doc/en/token1.txt + contrib/hbct/doc/en/token2.txt + contrib/hbct/doc/en/keyset.txt + contrib/hbct/doc/en/ct.txt + contrib/hbct/doc/en/charmirr.txt + contrib/hbct/doc/en/ctc.txt + contrib/hbct/doc/en/charlist.txt + contrib/hbct/doc/en/charlihb.txt + contrib/hbct/doc/en/relation.txt + contrib/hbct/doc/en/atadjust.txt + contrib/hbct/doc/en/charonly.txt + contrib/hbct/doc/en/ctmath.txt + contrib/hbct/doc/en/atnum.txt + contrib/hbct/doc/en/numconv.txt + contrib/hbct/doc/en/charsort.txt + contrib/hbct/doc/en/count.txt + contrib/hbct/doc/en/posdiff.txt + contrib/hbct/doc/en/ftoc.txt + contrib/hbct/doc/en/charmix.txt + contrib/hbct/doc/en/charevod.txt + contrib/hbct/doc/en/finan.txt + contrib/hbct/doc/en/range.txt + contrib/hbct/doc/en/wordrepl.txt + contrib/hbct/doc/en/charrepl.txt + contrib/hbct/doc/en/exponent.txt + contrib/hbct/doc/en/addascii.txt + contrib/hbct/doc/en/ctmath2.txt + contrib/hbct/doc/en/strswap.txt + contrib/hbct/doc/en/trig.txt + contrib/hbct/doc/en/tab.txt + contrib/hbct/doc/en/video.txt + contrib/hbct/doc/en/charswap.txt + contrib/hbct/doc/en/dattime2.txt + contrib/hbct/doc/en/dattime3.txt + contrib/hbct/doc/en/replace.txt + contrib/hbct/doc/en/charop.txt + contrib/hbct/doc/en/misc1.txt + contrib/hbct/doc/en/asciisum.txt + contrib/hbct/doc/en/color.txt + contrib/hbct/doc/en/charone.txt + contrib/hbct/doc/en/num1.txt + contrib/hbct/doc/en/pos1.txt + contrib/hbct/doc/en/pos2.txt + contrib/hbct/doc/en/numat.txt + contrib/hbct/doc/en/charophb.txt + contrib/hbct/doc/en/atrepl.txt + contrib/hbct/doc/en/ascpos.txt + contrib/hbct/doc/en/wordtoch.txt + contrib/hbct/doc/en/ctpad.txt + contrib/hbct/doc/en/datetime.txt + contrib/hbct/doc/en/print.txt + contrib/hbct/doc/en/justify.txt + contrib/hbct/doc/en/remove.txt + contrib/hbct/doc/en/ctstr.txt + contrib/hbct/doc/en/screen1.txt + Moved embedded docs to separate files. * contrib/hbct/charsort.c * contrib/hbct/ftoc.c * contrib/hbct/charmix.c * contrib/hbct/charevod.c * contrib/hbct/wordrepl.c * contrib/hbct/exponent.c * contrib/hbct/charrepl.c * contrib/hbct/files.c * contrib/hbct/strswap.c * contrib/hbct/trig.c * contrib/hbct/video.c * contrib/hbct/charswap.c * contrib/hbct/dattime3.c * contrib/hbct/charop.c * contrib/hbct/ct.prg * contrib/hbct/cursor.c * contrib/hbct/misc2.c * contrib/hbct/color.c * contrib/hbct/charone.c * contrib/hbct/num1.c * contrib/hbct/pos1.c * contrib/hbct/ctcom1.c * contrib/hbct/charophb.c * contrib/hbct/ascpos.c * contrib/hbct/numconv.prg * contrib/hbct/ctstr.c * contrib/hbct/screen1.c * contrib/hbct/token1.c * contrib/hbct/keyset.c * contrib/hbct/charmirr.c * contrib/hbct/ctc.c * contrib/hbct/ctwfunc.c * contrib/hbct/charlihb.c * contrib/hbct/relation.c * contrib/hbct/setlast.c * contrib/hbct/atnum.c * contrib/hbct/count.c * contrib/hbct/disk.c * contrib/hbct/posdiff.c * contrib/hbct/finan.c * contrib/hbct/range.c * contrib/hbct/addascii.c * contrib/hbct/ctmath2.c * contrib/hbct/tab.c * contrib/hbct/dattime2.c * contrib/hbct/replace.c * contrib/hbct/misc1.c * contrib/hbct/asciisum.c * contrib/hbct/pos2.c * contrib/hbct/numat.c * contrib/hbct/fcopy.prg * contrib/hbct/atrepl.c * contrib/hbct/ctcom2.c * contrib/hbct/wordtoch.c * contrib/hbct/ctpad.c * contrib/hbct/datetime.c * contrib/hbct/print.c * contrib/hbct/justify.c * contrib/hbct/remove.c - Stripped NFDOC/HBDOC from source code. + contrib/hbnf/doc + contrib/hbnf/doc/en + contrib/hbnf/doc/en/acctmnth.txt + contrib/hbnf/doc/en/savearr.txt + contrib/hbnf/doc/en/rand1.txt + contrib/hbnf/doc/en/madd.txt + contrib/hbnf/doc/en/dispmsg.txt + contrib/hbnf/doc/en/numlock.txt + contrib/hbnf/doc/en/mouse1.txt + contrib/hbnf/doc/en/settime.txt + contrib/hbnf/doc/en/restsets.txt + contrib/hbnf/doc/en/page.txt + contrib/hbnf/doc/en/prtscr.txt + contrib/hbnf/doc/en/color2n.txt + contrib/hbnf/doc/en/byt2bit.txt + contrib/hbnf/doc/en/month.txt + contrib/hbnf/doc/en/byt2hex.txt + contrib/hbnf/doc/en/findith.txt + contrib/hbnf/doc/en/at2.txt + contrib/hbnf/doc/en/acctweek.txt + contrib/hbnf/doc/en/gcd.txt + contrib/hbnf/doc/en/poke.txt + contrib/hbnf/doc/en/pegs.txt + contrib/hbnf/doc/en/min2dhm.txt + contrib/hbnf/doc/en/acctqtr.txt + contrib/hbnf/doc/en/dosver.txt + contrib/hbnf/doc/en/mkdir.txt + contrib/hbnf/doc/en/nooccur.txt + contrib/hbnf/doc/en/dayofyr.txt + contrib/hbnf/doc/en/metaph.txt + contrib/hbnf/doc/en/menu1.txt + contrib/hbnf/doc/en/byteand.txt + contrib/hbnf/doc/en/setlastk.txt + contrib/hbnf/doc/en/sqzn.txt + contrib/hbnf/doc/en/bytexor.txt + contrib/hbnf/doc/en/workdays.txt + contrib/hbnf/doc/en/byteor.txt + contrib/hbnf/doc/en/asum.txt + contrib/hbnf/doc/en/sleep.txt + contrib/hbnf/doc/en/wda.txt + contrib/hbnf/doc/en/aavg.txt + contrib/hbnf/doc/en/woy.txt + contrib/hbnf/doc/en/alt.txt + contrib/hbnf/doc/en/any2any.txt + contrib/hbnf/doc/en/adessort.txt + contrib/hbnf/doc/en/setdate.txt + contrib/hbnf/doc/en/netpv.txt + contrib/hbnf/doc/en/amedian.txt + contrib/hbnf/doc/en/blink.txt + contrib/hbnf/doc/en/ctrl.txt + contrib/hbnf/doc/en/vertmenu.txt + contrib/hbnf/doc/en/qtr.txt + contrib/hbnf/doc/en/linked.txt + contrib/hbnf/doc/en/aredit.txt + contrib/hbnf/doc/en/shift.txt + contrib/hbnf/doc/en/fttext.txt + contrib/hbnf/doc/en/xbox.txt + contrib/hbnf/doc/en/ftround.txt + contrib/hbnf/doc/en/hex2dec.txt + contrib/hbnf/doc/en/nwuid.txt + contrib/hbnf/doc/en/dectobin.txt + contrib/hbnf/doc/en/chdir.txt + contrib/hbnf/doc/en/bitset.txt + contrib/hbnf/doc/en/aemaxlen.txt + contrib/hbnf/doc/en/nwlstat.txt + contrib/hbnf/doc/en/invclr.txt + contrib/hbnf/doc/en/popadder.txt + contrib/hbnf/doc/en/lastday.txt + contrib/hbnf/doc/en/dispc.txt + contrib/hbnf/doc/en/ftattr.txt + contrib/hbnf/doc/en/tempfile.txt + contrib/hbnf/doc/en/diskfunc.txt + contrib/hbnf/doc/en/stod.txt + contrib/hbnf/doc/en/scregion.txt + contrib/hbnf/doc/en/mouse2.txt + contrib/hbnf/doc/en/d2e.txt + contrib/hbnf/doc/en/kspeed.txt + contrib/hbnf/doc/en/descendn.txt + contrib/hbnf/doc/en/pickday.txt + contrib/hbnf/doc/en/firstday.txt + contrib/hbnf/doc/en/daytobow.txt + contrib/hbnf/doc/en/getenvrn.txt + contrib/hbnf/doc/en/anomatch.txt + contrib/hbnf/doc/en/menutonf.txt + contrib/hbnf/doc/en/pvid.txt + contrib/hbnf/doc/en/proper.txt + contrib/hbnf/doc/en/isbiton.txt + contrib/hbnf/doc/en/isbit.txt + contrib/hbnf/doc/en/cntryset.txt + contrib/hbnf/doc/en/datecnfg.txt + contrib/hbnf/doc/en/caplock.txt + contrib/hbnf/doc/en/easter.txt + contrib/hbnf/doc/en/bytenot.txt + contrib/hbnf/doc/en/ftisprn.txt + contrib/hbnf/doc/en/setkeys.txt + contrib/hbnf/doc/en/ntow.txt + contrib/hbnf/doc/en/aeminlen.txt + contrib/hbnf/doc/en/floptst.txt + contrib/hbnf/doc/en/pchr.txt + contrib/hbnf/doc/en/savesets.txt + contrib/hbnf/doc/en/tbwhile.txt + contrib/hbnf/doc/en/year.txt + contrib/hbnf/doc/en/calendar.txt + contrib/hbnf/doc/en/e2d.txt + contrib/hbnf/doc/en/sysmem.txt + contrib/hbnf/doc/en/elapsed.txt + contrib/hbnf/doc/en/n2color.txt + contrib/hbnf/doc/en/bitclr.txt + contrib/hbnf/doc/en/eltime.txt + contrib/hbnf/doc/en/putkey.txt + contrib/hbnf/doc/en/aading.txt + contrib/hbnf/doc/en/dfile.txt + contrib/hbnf/doc/en/elapmil.txt + contrib/hbnf/doc/en/pending.txt + contrib/hbnf/doc/en/peek.txt + contrib/hbnf/doc/en/clrsel.txt + contrib/hbnf/doc/en/ontick.txt + contrib/hbnf/doc/en/acctyear.txt + contrib/hbnf/doc/en/byteneg.txt + contrib/hbnf/doc/en/isshare.txt + contrib/hbnf/doc/en/sinkey.txt + contrib/hbnf/doc/en/iamidle.txt + contrib/hbnf/doc/en/ftidle.txt + contrib/hbnf/doc/en/rmdir.txt + contrib/hbnf/doc/en/scancode.txt + contrib/hbnf/doc/en/vidmode.txt + contrib/hbnf/doc/en/origin.txt + contrib/hbnf/doc/en/nwsem.txt + contrib/hbnf/doc/en/acctadj.txt + contrib/hbnf/doc/en/week.txt + contrib/hbnf/doc/en/vidcur.txt + contrib/hbnf/doc/en/readme.txt + contrib/hbnf/doc/en/prtesc.txt + contrib/hbnf/doc/en/miltime.txt + Moved embedded docs to separate files. * contrib/hbnf/kspeed.c * contrib/hbnf/iamidle.c * contrib/hbnf/miltime.prg * contrib/hbnf/mouse1.prg * contrib/hbnf/setkeys.c * contrib/hbnf/origin.c * contrib/hbnf/chdir.c * contrib/hbnf/hex2dec.prg * contrib/hbnf/mouse2.prg * contrib/hbnf/ftisprn.c * contrib/hbnf/putkey.c * contrib/hbnf/floptst.prg * contrib/hbnf/mkdir.c * contrib/hbnf/rmdir.c * contrib/hbnf/setlastk.c ! Fixed NFDOC formatting. ; TODO: Strip docs. --- harbour/ChangeLog | 296 +++++ harbour/contrib/hbct/addascii.c | 66 - harbour/contrib/hbct/asciisum.c | 40 - harbour/contrib/hbct/ascpos.c | 86 -- harbour/contrib/hbct/atadjust.c | 44 - harbour/contrib/hbct/atnum.c | 170 --- harbour/contrib/hbct/atrepl.c | 67 -- harbour/contrib/hbct/bitnum.c | 2 - harbour/contrib/hbct/charevod.c | 73 -- harbour/contrib/hbct/charlihb.c | 78 -- harbour/contrib/hbct/charlist.c | 78 -- harbour/contrib/hbct/charmirr.c | 47 - harbour/contrib/hbct/charmix.c | 52 - harbour/contrib/hbct/charone.c | 89 -- harbour/contrib/hbct/charonly.c | 161 --- harbour/contrib/hbct/charop.c | 245 ---- harbour/contrib/hbct/charophb.c | 238 ---- harbour/contrib/hbct/charrepl.c | 66 - harbour/contrib/hbct/charsort.c | 82 -- harbour/contrib/hbct/charswap.c | 86 -- harbour/contrib/hbct/color.c | 194 --- harbour/contrib/hbct/count.c | 58 - harbour/contrib/hbct/ct.prg | 68 -- harbour/contrib/hbct/ctc.c | 107 -- harbour/contrib/hbct/ctcom1.c | 2 - harbour/contrib/hbct/ctcom2.c | 1 - harbour/contrib/hbct/ctmath.c | 61 - harbour/contrib/hbct/ctmath2.c | 186 --- harbour/contrib/hbct/ctnet.c | 3 - harbour/contrib/hbct/ctpad.c | 58 - harbour/contrib/hbct/ctset.c | 1 - harbour/contrib/hbct/ctstr.c | 181 --- harbour/contrib/hbct/ctwfunc.c | 1 - harbour/contrib/hbct/ctwin.c | 1 - harbour/contrib/hbct/cursor.c | 1 - harbour/contrib/hbct/datetime.c | 176 --- harbour/contrib/hbct/dattime2.c | 412 ------- harbour/contrib/hbct/dattime3.c | 215 ---- harbour/contrib/hbct/disk.c | 4 - harbour/contrib/hbct/doc/en/addascii.txt | 67 ++ harbour/contrib/hbct/doc/en/asciisum.txt | 41 + harbour/contrib/hbct/doc/en/ascpos.txt | 85 ++ harbour/contrib/hbct/doc/en/atadjust.txt | 47 + harbour/contrib/hbct/doc/en/atnum.txt | 170 +++ harbour/contrib/hbct/doc/en/atrepl.txt | 68 ++ harbour/contrib/hbct/doc/en/charevod.txt | 74 ++ harbour/contrib/hbct/doc/en/charlihb.txt | 81 ++ harbour/contrib/hbct/doc/en/charlist.txt | 79 ++ harbour/contrib/hbct/doc/en/charmirr.txt | 48 + harbour/contrib/hbct/doc/en/charmix.txt | 54 + harbour/contrib/hbct/doc/en/charone.txt | 88 ++ harbour/contrib/hbct/doc/en/charonly.txt | 158 +++ harbour/contrib/hbct/doc/en/charop.txt | 243 ++++ harbour/contrib/hbct/doc/en/charophb.txt | 237 ++++ harbour/contrib/hbct/doc/en/charrepl.txt | 67 ++ harbour/contrib/hbct/doc/en/charsort.txt | 84 ++ harbour/contrib/hbct/doc/en/charswap.txt | 85 ++ harbour/contrib/hbct/doc/en/color.txt | 219 ++++ harbour/contrib/hbct/doc/en/count.txt | 67 ++ harbour/contrib/hbct/doc/en/ct.txt | 75 ++ harbour/contrib/hbct/doc/en/ctc.txt | 112 ++ harbour/contrib/hbct/doc/en/ctmath.txt | 69 ++ harbour/contrib/hbct/doc/en/ctmath2.txt | 186 +++ harbour/contrib/hbct/doc/en/ctpad.txt | 67 ++ harbour/contrib/hbct/doc/en/ctstr.txt | 171 +++ harbour/contrib/hbct/doc/en/datetime.txt | 195 +++ harbour/contrib/hbct/doc/en/dattime2.txt | 474 ++++++++ harbour/contrib/hbct/doc/en/dattime3.txt | 220 ++++ harbour/contrib/hbct/doc/en/exponent.txt | 92 ++ harbour/contrib/hbct/doc/en/finan.txt | 256 ++++ harbour/contrib/hbct/doc/en/ftoc.txt | 86 ++ harbour/contrib/hbct/doc/en/justify.txt | 67 ++ harbour/contrib/hbct/doc/en/keyset.txt | 131 ++ harbour/contrib/hbct/doc/en/misc1.txt | 51 + harbour/contrib/hbct/doc/en/num1.txt | 115 ++ harbour/contrib/hbct/doc/en/numat.txt | 35 + harbour/contrib/hbct/doc/en/numconv.txt | 131 ++ harbour/contrib/hbct/doc/en/pos1.txt | 132 ++ harbour/contrib/hbct/doc/en/pos2.txt | 131 ++ harbour/contrib/hbct/doc/en/posdiff.txt | 67 ++ harbour/contrib/hbct/doc/en/print.txt | 67 ++ harbour/contrib/hbct/doc/en/range.txt | 78 ++ harbour/contrib/hbct/doc/en/relation.txt | 70 ++ harbour/contrib/hbct/doc/en/remove.txt | 99 ++ harbour/contrib/hbct/doc/en/replace.txt | 99 ++ harbour/contrib/hbct/doc/en/screen1.txt | 357 ++++++ harbour/contrib/hbct/doc/en/strdiff.txt | 71 ++ harbour/contrib/hbct/doc/en/strswap.txt | 35 + harbour/contrib/hbct/doc/en/tab.txt | 101 ++ harbour/contrib/hbct/doc/en/token1.txt | 330 +++++ harbour/contrib/hbct/doc/en/token2.txt | 394 ++++++ harbour/contrib/hbct/doc/en/trig.txt | 548 +++++++++ harbour/contrib/hbct/doc/en/video.txt | 145 +++ harbour/contrib/hbct/doc/en/wordrepl.txt | 67 ++ harbour/contrib/hbct/doc/en/wordtoch.txt | 36 + harbour/contrib/hbct/exponent.c | 86 -- harbour/contrib/hbct/fcopy.prg | 1 - harbour/contrib/hbct/files.c | 9 - harbour/contrib/hbct/finan.c | 259 ---- harbour/contrib/hbct/ftoc.c | 76 -- harbour/contrib/hbct/justify.c | 60 - harbour/contrib/hbct/keyset.c | 104 -- harbour/contrib/hbct/misc1.c | 45 - harbour/contrib/hbct/misc2.c | 1 - harbour/contrib/hbct/num1.c | 112 -- harbour/contrib/hbct/numat.c | 29 - harbour/contrib/hbct/numconv.prg | 104 -- harbour/contrib/hbct/pos1.c | 117 -- harbour/contrib/hbct/pos2.c | 117 -- harbour/contrib/hbct/posdiff.c | 59 - harbour/contrib/hbct/print.c | 54 - harbour/contrib/hbct/range.c | 74 -- harbour/contrib/hbct/relation.c | 62 - harbour/contrib/hbct/remove.c | 89 -- harbour/contrib/hbct/replace.c | 89 -- harbour/contrib/hbct/screen1.c | 314 ----- harbour/contrib/hbct/setlast.c | 1 - harbour/contrib/hbct/strdiff.c | 70 -- harbour/contrib/hbct/strswap.c | 29 - harbour/contrib/hbct/tab.c | 96 -- harbour/contrib/hbct/token1.c | 329 ----- harbour/contrib/hbct/token2.c | 391 ------ harbour/contrib/hbct/trig.c | 557 --------- harbour/contrib/hbct/video.c | 131 -- harbour/contrib/hbct/wordrepl.c | 66 - harbour/contrib/hbct/wordtoch.c | 31 - harbour/contrib/hbnf/chdir.c | 56 +- harbour/contrib/hbnf/doc/en/aading.txt | 50 + harbour/contrib/hbnf/doc/en/aavg.txt | 38 + harbour/contrib/hbnf/doc/en/acctadj.txt | 60 + harbour/contrib/hbnf/doc/en/acctmnth.txt | 57 + harbour/contrib/hbnf/doc/en/acctqtr.txt | 57 + harbour/contrib/hbnf/doc/en/acctweek.txt | 57 + harbour/contrib/hbnf/doc/en/acctyear.txt | 48 + harbour/contrib/hbnf/doc/en/adessort.txt | 35 + harbour/contrib/hbnf/doc/en/aemaxlen.txt | 48 + harbour/contrib/hbnf/doc/en/aeminlen.txt | 45 + harbour/contrib/hbnf/doc/en/alt.txt | 30 + harbour/contrib/hbnf/doc/en/amedian.txt | 42 + harbour/contrib/hbnf/doc/en/anomatch.txt | 46 + harbour/contrib/hbnf/doc/en/any2any.txt | 36 + harbour/contrib/hbnf/doc/en/aredit.txt | 75 ++ harbour/contrib/hbnf/doc/en/asum.txt | 36 + harbour/contrib/hbnf/doc/en/at2.txt | 81 ++ harbour/contrib/hbnf/doc/en/bitclr.txt | 48 + harbour/contrib/hbnf/doc/en/bitset.txt | 49 + harbour/contrib/hbnf/doc/en/blink.txt | 31 + harbour/contrib/hbnf/doc/en/byt2bit.txt | 45 + harbour/contrib/hbnf/doc/en/byt2hex.txt | 42 + harbour/contrib/hbnf/doc/en/byteand.txt | 42 + harbour/contrib/hbnf/doc/en/byteneg.txt | 40 + harbour/contrib/hbnf/doc/en/bytenot.txt | 40 + harbour/contrib/hbnf/doc/en/byteor.txt | 41 + harbour/contrib/hbnf/doc/en/bytexor.txt | 41 + harbour/contrib/hbnf/doc/en/calendar.txt | 74 ++ harbour/contrib/hbnf/doc/en/caplock.txt | 32 + harbour/contrib/hbnf/doc/en/chdir.txt | 33 + harbour/contrib/hbnf/doc/en/clrsel.txt | 102 ++ harbour/contrib/hbnf/doc/en/cntryset.txt | 33 + harbour/contrib/hbnf/doc/en/color2n.txt | 31 + harbour/contrib/hbnf/doc/en/ctrl.txt | 30 + harbour/contrib/hbnf/doc/en/d2e.txt | 38 + harbour/contrib/hbnf/doc/en/datecnfg.txt | 78 ++ harbour/contrib/hbnf/doc/en/dayofyr.txt | 63 + harbour/contrib/hbnf/doc/en/daytobow.txt | 40 + harbour/contrib/hbnf/doc/en/dectobin.txt | 25 + harbour/contrib/hbnf/doc/en/descendn.txt | 26 + harbour/contrib/hbnf/doc/en/dfile.txt | 87 ++ harbour/contrib/hbnf/doc/en/diskfunc.txt | 52 + harbour/contrib/hbnf/doc/en/dispc.txt | 64 + harbour/contrib/hbnf/doc/en/dispmsg.txt | 95 ++ harbour/contrib/hbnf/doc/en/dosver.txt | 35 + harbour/contrib/hbnf/doc/en/e2d.txt | 33 + harbour/contrib/hbnf/doc/en/easter.txt | 29 + harbour/contrib/hbnf/doc/en/elapmil.txt | 29 + harbour/contrib/hbnf/doc/en/elapsed.txt | 45 + harbour/contrib/hbnf/doc/en/eltime.txt | 29 + harbour/contrib/hbnf/doc/en/findith.txt | 38 + harbour/contrib/hbnf/doc/en/firstday.txt | 31 + harbour/contrib/hbnf/doc/en/floptst.txt | 54 + harbour/contrib/hbnf/doc/en/ftattr.txt | 77 ++ harbour/contrib/hbnf/doc/en/ftidle.txt | 43 + harbour/contrib/hbnf/doc/en/ftisprn.txt | 65 + harbour/contrib/hbnf/doc/en/ftround.txt | 66 + harbour/contrib/hbnf/doc/en/fttext.txt | 717 +++++++++++ harbour/contrib/hbnf/doc/en/gcd.txt | 30 + harbour/contrib/hbnf/doc/en/getenvrn.txt | 66 + harbour/contrib/hbnf/doc/en/hex2dec.txt | 27 + harbour/contrib/hbnf/doc/en/iamidle.txt | 41 + harbour/contrib/hbnf/doc/en/invclr.txt | 26 + harbour/contrib/hbnf/doc/en/isbit.txt | 48 + harbour/contrib/hbnf/doc/en/isbiton.txt | 34 + harbour/contrib/hbnf/doc/en/isshare.txt | 32 + harbour/contrib/hbnf/doc/en/kspeed.txt | 68 ++ harbour/contrib/hbnf/doc/en/lastday.txt | 31 + harbour/contrib/hbnf/doc/en/linked.txt | 47 + harbour/contrib/hbnf/doc/en/madd.txt | 50 + harbour/contrib/hbnf/doc/en/menu1.txt | 175 +++ harbour/contrib/hbnf/doc/en/menutonf.txt | 196 +++ harbour/contrib/hbnf/doc/en/metaph.txt | 36 + harbour/contrib/hbnf/doc/en/miltime.txt | 132 ++ harbour/contrib/hbnf/doc/en/min2dhm.txt | 26 + harbour/contrib/hbnf/doc/en/mkdir.txt | 35 + harbour/contrib/hbnf/doc/en/month.txt | 61 + harbour/contrib/hbnf/doc/en/mouse1.txt | 830 +++++++++++++ harbour/contrib/hbnf/doc/en/mouse2.txt | 536 +++++++++ harbour/contrib/hbnf/doc/en/n2color.txt | 27 + harbour/contrib/hbnf/doc/en/netpv.txt | 46 + harbour/contrib/hbnf/doc/en/nooccur.txt | 38 + harbour/contrib/hbnf/doc/en/ntow.txt | 49 + harbour/contrib/hbnf/doc/en/numlock.txt | 44 + harbour/contrib/hbnf/doc/en/nwlstat.txt | 34 + harbour/contrib/hbnf/doc/en/nwsem.txt | 349 ++++++ harbour/contrib/hbnf/doc/en/nwuid.txt | 47 + harbour/contrib/hbnf/doc/en/ontick.txt | 49 + harbour/contrib/hbnf/doc/en/origin.txt | 39 + harbour/contrib/hbnf/doc/en/page.txt | 58 + harbour/contrib/hbnf/doc/en/pchr.txt | 92 ++ harbour/contrib/hbnf/doc/en/peek.txt | 33 + harbour/contrib/hbnf/doc/en/pegs.txt | 25 + harbour/contrib/hbnf/doc/en/pending.txt | 53 + harbour/contrib/hbnf/doc/en/pickday.txt | 23 + harbour/contrib/hbnf/doc/en/poke.txt | 36 + harbour/contrib/hbnf/doc/en/popadder.txt | 83 ++ harbour/contrib/hbnf/doc/en/proper.txt | 39 + harbour/contrib/hbnf/doc/en/prtesc.txt | 33 + harbour/contrib/hbnf/doc/en/prtscr.txt | 31 + harbour/contrib/hbnf/doc/en/putkey.txt | 48 + harbour/contrib/hbnf/doc/en/pvid.txt | 60 + harbour/contrib/hbnf/doc/en/qtr.txt | 61 + harbour/contrib/hbnf/doc/en/rand1.txt | 32 + harbour/contrib/hbnf/doc/en/readme.txt | 34 + harbour/contrib/hbnf/doc/en/restsets.txt | 30 + harbour/contrib/hbnf/doc/en/rmdir.txt | 35 + harbour/contrib/hbnf/doc/en/savearr.txt | 105 ++ harbour/contrib/hbnf/doc/en/savesets.txt | 30 + harbour/contrib/hbnf/doc/en/scancode.txt | 50 + harbour/contrib/hbnf/doc/en/scregion.txt | 158 +++ harbour/contrib/hbnf/doc/en/setdate.txt | 44 + harbour/contrib/hbnf/doc/en/setkeys.txt | 40 + harbour/contrib/hbnf/doc/en/setlastk.txt | 40 + harbour/contrib/hbnf/doc/en/settime.txt | 42 + harbour/contrib/hbnf/doc/en/shift.txt | 30 + harbour/contrib/hbnf/doc/en/sinkey.txt | 35 + harbour/contrib/hbnf/doc/en/sleep.txt | 51 + harbour/contrib/hbnf/doc/en/sqzn.txt | 72 ++ harbour/contrib/hbnf/doc/en/stod.txt | 26 + harbour/contrib/hbnf/doc/en/sysmem.txt | 29 + harbour/contrib/hbnf/doc/en/tbwhile.txt | 90 ++ harbour/contrib/hbnf/doc/en/tempfile.txt | 49 + harbour/contrib/hbnf/doc/en/vertmenu.txt | 47 + harbour/contrib/hbnf/doc/en/vidcur.txt | 77 ++ harbour/contrib/hbnf/doc/en/vidmode.txt | 62 + harbour/contrib/hbnf/doc/en/wda.txt | 46 + harbour/contrib/hbnf/doc/en/week.txt | 61 + harbour/contrib/hbnf/doc/en/workdays.txt | 34 + harbour/contrib/hbnf/doc/en/woy.txt | 90 ++ harbour/contrib/hbnf/doc/en/xbox.txt | 84 ++ harbour/contrib/hbnf/doc/en/year.txt | 52 + harbour/contrib/hbnf/floptst.prg | 166 +-- harbour/contrib/hbnf/ftisprn.c | 122 +- harbour/contrib/hbnf/hex2dec.prg | 43 +- harbour/contrib/hbnf/iamidle.c | 74 +- harbour/contrib/hbnf/kspeed.c | 128 +- harbour/contrib/hbnf/miltime.prg | 2 +- harbour/contrib/hbnf/mkdir.c | 60 +- harbour/contrib/hbnf/mouse1.prg | 1390 +++++++++++----------- harbour/contrib/hbnf/mouse2.prg | 870 +++++++------- harbour/contrib/hbnf/origin.c | 62 +- harbour/contrib/hbnf/putkey.c | 90 +- harbour/contrib/hbnf/rmdir.c | 60 +- harbour/contrib/hbnf/setkeys.c | 72 +- harbour/contrib/hbnf/setlastk.c | 72 +- harbour/include/hbextern.ch | 1 + harbour/src/rtl/hbdoc.prg | 44 +- harbour/tests/hbdocext.prg | 44 + harbour/tests/stripdoc.hbs | 73 ++ 277 files changed, 18435 insertions(+), 8727 deletions(-) create mode 100644 harbour/contrib/hbct/doc/en/addascii.txt create mode 100644 harbour/contrib/hbct/doc/en/asciisum.txt create mode 100644 harbour/contrib/hbct/doc/en/ascpos.txt create mode 100644 harbour/contrib/hbct/doc/en/atadjust.txt create mode 100644 harbour/contrib/hbct/doc/en/atnum.txt create mode 100644 harbour/contrib/hbct/doc/en/atrepl.txt create mode 100644 harbour/contrib/hbct/doc/en/charevod.txt create mode 100644 harbour/contrib/hbct/doc/en/charlihb.txt create mode 100644 harbour/contrib/hbct/doc/en/charlist.txt create mode 100644 harbour/contrib/hbct/doc/en/charmirr.txt create mode 100644 harbour/contrib/hbct/doc/en/charmix.txt create mode 100644 harbour/contrib/hbct/doc/en/charone.txt create mode 100644 harbour/contrib/hbct/doc/en/charonly.txt create mode 100644 harbour/contrib/hbct/doc/en/charop.txt create mode 100644 harbour/contrib/hbct/doc/en/charophb.txt create mode 100644 harbour/contrib/hbct/doc/en/charrepl.txt create mode 100644 harbour/contrib/hbct/doc/en/charsort.txt create mode 100644 harbour/contrib/hbct/doc/en/charswap.txt create mode 100644 harbour/contrib/hbct/doc/en/color.txt create mode 100644 harbour/contrib/hbct/doc/en/count.txt create mode 100644 harbour/contrib/hbct/doc/en/ct.txt create mode 100644 harbour/contrib/hbct/doc/en/ctc.txt create mode 100644 harbour/contrib/hbct/doc/en/ctmath.txt create mode 100644 harbour/contrib/hbct/doc/en/ctmath2.txt create mode 100644 harbour/contrib/hbct/doc/en/ctpad.txt create mode 100644 harbour/contrib/hbct/doc/en/ctstr.txt create mode 100644 harbour/contrib/hbct/doc/en/datetime.txt create mode 100644 harbour/contrib/hbct/doc/en/dattime2.txt create mode 100644 harbour/contrib/hbct/doc/en/dattime3.txt create mode 100644 harbour/contrib/hbct/doc/en/exponent.txt create mode 100644 harbour/contrib/hbct/doc/en/finan.txt create mode 100644 harbour/contrib/hbct/doc/en/ftoc.txt create mode 100644 harbour/contrib/hbct/doc/en/justify.txt create mode 100644 harbour/contrib/hbct/doc/en/keyset.txt create mode 100644 harbour/contrib/hbct/doc/en/misc1.txt create mode 100644 harbour/contrib/hbct/doc/en/num1.txt create mode 100644 harbour/contrib/hbct/doc/en/numat.txt create mode 100644 harbour/contrib/hbct/doc/en/numconv.txt create mode 100644 harbour/contrib/hbct/doc/en/pos1.txt create mode 100644 harbour/contrib/hbct/doc/en/pos2.txt create mode 100644 harbour/contrib/hbct/doc/en/posdiff.txt create mode 100644 harbour/contrib/hbct/doc/en/print.txt create mode 100644 harbour/contrib/hbct/doc/en/range.txt create mode 100644 harbour/contrib/hbct/doc/en/relation.txt create mode 100644 harbour/contrib/hbct/doc/en/remove.txt create mode 100644 harbour/contrib/hbct/doc/en/replace.txt create mode 100644 harbour/contrib/hbct/doc/en/screen1.txt create mode 100644 harbour/contrib/hbct/doc/en/strdiff.txt create mode 100644 harbour/contrib/hbct/doc/en/strswap.txt create mode 100644 harbour/contrib/hbct/doc/en/tab.txt create mode 100644 harbour/contrib/hbct/doc/en/token1.txt create mode 100644 harbour/contrib/hbct/doc/en/token2.txt create mode 100644 harbour/contrib/hbct/doc/en/trig.txt create mode 100644 harbour/contrib/hbct/doc/en/video.txt create mode 100644 harbour/contrib/hbct/doc/en/wordrepl.txt create mode 100644 harbour/contrib/hbct/doc/en/wordtoch.txt create mode 100644 harbour/contrib/hbnf/doc/en/aading.txt create mode 100644 harbour/contrib/hbnf/doc/en/aavg.txt create mode 100644 harbour/contrib/hbnf/doc/en/acctadj.txt create mode 100644 harbour/contrib/hbnf/doc/en/acctmnth.txt create mode 100644 harbour/contrib/hbnf/doc/en/acctqtr.txt create mode 100644 harbour/contrib/hbnf/doc/en/acctweek.txt create mode 100644 harbour/contrib/hbnf/doc/en/acctyear.txt create mode 100644 harbour/contrib/hbnf/doc/en/adessort.txt create mode 100644 harbour/contrib/hbnf/doc/en/aemaxlen.txt create mode 100644 harbour/contrib/hbnf/doc/en/aeminlen.txt create mode 100644 harbour/contrib/hbnf/doc/en/alt.txt create mode 100644 harbour/contrib/hbnf/doc/en/amedian.txt create mode 100644 harbour/contrib/hbnf/doc/en/anomatch.txt create mode 100644 harbour/contrib/hbnf/doc/en/any2any.txt create mode 100644 harbour/contrib/hbnf/doc/en/aredit.txt create mode 100644 harbour/contrib/hbnf/doc/en/asum.txt create mode 100644 harbour/contrib/hbnf/doc/en/at2.txt create mode 100644 harbour/contrib/hbnf/doc/en/bitclr.txt create mode 100644 harbour/contrib/hbnf/doc/en/bitset.txt create mode 100644 harbour/contrib/hbnf/doc/en/blink.txt create mode 100644 harbour/contrib/hbnf/doc/en/byt2bit.txt create mode 100644 harbour/contrib/hbnf/doc/en/byt2hex.txt create mode 100644 harbour/contrib/hbnf/doc/en/byteand.txt create mode 100644 harbour/contrib/hbnf/doc/en/byteneg.txt create mode 100644 harbour/contrib/hbnf/doc/en/bytenot.txt create mode 100644 harbour/contrib/hbnf/doc/en/byteor.txt create mode 100644 harbour/contrib/hbnf/doc/en/bytexor.txt create mode 100644 harbour/contrib/hbnf/doc/en/calendar.txt create mode 100644 harbour/contrib/hbnf/doc/en/caplock.txt create mode 100644 harbour/contrib/hbnf/doc/en/chdir.txt create mode 100644 harbour/contrib/hbnf/doc/en/clrsel.txt create mode 100644 harbour/contrib/hbnf/doc/en/cntryset.txt create mode 100644 harbour/contrib/hbnf/doc/en/color2n.txt create mode 100644 harbour/contrib/hbnf/doc/en/ctrl.txt create mode 100644 harbour/contrib/hbnf/doc/en/d2e.txt create mode 100644 harbour/contrib/hbnf/doc/en/datecnfg.txt create mode 100644 harbour/contrib/hbnf/doc/en/dayofyr.txt create mode 100644 harbour/contrib/hbnf/doc/en/daytobow.txt create mode 100644 harbour/contrib/hbnf/doc/en/dectobin.txt create mode 100644 harbour/contrib/hbnf/doc/en/descendn.txt create mode 100644 harbour/contrib/hbnf/doc/en/dfile.txt create mode 100644 harbour/contrib/hbnf/doc/en/diskfunc.txt create mode 100644 harbour/contrib/hbnf/doc/en/dispc.txt create mode 100644 harbour/contrib/hbnf/doc/en/dispmsg.txt create mode 100644 harbour/contrib/hbnf/doc/en/dosver.txt create mode 100644 harbour/contrib/hbnf/doc/en/e2d.txt create mode 100644 harbour/contrib/hbnf/doc/en/easter.txt create mode 100644 harbour/contrib/hbnf/doc/en/elapmil.txt create mode 100644 harbour/contrib/hbnf/doc/en/elapsed.txt create mode 100644 harbour/contrib/hbnf/doc/en/eltime.txt create mode 100644 harbour/contrib/hbnf/doc/en/findith.txt create mode 100644 harbour/contrib/hbnf/doc/en/firstday.txt create mode 100644 harbour/contrib/hbnf/doc/en/floptst.txt create mode 100644 harbour/contrib/hbnf/doc/en/ftattr.txt create mode 100644 harbour/contrib/hbnf/doc/en/ftidle.txt create mode 100644 harbour/contrib/hbnf/doc/en/ftisprn.txt create mode 100644 harbour/contrib/hbnf/doc/en/ftround.txt create mode 100644 harbour/contrib/hbnf/doc/en/fttext.txt create mode 100644 harbour/contrib/hbnf/doc/en/gcd.txt create mode 100644 harbour/contrib/hbnf/doc/en/getenvrn.txt create mode 100644 harbour/contrib/hbnf/doc/en/hex2dec.txt create mode 100644 harbour/contrib/hbnf/doc/en/iamidle.txt create mode 100644 harbour/contrib/hbnf/doc/en/invclr.txt create mode 100644 harbour/contrib/hbnf/doc/en/isbit.txt create mode 100644 harbour/contrib/hbnf/doc/en/isbiton.txt create mode 100644 harbour/contrib/hbnf/doc/en/isshare.txt create mode 100644 harbour/contrib/hbnf/doc/en/kspeed.txt create mode 100644 harbour/contrib/hbnf/doc/en/lastday.txt create mode 100644 harbour/contrib/hbnf/doc/en/linked.txt create mode 100644 harbour/contrib/hbnf/doc/en/madd.txt create mode 100644 harbour/contrib/hbnf/doc/en/menu1.txt create mode 100644 harbour/contrib/hbnf/doc/en/menutonf.txt create mode 100644 harbour/contrib/hbnf/doc/en/metaph.txt create mode 100644 harbour/contrib/hbnf/doc/en/miltime.txt create mode 100644 harbour/contrib/hbnf/doc/en/min2dhm.txt create mode 100644 harbour/contrib/hbnf/doc/en/mkdir.txt create mode 100644 harbour/contrib/hbnf/doc/en/month.txt create mode 100644 harbour/contrib/hbnf/doc/en/mouse1.txt create mode 100644 harbour/contrib/hbnf/doc/en/mouse2.txt create mode 100644 harbour/contrib/hbnf/doc/en/n2color.txt create mode 100644 harbour/contrib/hbnf/doc/en/netpv.txt create mode 100644 harbour/contrib/hbnf/doc/en/nooccur.txt create mode 100644 harbour/contrib/hbnf/doc/en/ntow.txt create mode 100644 harbour/contrib/hbnf/doc/en/numlock.txt create mode 100644 harbour/contrib/hbnf/doc/en/nwlstat.txt create mode 100644 harbour/contrib/hbnf/doc/en/nwsem.txt create mode 100644 harbour/contrib/hbnf/doc/en/nwuid.txt create mode 100644 harbour/contrib/hbnf/doc/en/ontick.txt create mode 100644 harbour/contrib/hbnf/doc/en/origin.txt create mode 100644 harbour/contrib/hbnf/doc/en/page.txt create mode 100644 harbour/contrib/hbnf/doc/en/pchr.txt create mode 100644 harbour/contrib/hbnf/doc/en/peek.txt create mode 100644 harbour/contrib/hbnf/doc/en/pegs.txt create mode 100644 harbour/contrib/hbnf/doc/en/pending.txt create mode 100644 harbour/contrib/hbnf/doc/en/pickday.txt create mode 100644 harbour/contrib/hbnf/doc/en/poke.txt create mode 100644 harbour/contrib/hbnf/doc/en/popadder.txt create mode 100644 harbour/contrib/hbnf/doc/en/proper.txt create mode 100644 harbour/contrib/hbnf/doc/en/prtesc.txt create mode 100644 harbour/contrib/hbnf/doc/en/prtscr.txt create mode 100644 harbour/contrib/hbnf/doc/en/putkey.txt create mode 100644 harbour/contrib/hbnf/doc/en/pvid.txt create mode 100644 harbour/contrib/hbnf/doc/en/qtr.txt create mode 100644 harbour/contrib/hbnf/doc/en/rand1.txt create mode 100644 harbour/contrib/hbnf/doc/en/readme.txt create mode 100644 harbour/contrib/hbnf/doc/en/restsets.txt create mode 100644 harbour/contrib/hbnf/doc/en/rmdir.txt create mode 100644 harbour/contrib/hbnf/doc/en/savearr.txt create mode 100644 harbour/contrib/hbnf/doc/en/savesets.txt create mode 100644 harbour/contrib/hbnf/doc/en/scancode.txt create mode 100644 harbour/contrib/hbnf/doc/en/scregion.txt create mode 100644 harbour/contrib/hbnf/doc/en/setdate.txt create mode 100644 harbour/contrib/hbnf/doc/en/setkeys.txt create mode 100644 harbour/contrib/hbnf/doc/en/setlastk.txt create mode 100644 harbour/contrib/hbnf/doc/en/settime.txt create mode 100644 harbour/contrib/hbnf/doc/en/shift.txt create mode 100644 harbour/contrib/hbnf/doc/en/sinkey.txt create mode 100644 harbour/contrib/hbnf/doc/en/sleep.txt create mode 100644 harbour/contrib/hbnf/doc/en/sqzn.txt create mode 100644 harbour/contrib/hbnf/doc/en/stod.txt create mode 100644 harbour/contrib/hbnf/doc/en/sysmem.txt create mode 100644 harbour/contrib/hbnf/doc/en/tbwhile.txt create mode 100644 harbour/contrib/hbnf/doc/en/tempfile.txt create mode 100644 harbour/contrib/hbnf/doc/en/vertmenu.txt create mode 100644 harbour/contrib/hbnf/doc/en/vidcur.txt create mode 100644 harbour/contrib/hbnf/doc/en/vidmode.txt create mode 100644 harbour/contrib/hbnf/doc/en/wda.txt create mode 100644 harbour/contrib/hbnf/doc/en/week.txt create mode 100644 harbour/contrib/hbnf/doc/en/workdays.txt create mode 100644 harbour/contrib/hbnf/doc/en/woy.txt create mode 100644 harbour/contrib/hbnf/doc/en/xbox.txt create mode 100644 harbour/contrib/hbnf/doc/en/year.txt create mode 100644 harbour/tests/hbdocext.prg create mode 100644 harbour/tests/stripdoc.hbs diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0d8b43eb5f..a3818e7c32 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,302 @@ The license applies to all entries newer than 2009-04-28. */ +2010-07-14 14:41 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * include/hbextern.ch + * src/rtl/hbdoc.prg + + Added __HBDOC_FROMSOURCE( ) -> + + + tests/stripdoc.hbs + + Strips NFDOC/HBDOC from .c/.prg sources. + + + tests/hbdocext.prg + + Extracts NFDOC/HBDOC from source code. + + * contrib/hbct/bitnum.c + * contrib/hbct/strdiff.c + * contrib/hbct/token2.c + * contrib/hbct/charlist.c + * contrib/hbct/ctnet.c + * contrib/hbct/charonly.c + * contrib/hbct/atadjust.c + * contrib/hbct/ctmath.c + * contrib/hbct/ctset.c + * contrib/hbct/ctwin.c + + contrib/hbct/doc + + contrib/hbct/doc/en + + contrib/hbct/doc/en/strdiff.txt + + contrib/hbct/doc/en/token1.txt + + contrib/hbct/doc/en/token2.txt + + contrib/hbct/doc/en/keyset.txt + + contrib/hbct/doc/en/ct.txt + + contrib/hbct/doc/en/charmirr.txt + + contrib/hbct/doc/en/ctc.txt + + contrib/hbct/doc/en/charlist.txt + + contrib/hbct/doc/en/charlihb.txt + + contrib/hbct/doc/en/relation.txt + + contrib/hbct/doc/en/atadjust.txt + + contrib/hbct/doc/en/charonly.txt + + contrib/hbct/doc/en/ctmath.txt + + contrib/hbct/doc/en/atnum.txt + + contrib/hbct/doc/en/numconv.txt + + contrib/hbct/doc/en/charsort.txt + + contrib/hbct/doc/en/count.txt + + contrib/hbct/doc/en/posdiff.txt + + contrib/hbct/doc/en/ftoc.txt + + contrib/hbct/doc/en/charmix.txt + + contrib/hbct/doc/en/charevod.txt + + contrib/hbct/doc/en/finan.txt + + contrib/hbct/doc/en/range.txt + + contrib/hbct/doc/en/wordrepl.txt + + contrib/hbct/doc/en/charrepl.txt + + contrib/hbct/doc/en/exponent.txt + + contrib/hbct/doc/en/addascii.txt + + contrib/hbct/doc/en/ctmath2.txt + + contrib/hbct/doc/en/strswap.txt + + contrib/hbct/doc/en/trig.txt + + contrib/hbct/doc/en/tab.txt + + contrib/hbct/doc/en/video.txt + + contrib/hbct/doc/en/charswap.txt + + contrib/hbct/doc/en/dattime2.txt + + contrib/hbct/doc/en/dattime3.txt + + contrib/hbct/doc/en/replace.txt + + contrib/hbct/doc/en/charop.txt + + contrib/hbct/doc/en/misc1.txt + + contrib/hbct/doc/en/asciisum.txt + + contrib/hbct/doc/en/color.txt + + contrib/hbct/doc/en/charone.txt + + contrib/hbct/doc/en/num1.txt + + contrib/hbct/doc/en/pos1.txt + + contrib/hbct/doc/en/pos2.txt + + contrib/hbct/doc/en/numat.txt + + contrib/hbct/doc/en/charophb.txt + + contrib/hbct/doc/en/atrepl.txt + + contrib/hbct/doc/en/ascpos.txt + + contrib/hbct/doc/en/wordtoch.txt + + contrib/hbct/doc/en/ctpad.txt + + contrib/hbct/doc/en/datetime.txt + + contrib/hbct/doc/en/print.txt + + contrib/hbct/doc/en/justify.txt + + contrib/hbct/doc/en/remove.txt + + contrib/hbct/doc/en/ctstr.txt + + contrib/hbct/doc/en/screen1.txt + + Moved embedded docs to separate files. + + * contrib/hbct/charsort.c + * contrib/hbct/ftoc.c + * contrib/hbct/charmix.c + * contrib/hbct/charevod.c + * contrib/hbct/wordrepl.c + * contrib/hbct/exponent.c + * contrib/hbct/charrepl.c + * contrib/hbct/files.c + * contrib/hbct/strswap.c + * contrib/hbct/trig.c + * contrib/hbct/video.c + * contrib/hbct/charswap.c + * contrib/hbct/dattime3.c + * contrib/hbct/charop.c + * contrib/hbct/ct.prg + * contrib/hbct/cursor.c + * contrib/hbct/misc2.c + * contrib/hbct/color.c + * contrib/hbct/charone.c + * contrib/hbct/num1.c + * contrib/hbct/pos1.c + * contrib/hbct/ctcom1.c + * contrib/hbct/charophb.c + * contrib/hbct/ascpos.c + * contrib/hbct/numconv.prg + * contrib/hbct/ctstr.c + * contrib/hbct/screen1.c + * contrib/hbct/token1.c + * contrib/hbct/keyset.c + * contrib/hbct/charmirr.c + * contrib/hbct/ctc.c + * contrib/hbct/ctwfunc.c + * contrib/hbct/charlihb.c + * contrib/hbct/relation.c + * contrib/hbct/setlast.c + * contrib/hbct/atnum.c + * contrib/hbct/count.c + * contrib/hbct/disk.c + * contrib/hbct/posdiff.c + * contrib/hbct/finan.c + * contrib/hbct/range.c + * contrib/hbct/addascii.c + * contrib/hbct/ctmath2.c + * contrib/hbct/tab.c + * contrib/hbct/dattime2.c + * contrib/hbct/replace.c + * contrib/hbct/misc1.c + * contrib/hbct/asciisum.c + * contrib/hbct/pos2.c + * contrib/hbct/numat.c + * contrib/hbct/fcopy.prg + * contrib/hbct/atrepl.c + * contrib/hbct/ctcom2.c + * contrib/hbct/wordtoch.c + * contrib/hbct/ctpad.c + * contrib/hbct/datetime.c + * contrib/hbct/print.c + * contrib/hbct/justify.c + * contrib/hbct/remove.c + - Stripped NFDOC/HBDOC from source code. + + + contrib/hbnf/doc + + contrib/hbnf/doc/en + + contrib/hbnf/doc/en/acctmnth.txt + + contrib/hbnf/doc/en/savearr.txt + + contrib/hbnf/doc/en/rand1.txt + + contrib/hbnf/doc/en/madd.txt + + contrib/hbnf/doc/en/dispmsg.txt + + contrib/hbnf/doc/en/numlock.txt + + contrib/hbnf/doc/en/mouse1.txt + + contrib/hbnf/doc/en/settime.txt + + contrib/hbnf/doc/en/restsets.txt + + contrib/hbnf/doc/en/page.txt + + contrib/hbnf/doc/en/prtscr.txt + + contrib/hbnf/doc/en/color2n.txt + + contrib/hbnf/doc/en/byt2bit.txt + + contrib/hbnf/doc/en/month.txt + + contrib/hbnf/doc/en/byt2hex.txt + + contrib/hbnf/doc/en/findith.txt + + contrib/hbnf/doc/en/at2.txt + + contrib/hbnf/doc/en/acctweek.txt + + contrib/hbnf/doc/en/gcd.txt + + contrib/hbnf/doc/en/poke.txt + + contrib/hbnf/doc/en/pegs.txt + + contrib/hbnf/doc/en/min2dhm.txt + + contrib/hbnf/doc/en/acctqtr.txt + + contrib/hbnf/doc/en/dosver.txt + + contrib/hbnf/doc/en/mkdir.txt + + contrib/hbnf/doc/en/nooccur.txt + + contrib/hbnf/doc/en/dayofyr.txt + + contrib/hbnf/doc/en/metaph.txt + + contrib/hbnf/doc/en/menu1.txt + + contrib/hbnf/doc/en/byteand.txt + + contrib/hbnf/doc/en/setlastk.txt + + contrib/hbnf/doc/en/sqzn.txt + + contrib/hbnf/doc/en/bytexor.txt + + contrib/hbnf/doc/en/workdays.txt + + contrib/hbnf/doc/en/byteor.txt + + contrib/hbnf/doc/en/asum.txt + + contrib/hbnf/doc/en/sleep.txt + + contrib/hbnf/doc/en/wda.txt + + contrib/hbnf/doc/en/aavg.txt + + contrib/hbnf/doc/en/woy.txt + + contrib/hbnf/doc/en/alt.txt + + contrib/hbnf/doc/en/any2any.txt + + contrib/hbnf/doc/en/adessort.txt + + contrib/hbnf/doc/en/setdate.txt + + contrib/hbnf/doc/en/netpv.txt + + contrib/hbnf/doc/en/amedian.txt + + contrib/hbnf/doc/en/blink.txt + + contrib/hbnf/doc/en/ctrl.txt + + contrib/hbnf/doc/en/vertmenu.txt + + contrib/hbnf/doc/en/qtr.txt + + contrib/hbnf/doc/en/linked.txt + + contrib/hbnf/doc/en/aredit.txt + + contrib/hbnf/doc/en/shift.txt + + contrib/hbnf/doc/en/fttext.txt + + contrib/hbnf/doc/en/xbox.txt + + contrib/hbnf/doc/en/ftround.txt + + contrib/hbnf/doc/en/hex2dec.txt + + contrib/hbnf/doc/en/nwuid.txt + + contrib/hbnf/doc/en/dectobin.txt + + contrib/hbnf/doc/en/chdir.txt + + contrib/hbnf/doc/en/bitset.txt + + contrib/hbnf/doc/en/aemaxlen.txt + + contrib/hbnf/doc/en/nwlstat.txt + + contrib/hbnf/doc/en/invclr.txt + + contrib/hbnf/doc/en/popadder.txt + + contrib/hbnf/doc/en/lastday.txt + + contrib/hbnf/doc/en/dispc.txt + + contrib/hbnf/doc/en/ftattr.txt + + contrib/hbnf/doc/en/tempfile.txt + + contrib/hbnf/doc/en/diskfunc.txt + + contrib/hbnf/doc/en/stod.txt + + contrib/hbnf/doc/en/scregion.txt + + contrib/hbnf/doc/en/mouse2.txt + + contrib/hbnf/doc/en/d2e.txt + + contrib/hbnf/doc/en/kspeed.txt + + contrib/hbnf/doc/en/descendn.txt + + contrib/hbnf/doc/en/pickday.txt + + contrib/hbnf/doc/en/firstday.txt + + contrib/hbnf/doc/en/daytobow.txt + + contrib/hbnf/doc/en/getenvrn.txt + + contrib/hbnf/doc/en/anomatch.txt + + contrib/hbnf/doc/en/menutonf.txt + + contrib/hbnf/doc/en/pvid.txt + + contrib/hbnf/doc/en/proper.txt + + contrib/hbnf/doc/en/isbiton.txt + + contrib/hbnf/doc/en/isbit.txt + + contrib/hbnf/doc/en/cntryset.txt + + contrib/hbnf/doc/en/datecnfg.txt + + contrib/hbnf/doc/en/caplock.txt + + contrib/hbnf/doc/en/easter.txt + + contrib/hbnf/doc/en/bytenot.txt + + contrib/hbnf/doc/en/ftisprn.txt + + contrib/hbnf/doc/en/setkeys.txt + + contrib/hbnf/doc/en/ntow.txt + + contrib/hbnf/doc/en/aeminlen.txt + + contrib/hbnf/doc/en/floptst.txt + + contrib/hbnf/doc/en/pchr.txt + + contrib/hbnf/doc/en/savesets.txt + + contrib/hbnf/doc/en/tbwhile.txt + + contrib/hbnf/doc/en/year.txt + + contrib/hbnf/doc/en/calendar.txt + + contrib/hbnf/doc/en/e2d.txt + + contrib/hbnf/doc/en/sysmem.txt + + contrib/hbnf/doc/en/elapsed.txt + + contrib/hbnf/doc/en/n2color.txt + + contrib/hbnf/doc/en/bitclr.txt + + contrib/hbnf/doc/en/eltime.txt + + contrib/hbnf/doc/en/putkey.txt + + contrib/hbnf/doc/en/aading.txt + + contrib/hbnf/doc/en/dfile.txt + + contrib/hbnf/doc/en/elapmil.txt + + contrib/hbnf/doc/en/pending.txt + + contrib/hbnf/doc/en/peek.txt + + contrib/hbnf/doc/en/clrsel.txt + + contrib/hbnf/doc/en/ontick.txt + + contrib/hbnf/doc/en/acctyear.txt + + contrib/hbnf/doc/en/byteneg.txt + + contrib/hbnf/doc/en/isshare.txt + + contrib/hbnf/doc/en/sinkey.txt + + contrib/hbnf/doc/en/iamidle.txt + + contrib/hbnf/doc/en/ftidle.txt + + contrib/hbnf/doc/en/rmdir.txt + + contrib/hbnf/doc/en/scancode.txt + + contrib/hbnf/doc/en/vidmode.txt + + contrib/hbnf/doc/en/origin.txt + + contrib/hbnf/doc/en/nwsem.txt + + contrib/hbnf/doc/en/acctadj.txt + + contrib/hbnf/doc/en/week.txt + + contrib/hbnf/doc/en/vidcur.txt + + contrib/hbnf/doc/en/readme.txt + + contrib/hbnf/doc/en/prtesc.txt + + contrib/hbnf/doc/en/miltime.txt + + Moved embedded docs to separate files. + + * contrib/hbnf/kspeed.c + * contrib/hbnf/iamidle.c + * contrib/hbnf/miltime.prg + * contrib/hbnf/mouse1.prg + * contrib/hbnf/setkeys.c + * contrib/hbnf/origin.c + * contrib/hbnf/chdir.c + * contrib/hbnf/hex2dec.prg + * contrib/hbnf/mouse2.prg + * contrib/hbnf/ftisprn.c + * contrib/hbnf/putkey.c + * contrib/hbnf/floptst.prg + * contrib/hbnf/mkdir.c + * contrib/hbnf/rmdir.c + * contrib/hbnf/setlastk.c + ! Fixed NFDOC formatting. + ; TODO: Strip docs. + 2010-07-14 12:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbct/screen2.c * contrib/hbct/token2.c diff --git a/harbour/contrib/hbct/addascii.c b/harbour/contrib/hbct/addascii.c index ec90f194f1..1fe66f88f1 100644 --- a/harbour/contrib/hbct/addascii.c +++ b/harbour/contrib/hbct/addascii.c @@ -52,74 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * ADDASCII() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Add an integer value to an ascii value of a string - * $SYNTAX$ - * ADDASCII (<[@]cString>, , [], []) --> cString - * $ARGUMENTS$ - * <[@]cString> is the string that should be edited - * is a integer value that should be added to the - * ASCII value of the character at the th position - * [] is the position of the character that should be edited. - * If not supplied, the last character of <[@]cString> is - * edited. - * [] NEW: is set to .T. if the substring from position 1 to - * position should be treated as an integer - * written to the base 256. Thus, the addition of - * can affect to whole substring (see EXAMPLES). - * Default is .F., the original behaviour of this function. - * $RETURNS$ - * The edited string is returned. The return value can be suppressed by - * using the CSETREF() function. The string must then be passed by - * reference [@]. - * $DESCRIPTION$ - * ADDASCII() can be used to add or subtract integer values from - * ASCII values in a string. The new parameter allows - * to treat a string as an integer written to the base 256. Since - * is limited to a signed long, only substrings 4 characters - * long can be affected by one ADDASCII() call. - * If the length of <[@]cString> is smaller than , the - * string remains unchanged. The same happens, if uninterpretable - * parameters are passed to this function. - * $EXAMPLES$ - * // Add 32 to the ASCII value of the character at the last position - * // in the string - * - * ? addascii ("SmitH", 32) --> "Smith" - * $TESTS$ - * addascii ("0000", 1, 1) == "1000" - * addascii ("0000", 1) == "0001" - * addascii ("AAAA", -255, 1) == "BAAA" - * addascii ("AAAA", -255) == "AAAB" - * addascii ("AAAA", 1, 2, .T.) == "ABAA" - * addascii ("AAAA", 257, 2, .T.) == "BBAA" - * addascii ("AAAA", 257, 2, .F.) == "ABAA" - * addascii ("AAAA", 258,, .T.) == "AABC" - * addascii ("ABBA", -257, 3, .T.) == "AAAA" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * ADDASCII() is compatible with CT3's ADDASCII(). - * A new, 4th, parameter has been added who defaults to the original - * behaviour if omitted. - * $PLATFORMS$ - * All - * $FILES$ - * Source is addascii.c, library is ct3. - * $SEEALSO$ - * CSETREF() - * $END$ - */ - HB_FUNC( ADDASCII ) { int iNoRet; diff --git a/harbour/contrib/hbct/asciisum.c b/harbour/contrib/hbct/asciisum.c index b2f323be16..77a167c769 100644 --- a/harbour/contrib/hbct/asciisum.c +++ b/harbour/contrib/hbct/asciisum.c @@ -52,48 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * ASCIISUM() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * calculate the sum of the ASCII values of the characters in a string - * $SYNTAX$ - * ASCIISUM () --> nAsciiSum - * $ARGUMENTS$ - * the string to be processed - * $RETURNS$ - * sum of the ASCII values in - * $DESCRIPTION$ - * The ASCIISUM() function sums up the ASCII values of the characters - * in . Be aware that the function is not position sensitive, - * i.e. a change of position of a certain character in the string does - * not change the ascii sum. - * $EXAMPLES$ - * ? asciisum ("ABC") --> 197 - * ? asciisum ("ACB") --> 197 - * $TESTS$ - * asciisum (replicate ("A", 10000)) == 650000 - * asciisum ("0123456789") == 525 - * asciisum (nil) == 0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * ASCIISUM() is compatible with CT3's ASCIISUM(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is asciisum.c, library is ct3. - * $SEEALSO$ - * CHECKSUM() - * $END$ - */ - HB_FUNC( ASCIISUM ) { if( HB_ISCHAR( 1 ) ) diff --git a/harbour/contrib/hbct/ascpos.c b/harbour/contrib/hbct/ascpos.c index 9810693b8d..1ca96a9b05 100644 --- a/harbour/contrib/hbct/ascpos.c +++ b/harbour/contrib/hbct/ascpos.c @@ -54,10 +54,8 @@ * */ - #include "ct.h" - /* defines */ #define DO_ASCPOS_ASCPOS 0 #define DO_ASCPOS_VALPOS 1 @@ -120,95 +118,11 @@ static void do_ascpos( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * ASCPOS() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * ASCII value of a character at a certain position - * $SYNTAX$ - * ASCPOS (, []) --> nAsciiValue - * $ARGUMENTS$ - * is the processed string - * [] is an optional position within - * Default: last position in - * $RETURNS$ - * the ASCII value of the character at the specified - * position - * $DESCRIPTION$ - * The ASCPOS() function returns the ASCII value of the character that - * can be found at the position in . If - * is larger than the length of , 0 is returned. - * $EXAMPLES$ - * ? ascpos ("0123456789") --> 57 - * ? ascpos ("0123456789",1) --> 48 - * $TESTS$ - * ascpos ("0123456789") == 57 - * ascpos ("0123456789",1) == 48 - * ascpos ("0123456789",11) == 0 // to large ! - * $STATUS$ - * Ready - * $COMPLIANCE$ - * ASCPOS() is compatible with CT3's ASCPOS(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is asciisum.c, library is libct. - * $SEEALSO$ - * VALPOS() - * $END$ - */ - HB_FUNC( ASCPOS ) { do_ascpos( DO_ASCPOS_ASCPOS ); } - -/* $DOC$ - * $FUNCNAME$ - * VALPOS() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Numerical value of a character at a certain position - * $SYNTAX$ - * VALPOS (, []) --> nDigitValue - * $ARGUMENTS$ - * is the processed string - * [] is an optional position within - * Default: last position in - * $RETURNS$ - * the numerical value of the character at the specified - * position - * $DESCRIPTION$ - * The VALPOS() function returns the numerical value of the character that - * can be found at the position in . If no digit - * can be found at this position or if - * is larger than the length of , 0 is returned. - * $EXAMPLES$ - * ? valpos ("1234x56789") --> 9 - * ? valpos ("1234x56789",1) --> 1 - * $TESTS$ - * valpos ("1234x56789") == 9 - * valpos ("1234x56789",1) == 1 - * valpos ("1234x56789",11) == 0 // to large ! - * valpos ("1234x56789",5) == 0 // "x" is not a digit ! - * $STATUS$ - * Ready - * $COMPLIANCE$ - * VALPOS() is compatible with CT3's VALPOS(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is asciisum.c, library is libct. - * $SEEALSO$ - * ASCPOS() - * $END$ - */ - HB_FUNC( VALPOS ) { do_ascpos( DO_ASCPOS_VALPOS ); diff --git a/harbour/contrib/hbct/atadjust.c b/harbour/contrib/hbct/atadjust.c index e89385b3b6..f0e621f1c7 100644 --- a/harbour/contrib/hbct/atadjust.c +++ b/harbour/contrib/hbct/atadjust.c @@ -52,52 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * ATADJUST() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Adjusts a sequence within a string to a specified position - * $SYNTAX$ - * ATADJUST (, , , - * [], [], - * []) -> cString - * $ARGUMENTS$ - * is the sequence to be adjusted within - * is the string that contains - * specifies the position to that - * will be adjusted - * [] specifies which occurence of - * in is to be adjusted - * Default: last occurence - * [] specifies how many characters should be omitted - * in the scan - * [] specifies the character that is used for the - * adjustment - * $RETURNS$ - * cString the changed string - * $DESCRIPTION$ - * - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * ATADJUST() works like CT3's ATADJUST() - * $PLATFORMS$ - * All - * $FILES$ - * Source is atadjust.c, library is ct3. - * $SEEALSO$ - * SETATLIKE(),CSETATMUPA() - * $END$ - */ - HB_FUNC( ATADJUST ) { if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) && HB_ISNUM( 3 ) ) diff --git a/harbour/contrib/hbct/atnum.c b/harbour/contrib/hbct/atnum.c index 05a34c9a0c..09d9f5346b 100644 --- a/harbour/contrib/hbct/atnum.c +++ b/harbour/contrib/hbct/atnum.c @@ -310,186 +310,16 @@ static void do_atnum( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * AFTERATNUM() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Returns string portion after nth occurence of substring - * $SYNTAX$ - * AFTERATNUM (, , [], - * [] ) --> cRestString - * $ARGUMENTS$ - * is the substring scanned for - * is the scanned string - * [] determines how many occurences are of - * in are searched - * Default: search last occurence - * [] determines how many character from the start - * should be ignored in the search - * Default: 0 - * $RETURNS$ - * the portion of after the th - * occurence of in - * If such a rest does not exist, an empty string - * is returned. - * $DESCRIPTION$ - * This function scans for . After the - * th match (or the last one, depending on the value of - * ) has been found, the portion of - * after that match will be returned. If there aren't enough - * matches or the last match is identical to the end of , an - * empty string will be returned. - * After a match has been found, the function continues to scan after - * that match if the CSETATMUPA() switch is turned off, with the - * second character of the matched substring otherwise. - * The function will also consider the settings of SETATLIKE(). - * $EXAMPLES$ - * ? AFTERATNUM ("!", "What is the answer ? 4 ! 5 !") -> "" - * ? AFTERATNUM ("!", "What is the answer ? 4 ! 5 ?") -> " 5 ?" - * - * $TESTS$ - * AFTERATNUM ("..", "..This..is..a..test!") == "test!" - * AFTERATNUM ("..", "..This..is..a..test!", 2) == "is..a..test!" - * AFTERATNUM ("..", "..This..is..a..test!", 2, 2) == "a..test!" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * AFTERATNUM() is compatible with CT3's AFTERATNUM(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is atnum.c, library is libct. - * $SEEALSO$ - * ATNUM(),BEFORATNUM(),CSETATMUPA(),SETATLIKE() - * $END$ - */ - HB_FUNC( AFTERATNUM ) { do_atnum( DO_ATNUM_AFTERATNUM ); } - -/* $DOC$ - * $FUNCNAME$ - * BEFORATNUM() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Returns string portion before nth occurence of substring - * $SYNTAX$ - * BEFORATNUM (, , [], - * [] ) --> cRestString - * $ARGUMENTS$ - * is the substring scanned for - * is the scanned string - * [] determines how many occurences are of - * in are searched - * Default: search last occurence - * [] determines how many character from the start - * should be ignored in the search - * Default: 0 - * $RETURNS$ - * the portion of before the th - * occurence of in - * If such a string does not exist, an empty string - * is returned. - * $DESCRIPTION$ - * This function scans for . After the - * th match (or the last one, depending on the value of - * ) has been found, the portion of - * before that match will be returned. If there aren't enough - * matches or the last match is identical to the start of - * (i.e. the last match is the first match), an empty string will be returned. - * After a match has been found, the function continues to scan after - * that match if the CSETATMUPA() switch is turned off, with the - * second character of the matched substring otherwise. - * The function will also consider the settings of SETATLIKE(). - * $EXAMPLES$ - * ? BEFORATNUM ("!", "What is the answer ? 4 ! 5 !") -> "What is the answer ? 4 ! 5 " - * ? BEFORATNUM ("!", "What is the answer ? 4 ! 5 ?") -> "What is the answer ? 4 " - * - * $TESTS$ - * BEFORATNUM ("..", "..This..is..a..test!") == "..This..is..a" - * BEFORATNUM ("..", "..This..is..a..test!", 2) == "..This" - * BEFORATNUM ("..", "..This..is..a..test!", 2, 2) == "..This..is" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * BEFORATNUM() is compatible with CT3's BEFORATNUM(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is atnum.c, library is ct3. - * $SEEALSO$ - * ATNUM() AFTERATNUM() CSETATMUPA() SETATLIKE() - * $END$ - */ - HB_FUNC( BEFORATNUM ) { do_atnum( DO_ATNUM_BEFORATNUM ); } - -/* $DOC$ - * $FUNCNAME$ - * ATNUM() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Returns the start position of the nth occurence of a substring in a string - * $SYNTAX$ - * ATNUM (, , [], - * [] ) --> nPosition - * $ARGUMENTS$ - * is the substring scanned for - * is the scanned string - * [] determines how many occurences are of - * in are searched - * Default: search last occurence - * [] determines how many character from the start - * should be ignored in the search - * Default: 0 - * $RETURNS$ - * the position of the th - * occurence of in . - * If such an occurence does not exist, 0 - * is returned. - * $DESCRIPTION$ - * This function scans for . After the - * th match (or the last one, depending on the value of - * ) has been found, the position of - * that match will be returned. If there aren't enough - * matches or there is no last match, 0 will be returned. - * After a match has been found, the function continues to scan after - * that match if the CSETATMUPA() switch is turned off, with the - * second character of the matched substring otherwise. - * The function will also consider the settings of SETATLIKE(). - * $EXAMPLES$ - * ? ATNUM ("!", "What is the answer ? 4 ! 5 !") -> 28 - * ? ATNUM ("!", "What is the answer ? 4 ! 5 ?") -> 24 - * - * $TESTS$ - * ATNUM ("..", "..This..is..a..test!") == 14 - * ATNUM ("..", "..This..is..a..test!", 2) == 7 - * ATNUM ("..", "..This..is..a..test!", 2, 2) == 11 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * ATNUM() is compatible with CT3's ATNUM(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is atnum.c, library is libct. - * $SEEALSO$ - * ATNUM() AFTERATNUM() CSETATMUPA() SETATLIKE() - * $END$ - */ - HB_FUNC( ATNUM ) { do_atnum( DO_ATNUM_ATNUM ); diff --git a/harbour/contrib/hbct/atrepl.c b/harbour/contrib/hbct/atrepl.c index 6df7b24cf4..73b2943f58 100644 --- a/harbour/contrib/hbct/atrepl.c +++ b/harbour/contrib/hbct/atrepl.c @@ -52,75 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * ATREPL() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Search and replace sequences in a string - * $SYNTAX$ - * ATREPL (, , , [], - * [], []) --> cString - * $ARGUMENTS$ - * is the substring searched for in - * is the processed string - * is the replacement for sequences found - * [] specifies the number of replacements - * Default: last occurence - * [] if set to .T., only the th sequence - * of will be replaced, else - * all sequences will be replaced. - * Default: .F. - * []) specifies how many characters in from - * the beginning should be ignored by the function - * Default: 0 - * $RETURNS$ - * - * $DESCRIPTION$ - * The ATREPL() function searches and replaces sequences in a string. - * First, the function ignores the first characters of . - * Then, if is set to .T., it searches for the th - * occurence of in . If successful, the - * sequence will be replaced with . - * If is set to .F., the same search is performed, but EVERY - * occurence of till the th (inclusive) will - * be replaced with . Note that, in this case, - * the replacements are performed even if the th occurence - * does not exist. - * By using the CSETATMUPA() switch you can decide whether the - * function restarts searching after a found sequence of after - * the first character of that sequence. - * The function allows the use of wildcards in - * and looks for the settings of SETATLIKE(). - * $EXAMPLES$ - * ? ATREPL("ABC", "ABCDABCDABC", "xx") --> "xxDxxDxx" - * ? ATREPL("ABC", "ABCDABC", "ZYXW") --> "ZYXWDZYXW" - * ? ATREPL("ABC", "ABCDABCDABC", "xx", 2) --> "xxDxxDABC" - * ? ATREPL("ABC", "ABCDABCDABC", "xx", 2, .T.) --> "ABCDxxDABC" - * $TESTS$ - * ATREPL("ABC", "ABCDABCDABC", "xx") == "xxDxxDxx" - * ATREPL("ABC", "ABCDABC", "ZYXW") == "ZYXWDZYXW" - * ATREPL("ABC", "ABCDABCDABC", "xx", 2) == "xxDxxDABC" - * ATREPL("ABC", "ABCDABCDABC", "xx", 2, .T.) == "ABCDxxDABC" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * ATREPL() is compatible with CT3's ATREPL(). - * Note the new, 6th parameter ! - * $PLATFORMS$ - * All - * $FILES$ - * Source is atrepl.c, library is ct3. - * $SEEALSO$ - * CSETATMUPA() SETATLIKE() - * $END$ - */ - HB_FUNC( ATREPL ) { if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) ) diff --git a/harbour/contrib/hbct/bitnum.c b/harbour/contrib/hbct/bitnum.c index c27d9897cf..358718469b 100644 --- a/harbour/contrib/hbct/bitnum.c +++ b/harbour/contrib/hbct/bitnum.c @@ -53,7 +53,6 @@ * */ - #include "hbapi.h" static HB_BOOL __numParam( int iParam, HB_MAXINT * plNum ) @@ -196,7 +195,6 @@ HB_FUNC( NUMROL ) hb_retnint( lValue ); } - HB_FUNC( NUMMIRR ) { HB_MAXINT lValue; diff --git a/harbour/contrib/hbct/charevod.c b/harbour/contrib/hbct/charevod.c index 1c9627089f..a94c0521b8 100644 --- a/harbour/contrib/hbct/charevod.c +++ b/harbour/contrib/hbct/charevod.c @@ -127,84 +127,11 @@ static void do_charevod( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * CHAREVEN() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Returns the characters on the even positions in a string - * $SYNTAX$ - * CHAREVEN () --> cEvenString - * $ARGUMENTS$ - * processed string - * $RETURNS$ - * a string containing all character from even positions - * in - * $DESCRIPTION$ - * The CHAREVEN() function looks for the characters on the even positions - * in a given string, collects them and returns them as a string. - * $EXAMPLES$ - * ? CHAREVEN (" H E L L O !") -> "HELLO!" - * $TESTS$ - * CHAREVEN (" 1 2 3 4 5") == "12345" - * CHAREVEN (" 1 2 3 4 ") == "1234" - * CHAREVEN (" ") == "" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHAREVEN() is compatible with CT3's CHAREVEN(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charevod.c, library is ct3. - * $SEEALSO$ - * CHARODD() CHARMIX() - * $END$ - */ - HB_FUNC( CHAREVEN ) { do_charevod( DO_CHAREVOD_CHAREVEN ); } - -/* $DOC$ - * $FUNCNAME$ - * CHARODD() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Returns the characters on the odd positions in a string - * $SYNTAX$ - * CHARODD () --> cOddString - * $ARGUMENTS$ - * processed string - * $RETURNS$ - * a string containing all character from odd positions - * in - * $DESCRIPTION$ - * The CHARODD() function looks for the characters on the odd positions - * in a given string, collects them and returns them as a string. - * $EXAMPLES$ - * ? CHARODD ("H E L L O ! ") -> "HELLO!" - * $TESTS$ - * CHARODD ("1A2B3C4D5E") == "12345" - * CHARODD ("1A2B3C4D5") == "12345" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARODD() is compatible with CT3's CHARODD(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charevod.c, library is ct3. - * $SEEALSO$ - * CHAREVEN() CHARMIX() - * $END$ - */ - HB_FUNC( CHARODD ) { do_charevod( DO_CHAREVOD_CHARODD ); diff --git a/harbour/contrib/hbct/charlihb.c b/harbour/contrib/hbct/charlihb.c index 6b8988fc3d..6a80698a11 100644 --- a/harbour/contrib/hbct/charlihb.c +++ b/harbour/contrib/hbct/charlihb.c @@ -56,89 +56,11 @@ #include "ct.h" -/* $DOC$ - * $FUNCNAME$ - * CHARSLIST() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Generates a sorted list of all characters in a string - * $SYNTAX$ - * CHARSLIST ([]) -> cSortedCharacterList - * $ARGUMENTS$ - * [] is the string for whom the function generates a - * sorted list of all characters - * Default: "" (empty string) - * $RETURNS$ - * a sorted list of the characters in - * $DESCRIPTION$ - * The CHARLIST() function generates a sorted list of those characters that - * are contained in . This list can contain each character - * only once, so that its maximum length is 256. The function - * gives the same result as CHARSORT(CHARLIST()) - * $EXAMPLES$ - * ? charslist ("Hello World !") --> " !HWdelor" - * $TESTS$ - * charslist ("Hello World !") == " !HWdelor" - * charslist ("Hello World !") == charsort (charlist ("Hello World !")) - * charslist (nil) == "" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARSLIST() is only available in Harbour's CT3 library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is charlist.c, library is libct. - * $SEEALSO$ - * CHARNOLIST(),CHARLIST(),CHARHIST() - * $END$ - */ - HB_FUNC( CHARSLIST ) { ct_charlist( CT_CHARLIST_CHARSLIST ); } -/* $DOC$ - * $FUNCNAME$ - * CHARHIST() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Generates a character histogram of a string - * $SYNTAX$ - * CHARHIST ([]) -> aCharacterCount - * $ARGUMENTS$ - * [] is the string for whom the function generates a - * character histogram - * Default: "" (empty string) - * $RETURNS$ - * an array with 256 elements where the nth element - * contains the count of character #(n-1) in cString - * $DESCRIPTION$ - * The CHARHIST() function generates a character histogram of those - * characters that are contained in . This histogram is stored - * in an 256-element array where the nth element contains the count - * of ASCII character #(n-1) in . - * $EXAMPLES$ - * ? charhist ("Hello World !")[109] --> 3 // chr(108)=="l" - * $TESTS$ - * charhist ("Hello World !")[109] == 3 - * eval ({||aeval (charhist ("Hello World !"),{|x|nTotal+=x}),nTotal==len("Hello World !")} - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARHIST() is only available in Harbour's CT3 library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is charlist.c, library is libct. - * $SEEALSO$ - * CHARLIST(),CHARNOLIST(),CHARSLIST() - * $END$ - */ - HB_FUNC( CHARHIST ) { ct_charlist( CT_CHARLIST_CHARHIST ); diff --git a/harbour/contrib/hbct/charlist.c b/harbour/contrib/hbct/charlist.c index 6722093697..edf8693ed0 100644 --- a/harbour/contrib/hbct/charlist.c +++ b/harbour/contrib/hbct/charlist.c @@ -134,89 +134,11 @@ void ct_charlist( int iMode ) } } - -/* $DOC$ - * $FUNCNAME$ - * CHARLIST() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Generates a list of all characters in a string - * $SYNTAX$ - * CHARLIST ([]) -> cCharacterList - * $ARGUMENTS$ - * [] is the string for whom the function generates a list - * of all characters - * Default: "" (empty string) - * $RETURNS$ - * a list of the characters in - * $DESCRIPTION$ - * The CHARLIST() function generates a list of those characters that - * are contained in . This list can contain each character - * only once, so that its maximum length is 256. The list lists those - * characters first that are occuring in first. - * $EXAMPLES$ - * ? charlist ("Hello World !") --> "Helo Wrd!" - * $TESTS$ - * charlist ("Hello World !") == "Helo Wrd!" - * charlist (nil) == "" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARLIST() is compatible with CT3's CHARLIST(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charlist.c, library is libct. - * $SEEALSO$ - * CHARNOLIST(),CHARSLIST(),CHARHIST() - * $END$ - */ - HB_FUNC( CHARLIST ) { ct_charlist( CT_CHARLIST_CHARLIST ); } - -/* $DOC$ - * $FUNCNAME$ - * CHARNOLIST() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Generates a list of all characters not contained in a string - * $SYNTAX$ - * CHARNOLIST ([]) -> cCharacterList - * $ARGUMENTS$ - * [] is the string for whom the function generates a list - * of all characters not contained in that string - * Default: "" (empty string) - * $RETURNS$ - * a list of the characters that are not contained in - * $DESCRIPTION$ - * The CHARNOLIST() function generates a list of those characters that - * are not contained in . This list can contain each character - * only once, so that its maximum length is 256. The list is alphabetically - * sorted. - * $EXAMPLES$ - * ? charnolist (charnolist ("Hello World !")) --> " !HWdelor" - * $TESTS$ - * charnolist (charnolist ("Hello World !")) == charslist ("Hello World !") - * charnolist (charnolist (nil)) == "" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARNOLIST() is compatible with CT3's CHARNOLIST(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charlist.c, library is libct. - * $SEEALSO$ - * CHARLIST(),CHARSLIST(),CHARHIST() - * $END$ - */ - HB_FUNC( CHARNOLIST ) { ct_charlist( CT_CHARLIST_CHARNOLIST ); diff --git a/harbour/contrib/hbct/charmirr.c b/harbour/contrib/hbct/charmirr.c index ac4c97f4bb..37becadd94 100644 --- a/harbour/contrib/hbct/charmirr.c +++ b/harbour/contrib/hbct/charmirr.c @@ -52,55 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * CHARMIRR() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Mirror a string - * $SYNTAX$ - * CHARMIRR (<[@]cString>, []) -> cMirroredString - * $ARGUMENTS$ - * <[@]cString> is the string that should be mirrored - * [] if set to .T., spaces at the end of - * will not be mirrored but kept at the end - * Default: .F., mirror the whole string - * $RETURNS$ - * the mirrored string - * $DESCRIPTION$ - * The CHARMIRR() function mirrors a string, i.e. the first character - * will be put at the end, the second at the last but one position etc.. - * One can use this function for index searches, but then, the spaces - * at the end of the string should not be mirrored. - * One can omit the return value of the function by setting the CSETREF() - * switch to .T., but must then be passed by reference to get - * a result. - * $EXAMPLES$ - * ? charmirr ("racecar") // "racecar" - * ? charmirr ("racecar ", .T.) // "racecar " - * ? charmirr ("racecar ", .F.) // " racecar" - * $TESTS$ - * charmirr ("racecar") == "racecar" - * charmirr ("racecar ", .T.) == "racecar " - * charmirr ("racecar ", .F.) == " racecar" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARMIRR() is compatible with CT3's CHARMIRR(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charmirr.c, library is ct3. - * $SEEALSO$ - * CSETREF() - * $END$ - */ - HB_FUNC( CHARMIRR ) { int iNoRet; diff --git a/harbour/contrib/hbct/charmix.c b/harbour/contrib/hbct/charmix.c index 57f6737d23..513b282a6a 100644 --- a/harbour/contrib/hbct/charmix.c +++ b/harbour/contrib/hbct/charmix.c @@ -56,58 +56,6 @@ #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * CHARMIX() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Mix two strings - * $SYNTAX$ - * CHARMIX ([, ]) --> cMixedString - * $ARGUMENTS$ - * String that will be mixed with the characters from - * [] String whose characters will be mixed with the one from - * . - * Default: " " (string with one space char) - * $RETURNS$ - * Mixed string - * $DESCRIPTION$ - * The CHARMIX() function mixes the strings and . To - * do this it takes one character after the other alternatively from - * and and puts them in the output string. - * This procedure is stopped when the end of is reached. If - * is shorter than , the function will start at - * the begin of again. If on the other hand is - * longer than , the surplus characters will be omitted. - * $EXAMPLES$ - * ? CHARMIX("ABC", "123") // "A1B2C3" - * ? CHARMIX("ABCDE", "12") // "A1B2C1D2E1" - * ? CHARMIX("AB", "12345") // "A1B2" - * ? CHARMIX("HELLO", " ") // "H E L L O " - * ? CHARMIX("HELLO", "") // "HELLO" - * $TESTS$ - * CHARMIX("ABC", "123") == "A1B2C3" - * CHARMIX("ABCDE", "12") == "A1B2C1D2E1" - * CHARMIX("AB", "12345") == "A1B2" - * CHARMIX("HELLO", " ") == "H E L L O " - * CHARMIX("HELLO", "") == "HELLO" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARMIX() is compatible with CT3's CHARMIX(). - * NOTE: CA-Tools version of CHARMIX() will hang - * if the second parameter is an empty string, this version will not. - * $PLATFORMS$ - * All - * $FILES$ - * Source is charmix.c, library is ct3. - * $SEEALSO$ - * CHAREVEN() CHARODD() - * $END$ - */ - HB_FUNC( CHARMIX ) { if( HB_ISCHAR( 1 ) ) diff --git a/harbour/contrib/hbct/charone.c b/harbour/contrib/hbct/charone.c index dff6d9010a..3b8852b012 100644 --- a/harbour/contrib/hbct/charone.c +++ b/harbour/contrib/hbct/charone.c @@ -54,10 +54,8 @@ * */ - #include "ct.h" - /* defines */ #define DO_CHARONE_CHARONE 0 #define DO_CHARONE_WORDONE 1 @@ -204,98 +202,11 @@ static void do_charone( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * CHARONE() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Reduce multiple occurences of a character to one - * $SYNTAX$ - * CHARONE ([,] ) -> cReducedString - * $ARGUMENTS$ - * [] specifies the characters the multiple - * occurences of which should be reduced to one - * Default: All characters. - * specifies the processed string - * $RETURNS$ - * the string with the reduced occurences - * $DESCRIPTION$ - * The CHARONE() function reduces multiple occurences of characters in - * to a single one. It is important to note that the multiple - * occurences must occur directly one behind the other. This behaviour is - * is in contrast to the CHARLIST() function. - * $EXAMPLES$ - * ? CHARONE("122333a123") // "123a123" - * ? CHARONE("A B CCCD") // "A B CD" - * ? CHARONE(" ", "A B A B") // "A B A B" - * ? CHARONE("o", "122oooB12o") // "122oB12o" - * $TESTS$ - * CHARONE("122333a123") == "123a123" - * CHARONE("A B CCCD") == "A B CD" - * CHARONE(" ", "A B A B") == "A B A B" - * CHARONE("o", "122oooB12o") == "122oB12o" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARONE() is compatible with CT3's CHARONE(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charone.c, library is ct3. - * $SEEALSO$ - * CHARREM() WORDONE() - * $END$ - */ - HB_FUNC( CHARONE ) { do_charone( DO_CHARONE_CHARONE ); } - -/* $DOC$ - * $FUNCNAME$ - * WORDONE() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Reduce multiple occurences of a double character to one - * $SYNTAX$ - * WORDONE ([,] ) -> cReducedString - * $ARGUMENTS$ - * [] specifies the double characters the multiple - * occurences of which should be reduced to one - * Default: All characters. - * specifies the processed string - * $RETURNS$ - * the string with the reduced occurences - * $DESCRIPTION$ - * The WORDONE() function reduces multiple occurences of double characters in - * to a single one. It is important to note that the multiple - * occurences must occur directly one behind the other. - * $EXAMPLES$ - * ? WORDONE("12ABAB12") // "12AB12" - * ? WORDONE("1AAAA2") // "1AAAA2" - * ? WORDONE("12", "1212ABAB") // "12ABAB" - * $TESTS$ - * WORDONE("12ABAB12") == "12AB12" - * WORDONE("1AAAA2") == "1AAAA2" - * WORDONE("12", "1212ABAB") == "12ABAB" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * WORDONE() is compatible with CT3's WORDONE(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charone.c, library is ct3. - * $SEEALSO$ - * CHARONE() CHARREM() - * $END$ - */ - HB_FUNC( WORDONE ) { do_charone( DO_CHARONE_WORDONE ); diff --git a/harbour/contrib/hbct/charonly.c b/harbour/contrib/hbct/charonly.c index 23aa21aa7e..684b143ec3 100644 --- a/harbour/contrib/hbct/charonly.c +++ b/harbour/contrib/hbct/charonly.c @@ -56,10 +56,8 @@ * */ - #include "ct.h" - /* defines */ #define DO_CHARONLY_CHARONLY 0 #define DO_CHARONLY_WORDONLY 1 @@ -175,180 +173,21 @@ static void do_charonly( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * CHARONLY() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Intersectional set of two strings based on characters - * $SYNTAX$ - * CHARONLY (, ) -> cReducedString - * $ARGUMENTS$ - * specifies the characters that must not be - * deleted in . - * is the string that should be processed - * $RETURNS$ - * A string with all characters deleted but those - * specified in . - * $DESCRIPTION$ - * The CHARONLY() function calculates the intersectional set of two - * strings. To do this, it deletes all characters from that - * do not appear in . - * $EXAMPLES$ - * ? CHARONLY("0123456789", "0211 - 38 99 77") // "0211389977" - * ? CHARONLY("0123456789", "0211/ 389 977") // "0211389977" - * $TESTS$ - * CHARONLY("0123456789", "0211 - 38 99 77") == "0211389977" - * CHARONLY("0123456789", "0211/ 389 977") == "0211389977" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARONLY() is compatible with CT3's CHARONLY(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charonly.c, library is ct3. - * $SEEALSO$ - * CHARREM() WORDONLY() WORDREM() - * $END$ - */ - HB_FUNC( CHARONLY ) { do_charonly( DO_CHARONLY_CHARONLY ); } - -/* $DOC$ - * $FUNCNAME$ - * WORDONLY() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Intersectional set of two strings based on double characters - * $SYNTAX$ - * WORDONLY (, ) -> cReducedString - * $ARGUMENTS$ - * specifies the double characters that must - * not be deleted in . - * is the string that should be processed - * $RETURNS$ - * A string with all double characters deleted - * but those specified in . - * $DESCRIPTION$ - * The WORDONLY() function calculates the intersectional set of two - * strings based on double characters. To do this, it deletes all double - * characters from that do not appear in . - * $EXAMPLES$ - * ? WORDONLY("AABBCCDD", "XXAAYYBBZZ") // "AABB" - * ? WORDONLY("AABBCCDD", "XAAYYYBBZZ") // "BB" - * $TESTS$ - * WORDONLY("AABBCCDD", "XXAAYYBBZZ") == "AABB" - * WORDONLY("AABBCCDD", "XAAYYYBBZZ") == "BB" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * WORDONLY() is compatible with CT3's WORDONLY(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charonly.c, library is ct3. - * $SEEALSO$ - * CHARONLY() CHARREM() WORDREM() - * $END$ - */ - HB_FUNC( WORDONLY ) { do_charonly( DO_CHARONLY_WORDONLY ); } - -/* $DOC$ - * $FUNCNAME$ - * CHARREM() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Removes characters from a string - * $SYNTAX$ - * CHARREM (, ) -> cReducedString - * $ARGUMENTS$ - * specifies the characters that should - * be deleted in - * ) is the string that should be processed - * $RETURNS$ - * is a string where the characters specified - * in are deleted - * $DESCRIPTION$ - * The CHARREM() function deletes the characters specified in - * from . - * $EXAMPLES$ - * ? CHARREM(" ", " 1 2 ") // "12" - * ? CHARREM("3y", "xyz123") // "xz12" - * $TESTS$ - * CHARREM(" ", " 1 2 ") == "12" - * CHARREM("3y", "xyz123") == "xz12" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARREM() is compatible with CT3's CHARREM(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charonly.c, library is ct3. - * $SEEALSO$ - * CHARONLY() WORDONLY() WORDREM() - * $END$ - */ - HB_FUNC( CHARREM ) { do_charonly( DO_CHARONLY_CHARREM ); } - -/* $DOC$ - * $FUNCNAME$ - * WORDREM() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Removes characters from a string - * $SYNTAX$ - * WORDREM (, ) -> cReducedString - * $ARGUMENTS$ - * specifies the double characters that - * should be deleted in - * ) is the string that should be processed - * $RETURNS$ - * is a string where the double characters - * specified in - * are deleted - * $DESCRIPTION$ - * The WORDREM() function deletes the double characters specified in - * from . - * $EXAMPLES$ - * ? WORDREM("abcd", "0ab1cd") // "0ab1" - * ? WORDREM("abcd", "ab0cd1") // "0cd1" - * $TESTS$ - * WORDREM("abcd", "0ab1cd") == "0ab1" - * WORDREM("abcd", "ab0cd1") == "0cd1" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * WORDREM() is a new function available only in Harbour's CT3. - * $PLATFORMS$ - * All - * $FILES$ - * Source is charonly.c, library is ct3. - * $SEEALSO$ - * CHARONLY CHARREM() WORDREM() - * $END$ - */ - HB_FUNC( WORDREM ) { do_charonly( DO_CHARONLY_WORDREM ); diff --git a/harbour/contrib/hbct/charop.c b/harbour/contrib/hbct/charop.c index 6a52528e02..b96d0b858c 100644 --- a/harbour/contrib/hbct/charop.c +++ b/harbour/contrib/hbct/charop.c @@ -369,271 +369,26 @@ void ct_charop( int iMode ) } } - -/* $DOC$ - * $FUNCNAME$ - * CHARADD() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Adds corresponding ASCII value of two strings - * $SYNTAX$ - * CHARADD (<[@]cString1>, ) --> cAddString - * $ARGUMENTS$ - * <[@]cString1> first string - * second string - * $RETURNS$ - * string with added ASCII values - * $DESCRIPTION$ - * The CHARADD() function constructs a new string from the two strings - * passed as parameters. To do this, it adds the ASCII values of the - * corresponding characters of both strings and places a character in - * the resulting string whose ASCII value equals to that sum (modulo 256). - * If the first string is passed by reference, the resulting string is - * stored in , too. By setting the CSETREF()-switch to .T., - * the return value can be omitted. - * If is shorter than and the last character of - * has been processed, the function restarts with the first - * character of . - * $EXAMPLES$ - * ? charadd ("012345678", chr(1)) --> "123456789" - * ? charadd ("123456789", chr(255)) --> "012345678" - * ? charadd ("0000", chr(0)+chr(1)+chr(2)+chr(3)) --> "0123" - * $TESTS$ - * charadd ("012345678", chr(1)) == "123456789" - * charadd ("012345678", chr(1)+chr(2)) == "133557799" - * charadd ("123456789", chr(255)) == "012345678" - * charadd ("123456789", chr(255)+chr(254)) == "002244668" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARADD() is compatible with CT3's CHARADD(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charop.c, library is ct3. - * $SEEALSO$ - * CHARSUB() CHARAND() CHARNOT() - * CHAROR() CHARXOR() CHARSHL() - * CHARSHR() CHARRLL() CHARRLR() - * CSETREF() - * $END$ - */ - HB_FUNC( CHARADD ) { ct_charop( CT_CHAROP_CHARADD ); } - -/* $DOC$ - * $FUNCNAME$ - * CHARAND() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Combine corresponding ASCII value of two strings with bitwise AND - * $SYNTAX$ - * CHARAND (<[@]cString1>, ) --> cAndString - * $ARGUMENTS$ - * <[@]cString1> first string - * second string - * $RETURNS$ - * string with bitwise AND combined ASCII values - * $DESCRIPTION$ - * The CHARAND() function constructs a new string from the two strings - * passed as parameters. To do this, it combines the ASCII values of the - * corresponding characters of both strings with a bitwise AND-operation - * and places a character in the resulting string whose ASCII value - * equals to the result of that operation. - * If the first string is passed by reference, the resulting string is - * stored in , too. By setting the CSETREF()-switch to .T., - * the return value can be omitted. - * If is shorter than and the last character of - * has been processed, the function restarts with the first - * character of . - * $EXAMPLES$ - * // clear the LSB - * ? charand ("012345678", chr(254)) --> "002244668" - * ? charand ("012345678", chr(254)+chr(252)) --> "002044648" - * $TESTS$ - * charand ("012345678", chr(254)) == "002244668" - * charand ("012345678", chr(254)+chr(252)) == "002044648" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARAND() is compatible with CT3's CHARAND(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charop.c, library is ct3. - * $SEEALSO$ - * CHARADD() CHARSUB() CHARNOT() - * CHAROR() CHARXOR() CHARSHL() - * CHARSHR() CHARRLL() CHARRLR() - * CSETREF() - * $END$ - */ - HB_FUNC( CHARAND ) { ct_charop( CT_CHAROP_CHARAND ); } - -/* $DOC$ - * $FUNCNAME$ - * CHARNOT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Process each character in a string with bitwise NOT operation - * $SYNTAX$ - * CHARNOT (<[@]cString>) --> cNotString - * $ARGUMENTS$ - * <[@]cString> string to be processed - * $RETURNS$ - * string with bitwise negated characters - * $DESCRIPTION$ - * The CHARNOT() function constructs a new string from the string - * passed as parameter. To do this, it performs a bitwise NOT operation - * to the characters of the string and places a character in - * the resulting string whose ASCII value equals to the result of that - * operation. It can be easily seen that the resulting ASCII-value equals - * 255 minus input ASCII value. - * If the string is passed by reference, the resulting string is - * stored in , too. By setting the CSETREF()-switch to .T., - * the return value can be omitted. - * $EXAMPLES$ - * ? charnot (chr(85)+chr(128)+chr(170)+chr(1)) --> chr(170)+chr(127)+chr(85)+chr(254) - * ? charnot (charnot ("This is a test!")) --> "This is a test!" - * $TESTS$ - * charnot (chr(85)+chr(128)+chr(170)+chr(1)) == chr(170)+chr(127)+chr(85)+chr(254) - * charnot (charnot ("This is a test!")) == "This is a test!" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARNOT() is compatible with CT3's CHARNOT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charop.c, library is ct3. - * $SEEALSO$ - * CHARADD() CHARSUB() CHARAND() - * CHAROR() CHARXOR() CHARSHL() - * CHARSHR() CHARRLL() CHARRLR() - * CSETREF() - * $END$ - */ - HB_FUNC( CHARNOT ) { ct_charop( CT_CHAROP_CHARNOT ); } - -/* $DOC$ - * $FUNCNAME$ - * CHAROR() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Combine corresponding ASCII value of two strings with bitwise OR - * $SYNTAX$ - * CHAROR (<[@]cString1>, ) --> cOrString - * $ARGUMENTS$ - * <[@]cString1> first string - * second string - * $RETURNS$ - * string with bitwise OR combined ASCII values - * $DESCRIPTION$ - * The CHAROR() function constructs a new string from the two strings - * passed as parameters. To do this, it combines the ASCII values of the - * corresponding characters of both strings with a bitwise OR-operation - * and places a character in the resulting string whose ASCII value - * equals to the result of that operation. - * If the first string is passed by reference, the resulting string is - * stored in , too. By setting the CSETREF()-switch to .T., - * the return value can be omitted. - * If is shorter than and the last character of - * has been processed, the function restarts with the first - * character of . - * $EXAMPLES$ - * // set the LSB - * ? charor ("012345678", chr(1)) --> "113355779" - * ? charor ("012345678", chr(1)+chr(3)) --> "133357779" - * $TESTS$ - * charor ("012345678", chr(1)) == "113355779" - * charor ("012345678", chr(1)+chr(3)) == "133357779" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHAROR() is compatible with CT3's CHAROR(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charop.c, library is ct3. - * $SEEALSO$ - * CHARADD() CHARSUB() CHARNOT() - * CHARAND() CHARXOR() CHARSHL() - * CHARSHR() CHARRLL() CHARRLR() - * CSETREF() - * $END$ - */ - HB_FUNC( CHAROR ) { ct_charop( CT_CHAROP_CHAROR ); } - -/* $DOC$ - * $FUNCNAME$ - * CHARXOR() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Combine corresponding ASCII value of two strings with bitwise XOR - * $SYNTAX$ - * CHARXOR (<[@]cString1>, ) --> cXOrString - * $ARGUMENTS$ - * <[@]cString1> first string - * second string - * $RETURNS$ - * string with bitwise XOR combined ASCII values - * $DESCRIPTION$ - * The CHARXOR() function constructs a new string from the two strings - * passed as parameters. To do this, it combines the ASCII values of the - * corresponding characters of both strings with a bitwise XOR-operation - * and places a character in the resulting string whose ASCII value - * equals to the result of that operation. - * If the first string is passed by reference, the resulting string is - * stored in , too. By setting the CSETREF()-switch to .T., - * the return value can be omitted. - * If is shorter than and the last character of - * has been processed, the function restarts with the first - * character of . - * $EXAMPLES$ - * // easy encryption - * ? charxor ("This is top secret !", "My Password") --> - * $TESTS$ - * charxor (charxor ("This is top secret !", "My Password"), "My Password") == "This is top secret !" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARXOR() is compatible with CT3's CHARXOR(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charop.c, library is ct3. - * $SEEALSO$ - * CHARADD() CHARSUB() CHARNOT() - * CHARAND() CHAROR() CHARSHL() - * CHARSHR() CHARRLL() CHARRLR() - * CSETREF() - * $END$ - */ - HB_FUNC( CHARXOR ) { ct_charop( CT_CHAROP_CHARXOR ); diff --git a/harbour/contrib/hbct/charophb.c b/harbour/contrib/hbct/charophb.c index f3dce34547..9f42d635ef 100644 --- a/harbour/contrib/hbct/charophb.c +++ b/harbour/contrib/hbct/charophb.c @@ -59,264 +59,26 @@ #include "ct.h" -/* $DOC$ - * $FUNCNAME$ - * CHARSUB() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Subtracts corresponding ASCII value of two strings - * $SYNTAX$ - * CHARSUB (<[@]cString1>, ) --> cSubString - * $ARGUMENTS$ - * <[@]cString1> first string - * second string - * $RETURNS$ - * string with subtracted ASCII values - * $DESCRIPTION$ - * The CHARSUB() function constructs a new string from the two strings - * passed as parameters. To do this, it subtracts the ASCII values of the - * corresponding characters of both strings and places a character in - * the resulting string whose ASCII value equals to that difference (modulo 256). - * If the first string is passed by reference, the resulting string is - * stored in , too. By setting the CSETREF()-switch to .T., - * the return value can be omitted. - * If is shorter than and the last character of - * has been processed, the function restarts with the first - * character of . - * $EXAMPLES$ - * ? charsub ("012345678", chr(1)) --> "/01234567" - * ? charsub ("123456789", chr(255)) --> "23456789:" - * ? charsub ("9999", chr(0)+chr(1)+chr(2)+chr(3)) --> "9876" - * $TESTS$ - * charsub ("123456789", chr(1)) == "012345678" - * charsub ("123456789", chr(1)+chr(2)) == "002244668" - * charsub ("012345678", chr(255)) == "123456789" - * charsub ("012345678", chr(255)+chr(254)) == "133557799" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARSUB() is a new function that is only available in Harbour's CT3 lib. - * $PLATFORMS$ - * All - * $FILES$ - * Source is charop.c, library is ct3. - * $SEEALSO$ - * CHARADD() CHARAND() CHARNOT() - * CHAROR() CHARXOR() CHARSHL() - * CHARSHR() CHARRLL() CHARRLR() - * CSETREF() - * $END$ - */ - HB_FUNC( CHARSUB ) { ct_charop( CT_CHAROP_CHARSUB ); } - -/* $DOC$ - * $FUNCNAME$ - * CHARSHL() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Process each character in a string with bitwise SHIFT LEFT operation - * $SYNTAX$ - * CHARSHL (<[@]cString>, ) --> cSHLString - * $ARGUMENTS$ - * <[@]cString> string to be processed - * number of bit positions to be shifted to the left - * $RETURNS$ - * string with bitwise shifted left characters - * $DESCRIPTION$ - * The CHARSHL() function constructs a new string from the string - * passed as parameter. To do this, it performs a bitwise SHIFT LEFT - * (SHL) operation to the characters of the string and places a character in - * the resulting string whose ASCII value equals to the result of that - * operation. - * Be aware that bits shifted out of the byte are lost. If you need - * a bit rotation, use the CHARRLL() function instead. - * If the string is passed by reference, the resulting string is - * stored in , too. By setting the CSETREF()-switch to .T., - * the return value can be omitted. - * $EXAMPLES$ - * ? charshl (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) - * --> chr(8)+chr(16)+chr(32)+chr(64)+chr(128)+chr(0)+chr(0)+chr(0) - * $TESTS$ - * charshl (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) == chr(8)+chr(16)+chr(32)+chr(64)+chr(128)+chr(0)+chr(0)+chr(0) - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARSHL() is a new function that is only available in Harbour's CT3 lib. - * $PLATFORMS$ - * All - * $FILES$ - * Source is charop.c, library is ct3. - * $SEEALSO$ - * CHARADD() CHARSUB() CHARAND() - * CHAROR() CHARXOR() CHARNOT() - * CHARSHR() CHARRLL() CHARRLR() - * CSETREF() - * $END$ - */ - HB_FUNC( CHARSHL ) { ct_charop( CT_CHAROP_CHARSHL ); } - -/* $DOC$ - * $FUNCNAME$ - * CHARSHR() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Process each character in a string with bitwise SHIFT RIGHT operation - * $SYNTAX$ - * CHARSHR (<[@]cString>, ) --> cSHRString - * $ARGUMENTS$ - * <[@]cString> string to be processed - * number of bit positions to be shifted to the right - * $RETURNS$ - * string with bitwise shifted right characters - * $DESCRIPTION$ - * The CHARSHR() function constructs a new string from the string - * passed as parameter. To do this, it performs a bitwise SHIFT RIGHT - * (SHR) operation to the characters of the string and places a character in - * the resulting string whose ASCII value equals to the result of that - * operation. - * Be aware that bits shifted out of the byte are lost. If you need - * a bit rotation, use the CHARRLR() function instead. - * If the string is passed by reference, the resulting string is - * stored in , too. By setting the CSETREF()-switch to .T., - * the return value can be omitted. - * $EXAMPLES$ - * ? charshr (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) - * --> chr(0)+chr(0)+chr(0)+chr(1)+chr(2)+chr(4)+chr(8)+chr(16) - * $TESTS$ - * charshr (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) == chr(0)+chr(0)+chr(0)+chr(1)+chr(2)+chr(4)+chr(8)+chr(16) - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARSHR() is a new function that is only available in Harbour's CT3 lib. - * $PLATFORMS$ - * All - * $FILES$ - * Source is charop.c, library is ct3. - * $SEEALSO$ - * CHARADD() CHARSUB() CHARAND() - * CHAROR() CHARXOR() CHARNOT() - * CHARSHL() CHARRLL() CHARRLR() - * CSETREF() - * $END$ - */ - HB_FUNC( CHARSHR ) { ct_charop( CT_CHAROP_CHARSHR ); } - -/* $DOC$ - * $FUNCNAME$ - * CHARRLL() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Process each character in a string with bitwise ROLL LEFT operation - * $SYNTAX$ - * CHARRLL (<[@]cString>, ) --> cRLLString - * $ARGUMENTS$ - * <[@]cString> string to be processed - * number of bit positions to be rolled to the left - * $RETURNS$ - * string with bitwise rolled left characters - * $DESCRIPTION$ - * The CHARRLL() function constructs a new string from the string - * passed as parameter. To do this, it performs a bitwise ROLL LEFT - * (RLL) operation to the characters of the string and places a character in - * the resulting string whose ASCII value equals to the result of that - * operation. - * Be aware that, in contrast to CHARSHL(), bits rolled out on - * the left are put in again on the right. - * If the string is passed by reference, the resulting string is - * stored in , too. By setting the CSETREF()-switch to .T., - * the return value can be omitted. - * $EXAMPLES$ - * ? charrll (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) - * --> chr(8)+chr(16)+chr(32)+chr(64)+chr(128)+chr(1)+chr(2)+chr(4) - * $TESTS$ - * charrll (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) == chr(8)+chr(16)+chr(32)+chr(64)+chr(128)+chr(1)+chr(2)+chr(4) - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARRLL() is a new function that is only available in Harbour's CT3 lib. - * $PLATFORMS$ - * All - * $FILES$ - * Source is charop.c, library is ct3. - * $SEEALSO$ - * CHARADD() CHARSUB() CHARAND() - * CHAROR() CHARXOR() CHARNOT() - * CHARSHL() CHARSHR() CHARRLR() - * CSETREF() - * $END$ - */ - HB_FUNC( CHARRLL ) { ct_charop( CT_CHAROP_CHARRLL ); } - -/* $DOC$ - * $FUNCNAME$ - * CHARRLR() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Process each character in a string with bitwise ROLL RIGHT operation - * $SYNTAX$ - * CHARRLR (<[@]cString>, ) --> cRLRString - * $ARGUMENTS$ - * <[@]cString> string to be processed - * number of bit positions to be rolled to the right - * $RETURNS$ - * string with bitwise rolled right characters - * $DESCRIPTION$ - * The CHARRLR() function constructs a new string from the string - * passed as parameter. To do this, it performs a bitwise ROLL RIGHT - * (RLR) operation to the characters of the string and places a character in - * the resulting string whose ASCII value equals to the result of that - * operation. - * Be aware that, in contrast to CHARSHR(), bits rolled out on - * the right are put in again on the left. - * If the string is passed by reference, the resulting string is - * stored in , too. By setting the CSETREF()-switch to .T., - * the return value can be omitted. - * $EXAMPLES$ - * ? charrlr (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) - * --> chr(32)+chr(64)+chr(128)+chr(1)+chr(2)+chr(4)+chr(8)+chr(16) - * $TESTS$ - * charrlr (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) == chr(32)+chr(64)+chr(128)+chr(1)+chr(2)+chr(4)+chr(8)+chr(16) - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARRLR() is a new function that is only available in Harbour's CT3 lib. - * $PLATFORMS$ - * All - * $FILES$ - * Source is charop.c, library is ct3. - * $SEEALSO$ - * CHARADD() CHARSUB() CHARAND() - * CHAROR() CHARXOR() CHARNOT() - * CHARSHL() CHARSHR() CHARRLL() - * CSETREF() - * $END$ - */ - HB_FUNC( CHARRLR ) { ct_charop( CT_CHAROP_CHARRLR ); diff --git a/harbour/contrib/hbct/charrepl.c b/harbour/contrib/hbct/charrepl.c index faad5d2690..3aebaa79fb 100644 --- a/harbour/contrib/hbct/charrepl.c +++ b/harbour/contrib/hbct/charrepl.c @@ -52,74 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * CHARREPL() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Replacement of characters - * $SYNTAX$ - * CHARREPL (, <[@]cString>, - * , []) -> cString - * $ARGUMENTS$ - * is a string of characters that should be replaced - * <[@]cString> is the processed string - * is a string of characters that replace the one - * of - * [] sets the replacement method (see description) - * Default: .F. - * $RETURNS$ - * the processed string - * $DESCRIPTION$ - * The CHARREPL() function replaces certain characters in - * with others depending on the setting of . - * If is set to .F., the function takes the characters of - * one after the other, searches for them in - * and, if successful, replaces them with the corresponding character - * of . Be aware that if the same characters occur - * in both and , the character on a - * certain position in can be replaced multiple times. - * if is set to .T., the function takes the characters in - * one after the other, searches for them in and, if - * successful, replaces them with the corresponding character of - * . Note that no multiple replacements are possible - * in this mode. - * If is shorter than , the last - * character of is used as corresponding character - * for the the "rest" of . - * One can omit the return value by setting the CSETREF() switch to .T., - * but then one must pass by reference to get the result. - * $EXAMPLES$ - * ? charrepl ("1234", "1x2y3z", "abcd") // "axbycz" - * ? charrepl ("abcdefghij", "jhfdb", "1234567890") // "08642" - * ? charrepl ("abcdefghij", "jhfdb", "12345") // "55542" - * ? charrepl ("1234", "1234", "234A") // "AAAA" - * ? charrepl ("1234", "1234", "234A", .T.) // "234A" - * $TESTS$ - * charrepl ("1234", "1x2y3z", "abcd") == "axbycz" - * charrepl ("abcdefghij", "jhfdb", "1234567890") == "08642" - * charrepl ("abcdefghij", "jhfdb", "12345") == "55542" - * charrepl ("1234", "1234", "234A") == "AAAA" - * charrepl ("1234", "1234", "234A", .T.) == "234A" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARREPL() is compatible with CT3's CHARREPL(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charrepl.c, library is ct3. - * $SEEALSO$ - * WORDREPL() POSREPL() RANGEREPL() - * CSETREF() - * $END$ - */ - HB_FUNC( CHARREPL ) { int iNoRet; diff --git a/harbour/contrib/hbct/charsort.c b/harbour/contrib/hbct/charsort.c index 622f8b8e5f..ec47076f01 100644 --- a/harbour/contrib/hbct/charsort.c +++ b/harbour/contrib/hbct/charsort.c @@ -91,88 +91,6 @@ _hb_do_sortdescend( const void *p1, const void *p2 ) return -strncmp( pc1, pc2, s_sCompareLen ); } - -/* $DOC$ - * $FUNCNAME$ - * CHARSORT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Sort sequences within a string. - * $SYNTAX$ - * CHARSORT (<[@]cString>, [], [], - * [], [], [], - * []) -> cSortedString - * $ARGUMENTS$ - * <[@]cString> is the string that should be processed - * [] specifies the length of the elements that - * should be sorted - * Default: 1 - * [] specifies how many characters within one - * element should be used for comparison - * Default: - * [] specifies the number of characters at the - * beginning of that should be ignored - * in the sort process - * Default: 0 - * [] specifies the offset of the comparison string - * within a element - * Default: 0 - * [] specifies how many characters in , - * starting from the position, - * should be sorted - * Default: len(cString)-nIgnoreCharacters - * []) specifies whether the process should - * sort descending or not - * $RETURNS$ - * the string resulting from the sort process - * $DESCRIPTION$ - * The CHARSORT function sorts the characters within a string . - * With the parameters and , you can - * determine that only the substring from position +1 - * to position + within should - * be sorted. - * The sorting algorithm is determined with the other parameters. - * specifies the length of one element, i.e. there are - * / elements that are sorted. Note that - * surplus characters are not sorted but stay at their position. - * To do the sorting, the function uses the Quicksort algorithm implemented - * in the C-lib qsort() function. This algorithm needs to know how to compare - * and order two elements. This is done by comparing the ASCII values of - * a substring within each element. This substring is determined by the - * parameters and and the order - * by . - * By setting the CSETREF() switch to .T., one can omit the return value - * of the function, but one must then pass by reference. - * $EXAMPLES$ - * ? CHARSORT("qwert") // "eqrtw" - * ? CHARSORT("qwert", 2) // "erqwt" - * ? CHARSORT("b1a4a3a2a1", 2, 1) // "a2a1a3a4b1" - * ? CHARSORT("XXXqwert", 1, 1, 3) // "XXXeqrtw" - * ? CHARSORT("b1a4a3a2a1", 2, 1, 0, 1) // "a1b1a2a3a4" - * ? CHARSORT("384172852", 1, 1, 0, 0, 4) // "134872852" - * ? CHARSORT("qwert", .T.) // "wtrqe" - * $TESTS$ - * CHARSORT("qwert") == "eqrtw" - * CHARSORT("qwert", 2) == "erqwt" - * CHARSORT("b1a4a3a2a1", 2, 1) == "a2a1a3a4b1" - * CHARSORT("XXXqwert", 1, 1, 3) == "XXXeqrtw" - * CHARSORT("b1a4a3a2a1", 2, 1, 0, 1) == "a1b1a2a3a4" - * CHARSORT("384172852", 1, 1, 0, 0, 4) == "134872852" - * CHARSORT("qwert", .T.) == "wtrqe" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARSORT() is compatible with CT3's CHARSORT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charsort.c, library is ct3. - * $SEEALSO$ - * CSETREF() - * $END$ - */ - HB_FUNC( CHARSORT ) { int iNoRet; diff --git a/harbour/contrib/hbct/charswap.c b/harbour/contrib/hbct/charswap.c index 1942302d42..fb6ac97407 100644 --- a/harbour/contrib/hbct/charswap.c +++ b/harbour/contrib/hbct/charswap.c @@ -54,10 +54,8 @@ * */ - #include "ct.h" - /* defines */ #define DO_CHARSWAP_CHARSWAP 0 #define DO_CHARSWAP_WORDSWAP 1 @@ -185,95 +183,11 @@ static void do_charswap( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * CHARSWAP() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Swap neighbouring characters in a string - * $SYNTAX$ - * CHARSWAP (<[@]cString>) -> cSwappedString - * $ARGUMENTS$ - * <[@]cString> is the string that should be processed - * $RETURNS$ - * a string where neighbour characters are swapped - * $DESCRIPTION$ - * The CHARSWAP() function loops through in steps of two - * characters and exchanges the characters from the odd and the even - * positions. - * By setting the CSETREF() switch to .T., one can omit the return value - * of this functin, but one must then pass by reference. - * $EXAMPLES$ - * ? CHARSWAP("0123456789") // "1032547698" - * ? CHARSWAP("ABCDEFGHIJK") // "BADCFEHGJIK" - * $TESTS$ - * CHARSWAP("0123456789") == "1032547698" - * CHARSWAP("ABCDEFGHIJK") == "BADCFEHGJIK" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CHARSWAP() is compatible with CT3's CHARSWAP(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charswap.c, library is libct. - * $SEEALSO$ - * WORDSWAP(),CSETREF() - * $END$ - */ - HB_FUNC( CHARSWAP ) { do_charswap( DO_CHARSWAP_CHARSWAP ); } - -/* $DOC$ - * $FUNCNAME$ - * WORDSWAP() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Swap neighbouring double characters in a string - * $SYNTAX$ - * WORDSWAP (<[@]cString> [, ]) -> cSwappedString - * $ARGUMENTS$ - * <[@]cString> is the string that should be processed - * [] specifies whether an additional swap should be - * done within the double characters - * Default: .F., no additional swap - * $RETURNS$ - * a string where neighbouring double characters are - * swapped - * $DESCRIPTION$ - * The WORDSWAP() function loops through in steps of four - * characters and exchanges the double characters from the first and - * second position with the one from the third and forth position. - * Additionally the function can perform a swap of the both char of - * each double character. - * By setting the CSETREF() switch to .T., one can omit the return value - * of this functin, but one must then pass by reference. - * $EXAMPLES$ - * ? WORDSWAP("1234567890") // "3412785690" - * ? WORDSWAP("1234567890", .t.) // "4321876590" - * $TESTS$ - * WORDSWAP("1234567890") == "3412785690" - * WORDSWAP("1234567890", .t.) == "4321876590" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * WORDSWAP() is compatible with CT3's WORDSWAP(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is charswap.c, library is libct. - * $SEEALSO$ - * CHARSWAP(),CSETREF() - * $END$ - */ - HB_FUNC( WORDSWAP ) { do_charswap( DO_CHARSWAP_WORDSWAP ); diff --git a/harbour/contrib/hbct/color.c b/harbour/contrib/hbct/color.c index deee1063a6..59c69c7177 100644 --- a/harbour/contrib/hbct/color.c +++ b/harbour/contrib/hbct/color.c @@ -55,33 +55,6 @@ #include "hbapi.h" #include "hbapigt.h" -/* $DOC$ - * $FUNCNAME$ - * INVERTATTR() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * - * $SYNTAX$ - * - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * INVERTATTR() is compatible with CT3's INVERTATTR(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is color.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( INVERTATTR ) { int iAttr; @@ -100,45 +73,6 @@ HB_FUNC( INVERTATTR ) ( ( iAttr >> 4 ) & 0x07 ) ); } - -/* $DOC$ - * $FUNCNAME$ - * COLORTON() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * $SYNTAX$ - * COLORTON ( ) -> - * $ARGUMENTS$ - * Designates the alphanumeric color attribute that is - * converted in NN/NN or CC/CC form. - * - * $RETURNS$ - * COLORTON() returns a number that corresponds to the combined numeric - * color attribute. - * - * $DESCRIPTION$ - * COLOR TO (N)umeric - * The function changes an alphanumeric color attribute from NN/NN or - * CC/CC into a combined numeric attribute. These combined attribute - * values are useful with the CA-Cl*pper Tools functions STRSCREEN(), - * SCREENMIX(), SCREENATTR(), and the CA-Cl*pper commands - * SAVE/RESTORE SCREEN. - * - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is color.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( COLORTON ) { if( HB_ISCHAR( 1 ) ) @@ -150,47 +84,6 @@ HB_FUNC( COLORTON ) hb_retni( hb_parni( 1 ) ); } - -/* $DOC$ - * $FUNCNAME$ - * NTOCOLOR() - * $CATEGORY$ - * HBCT video functions - * $ONELINER$ - * $SYNTAX$ - * NTOCOLOR ( , [] ) -> - * $ARGUMENTS$ - * Designates the value for the combined numeric color - * attributes. - * - * If designated as .F. or if the parameter is omitted, - * NTOCOLOR() returns a string with a numeric color code. - * When designated as .T., NTOCOLOR() returns a string with - * the CA-Cl*pper alpha color coding. - * - * $RETURNS$ - * NTOCOLOR() returns the designated color attribute in the NN/NN - * or CC/CC form. - * - * $DESCRIPTION$ - * NTOCOLOR() converts a color attribute returned from another function - * in numeric form, into the alphanumeric data format. Use this - * attribute in conjunction with the CA-Cl*pper SET COLOR TO command. - * - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is color.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( NTOCOLOR ) { char szColorString[ 10 ]; @@ -208,105 +101,18 @@ HB_FUNC( NTOCOLOR ) hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * ENHANCED() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * Select the "ENHANCED" color value for output - * $SYNTAX$ - * ENHANCED () -> - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * ENHANCED() is compatible with CT3's ENHANCED() - * $PLATFORMS$ - * All - * $FILES$ - * Source is color.c, library is libct. - * $SEEALSO$ - * STANDARD(),UNSELECTED() - * $END$ - */ - HB_FUNC( ENHANCED ) { hb_gtColorSelect( HB_CLR_ENHANCED ); hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * STANDARD() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * Select the "STANDARD" color value for output - * $SYNTAX$ - * STANDARD () -> - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * STANDARD() is compatible with CT3's STANDARD() - * $PLATFORMS$ - * All - * $FILES$ - * Source is color.c, library is libct. - * $SEEALSO$ - * ENHANCED(),UNSELECTED() - * $END$ - */ - HB_FUNC( STANDARD ) { hb_gtColorSelect( HB_CLR_STANDARD ); hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * UNSELECTED() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * Select the "UNSELECTED" color value for output - * $SYNTAX$ - * UNSELECTED () -> - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * UNSELECTED() is compatible with CT3's UNSELECTED() - * $PLATFORMS$ - * All - * $FILES$ - * Source is color.c, library is libct. - * $SEEALSO$ - * ENHANCED(),STANDARD() - * $END$ - */ - HB_FUNC( UNSELECTED ) { hb_gtColorSelect( HB_CLR_UNSELECTED ); diff --git a/harbour/contrib/hbct/count.c b/harbour/contrib/hbct/count.c index e94b8fdd70..c75c43aa4a 100644 --- a/harbour/contrib/hbct/count.c +++ b/harbour/contrib/hbct/count.c @@ -123,69 +123,11 @@ static void do_count( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * COUNTLEFT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Count a certain character at the beginning of a string - * $SYNTAX$ - * COUNTLEFT (, []) -> nCount - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * COUNTLEFT() is compatible with CT3's COUNTLEFT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is count.c, library is libct. - * $SEEALSO$ - * COUNTRIGHT() - * $END$ - */ - HB_FUNC( COUNTLEFT ) { do_count( DO_COUNT_COUNTLEFT ); } - -/* $DOC$ - * $FUNCNAME$ - * COUNTRIGHT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Count a certain character at the end of a string - * $SYNTAX$ - * COUNTRIGHT (, []) -> nCount - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * COUNTRIGHT() is compatible with CT3's COUNTRIGHT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is count.c, library is libct. - * $SEEALSO$ - * COUNTLEFT() - * $END$ - */ - HB_FUNC( COUNTRIGHT ) { do_count( DO_COUNT_COUNTRIGHT ); diff --git a/harbour/contrib/hbct/ct.prg b/harbour/contrib/hbct/ct.prg index b85250e6d4..5d97f015fb 100644 --- a/harbour/contrib/hbct/ct.prg +++ b/harbour/contrib/hbct/ct.prg @@ -54,40 +54,6 @@ STATIC s_bInitialized := .F. - -/* $DOC$ - * $FUNCNAME$ - * CTINIT() - * $CATEGORY$ - * CT3 general functions - * $ONELINER$ - * Initializes the CT3 library - * $SYNTAX$ - * CTINIT () -> lInitialized - * $ARGUMENTS$ - * None - * $RETURNS$ - * lInitialized .T. if the function has been correctly initialized - * $DESCRIPTION$ - * The CTINIT() function initializes the CT3 library. - * Identical code is declared as INIT FUNCTION, thus should be executed - * automatically at the beginning of the application, but it is a good - * idea to call it once again explicitly somewhere at the beginning of - * your program to check the initialization. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CTINIT() is a new function in Harbour's CT3 library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is ct.prg, library is libct. - * $SEEALSO$ - * $END$ - */ - FUNCTION CTINIT() IF ! s_bInitialized @@ -104,40 +70,6 @@ INIT PROCEDURE _CTINIT() RETURN - -/* $DOC$ - * $FUNCNAME$ - * CTEXIT() - * $CATEGORY$ - * CT3 general functions - * $ONELINER$ - * Uninitializes the CT3 library - * $SYNTAX$ - * CTEXIT () -> nil - * $ARGUMENTS$ - * none - * $RETURNS$ - * nil - * $DESCRIPTION$ - * The CTEXIT() function uninitializes the CT3 library. - * Identical code is declared as EXIT FUNCTION, thus should be executed - * automatically at the end of the application, but it is a good idea - * to call it explicitly somewhere at the end of your program to make - * sure that the deinitialization takes place. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CTEXIT() is a new function in Harbour's CT3 library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is ct.prg, library is libct. - * $SEEALSO$ - * $END$ - */ - FUNCTION CTEXIT() IF s_bInitialized diff --git a/harbour/contrib/hbct/ctc.c b/harbour/contrib/hbct/ctc.c index ea2c28e578..0002c4e71e 100644 --- a/harbour/contrib/hbct/ctc.c +++ b/harbour/contrib/hbct/ctc.c @@ -52,7 +52,6 @@ * */ - #include "ct.h" #include "ctmath.h" #include "hbvm.h" @@ -125,7 +124,6 @@ HB_USHORT ct_error( HB_USHORT uiSeverity, HB_ERRCODE errGenCode, HB_ERRCODE errS return uiAction; } - /* throwing a CT-subsystem error with value substitution - function adapted from errorapi.c */ PHB_ITEM ct_error_subst( HB_USHORT uiSeverity, HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, @@ -191,7 +189,6 @@ PHB_ITEM ct_error_subst( HB_USHORT uiSeverity, HB_ERRCODE errGenCode, HB_ERRCODE return pRetVal; } - /* argument error behaviour */ static int s_iArgErrMode = CT_ARGERR_IGNORE; @@ -207,46 +204,6 @@ int ct_getargerrormode( void ) return s_iArgErrMode; } -/* $DOC$ - * $FUNCNAME$ - * CSETARGERR() - * $CATEGORY$ - * CT3 general functions - * $ONELINER$ - * Sets argument error behaviour - * $SYNTAX$ - * CSETARGERR ([]) -> - * $ARGUMENTS$ - * [] New argument error throwing mode - * $RETURNS$ - * The current or old argument error throwing mode. - * $DESCRIPTION$ - * All CT3 functions are very compliant in their reaction to wrong - * parameters. By using the CSETARGERR() function, you can make the - * library throw an error with the severity . It is then - * up to the error handler to substitute the return value. - * can be one of the severity modes defined in ct.ch: - * CT_ARGERR_WHOCARES corresponds to ES_WHOCARES - * CT_ARGERR_WARNING corresponds to ES_WARNING - * CT_ARGERR_ERROR corresponds to ES_ERROR - * CT_ARGERR_CATASTROPHIC corresponds to ES_CATASTROPHIC - * CT_ARGERR_IGNORE - * The last is the default behaviour and switches any argument error - * throwing off. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CSETARGERR() is a new function in Harbour's CT3 library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is ct.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( CSETARGERR ) { hb_retni( ct_getargerrormode() ); @@ -286,41 +243,9 @@ HB_FUNC( CSETARGERR ) } } - /* initialization */ static int s_initialized = 0; /* TODO: make this thread safe */ -/* $DOC$ - * $FUNCNAME$ - * CTCINIT() - * $CATEGORY$ - * CT3 general functions - * $ONELINER$ - * Initializes the CT3 library, C part - * $SYNTAX$ - * CTCINIT () -> lInitialized - * $ARGUMENTS$ - * None - * $RETURNS$ - * lInitialized .T. if the function has been correctly initialized - * $DESCRIPTION$ - * The CTCINIT() function initializes the C source part of the CT3 - * library. Do not call this function directly. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CTCINIT() is a new function in Harbour's CT3 library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is ctc.c, library is libct. - * $SEEALSO$ - * CTINIT(),CTEXIT() - * $END$ - */ - HB_FUNC( CTCINIT ) { if( s_initialized == 0 ) @@ -334,38 +259,6 @@ HB_FUNC( CTCINIT ) hb_retl( s_initialized ); } - -/* $DOC$ - * $FUNCNAME$ - * CTCEXIT() - * $CATEGORY$ - * CT3 general functions - * $ONELINER$ - * Uninitializes the CT3 library, C part - * $SYNTAX$ - * CTCEXIT () -> nil - * $ARGUMENTS$ - * none - * $RETURNS$ - * nil - * $DESCRIPTION$ - * The CTCEXIT() function uninitializes the C part of the CT3 library. - * Do not call this function directly. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CTCEXIT() is a new function in Harbour's CT3 library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is ctc.c, library is libct. - * $SEEALSO$ - * CTINIT(),CTEXIT() - * $END$ - */ - HB_FUNC( CTCEXIT ) { ct_str_exit(); diff --git a/harbour/contrib/hbct/ctcom1.c b/harbour/contrib/hbct/ctcom1.c index 037c49a6bd..42db5a25cc 100644 --- a/harbour/contrib/hbct/ctcom1.c +++ b/harbour/contrib/hbct/ctcom1.c @@ -367,7 +367,6 @@ HB_FUNC( COM_SKEY ) hb_retl( HB_FALSE ); } - /* COM_INIT( , [=300], [=N], * [=8], [=1] ) -> */ @@ -482,7 +481,6 @@ HB_FUNC( COM_NUM ) hb_retni( hb_comLastNum() ); } - /* COM_GETIO( ) -> | -1 */ HB_FUNC( COM_GETIO ) diff --git a/harbour/contrib/hbct/ctcom2.c b/harbour/contrib/hbct/ctcom2.c index 77ab6dedd9..1b6eb198fd 100644 --- a/harbour/contrib/hbct/ctcom2.c +++ b/harbour/contrib/hbct/ctcom2.c @@ -56,7 +56,6 @@ #include "hbapigt.h" #include "hbchksum.h" - /* COM_DOSCON( , [], [] ) -> */ HB_FUNC( COM_DOSCON ) diff --git a/harbour/contrib/hbct/ctmath.c b/harbour/contrib/hbct/ctmath.c index 7c510a06d2..71eb915b84 100644 --- a/harbour/contrib/hbct/ctmath.c +++ b/harbour/contrib/hbct/ctmath.c @@ -87,37 +87,6 @@ int ct_getprecision( void ) return s_ct_precision; } - -/* $DOC$ - * $FUNCNAME$ - * SETPREC() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Set precision of math functions - * $SYNTAX$ - * SETPREC () -> cEmptyString - * $ARGUMENTS$ - * digit count between 1 and 16, defaults to 16 - * $RETURNS$ - * cEmptyString this function always returns an empty string - * $DESCRIPTION$ - * Be aware that calls to this functions do _NOT_ affect the - * calculation precision of the math functions at the moment. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * SETPREC() is compatible with CT3's SETPREC. - * $PLATFORMS$ - * All - * $FILES$ - * Source is ctmath.c, library is ct3. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( SETPREC ) { int iPrec = hb_parni( 1 ); @@ -135,36 +104,6 @@ HB_FUNC( SETPREC ) hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * GETPREC() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Get precision of math functions - * $SYNTAX$ - * GETPREC () -> nDigits - * $ARGUMENTS$ - * $RETURNS$ - * nDigits digit count between 1 and 16 - * $DESCRIPTION$ - * Be aware that calls to this functions do _NOT_ affect the - * calculation precision of the math functions at the moment. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * GETPREC() is compatible with CT3's GETPREC. - * $PLATFORMS$ - * All - * $FILES$ - * Source is ctmath.c, library is ct3. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( GETPREC ) { hb_retni( ct_getprecision() ); diff --git a/harbour/contrib/hbct/ctmath2.c b/harbour/contrib/hbct/ctmath2.c index d36b3ca9ee..b85fe1a1a1 100644 --- a/harbour/contrib/hbct/ctmath2.c +++ b/harbour/contrib/hbct/ctmath2.c @@ -62,47 +62,10 @@ * */ - #include "ct.h" #include "ctmath.h" #include "hbmather.h" - -/* $DOC$ - * $FUNCNAME$ - * FLOOR() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Rounds down a number to the next integer - * $SYNTAX$ - * FLOOR (nNumber) -> nDownRoundedNumber - * $ARGUMENTS$ - * number to round down - * $RETURNS$ - * the rounded number - * $DESCRIPTION$ - * The function FLOOR() determines the biggest integer that is smaller - * than . - * $EXAMPLES$ - * ? floor (1.1) --> 1.0 - * ? floor (-1.1) --> -2.0 - * $TESTS$ - * floor (1.1) == 1.0 - * floor (-1.1) == -2.0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * FLOOR() is compatible with CT3's FLOOR(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is math.c, library is libct. - * $SEEALSO$ - * CEILING - * $END$ - */ - HB_FUNC( FLOOR ) { if( HB_ISNUM( 1 ) ) @@ -140,42 +103,6 @@ HB_FUNC( FLOOR ) } } - -/* $DOC$ - * $FUNCNAME$ - * CEILING() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Rounds up a number to the next integer - * $SYNTAX$ - * CEILING (nNumber) -> nUpRoundedNumber - * $ARGUMENTS$ - * number to round up - * $RETURNS$ - * the rounded number - * $DESCRIPTION$ - * The function CEILING() determines the smallest integer that is bigger - * than . - * $EXAMPLES$ - * ? ceiling (1.1) --> 2.0 - * ? ceiling (-1.1) --> -1.0 - * $TESTS$ - * ceiling (1.1) == 2.0 - * ceiling (-1.1) == -1.0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CEILING() is compatible with CT3's CEILING(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is math.c, library is libct. - * $SEEALSO$ - * FLOOR - * $END$ - */ - HB_FUNC( CEILING ) { if( HB_ISNUM( 1 ) ) @@ -213,45 +140,6 @@ HB_FUNC( CEILING ) } } - -/* $DOC$ - * $FUNCNAME$ - * SIGN() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Sign of a number - * $SYNTAX$ - * SIGN (nNumber) -> nSign - * $ARGUMENTS$ - * a number - * $RETURNS$ - * sign of - * $DESCRIPTION$ - * The function SIGN() determines the sign of . - * If is > 0, then SIGN() returns 1 - * If is < 0, then SIGN() returns -1 - * If is == 0, then SIGN() returns 0 - * $EXAMPLES$ - * ? sign (1.1) --> 1 - * ? sign (-1.1) --> -1 - * ? sign (0.0) --> 0 - * $TESTS$ - * sign (1.1) == 1 - * sign (-1.1) == -1 - * sign (0.0) == 0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * SIGN() is compatible with CT3's SIGN(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is math.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( SIGN ) { if( HB_ISNUM( 1 ) ) @@ -288,41 +176,6 @@ HB_FUNC( SIGN ) } } - -/* $DOC$ - * $FUNCNAME$ - * LOG10() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Decadic logarithm of a number - * $SYNTAX$ - * LOG10 (nNumber) -> nLogarithm - * $ARGUMENTS$ - * number to logarithm - * $RETURNS$ - * decadic logarithm of - * $DESCRIPTION$ - * The function LOG10() calculates the decadic logarithm of , - * i.e. 10^ == . - * $EXAMPLES$ - * ? log10 (10.0) --> 1.0 - * ? log10 (sqrt(10.0)) --> 0.5 - * $TESTS$ - * log10 (10.0) == 1.0 - * log10 (sqrt(10.0)) == 0.5 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * LOG10() is compatible with CT3's LOG10(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is math.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( LOG10 ) { if( HB_ISNUM( 1 ) ) @@ -373,45 +226,6 @@ HB_FUNC( LOG10 ) } } - -/* $DOC$ - * $FUNCNAME$ - * FACT() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Calculates faculty - * $SYNTAX$ - * FACT (nNumber) -> nFaculty - * $ARGUMENTS$ - * number between 0 and 21 - * $RETURNS$ - * the faculty of - * $DESCRIPTION$ - * The function FACT() calculates the faculty to the integer given in - * . The faculty is defined as n! = 1*2*...*n and is often - * used in statistics. Note, that faculties above 21 are too big - * so that the function must return a -1. - * $EXAMPLES$ - * ? fact (0) --> 1 - * ? fact (1) --> 1 - * ? fact (4) --> 24 - * $TESTS$ - * fact (0) == 1 - * fact (1) == 1 - * fact (4) == 24 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * FACT() is compatible with CT3's FACT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is math.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( FACT ) { if( HB_ISNUM( 1 ) ) diff --git a/harbour/contrib/hbct/ctnet.c b/harbour/contrib/hbct/ctnet.c index 81b25a803b..f9797c7371 100644 --- a/harbour/contrib/hbct/ctnet.c +++ b/harbour/contrib/hbct/ctnet.c @@ -129,7 +129,6 @@ HB_FUNC( NETCANCEL ) #endif } - HB_FUNC( NETPRINTER ) { #if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) @@ -143,7 +142,6 @@ HB_FUNC( NETPRINTER ) #endif } - HB_FUNC( NETDISK ) { #if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) @@ -224,7 +222,6 @@ HB_FUNC( NETWORK ) #endif } - HB_FUNC( NNETWORK ) { #if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) diff --git a/harbour/contrib/hbct/ctpad.c b/harbour/contrib/hbct/ctpad.c index b6debc809f..81abf0a531 100644 --- a/harbour/contrib/hbct/ctpad.c +++ b/harbour/contrib/hbct/ctpad.c @@ -144,69 +144,11 @@ static void do_pad( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * PADLEFT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Fills string to a certain length on the left - * $SYNTAX$ - * PADLEFT (,, []) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * PADLEFT() is compatible with CT3's PADLEFT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is pad.c, library is libct. - * $SEEALSO$ - * PADRIGHT() - * $END$ - */ - HB_FUNC( PADLEFT ) { do_pad( DO_PAD_PADLEFT ); } - -/* $DOC$ - * $FUNCNAME$ - * PADRIGHT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Fills string to a certain length on the right - * $SYNTAX$ - * PADRIGHT (,, []) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * PADRIGHT() is compatible with CT3's PADRIGHT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is pad.c, library is libct. - * $SEEALSO$ - * PADLEFT() - * $END$ - */ - HB_FUNC( PADRIGHT ) { do_pad( DO_PAD_PADRIGHT ); diff --git a/harbour/contrib/hbct/ctset.c b/harbour/contrib/hbct/ctset.c index a383d0aa3f..52c0929087 100644 --- a/harbour/contrib/hbct/ctset.c +++ b/harbour/contrib/hbct/ctset.c @@ -53,5 +53,4 @@ * */ - #include "ct.h" diff --git a/harbour/contrib/hbct/ctstr.c b/harbour/contrib/hbct/ctstr.c index 7b6d6fa68c..54f4c607ef 100644 --- a/harbour/contrib/hbct/ctstr.c +++ b/harbour/contrib/hbct/ctstr.c @@ -52,10 +52,8 @@ * */ - #include "ct.h" - /* -------------- */ /* initialization */ /* -------------- */ @@ -71,7 +69,6 @@ int ct_str_exit( void ) return 1; } - /* -------------------------- */ /* search for exact substring */ /* -------------------------- */ @@ -101,7 +98,6 @@ const char *ct_at_exact_forward( const char * pcString, HB_SIZE sStrLen, } - /* ------------------------------------------------ */ /* search for exact substring in backward direction */ /* ------------------------------------------------ */ @@ -135,7 +131,6 @@ const char *ct_at_exact_backward( const char * pcString, HB_SIZE sStrLen, return NULL; } - /* ----------------------------------- */ /* search for substring using wildcard */ /* ----------------------------------- */ @@ -174,7 +169,6 @@ const char *ct_at_wildcard_forward( const char * pcString, HB_SIZE sStrLen, return NULL; } - /* --------------------------------------------------------- */ /* search for substring using wildcard in backward direction */ /* --------------------------------------------------------- */ @@ -213,7 +207,6 @@ const char *ct_at_wildcard_backward( const char * pcString, HB_SIZE sStrLen, return NULL; } - /* ------------------------------- */ /* search for character from a set */ /* ------------------------------- */ @@ -247,7 +240,6 @@ const char *ct_at_charset_forward( const char * pcString, HB_SIZE sStrLen, return NULL; } - /* ----------------------------------------------------- */ /* search for character from a set in backward direction */ /* ----------------------------------------------------- */ @@ -280,7 +272,6 @@ const char *ct_at_charset_backward( const char * pcString, HB_SIZE sStrLen, return NULL; } - /* * CSETREF() stuff */ @@ -293,74 +284,12 @@ void ct_setref( int iNewSwitch ) siRefSwitch = iNewSwitch; } - int ct_getref( void ) { HB_TRACE( HB_TR_DEBUG, ( "ct_getref()" ) ); return siRefSwitch; } - -/* $DOC$ - * $FUNCNAME$ - * CSETREF() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Determine return value of reference sensitive CT3 string functions - * $SYNTAX$ - * CSETREF ([]) -> lOldSwitch - * $ARGUMENTS$ - * [] .T. -> suppress return value - * .F. -> do not suppress return value - * $RETURNS$ - * lOldSwitch old (if lNewSwitch is a logical value) or - * current state of the switch - * $DESCRIPTION$ - * Within the CT3 functions, the following functions do not - * change the length of a string passed as parameter while - * transforming this string: - * - * ADDASCII() BLANK() CHARADD() - * CHARAND() CHARMIRR() CHARNOT() - * CHAROR() CHARRELREP() CHARREPL() - * CHARSORT() CHARSWAP() CHARXOR() - * CRYPT() JUSTLEFT() JUSTRIGHT() - * POSCHAR() POSREPL() RANGEREPL() - * REPLALL() REPLLEFT() REPLRIGHT() - * TOKENLOWER() TOKENUPPER() WORDREPL() - * WORDSWAP() - * - * Thus, these functions allow to pass the string by reference [@] to - * the function so that it may not be necessary to return the transformed - * string. By calling CSETREF (.T.), the above mentioned functions return - * the value .F. instead of the transformed string if the string is - * passed by reference to the function. - * The switch is turned off (.F.) by default. - * - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * This function is fully CT3 compatible. - * $PLATFORMS$ - * All - * $FILES$ - * Source is ctstr.c, library is ct3. - * $SEEALSO$ - * ADDASCII() BLANK() CHARADD() - * CHARAND() CHARMIRR() CHARNOT() - * CHAROR() CHARRELREP() CHARREPL() - * CHARSORT() CHARSWAP() CHARXOR() - * CRYPT() JUSTLEFT() JUSTRIGHT() - * POSCHAR() POSREPL() RANGEREPL() - * REPLALL() REPLLEFT() REPLRIGHT() - * TOKENLOWER() TOKENUPPER() WORDREPL() - * WORDSWAP() - * $END$ - */ - HB_FUNC( CSETREF ) { hb_retl( ct_getref() ); @@ -381,7 +310,6 @@ HB_FUNC( CSETREF ) } } - /* * CSETATMUPA() stuff */ @@ -394,57 +322,12 @@ void ct_setatmupa( int iNewSwitch ) siAtMupaSwitch = iNewSwitch; } - int ct_getatmupa( void ) { HB_TRACE( HB_TR_DEBUG, ( "ct_getatmupa()" ) ); return siAtMupaSwitch; } - -/* $DOC$ - * $FUNCNAME$ - * CSETATMUPA() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Determine "multi-pass" behaviour in some string functions - * $SYNTAX$ - * CSETATMUPA ([]) -> lOldSwitch - * $ARGUMENTS$ - * [] .T. -> turn "multi-pass" on - * .F. -> turn "multi-pass" off - * $RETURNS$ - * lOldSwitch old (if lNewSwitch is a logical value) or - * current state of the switch - * $DESCRIPTION$ - * CSETATMUPA determines how the following CT3 string functions - * - * ATNUM() AFTERATNUM() BEFORATNUM() - * ATREPL() NUMAT() ATADJUST() - * WORDTOCHAR() WORDREPL() - * - * perform their work. See the respective function documentation for a - * further description how the switch influences these functions. - * - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * This function is fully CT3 compatible. - * $PLATFORMS$ - * All - * $FILES$ - * Source is ctstr.c, library is ct3. - * $SEEALSO$ - * ATNUM() AFTERATNUM() BEFORATNUM() - * ATREPL() NUMAT() ATADJUST() - * WORDTOCHAR() WORDREPL() - * $END$ - */ - - HB_FUNC( CSETATMUPA ) { hb_retl( ct_getatmupa() ); @@ -465,7 +348,6 @@ HB_FUNC( CSETATMUPA ) } } - /* * SETATLIKE() stuff */ @@ -479,87 +361,24 @@ void ct_setatlike( int iNewMode ) siAtLikeMode = iNewMode; } - int ct_getatlike( void ) { HB_TRACE( HB_TR_DEBUG, ( "ct_getatlike()" ) ); return siAtLikeMode; } - void ct_setatlikechar( char cNewChar ) { HB_TRACE( HB_TR_DEBUG, ( "ct_setatlikechar(\'%c\')", cNewChar ) ); scAtLikeChar = cNewChar; } - char ct_getatlikechar( void ) { HB_TRACE( HB_TR_DEBUG, ( "ct_getatlikechar()" ) ); return scAtLikeChar; } - -/* $DOC$ - * $FUNCNAME$ - * SETATLIKE() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Determine scan behaviour in some string functions - * $SYNTAX$ - * SETATLIKE ([] [, <[@]cWildcard>]) --> nOldMode - * $ARGUMENTS$ - * [] CT_SETATLIKE_EXACT -> characters are compared exactly - * CT_SETATLIKE_WILDCARD -> characters are compared using - * a wildcard character - * The default value is CT_SETATLIKE_EXACT. - * [<[@]cWildcard>] determines the character that is subsequently used - * as a wildcard character for substring scanning. - * The default value is "?". - * NEW: If this parameter is passed by reference [@], - * the current wildcard character is stored in - * . - * $RETURNS$ - * nOldMode old (if nMode is a numeric value) or - * current state of the switch - * $DESCRIPTION$ - * In the following CT3 functions, strings are compared on a character - * base: - * - * ATADJUST() ATNUM() AFTERATNUM() - * BEFOREATNUM() ATREPL() NUMAT() - * STRDIFF() - * - * With the SETATLIKE function, one can determine when characters are - * considered to match within these functions. If CT_SETATLIKE_WILDCARD - * is set (e.g. "?"), then "?" matches every other character. - * - * can be one of the following values that are defined - * in ct.ch - * - * Definition | Value - * ----------------------|------ - * CT_SETATLIKE_EXACT | 0 - * CT_SETATLIKE_WILDCARD | 1 - * - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * This function is fully CT3 compatible, but allows to pass the - * second parameter by reference so that the current wildcard character - * can be determined. - * $PLATFORMS$ - * All - * $FILES$ - * Source is ctstr.c, header is ct.ch, library is ct3. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( SETATLIKE ) { diff --git a/harbour/contrib/hbct/ctwfunc.c b/harbour/contrib/hbct/ctwfunc.c index 449676ecf8..7360ff3539 100644 --- a/harbour/contrib/hbct/ctwfunc.c +++ b/harbour/contrib/hbct/ctwfunc.c @@ -72,7 +72,6 @@ static int hb_ctColorParam( int iParam, int iDefault ) return iColor; } - HB_FUNC( CTWINIT ) { hb_retl( hb_ctwInit() ); diff --git a/harbour/contrib/hbct/ctwin.c b/harbour/contrib/hbct/ctwin.c index e6f89f09d4..e48d9714c6 100644 --- a/harbour/contrib/hbct/ctwin.c +++ b/harbour/contrib/hbct/ctwin.c @@ -1443,7 +1443,6 @@ static void hb_ctw_gt_WriteCon( PHB_GT pGT, const char * pText, HB_SIZE nLength } } - static int hb_ctw_gt_GetCursorStyle( PHB_GT pGT ) { PHB_GTCTW pCTW; diff --git a/harbour/contrib/hbct/cursor.c b/harbour/contrib/hbct/cursor.c index bd8d9709c8..432cd6e7ba 100644 --- a/harbour/contrib/hbct/cursor.c +++ b/harbour/contrib/hbct/cursor.c @@ -69,7 +69,6 @@ HB_FUNC( SAVECURSOR ) hb_retnl( ( long ) iCol | ( iRow << 8 ) | ( iCursor << 16 ) ); } - HB_FUNC( RESTCURSOR ) { long lCursor = hb_parnl( 1 ); diff --git a/harbour/contrib/hbct/datetime.c b/harbour/contrib/hbct/datetime.c index ba1e42888c..797bf752b5 100644 --- a/harbour/contrib/hbct/datetime.c +++ b/harbour/contrib/hbct/datetime.c @@ -53,7 +53,6 @@ * */ - /* * The following parts are Copyright of the individual authors. * www - http://harbour-project.org @@ -65,39 +64,10 @@ * */ - #include "hbapi.h" #include "hbapiitm.h" #include "hbdate.h" -/* $DOC$ - * $FUNCNAME$ - * BOM() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * _B_egin _O_f _M_onth - * $SYNTAX$ - * BOM ([]) -> dDateBeginOfMonth - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * BOM() is compatible with CT3's BOM(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is datetime.prg, library is libct. - * $SEEALSO$ - * EOM(),BOQ(),EOQ(),BOY(),EOY() - * $END$ - */ - HB_FUNC( BOM ) { long lDate; @@ -124,35 +94,6 @@ HB_FUNC( BOM ) } } - -/* $DOC$ - * $FUNCNAME$ - * EOM() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * _E_nd _O_f _M_onth - * $SYNTAX$ - * EOM ([]) -> dDateEndOfMonth - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * EOM() is compatible with CT3's EOM(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is datetime.prg, library is libct. - * $SEEALSO$ - * BOM(),BOQ(),EOQ(),BOY(),EOY() - * $END$ - */ - HB_FUNC( EOM ) { long lDate; @@ -185,35 +126,6 @@ HB_FUNC( EOM ) } } - -/* $DOC$ - * $FUNCNAME$ - * BOQ() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * _B_egin _O_f _Q_uarter - * $SYNTAX$ - * BOQ ([]) -> dDateBeginOfQuarter - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * BOQ() is compatible with CT3's BOQ(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is datetime.prg, library is libct. - * $SEEALSO$ - * BOM(),EOM(),EOQ(),BOY(),EOY() - * $END$ - */ - HB_FUNC( BOQ ) { long lDate; @@ -242,35 +154,6 @@ HB_FUNC( BOQ ) } } - -/* $DOC$ - * $FUNCNAME$ - * EOQ() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * _E_nd _O_f _Q_uarter - * $SYNTAX$ - * EOQ ([]) -> dDateEndOfQuarter - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * EOQ() is compatible with CT3's EOQ(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is datetime.prg, library is libct. - * $SEEALSO$ - * BOM(),EOM(),BOQ(),BOY(),EOY() - * $END$ - */ - HB_FUNC( EOQ ) { long lDate; @@ -304,35 +187,6 @@ HB_FUNC( EOQ ) } } - -/* $DOC$ - * $FUNCNAME$ - * BOY() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * _B_egin _O_f _Y_ear - * $SYNTAX$ - * BOY ([]) -> dDateBeginOfYear - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * BOY() is compatible with CT3's BOY(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is datetime.prg, library is libct. - * $SEEALSO$ - * BOM(),EOM(),BOQ(),EOQ(),EOY() - * $END$ - */ - HB_FUNC( BOY ) { long lDate; @@ -359,35 +213,6 @@ HB_FUNC( BOY ) } } - -/* $DOC$ - * $FUNCNAME$ - * EOY() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * _E_nd _O_f _Y_ear - * $SYNTAX$ - * EOY ([]) -> dDateEndOfYear - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * EOY() is compatible with CT3's EOY(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is datetime.prg, library is libct. - * $SEEALSO$ - * BOM(),EOM(),BOQ(),EOQ(),BOY() - * $END$ - */ - HB_FUNC( EOY ) { long lDate; @@ -414,7 +239,6 @@ HB_FUNC( EOY ) } } - static int hb_wom( int iYear, int iMonth, int iDay ) { int iWom; diff --git a/harbour/contrib/hbct/dattime2.c b/harbour/contrib/hbct/dattime2.c index 9bdd5f7113..01245c54c9 100644 --- a/harbour/contrib/hbct/dattime2.c +++ b/harbour/contrib/hbct/dattime2.c @@ -69,7 +69,6 @@ #include "hbdate.h" #include "hbset.h" - static HB_BOOL ct_isleap( int iYear ) { return iYear != 0 && ( ( ( iYear & 3 ) == 0 && iYear % 100 != 0 ) || @@ -105,34 +104,6 @@ static int ct_doy( long lDate ) return ( int ) ( lDate - lFirst + 1 ); } - -/* $DOC$ - * $FUNCNAME$ - * CTODOW() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * convert name of day of the week to its ordinal number - * $SYNTAX$ - * CTODOW () -> nOrdinal - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * CTODOW() is compatible with CT3's CTODOW(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * NTOCDOW() - * $END$ - */ HB_FUNC( CTODOW ) { HB_SIZE nLen = hb_parclen( 1 ); @@ -153,34 +124,6 @@ HB_FUNC( CTODOW ) hb_retnl( iDow ); } - -/* $DOC$ - * $FUNCNAME$ - * CTOMONTH() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * convert name of month to its ordinal number - * $SYNTAX$ - * CTOMONTH () -> nOrdinal - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * CTOMONTH() is compatible with CT3's CTOMONTH(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * NTOCMONTH() - * $END$ - */ HB_FUNC( CTOMONTH ) { HB_SIZE nLen = hb_parclen( 1 ); @@ -200,36 +143,6 @@ HB_FUNC( CTOMONTH ) hb_retnl( iMonth ); } - -/* $DOC$ - * $FUNCNAME$ - * DMY() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * Returns the date as a string in DD Month YY format - * $SYNTAX$ - * DMY ([][, ]) -> cDateString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * Returns the date as a string in DD Month YY format. If lmode - * is TRUE, a "." is inserted after the DD - * TODO: add further documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * DMY() is compatible with CT3's DMY(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * MDY() - * $END$ - */ HB_FUNC( DMY ) { int iYear, iMonth, iDay; @@ -292,36 +205,6 @@ HB_FUNC( DMY ) hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * MDY() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * Returns the date as a string in Month DD, YY or Month DD, YYYY - * $SYNTAX$ - * MDY ([]) -> cDateString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * Returns the date as a string in Month DD, YY or Month DD, YYYY - * If dDate is NULL, the system date is used - * TODO: add further documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * MDY() is compatible with CT3's MDY(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * DMY() - * $END$ - */ HB_FUNC( MDY ) { int iYear, iMonth, iDay; @@ -370,34 +253,6 @@ HB_FUNC( MDY ) hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * ADDMONTH() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * add months to a date - * $SYNTAX$ - * ADDMONTH ([,] ) -> dShiftedDate - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * ADDMONTH() is compatible with CT3's ADDMOTH(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( ADDMONTH ) { long lJulian, lMillisec = 0; @@ -449,35 +304,6 @@ HB_FUNC( ADDMONTH ) hb_retdl( lJulian ); } - -/* $DOC$ - * $FUNCNAME$ - * DOY() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * Determines the day of the year for a specific date - * $SYNTAX$ - * DMY ([]) -> nDayOfYear - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * Determines the day of the year for a specific date - * if dDate is invalid, returns 0 - * TODO: add further documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * DOY() is compatible with CT3's DOY(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * $END$ - */ HB_FUNC( DOY ) { long lDate; @@ -495,33 +321,6 @@ HB_FUNC( DOY ) hb_retni( ct_doy( lDate ) ); } - -/* $DOC$ - * $FUNCNAME$ - * ISLEAP() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * determines of year of date is a leap year - * $SYNTAX$ - * ISLEAP ([]) -> lIsLeap - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add further documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * ISLEAP() is compatible with CT3's ISLEAP(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * $END$ - */ HB_FUNC( ISLEAP ) { int iYear, iMonth, iDay; @@ -534,36 +333,6 @@ HB_FUNC( ISLEAP ) hb_retl( ct_isleap( iYear ) ); } - -/* $DOC$ - * $FUNCNAME$ - * DAYSTOMONTH() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * Total number of days from first of Jan to beginning of nMonth. - * $SYNTAX$ - * DAYSTOMONTH (, ) -> nDaysToMonth - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * lLeap is FALSE for a non-leap year but TRUE if it is. If so and nMonth - * is greater than 2, ndays is incremented - * TODO: add further documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * DAYSTOMONTH() is a new function in Harbour's CT3 library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * DAYSINMONTH() - * $END$ - */ HB_FUNC( DAYSTOMONTH ) { int iMonth = hb_parni( 1 ); @@ -572,34 +341,6 @@ HB_FUNC( DAYSTOMONTH ) hb_retni( ct_daystomonth( iMonth, bLeap ) ); } - -/* $DOC$ - * $FUNCNAME$ - * DAYSINMONTH() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * Returns the number of days in month - * $SYNTAX$ - * DAYSINMONTH (, ) -> nDaysInMonth - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * DAYSINMONTH() is a new function in Harbour's CT3 library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * DAYSTOMONTH() - * $END$ - */ HB_FUNC( DAYSINMONTH ) { int iMonth = hb_parni( 1 ); @@ -609,35 +350,6 @@ HB_FUNC( DAYSINMONTH ) } - -/* $DOC$ - * $FUNCNAME$ - * QUARTER() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * Returns a number equal to the quarter in which a date falls - * $SYNTAX$ - * QUARTER ([]) -> nQuarter - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * Returns a number equal to the quarter in which ddate - * falls. If ddate is empty, the system date is employed. - * TODO: add further documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * QUARTER() is compatible with CT3's QUARTER(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * $END$ - */ HB_FUNC( QUARTER ) { int iYear, iMonth, iDay; @@ -650,37 +362,6 @@ HB_FUNC( QUARTER ) hb_retni( ( iMonth + 2 ) / 3 ); } - -/* $DOC$ - * $FUNCNAME$ - * LASTDAYOM() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * Returns the the number of days in the month. - * $SYNTAX$ - * LASTDAYOM ([]) -> nDaysInMonth - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * can be a date or a month number. If empty uses the - * system date. If nMonth is a 2, lastdayom() will not know if it - * is a leap year or not. If dDate is invalid, returns 0 - * TODO: add further documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * LASTDAYOM() is compatible with CT3's LASTDAYOM(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * EOM() - * $END$ - */ HB_FUNC( LASTDAYOM ) { HB_BOOL bLeap = HB_FALSE; @@ -702,109 +383,16 @@ HB_FUNC( LASTDAYOM ) } - -/* $DOC$ - * $FUNCNAME$ - * NTOCDOW() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * (num of day) -> day name - * $SYNTAX$ - * NTOCDOW () -> cDay - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * NTOCDOW() is compatible with CT3's NTOCDOW(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * CTODOW() - * $END$ - */ HB_FUNC( NTOCDOW ) { hb_retc( hb_dateCDOW( hb_parni( 1 ) ) ); } - -/* $DOC$ - * $FUNCNAME$ - * NTOCMONTH() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * (num of month ) -> Month Name - * $SYNTAX$ - * NTOCMONTH () -> cMonth - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * NTOCMONTH() is compatible with CT3's NTOCMONTH(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * CTOMONTH() - * $END$ - */ HB_FUNC( NTOCMONTH ) { hb_retc( hb_dateCMonth( hb_parni( 1 ) ) ); } - -/* $DOC$ - * $FUNCNAME$ - * WEEK() - * $CATEGORY$ - * CT3 date and time functions - * $ONELINER$ - * Returns the calendar week a number - * $SYNTAX$ - * WEEK ([][, ]) -> nWeek - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * Returns the calendar week a number. If no date is specified, - * the system date is used. An empty date viz ctod(" / / ") - * returns 0. - * If is .T., week() will calculate the "simple week number", defined by - * - week #1 starts on January, 1st - * - week #(n+1) starts seven days after start of week #n - * If is .F. (default), the ISO8601 week number, defined by - * - weeks start on mondays - * - week #1 is the one that includes January, 4 - * will be calculated - * TODO: add further documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * WEEK() is compatible with CT3's WEEK(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is dattime2.prg, library is libct. - * $SEEALSO$ - * $END$ - */ HB_FUNC( WEEK ) { int iYear, iMonth, iDay, iWeek; diff --git a/harbour/contrib/hbct/dattime3.c b/harbour/contrib/hbct/dattime3.c index 26c572b264..3787768f95 100644 --- a/harbour/contrib/hbct/dattime3.c +++ b/harbour/contrib/hbct/dattime3.c @@ -66,57 +66,6 @@ #include - -/* $DOC$ - * $FUNCNAME$ - * WAITPERIOD() - * $CATEGORY$ - * HBCT date and time functions - * $ONELINER$ - * Pauses a specified time in increments of 1/100 seconds - * $SYNTAX$ - * WAITPERIOD([]) --> lNotElapsed - * $ARGUMENTS$ - * Designates the waiting period at initialization in - * 1/100ths of seconds. Values from 1 to 8, 640, 000 (one day) are - * possible. - * $RETURNS$ - * WAITPERIOD() returns .T. , if the time span designated at initialization - * has not elapsed. - * $DESCRIPTION$ - * This function sets a time span for a xHarbour DO WHILE loop to run. - * The function must initialize prior to the loop, since you must specify - * the parameter in 1/100th seconds. Subsequently, the function - * can be implemented without a parameter for additional loop conditions. - * It returns .T., as long as the designated time span has not yet run out. - * - * Note - * - * The function notes the status of the internal timer at - * initialization. From that point on, the initialization should always - * precede the respective DO WHILE; otherwise, the time delay is - * incorrect. The passing of midnight (the time resets to the 0 value) - * is taken into account. - * $EXAMPLES$ - * Run a loop for 5 seconds: - * - * WAITPERIOD(500) // Initialization, 5 seconds - * DO WHILE .AND. .AND. WAITPERIOD() - * *... - * ENDDO - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * WAITPERIOD() is Clipper Tools compatible. - * $PLATFORMS$ - * Windows - * $FILES$ - * Source is dattime3.c, library is libct. - * $SEEALSO$ - * $END$ - */ - /* TODO: make it MT safe */ static double s_dTimeSet = 0; static double s_dTimeCounter = 0; @@ -165,124 +114,11 @@ static HB_BOOL _hb_timeValid( const char * szTime, HB_SIZE nLen, int * piDecode return fValid; } -/* $DOC$ - * $FUNCNAME$ - * TIMEVALID() - * $CATEGORY$ - * HBCT Date and Time Functions - * $ONELINER$ - * Determines whether a specIFied time is valid - * $SYNTAX$ - * TIMEVALID() --> lValid - * $ARGUMENTS$ - * Designates a character string that contains the time to - * test. - * $RETURNS$ - * TIMEVALID() RETURNs .T. when is a valid time; or .F. when - * is an invalid time. - * $DESCRIPTION$ - * With input that requires time manipulation, writing your own UDF to - * check time inputs was unavoidable up to now. TIMEVALID() permits - * Complete checking of a time designation. You can use this FUNCTION - * effectively with a VALID clause within a READ mask. - * - * Note - * - * Note the format for time designations. There must always be - * two digits for hours, minutes, seconds, and hundredths; otherwise, - * the time it is regarded as invalid. Valid examples are "12", - * "12:59", "12:59:59", and "12:59:59:99". By contrast, invalid - * examples are "24", "12:60", or "12:1", and/or "12:". IF you work - * with time strings that are not completely filled and that you need to - * check with TIMEVALID(), then they must be TRIMmed prior to the use of - * TIMEVALID() (see following Examples). - * $EXAMPLES$ - * Using the VALID clause with TRIM, all valid times are - * accepted, even IF no seconds or minutes are specIFied: - * - * cBegin := SPACE(11) - * @ 5, 10 SAY "Please input time for beginning work:"; - * GET cBegin VALID TIMEVALID(TRIM(cBegin)) - * READ - * - * Using a VALID clause without TRIM, hours and minutes must be - * specified, so that TIMEVALID() can confirm a valid time: - * - * cBegin := SPACE(5) - * @ 5, 10 SAY "Please input time for beginning work:"; - * GET cBegin VALID TIMEVALID(cBegin) - * READ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * This function is CA-Cl*pper Tools compatible. - * $PLATFORMS$ - * Windows - * $FILES$ - * Source is dattime3.c, library is libct. - * $SEEALSO$ - * SETTIME() - * $END$ - */ - HB_FUNC( TIMEVALID ) { hb_retl( _hb_timeValid( hb_parc( 1 ), hb_parclen( 1 ), NULL ) ); } - -/* $DOC$ - * $FUNCNAME$ - * SETTIME() - * $CATEGORY$ - * HBCT Date and Time Functions - * $ONELINER$ - * Sets the system clock - * $SYNTAX$ - * SETTIME(, []) --> lSet - * $ARGUMENTS$ - * Designates a character string that contains the time that - * is to become the system time. - * - * Designates whether the time should also be set in the - * CMOS-RAM of an AT. The default is do not write to CMOS-RAM. Note that in - * Windows plataform this adjust is automatic, therefore this parameter is - * without efect. - * $RETURNS$ - * The FUNCTION RETURNs .T. when the time is set successfully. - * $DESCRIPTION$ - * When you use this FUNCTION to convert the time into the system time from - * within your xHarbour application, all files acquire this time with - * each write procedure. - * $EXAMPLES$ - * Set the system time in each case; but the hardware clock only - * on an AT: - * - * cNewTime := "10:20:00" - * IF ISAT() - * SETTIME(cNewTime, .T.) - * ELSE - * SETTIME(cNewTime) - * ENDIF - * - * Or, more compactly: - * - * SETTIME(cNewTime, ISAT()) - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * This function is CA-Cl*pper Tools compatible. - * $PLATFORMS$ - * Windows - * $FILES$ - * Source is dattime3.c, library is libct. - * $SEEALSO$ - * SETDATE(),TIMEVALID() - * $END$ - */ - HB_FUNC( SETTIME ) { HB_BOOL fResult = HB_FALSE; @@ -314,57 +150,6 @@ HB_FUNC( SETTIME ) hb_retl( fResult ); } - -/* $DOC$ - * $FUNCNAME$ - * SETDATE() - * $CATEGORY$ - * HBCT Date and Time Functions - * $ONELINER$ - * Sets the system date - * $SYNTAX$ - * SETDATE(, []) --> lSet - * $ARGUMENTS$ - * Designates which date to use to set the system date. - * - * Designates whether the date should also be set in the CMOS- - * RAM of an AT. The default is do not write (.F.). Note that in Windows - * plataform this adjust is automatic, therefore this parameter is without - * efect. - * $RETURNS$ - * SETDATE() RETURNs .T. when the date is successfully set. - * $DESCRIPTION$ - * When you use this FUNCTION to set the system date from within your - * xHarbour application, all files acquire this date with each write - * procedure. - * $EXAMPLES$ - * Set the system date in each case; but the hardware clock only - * on an AT: - * - * dNewDate := CTOD("07/30/91") - * IF ISAT() - * SETDATE(dNewDate, .T.) - * ELSE - * SETDATE(dNewDate) - * ENDIF - * - * Or, more compactly: - * - * SETDATE(dNewDate, ISAT()) - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * This function is CA-Cl*pper Tools compatible. - * $PLATFORMS$ - * Windows - * $FILES$ - * Source is dattime3.c, library is libct. - * $SEEALSO$ - * SETTIME() - * $END$ - */ - HB_FUNC( SETDATE ) { HB_BOOL fResult = HB_FALSE; diff --git a/harbour/contrib/hbct/disk.c b/harbour/contrib/hbct/disk.c index 7bdf6cbcc2..31bb096891 100644 --- a/harbour/contrib/hbct/disk.c +++ b/harbour/contrib/hbct/disk.c @@ -77,7 +77,6 @@ #include #endif - HB_FUNC( DIRMAKE ) { if( hb_fsMkDir( hb_parcx( 1 ) ) ) @@ -109,7 +108,6 @@ HB_FUNC( DIRNAME ) hb_retc_buffer( pbyBuffer ); } - HB_FUNC( DRIVETYPE ) { #if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) @@ -157,7 +155,6 @@ HB_FUNC( DRIVETYPE ) } - HB_FUNC( NUMDISKL ) { #if defined( HB_OS_DOS ) @@ -180,7 +177,6 @@ HB_FUNC( NUMDISKL ) #endif } - /* * Volume() depends of the CSETSAFETY() setting and, if is true, does not * overwrite an existing label. diff --git a/harbour/contrib/hbct/doc/en/addascii.txt b/harbour/contrib/hbct/doc/en/addascii.txt new file mode 100644 index 0000000000..7f94f91218 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/addascii.txt @@ -0,0 +1,67 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ADDASCII() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Add an integer value to an ascii value of a string + * $SYNTAX$ + * ADDASCII (<[@]cString>, , [], []) --> cString + * $ARGUMENTS$ + * <[@]cString> is the string that should be edited + * is a integer value that should be added to the + * ASCII value of the character at the th position + * [] is the position of the character that should be edited. + * If not supplied, the last character of <[@]cString> is + * edited. + * [] NEW: is set to .T. if the substring from position 1 to + * position should be treated as an integer + * written to the base 256. Thus, the addition of + * can affect to whole substring (see EXAMPLES). + * Default is .F., the original behaviour of this function. + * $RETURNS$ + * The edited string is returned. The return value can be suppressed by + * using the CSETREF() function. The string must then be passed by + * reference [@]. + * $DESCRIPTION$ + * ADDASCII() can be used to add or subtract integer values from + * ASCII values in a string. The new parameter allows + * to treat a string as an integer written to the base 256. Since + * is limited to a signed long, only substrings 4 characters + * long can be affected by one ADDASCII() call. + * If the length of <[@]cString> is smaller than , the + * string remains unchanged. The same happens, if uninterpretable + * parameters are passed to this function. + * $EXAMPLES$ + * // Add 32 to the ASCII value of the character at the last position + * // in the string + * + * ? addascii ("SmitH", 32) --> "Smith" + * $TESTS$ + * addascii ("0000", 1, 1) == "1000" + * addascii ("0000", 1) == "0001" + * addascii ("AAAA", -255, 1) == "BAAA" + * addascii ("AAAA", -255) == "AAAB" + * addascii ("AAAA", 1, 2, .T.) == "ABAA" + * addascii ("AAAA", 257, 2, .T.) == "BBAA" + * addascii ("AAAA", 257, 2, .F.) == "ABAA" + * addascii ("AAAA", 258,, .T.) == "AABC" + * addascii ("ABBA", -257, 3, .T.) == "AAAA" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * ADDASCII() is compatible with CT3's ADDASCII(). + * A new, 4th, parameter has been added who defaults to the original + * behaviour if omitted. + * $PLATFORMS$ + * All + * $FILES$ + * Source is addascii.c, library is ct3. + * $SEEALSO$ + * CSETREF() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/asciisum.txt b/harbour/contrib/hbct/doc/en/asciisum.txt new file mode 100644 index 0000000000..6d971907a9 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/asciisum.txt @@ -0,0 +1,41 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ASCIISUM() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * calculate the sum of the ASCII values of the characters in a string + * $SYNTAX$ + * ASCIISUM () --> nAsciiSum + * $ARGUMENTS$ + * the string to be processed + * $RETURNS$ + * sum of the ASCII values in + * $DESCRIPTION$ + * The ASCIISUM() function sums up the ASCII values of the characters + * in . Be aware that the function is not position sensitive, + * i.e. a change of position of a certain character in the string does + * not change the ascii sum. + * $EXAMPLES$ + * ? asciisum ("ABC") --> 197 + * ? asciisum ("ACB") --> 197 + * $TESTS$ + * asciisum (replicate ("A", 10000)) == 650000 + * asciisum ("0123456789") == 525 + * asciisum (nil) == 0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * ASCIISUM() is compatible with CT3's ASCIISUM(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is asciisum.c, library is ct3. + * $SEEALSO$ + * CHECKSUM() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/ascpos.txt b/harbour/contrib/hbct/doc/en/ascpos.txt new file mode 100644 index 0000000000..b8a901337e --- /dev/null +++ b/harbour/contrib/hbct/doc/en/ascpos.txt @@ -0,0 +1,85 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ASCPOS() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * ASCII value of a character at a certain position + * $SYNTAX$ + * ASCPOS (, []) --> nAsciiValue + * $ARGUMENTS$ + * is the processed string + * [] is an optional position within + * Default: last position in + * $RETURNS$ + * the ASCII value of the character at the specified + * position + * $DESCRIPTION$ + * The ASCPOS() function returns the ASCII value of the character that + * can be found at the position in . If + * is larger than the length of , 0 is returned. + * $EXAMPLES$ + * ? ascpos ("0123456789") --> 57 + * ? ascpos ("0123456789",1) --> 48 + * $TESTS$ + * ascpos ("0123456789") == 57 + * ascpos ("0123456789",1) == 48 + * ascpos ("0123456789",11) == 0 // to large ! + * $STATUS$ + * Ready + * $COMPLIANCE$ + * ASCPOS() is compatible with CT3's ASCPOS(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is asciisum.c, library is libct. + * $SEEALSO$ + * VALPOS() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * VALPOS() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Numerical value of a character at a certain position + * $SYNTAX$ + * VALPOS (, []) --> nDigitValue + * $ARGUMENTS$ + * is the processed string + * [] is an optional position within + * Default: last position in + * $RETURNS$ + * the numerical value of the character at the specified + * position + * $DESCRIPTION$ + * The VALPOS() function returns the numerical value of the character that + * can be found at the position in . If no digit + * can be found at this position or if + * is larger than the length of , 0 is returned. + * $EXAMPLES$ + * ? valpos ("1234x56789") --> 9 + * ? valpos ("1234x56789",1) --> 1 + * $TESTS$ + * valpos ("1234x56789") == 9 + * valpos ("1234x56789",1) == 1 + * valpos ("1234x56789",11) == 0 // to large ! + * valpos ("1234x56789",5) == 0 // "x" is not a digit ! + * $STATUS$ + * Ready + * $COMPLIANCE$ + * VALPOS() is compatible with CT3's VALPOS(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is asciisum.c, library is libct. + * $SEEALSO$ + * ASCPOS() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/atadjust.txt b/harbour/contrib/hbct/doc/en/atadjust.txt new file mode 100644 index 0000000000..243ff5e094 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/atadjust.txt @@ -0,0 +1,47 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ATADJUST() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Adjusts a sequence within a string to a specified position + * $SYNTAX$ + * ATADJUST (, , , + * [], [], + * []) -> cString + * $ARGUMENTS$ + * is the sequence to be adjusted within + * is the string that contains + * specifies the position to that + * will be adjusted + * [] specifies which occurence of + * in is to be adjusted + * Default: last occurence + * [] specifies how many characters should be omitted + * in the scan + * [] specifies the character that is used for the + * adjustment + * $RETURNS$ + * cString the changed string + * $DESCRIPTION$ + * + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * ATADJUST() works like CT3's ATADJUST() + * $PLATFORMS$ + * All + * $FILES$ + * Source is atadjust.c, library is ct3. + * $SEEALSO$ + * SETATLIKE(),CSETATMUPA() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/atnum.txt b/harbour/contrib/hbct/doc/en/atnum.txt new file mode 100644 index 0000000000..ac6ccf4142 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/atnum.txt @@ -0,0 +1,170 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * AFTERATNUM() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Returns string portion after nth occurence of substring + * $SYNTAX$ + * AFTERATNUM (, , [], + * [] ) --> cRestString + * $ARGUMENTS$ + * is the substring scanned for + * is the scanned string + * [] determines how many occurences are of + * in are searched + * Default: search last occurence + * [] determines how many character from the start + * should be ignored in the search + * Default: 0 + * $RETURNS$ + * the portion of after the th + * occurence of in + * If such a rest does not exist, an empty string + * is returned. + * $DESCRIPTION$ + * This function scans for . After the + * th match (or the last one, depending on the value of + * ) has been found, the portion of + * after that match will be returned. If there aren't enough + * matches or the last match is identical to the end of , an + * empty string will be returned. + * After a match has been found, the function continues to scan after + * that match if the CSETATMUPA() switch is turned off, with the + * second character of the matched substring otherwise. + * The function will also consider the settings of SETATLIKE(). + * $EXAMPLES$ + * ? AFTERATNUM ("!", "What is the answer ? 4 ! 5 !") -> "" + * ? AFTERATNUM ("!", "What is the answer ? 4 ! 5 ?") -> " 5 ?" + * + * $TESTS$ + * AFTERATNUM ("..", "..This..is..a..test!") == "test!" + * AFTERATNUM ("..", "..This..is..a..test!", 2) == "is..a..test!" + * AFTERATNUM ("..", "..This..is..a..test!", 2, 2) == "a..test!" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * AFTERATNUM() is compatible with CT3's AFTERATNUM(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is atnum.c, library is libct. + * $SEEALSO$ + * ATNUM(),BEFORATNUM(),CSETATMUPA(),SETATLIKE() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * BEFORATNUM() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Returns string portion before nth occurence of substring + * $SYNTAX$ + * BEFORATNUM (, , [], + * [] ) --> cRestString + * $ARGUMENTS$ + * is the substring scanned for + * is the scanned string + * [] determines how many occurences are of + * in are searched + * Default: search last occurence + * [] determines how many character from the start + * should be ignored in the search + * Default: 0 + * $RETURNS$ + * the portion of before the th + * occurence of in + * If such a string does not exist, an empty string + * is returned. + * $DESCRIPTION$ + * This function scans for . After the + * th match (or the last one, depending on the value of + * ) has been found, the portion of + * before that match will be returned. If there aren't enough + * matches or the last match is identical to the start of + * (i.e. the last match is the first match), an empty string will be returned. + * After a match has been found, the function continues to scan after + * that match if the CSETATMUPA() switch is turned off, with the + * second character of the matched substring otherwise. + * The function will also consider the settings of SETATLIKE(). + * $EXAMPLES$ + * ? BEFORATNUM ("!", "What is the answer ? 4 ! 5 !") -> "What is the answer ? 4 ! 5 " + * ? BEFORATNUM ("!", "What is the answer ? 4 ! 5 ?") -> "What is the answer ? 4 " + * + * $TESTS$ + * BEFORATNUM ("..", "..This..is..a..test!") == "..This..is..a" + * BEFORATNUM ("..", "..This..is..a..test!", 2) == "..This" + * BEFORATNUM ("..", "..This..is..a..test!", 2, 2) == "..This..is" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * BEFORATNUM() is compatible with CT3's BEFORATNUM(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is atnum.c, library is ct3. + * $SEEALSO$ + * ATNUM() AFTERATNUM() CSETATMUPA() SETATLIKE() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ATNUM() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Returns the start position of the nth occurence of a substring in a string + * $SYNTAX$ + * ATNUM (, , [], + * [] ) --> nPosition + * $ARGUMENTS$ + * is the substring scanned for + * is the scanned string + * [] determines how many occurences are of + * in are searched + * Default: search last occurence + * [] determines how many character from the start + * should be ignored in the search + * Default: 0 + * $RETURNS$ + * the position of the th + * occurence of in . + * If such an occurence does not exist, 0 + * is returned. + * $DESCRIPTION$ + * This function scans for . After the + * th match (or the last one, depending on the value of + * ) has been found, the position of + * that match will be returned. If there aren't enough + * matches or there is no last match, 0 will be returned. + * After a match has been found, the function continues to scan after + * that match if the CSETATMUPA() switch is turned off, with the + * second character of the matched substring otherwise. + * The function will also consider the settings of SETATLIKE(). + * $EXAMPLES$ + * ? ATNUM ("!", "What is the answer ? 4 ! 5 !") -> 28 + * ? ATNUM ("!", "What is the answer ? 4 ! 5 ?") -> 24 + * + * $TESTS$ + * ATNUM ("..", "..This..is..a..test!") == 14 + * ATNUM ("..", "..This..is..a..test!", 2) == 7 + * ATNUM ("..", "..This..is..a..test!", 2, 2) == 11 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * ATNUM() is compatible with CT3's ATNUM(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is atnum.c, library is libct. + * $SEEALSO$ + * ATNUM() AFTERATNUM() CSETATMUPA() SETATLIKE() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/atrepl.txt b/harbour/contrib/hbct/doc/en/atrepl.txt new file mode 100644 index 0000000000..36893e5327 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/atrepl.txt @@ -0,0 +1,68 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ATREPL() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Search and replace sequences in a string + * $SYNTAX$ + * ATREPL (, , , [], + * [], []) --> cString + * $ARGUMENTS$ + * is the substring searched for in + * is the processed string + * is the replacement for sequences found + * [] specifies the number of replacements + * Default: last occurence + * [] if set to .T., only the th sequence + * of will be replaced, else + * all sequences will be replaced. + * Default: .F. + * []) specifies how many characters in from + * the beginning should be ignored by the function + * Default: 0 + * $RETURNS$ + * + * $DESCRIPTION$ + * The ATREPL() function searches and replaces sequences in a string. + * First, the function ignores the first characters of . + * Then, if is set to .T., it searches for the th + * occurence of in . If successful, the + * sequence will be replaced with . + * If is set to .F., the same search is performed, but EVERY + * occurence of till the th (inclusive) will + * be replaced with . Note that, in this case, + * the replacements are performed even if the th occurence + * does not exist. + * By using the CSETATMUPA() switch you can decide whether the + * function restarts searching after a found sequence of after + * the first character of that sequence. + * The function allows the use of wildcards in + * and looks for the settings of SETATLIKE(). + * $EXAMPLES$ + * ? ATREPL("ABC", "ABCDABCDABC", "xx") --> "xxDxxDxx" + * ? ATREPL("ABC", "ABCDABC", "ZYXW") --> "ZYXWDZYXW" + * ? ATREPL("ABC", "ABCDABCDABC", "xx", 2) --> "xxDxxDABC" + * ? ATREPL("ABC", "ABCDABCDABC", "xx", 2, .T.) --> "ABCDxxDABC" + * $TESTS$ + * ATREPL("ABC", "ABCDABCDABC", "xx") == "xxDxxDxx" + * ATREPL("ABC", "ABCDABC", "ZYXW") == "ZYXWDZYXW" + * ATREPL("ABC", "ABCDABCDABC", "xx", 2) == "xxDxxDABC" + * ATREPL("ABC", "ABCDABCDABC", "xx", 2, .T.) == "ABCDxxDABC" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * ATREPL() is compatible with CT3's ATREPL(). + * Note the new, 6th parameter ! + * $PLATFORMS$ + * All + * $FILES$ + * Source is atrepl.c, library is ct3. + * $SEEALSO$ + * CSETATMUPA() SETATLIKE() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charevod.txt b/harbour/contrib/hbct/doc/en/charevod.txt new file mode 100644 index 0000000000..b05baf39b2 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charevod.txt @@ -0,0 +1,74 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHAREVEN() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Returns the characters on the even positions in a string + * $SYNTAX$ + * CHAREVEN () --> cEvenString + * $ARGUMENTS$ + * processed string + * $RETURNS$ + * a string containing all character from even positions + * in + * $DESCRIPTION$ + * The CHAREVEN() function looks for the characters on the even positions + * in a given string, collects them and returns them as a string. + * $EXAMPLES$ + * ? CHAREVEN (" H E L L O !") -> "HELLO!" + * $TESTS$ + * CHAREVEN (" 1 2 3 4 5") == "12345" + * CHAREVEN (" 1 2 3 4 ") == "1234" + * CHAREVEN (" ") == "" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHAREVEN() is compatible with CT3's CHAREVEN(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charevod.c, library is ct3. + * $SEEALSO$ + * CHARODD() CHARMIX() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARODD() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Returns the characters on the odd positions in a string + * $SYNTAX$ + * CHARODD () --> cOddString + * $ARGUMENTS$ + * processed string + * $RETURNS$ + * a string containing all character from odd positions + * in + * $DESCRIPTION$ + * The CHARODD() function looks for the characters on the odd positions + * in a given string, collects them and returns them as a string. + * $EXAMPLES$ + * ? CHARODD ("H E L L O ! ") -> "HELLO!" + * $TESTS$ + * CHARODD ("1A2B3C4D5E") == "12345" + * CHARODD ("1A2B3C4D5") == "12345" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARODD() is compatible with CT3's CHARODD(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charevod.c, library is ct3. + * $SEEALSO$ + * CHAREVEN() CHARMIX() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charlihb.txt b/harbour/contrib/hbct/doc/en/charlihb.txt new file mode 100644 index 0000000000..ea04501d8f --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charlihb.txt @@ -0,0 +1,81 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARSLIST() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Generates a sorted list of all characters in a string + * $SYNTAX$ + * CHARSLIST ([]) -> cSortedCharacterList + * $ARGUMENTS$ + * [] is the string for whom the function generates a + * sorted list of all characters + * Default: "" (empty string) + * $RETURNS$ + * a sorted list of the characters in + * $DESCRIPTION$ + * The CHARLIST() function generates a sorted list of those characters that + * are contained in . This list can contain each character + * only once, so that its maximum length is 256. The function + * gives the same result as CHARSORT(CHARLIST()) + * $EXAMPLES$ + * ? charslist ("Hello World !") --> " !HWdelor" + * $TESTS$ + * charslist ("Hello World !") == " !HWdelor" + * charslist ("Hello World !") == charsort (charlist ("Hello World !")) + * charslist (nil) == "" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARSLIST() is only available in Harbour's CT3 library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is charlist.c, library is libct. + * $SEEALSO$ + * CHARNOLIST(),CHARLIST(),CHARHIST() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARHIST() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Generates a character histogram of a string + * $SYNTAX$ + * CHARHIST ([]) -> aCharacterCount + * $ARGUMENTS$ + * [] is the string for whom the function generates a + * character histogram + * Default: "" (empty string) + * $RETURNS$ + * an array with 256 elements where the nth element + * contains the count of character #(n-1) in cString + * $DESCRIPTION$ + * The CHARHIST() function generates a character histogram of those + * characters that are contained in . This histogram is stored + * in an 256-element array where the nth element contains the count + * of ASCII character #(n-1) in . + * $EXAMPLES$ + * ? charhist ("Hello World !")[109] --> 3 // chr(108)=="l" + * $TESTS$ + * charhist ("Hello World !")[109] == 3 + * eval ({||aeval (charhist ("Hello World !"),{|x|nTotal+=x}),nTotal==len("Hello World !")} + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARHIST() is only available in Harbour's CT3 library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is charlist.c, library is libct. + * $SEEALSO$ + * CHARLIST(),CHARNOLIST(),CHARSLIST() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charlist.txt b/harbour/contrib/hbct/doc/en/charlist.txt new file mode 100644 index 0000000000..c51007eef3 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charlist.txt @@ -0,0 +1,79 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARLIST() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Generates a list of all characters in a string + * $SYNTAX$ + * CHARLIST ([]) -> cCharacterList + * $ARGUMENTS$ + * [] is the string for whom the function generates a list + * of all characters + * Default: "" (empty string) + * $RETURNS$ + * a list of the characters in + * $DESCRIPTION$ + * The CHARLIST() function generates a list of those characters that + * are contained in . This list can contain each character + * only once, so that its maximum length is 256. The list lists those + * characters first that are occuring in first. + * $EXAMPLES$ + * ? charlist ("Hello World !") --> "Helo Wrd!" + * $TESTS$ + * charlist ("Hello World !") == "Helo Wrd!" + * charlist (nil) == "" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARLIST() is compatible with CT3's CHARLIST(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charlist.c, library is libct. + * $SEEALSO$ + * CHARNOLIST(),CHARSLIST(),CHARHIST() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARNOLIST() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Generates a list of all characters not contained in a string + * $SYNTAX$ + * CHARNOLIST ([]) -> cCharacterList + * $ARGUMENTS$ + * [] is the string for whom the function generates a list + * of all characters not contained in that string + * Default: "" (empty string) + * $RETURNS$ + * a list of the characters that are not contained in + * $DESCRIPTION$ + * The CHARNOLIST() function generates a list of those characters that + * are not contained in . This list can contain each character + * only once, so that its maximum length is 256. The list is alphabetically + * sorted. + * $EXAMPLES$ + * ? charnolist (charnolist ("Hello World !")) --> " !HWdelor" + * $TESTS$ + * charnolist (charnolist ("Hello World !")) == charslist ("Hello World !") + * charnolist (charnolist (nil)) == "" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARNOLIST() is compatible with CT3's CHARNOLIST(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charlist.c, library is libct. + * $SEEALSO$ + * CHARLIST(),CHARSLIST(),CHARHIST() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charmirr.txt b/harbour/contrib/hbct/doc/en/charmirr.txt new file mode 100644 index 0000000000..2be1392fe3 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charmirr.txt @@ -0,0 +1,48 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARMIRR() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Mirror a string + * $SYNTAX$ + * CHARMIRR (<[@]cString>, []) -> cMirroredString + * $ARGUMENTS$ + * <[@]cString> is the string that should be mirrored + * [] if set to .T., spaces at the end of + * will not be mirrored but kept at the end + * Default: .F., mirror the whole string + * $RETURNS$ + * the mirrored string + * $DESCRIPTION$ + * The CHARMIRR() function mirrors a string, i.e. the first character + * will be put at the end, the second at the last but one position etc.. + * One can use this function for index searches, but then, the spaces + * at the end of the string should not be mirrored. + * One can omit the return value of the function by setting the CSETREF() + * switch to .T., but must then be passed by reference to get + * a result. + * $EXAMPLES$ + * ? charmirr ("racecar") // "racecar" + * ? charmirr ("racecar ", .T.) // "racecar " + * ? charmirr ("racecar ", .F.) // " racecar" + * $TESTS$ + * charmirr ("racecar") == "racecar" + * charmirr ("racecar ", .T.) == "racecar " + * charmirr ("racecar ", .F.) == " racecar" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARMIRR() is compatible with CT3's CHARMIRR(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charmirr.c, library is ct3. + * $SEEALSO$ + * CSETREF() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charmix.txt b/harbour/contrib/hbct/doc/en/charmix.txt new file mode 100644 index 0000000000..0575d6cbab --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charmix.txt @@ -0,0 +1,54 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARMIX() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Mix two strings + * $SYNTAX$ + * CHARMIX ([, ]) --> cMixedString + * $ARGUMENTS$ + * String that will be mixed with the characters from + * [] String whose characters will be mixed with the one from + * . + * Default: " " (string with one space char) + * $RETURNS$ + * Mixed string + * $DESCRIPTION$ + * The CHARMIX() function mixes the strings and . To + * do this it takes one character after the other alternatively from + * and and puts them in the output string. + * This procedure is stopped when the end of is reached. If + * is shorter than , the function will start at + * the begin of again. If on the other hand is + * longer than , the surplus characters will be omitted. + * $EXAMPLES$ + * ? CHARMIX("ABC", "123") // "A1B2C3" + * ? CHARMIX("ABCDE", "12") // "A1B2C1D2E1" + * ? CHARMIX("AB", "12345") // "A1B2" + * ? CHARMIX("HELLO", " ") // "H E L L O " + * ? CHARMIX("HELLO", "") // "HELLO" + * $TESTS$ + * CHARMIX("ABC", "123") == "A1B2C3" + * CHARMIX("ABCDE", "12") == "A1B2C1D2E1" + * CHARMIX("AB", "12345") == "A1B2" + * CHARMIX("HELLO", " ") == "H E L L O " + * CHARMIX("HELLO", "") == "HELLO" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARMIX() is compatible with CT3's CHARMIX(). + * NOTE: CA-Tools version of CHARMIX() will hang + * if the second parameter is an empty string, this version will not. + * $PLATFORMS$ + * All + * $FILES$ + * Source is charmix.c, library is ct3. + * $SEEALSO$ + * CHAREVEN() CHARODD() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charone.txt b/harbour/contrib/hbct/doc/en/charone.txt new file mode 100644 index 0000000000..38325ec650 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charone.txt @@ -0,0 +1,88 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARONE() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Reduce multiple occurences of a character to one + * $SYNTAX$ + * CHARONE ([,] ) -> cReducedString + * $ARGUMENTS$ + * [] specifies the characters the multiple + * occurences of which should be reduced to one + * Default: All characters. + * specifies the processed string + * $RETURNS$ + * the string with the reduced occurences + * $DESCRIPTION$ + * The CHARONE() function reduces multiple occurences of characters in + * to a single one. It is important to note that the multiple + * occurences must occur directly one behind the other. This behaviour is + * is in contrast to the CHARLIST() function. + * $EXAMPLES$ + * ? CHARONE("122333a123") // "123a123" + * ? CHARONE("A B CCCD") // "A B CD" + * ? CHARONE(" ", "A B A B") // "A B A B" + * ? CHARONE("o", "122oooB12o") // "122oB12o" + * $TESTS$ + * CHARONE("122333a123") == "123a123" + * CHARONE("A B CCCD") == "A B CD" + * CHARONE(" ", "A B A B") == "A B A B" + * CHARONE("o", "122oooB12o") == "122oB12o" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARONE() is compatible with CT3's CHARONE(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charone.c, library is ct3. + * $SEEALSO$ + * CHARREM() WORDONE() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * WORDONE() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Reduce multiple occurences of a double character to one + * $SYNTAX$ + * WORDONE ([,] ) -> cReducedString + * $ARGUMENTS$ + * [] specifies the double characters the multiple + * occurences of which should be reduced to one + * Default: All characters. + * specifies the processed string + * $RETURNS$ + * the string with the reduced occurences + * $DESCRIPTION$ + * The WORDONE() function reduces multiple occurences of double characters in + * to a single one. It is important to note that the multiple + * occurences must occur directly one behind the other. + * $EXAMPLES$ + * ? WORDONE("12ABAB12") // "12AB12" + * ? WORDONE("1AAAA2") // "1AAAA2" + * ? WORDONE("12", "1212ABAB") // "12ABAB" + * $TESTS$ + * WORDONE("12ABAB12") == "12AB12" + * WORDONE("1AAAA2") == "1AAAA2" + * WORDONE("12", "1212ABAB") == "12ABAB" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * WORDONE() is compatible with CT3's WORDONE(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charone.c, library is ct3. + * $SEEALSO$ + * CHARONE() CHARREM() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charonly.txt b/harbour/contrib/hbct/doc/en/charonly.txt new file mode 100644 index 0000000000..48adeae624 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charonly.txt @@ -0,0 +1,158 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARONLY() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Intersectional set of two strings based on characters + * $SYNTAX$ + * CHARONLY (, ) -> cReducedString + * $ARGUMENTS$ + * specifies the characters that must not be + * deleted in . + * is the string that should be processed + * $RETURNS$ + * A string with all characters deleted but those + * specified in . + * $DESCRIPTION$ + * The CHARONLY() function calculates the intersectional set of two + * strings. To do this, it deletes all characters from that + * do not appear in . + * $EXAMPLES$ + * ? CHARONLY("0123456789", "0211 - 38 99 77") // "0211389977" + * ? CHARONLY("0123456789", "0211/ 389 977") // "0211389977" + * $TESTS$ + * CHARONLY("0123456789", "0211 - 38 99 77") == "0211389977" + * CHARONLY("0123456789", "0211/ 389 977") == "0211389977" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARONLY() is compatible with CT3's CHARONLY(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charonly.c, library is ct3. + * $SEEALSO$ + * CHARREM() WORDONLY() WORDREM() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * WORDONLY() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Intersectional set of two strings based on double characters + * $SYNTAX$ + * WORDONLY (, ) -> cReducedString + * $ARGUMENTS$ + * specifies the double characters that must + * not be deleted in . + * is the string that should be processed + * $RETURNS$ + * A string with all double characters deleted + * but those specified in . + * $DESCRIPTION$ + * The WORDONLY() function calculates the intersectional set of two + * strings based on double characters. To do this, it deletes all double + * characters from that do not appear in . + * $EXAMPLES$ + * ? WORDONLY("AABBCCDD", "XXAAYYBBZZ") // "AABB" + * ? WORDONLY("AABBCCDD", "XAAYYYBBZZ") // "BB" + * $TESTS$ + * WORDONLY("AABBCCDD", "XXAAYYBBZZ") == "AABB" + * WORDONLY("AABBCCDD", "XAAYYYBBZZ") == "BB" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * WORDONLY() is compatible with CT3's WORDONLY(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charonly.c, library is ct3. + * $SEEALSO$ + * CHARONLY() CHARREM() WORDREM() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARREM() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Removes characters from a string + * $SYNTAX$ + * CHARREM (, ) -> cReducedString + * $ARGUMENTS$ + * specifies the characters that should + * be deleted in + * ) is the string that should be processed + * $RETURNS$ + * is a string where the characters specified + * in are deleted + * $DESCRIPTION$ + * The CHARREM() function deletes the characters specified in + * from . + * $EXAMPLES$ + * ? CHARREM(" ", " 1 2 ") // "12" + * ? CHARREM("3y", "xyz123") // "xz12" + * $TESTS$ + * CHARREM(" ", " 1 2 ") == "12" + * CHARREM("3y", "xyz123") == "xz12" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARREM() is compatible with CT3's CHARREM(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charonly.c, library is ct3. + * $SEEALSO$ + * CHARONLY() WORDONLY() WORDREM() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * WORDREM() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Removes characters from a string + * $SYNTAX$ + * WORDREM (, ) -> cReducedString + * $ARGUMENTS$ + * specifies the double characters that + * should be deleted in + * ) is the string that should be processed + * $RETURNS$ + * is a string where the double characters + * specified in + * are deleted + * $DESCRIPTION$ + * The WORDREM() function deletes the double characters specified in + * from . + * $EXAMPLES$ + * ? WORDREM("abcd", "0ab1cd") // "0ab1" + * ? WORDREM("abcd", "ab0cd1") // "0cd1" + * $TESTS$ + * WORDREM("abcd", "0ab1cd") == "0ab1" + * WORDREM("abcd", "ab0cd1") == "0cd1" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * WORDREM() is a new function available only in Harbour's CT3. + * $PLATFORMS$ + * All + * $FILES$ + * Source is charonly.c, library is ct3. + * $SEEALSO$ + * CHARONLY CHARREM() WORDREM() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charop.txt b/harbour/contrib/hbct/doc/en/charop.txt new file mode 100644 index 0000000000..5f73619f3e --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charop.txt @@ -0,0 +1,243 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARADD() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Adds corresponding ASCII value of two strings + * $SYNTAX$ + * CHARADD (<[@]cString1>, ) --> cAddString + * $ARGUMENTS$ + * <[@]cString1> first string + * second string + * $RETURNS$ + * string with added ASCII values + * $DESCRIPTION$ + * The CHARADD() function constructs a new string from the two strings + * passed as parameters. To do this, it adds the ASCII values of the + * corresponding characters of both strings and places a character in + * the resulting string whose ASCII value equals to that sum (modulo 256). + * If the first string is passed by reference, the resulting string is + * stored in , too. By setting the CSETREF()-switch to .T., + * the return value can be omitted. + * If is shorter than and the last character of + * has been processed, the function restarts with the first + * character of . + * $EXAMPLES$ + * ? charadd ("012345678", chr(1)) --> "123456789" + * ? charadd ("123456789", chr(255)) --> "012345678" + * ? charadd ("0000", chr(0)+chr(1)+chr(2)+chr(3)) --> "0123" + * $TESTS$ + * charadd ("012345678", chr(1)) == "123456789" + * charadd ("012345678", chr(1)+chr(2)) == "133557799" + * charadd ("123456789", chr(255)) == "012345678" + * charadd ("123456789", chr(255)+chr(254)) == "002244668" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARADD() is compatible with CT3's CHARADD(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charop.c, library is ct3. + * $SEEALSO$ + * CHARSUB() CHARAND() CHARNOT() + * CHAROR() CHARXOR() CHARSHL() + * CHARSHR() CHARRLL() CHARRLR() + * CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARAND() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Combine corresponding ASCII value of two strings with bitwise AND + * $SYNTAX$ + * CHARAND (<[@]cString1>, ) --> cAndString + * $ARGUMENTS$ + * <[@]cString1> first string + * second string + * $RETURNS$ + * string with bitwise AND combined ASCII values + * $DESCRIPTION$ + * The CHARAND() function constructs a new string from the two strings + * passed as parameters. To do this, it combines the ASCII values of the + * corresponding characters of both strings with a bitwise AND-operation + * and places a character in the resulting string whose ASCII value + * equals to the result of that operation. + * If the first string is passed by reference, the resulting string is + * stored in , too. By setting the CSETREF()-switch to .T., + * the return value can be omitted. + * If is shorter than and the last character of + * has been processed, the function restarts with the first + * character of . + * $EXAMPLES$ + * // clear the LSB + * ? charand ("012345678", chr(254)) --> "002244668" + * ? charand ("012345678", chr(254)+chr(252)) --> "002044648" + * $TESTS$ + * charand ("012345678", chr(254)) == "002244668" + * charand ("012345678", chr(254)+chr(252)) == "002044648" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARAND() is compatible with CT3's CHARAND(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charop.c, library is ct3. + * $SEEALSO$ + * CHARADD() CHARSUB() CHARNOT() + * CHAROR() CHARXOR() CHARSHL() + * CHARSHR() CHARRLL() CHARRLR() + * CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARNOT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Process each character in a string with bitwise NOT operation + * $SYNTAX$ + * CHARNOT (<[@]cString>) --> cNotString + * $ARGUMENTS$ + * <[@]cString> string to be processed + * $RETURNS$ + * string with bitwise negated characters + * $DESCRIPTION$ + * The CHARNOT() function constructs a new string from the string + * passed as parameter. To do this, it performs a bitwise NOT operation + * to the characters of the string and places a character in + * the resulting string whose ASCII value equals to the result of that + * operation. It can be easily seen that the resulting ASCII-value equals + * 255 minus input ASCII value. + * If the string is passed by reference, the resulting string is + * stored in , too. By setting the CSETREF()-switch to .T., + * the return value can be omitted. + * $EXAMPLES$ + * ? charnot (chr(85)+chr(128)+chr(170)+chr(1)) --> chr(170)+chr(127)+chr(85)+chr(254) + * ? charnot (charnot ("This is a test!")) --> "This is a test!" + * $TESTS$ + * charnot (chr(85)+chr(128)+chr(170)+chr(1)) == chr(170)+chr(127)+chr(85)+chr(254) + * charnot (charnot ("This is a test!")) == "This is a test!" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARNOT() is compatible with CT3's CHARNOT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charop.c, library is ct3. + * $SEEALSO$ + * CHARADD() CHARSUB() CHARAND() + * CHAROR() CHARXOR() CHARSHL() + * CHARSHR() CHARRLL() CHARRLR() + * CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHAROR() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Combine corresponding ASCII value of two strings with bitwise OR + * $SYNTAX$ + * CHAROR (<[@]cString1>, ) --> cOrString + * $ARGUMENTS$ + * <[@]cString1> first string + * second string + * $RETURNS$ + * string with bitwise OR combined ASCII values + * $DESCRIPTION$ + * The CHAROR() function constructs a new string from the two strings + * passed as parameters. To do this, it combines the ASCII values of the + * corresponding characters of both strings with a bitwise OR-operation + * and places a character in the resulting string whose ASCII value + * equals to the result of that operation. + * If the first string is passed by reference, the resulting string is + * stored in , too. By setting the CSETREF()-switch to .T., + * the return value can be omitted. + * If is shorter than and the last character of + * has been processed, the function restarts with the first + * character of . + * $EXAMPLES$ + * // set the LSB + * ? charor ("012345678", chr(1)) --> "113355779" + * ? charor ("012345678", chr(1)+chr(3)) --> "133357779" + * $TESTS$ + * charor ("012345678", chr(1)) == "113355779" + * charor ("012345678", chr(1)+chr(3)) == "133357779" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHAROR() is compatible with CT3's CHAROR(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charop.c, library is ct3. + * $SEEALSO$ + * CHARADD() CHARSUB() CHARNOT() + * CHARAND() CHARXOR() CHARSHL() + * CHARSHR() CHARRLL() CHARRLR() + * CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARXOR() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Combine corresponding ASCII value of two strings with bitwise XOR + * $SYNTAX$ + * CHARXOR (<[@]cString1>, ) --> cXOrString + * $ARGUMENTS$ + * <[@]cString1> first string + * second string + * $RETURNS$ + * string with bitwise XOR combined ASCII values + * $DESCRIPTION$ + * The CHARXOR() function constructs a new string from the two strings + * passed as parameters. To do this, it combines the ASCII values of the + * corresponding characters of both strings with a bitwise XOR-operation + * and places a character in the resulting string whose ASCII value + * equals to the result of that operation. + * If the first string is passed by reference, the resulting string is + * stored in , too. By setting the CSETREF()-switch to .T., + * the return value can be omitted. + * If is shorter than and the last character of + * has been processed, the function restarts with the first + * character of . + * $EXAMPLES$ + * // easy encryption + * ? charxor ("This is top secret !", "My Password") --> + * $TESTS$ + * charxor (charxor ("This is top secret !", "My Password"), "My Password") == "This is top secret !" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARXOR() is compatible with CT3's CHARXOR(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charop.c, library is ct3. + * $SEEALSO$ + * CHARADD() CHARSUB() CHARNOT() + * CHARAND() CHAROR() CHARSHL() + * CHARSHR() CHARRLL() CHARRLR() + * CSETREF() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charophb.txt b/harbour/contrib/hbct/doc/en/charophb.txt new file mode 100644 index 0000000000..64cfaaf423 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charophb.txt @@ -0,0 +1,237 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARSUB() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Subtracts corresponding ASCII value of two strings + * $SYNTAX$ + * CHARSUB (<[@]cString1>, ) --> cSubString + * $ARGUMENTS$ + * <[@]cString1> first string + * second string + * $RETURNS$ + * string with subtracted ASCII values + * $DESCRIPTION$ + * The CHARSUB() function constructs a new string from the two strings + * passed as parameters. To do this, it subtracts the ASCII values of the + * corresponding characters of both strings and places a character in + * the resulting string whose ASCII value equals to that difference (modulo 256). + * If the first string is passed by reference, the resulting string is + * stored in , too. By setting the CSETREF()-switch to .T., + * the return value can be omitted. + * If is shorter than and the last character of + * has been processed, the function restarts with the first + * character of . + * $EXAMPLES$ + * ? charsub ("012345678", chr(1)) --> "/01234567" + * ? charsub ("123456789", chr(255)) --> "23456789:" + * ? charsub ("9999", chr(0)+chr(1)+chr(2)+chr(3)) --> "9876" + * $TESTS$ + * charsub ("123456789", chr(1)) == "012345678" + * charsub ("123456789", chr(1)+chr(2)) == "002244668" + * charsub ("012345678", chr(255)) == "123456789" + * charsub ("012345678", chr(255)+chr(254)) == "133557799" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARSUB() is a new function that is only available in Harbour's CT3 lib. + * $PLATFORMS$ + * All + * $FILES$ + * Source is charop.c, library is ct3. + * $SEEALSO$ + * CHARADD() CHARAND() CHARNOT() + * CHAROR() CHARXOR() CHARSHL() + * CHARSHR() CHARRLL() CHARRLR() + * CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARSHL() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Process each character in a string with bitwise SHIFT LEFT operation + * $SYNTAX$ + * CHARSHL (<[@]cString>, ) --> cSHLString + * $ARGUMENTS$ + * <[@]cString> string to be processed + * number of bit positions to be shifted to the left + * $RETURNS$ + * string with bitwise shifted left characters + * $DESCRIPTION$ + * The CHARSHL() function constructs a new string from the string + * passed as parameter. To do this, it performs a bitwise SHIFT LEFT + * (SHL) operation to the characters of the string and places a character in + * the resulting string whose ASCII value equals to the result of that + * operation. + * Be aware that bits shifted out of the byte are lost. If you need + * a bit rotation, use the CHARRLL() function instead. + * If the string is passed by reference, the resulting string is + * stored in , too. By setting the CSETREF()-switch to .T., + * the return value can be omitted. + * $EXAMPLES$ + * ? charshl (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) + * --> chr(8)+chr(16)+chr(32)+chr(64)+chr(128)+chr(0)+chr(0)+chr(0) + * $TESTS$ + * charshl (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) == chr(8)+chr(16)+chr(32)+chr(64)+chr(128)+chr(0)+chr(0)+chr(0) + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARSHL() is a new function that is only available in Harbour's CT3 lib. + * $PLATFORMS$ + * All + * $FILES$ + * Source is charop.c, library is ct3. + * $SEEALSO$ + * CHARADD() CHARSUB() CHARAND() + * CHAROR() CHARXOR() CHARNOT() + * CHARSHR() CHARRLL() CHARRLR() + * CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARSHR() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Process each character in a string with bitwise SHIFT RIGHT operation + * $SYNTAX$ + * CHARSHR (<[@]cString>, ) --> cSHRString + * $ARGUMENTS$ + * <[@]cString> string to be processed + * number of bit positions to be shifted to the right + * $RETURNS$ + * string with bitwise shifted right characters + * $DESCRIPTION$ + * The CHARSHR() function constructs a new string from the string + * passed as parameter. To do this, it performs a bitwise SHIFT RIGHT + * (SHR) operation to the characters of the string and places a character in + * the resulting string whose ASCII value equals to the result of that + * operation. + * Be aware that bits shifted out of the byte are lost. If you need + * a bit rotation, use the CHARRLR() function instead. + * If the string is passed by reference, the resulting string is + * stored in , too. By setting the CSETREF()-switch to .T., + * the return value can be omitted. + * $EXAMPLES$ + * ? charshr (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) + * --> chr(0)+chr(0)+chr(0)+chr(1)+chr(2)+chr(4)+chr(8)+chr(16) + * $TESTS$ + * charshr (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) == chr(0)+chr(0)+chr(0)+chr(1)+chr(2)+chr(4)+chr(8)+chr(16) + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARSHR() is a new function that is only available in Harbour's CT3 lib. + * $PLATFORMS$ + * All + * $FILES$ + * Source is charop.c, library is ct3. + * $SEEALSO$ + * CHARADD() CHARSUB() CHARAND() + * CHAROR() CHARXOR() CHARNOT() + * CHARSHL() CHARRLL() CHARRLR() + * CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARRLL() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Process each character in a string with bitwise ROLL LEFT operation + * $SYNTAX$ + * CHARRLL (<[@]cString>, ) --> cRLLString + * $ARGUMENTS$ + * <[@]cString> string to be processed + * number of bit positions to be rolled to the left + * $RETURNS$ + * string with bitwise rolled left characters + * $DESCRIPTION$ + * The CHARRLL() function constructs a new string from the string + * passed as parameter. To do this, it performs a bitwise ROLL LEFT + * (RLL) operation to the characters of the string and places a character in + * the resulting string whose ASCII value equals to the result of that + * operation. + * Be aware that, in contrast to CHARSHL(), bits rolled out on + * the left are put in again on the right. + * If the string is passed by reference, the resulting string is + * stored in , too. By setting the CSETREF()-switch to .T., + * the return value can be omitted. + * $EXAMPLES$ + * ? charrll (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) + * --> chr(8)+chr(16)+chr(32)+chr(64)+chr(128)+chr(1)+chr(2)+chr(4) + * $TESTS$ + * charrll (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) == chr(8)+chr(16)+chr(32)+chr(64)+chr(128)+chr(1)+chr(2)+chr(4) + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARRLL() is a new function that is only available in Harbour's CT3 lib. + * $PLATFORMS$ + * All + * $FILES$ + * Source is charop.c, library is ct3. + * $SEEALSO$ + * CHARADD() CHARSUB() CHARAND() + * CHAROR() CHARXOR() CHARNOT() + * CHARSHL() CHARSHR() CHARRLR() + * CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARRLR() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Process each character in a string with bitwise ROLL RIGHT operation + * $SYNTAX$ + * CHARRLR (<[@]cString>, ) --> cRLRString + * $ARGUMENTS$ + * <[@]cString> string to be processed + * number of bit positions to be rolled to the right + * $RETURNS$ + * string with bitwise rolled right characters + * $DESCRIPTION$ + * The CHARRLR() function constructs a new string from the string + * passed as parameter. To do this, it performs a bitwise ROLL RIGHT + * (RLR) operation to the characters of the string and places a character in + * the resulting string whose ASCII value equals to the result of that + * operation. + * Be aware that, in contrast to CHARSHR(), bits rolled out on + * the right are put in again on the left. + * If the string is passed by reference, the resulting string is + * stored in , too. By setting the CSETREF()-switch to .T., + * the return value can be omitted. + * $EXAMPLES$ + * ? charrlr (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) + * --> chr(32)+chr(64)+chr(128)+chr(1)+chr(2)+chr(4)+chr(8)+chr(16) + * $TESTS$ + * charrlr (chr(1)+chr(2)+chr(4)+chr(8)+chr(16)+chr(32)+chr(64)+chr(128), 3) == chr(32)+chr(64)+chr(128)+chr(1)+chr(2)+chr(4)+chr(8)+chr(16) + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARRLR() is a new function that is only available in Harbour's CT3 lib. + * $PLATFORMS$ + * All + * $FILES$ + * Source is charop.c, library is ct3. + * $SEEALSO$ + * CHARADD() CHARSUB() CHARAND() + * CHAROR() CHARXOR() CHARNOT() + * CHARSHL() CHARSHR() CHARRLL() + * CSETREF() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charrepl.txt b/harbour/contrib/hbct/doc/en/charrepl.txt new file mode 100644 index 0000000000..93fd5df026 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charrepl.txt @@ -0,0 +1,67 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARREPL() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Replacement of characters + * $SYNTAX$ + * CHARREPL (, <[@]cString>, + * , []) -> cString + * $ARGUMENTS$ + * is a string of characters that should be replaced + * <[@]cString> is the processed string + * is a string of characters that replace the one + * of + * [] sets the replacement method (see description) + * Default: .F. + * $RETURNS$ + * the processed string + * $DESCRIPTION$ + * The CHARREPL() function replaces certain characters in + * with others depending on the setting of . + * If is set to .F., the function takes the characters of + * one after the other, searches for them in + * and, if successful, replaces them with the corresponding character + * of . Be aware that if the same characters occur + * in both and , the character on a + * certain position in can be replaced multiple times. + * if is set to .T., the function takes the characters in + * one after the other, searches for them in and, if + * successful, replaces them with the corresponding character of + * . Note that no multiple replacements are possible + * in this mode. + * If is shorter than , the last + * character of is used as corresponding character + * for the the "rest" of . + * One can omit the return value by setting the CSETREF() switch to .T., + * but then one must pass by reference to get the result. + * $EXAMPLES$ + * ? charrepl ("1234", "1x2y3z", "abcd") // "axbycz" + * ? charrepl ("abcdefghij", "jhfdb", "1234567890") // "08642" + * ? charrepl ("abcdefghij", "jhfdb", "12345") // "55542" + * ? charrepl ("1234", "1234", "234A") // "AAAA" + * ? charrepl ("1234", "1234", "234A", .T.) // "234A" + * $TESTS$ + * charrepl ("1234", "1x2y3z", "abcd") == "axbycz" + * charrepl ("abcdefghij", "jhfdb", "1234567890") == "08642" + * charrepl ("abcdefghij", "jhfdb", "12345") == "55542" + * charrepl ("1234", "1234", "234A") == "AAAA" + * charrepl ("1234", "1234", "234A", .T.) == "234A" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARREPL() is compatible with CT3's CHARREPL(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charrepl.c, library is ct3. + * $SEEALSO$ + * WORDREPL() POSREPL() RANGEREPL() + * CSETREF() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charsort.txt b/harbour/contrib/hbct/doc/en/charsort.txt new file mode 100644 index 0000000000..fae2b08dfa --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charsort.txt @@ -0,0 +1,84 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARSORT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Sort sequences within a string. + * $SYNTAX$ + * CHARSORT (<[@]cString>, [], [], + * [], [], [], + * []) -> cSortedString + * $ARGUMENTS$ + * <[@]cString> is the string that should be processed + * [] specifies the length of the elements that + * should be sorted + * Default: 1 + * [] specifies how many characters within one + * element should be used for comparison + * Default: + * [] specifies the number of characters at the + * beginning of that should be ignored + * in the sort process + * Default: 0 + * [] specifies the offset of the comparison string + * within a element + * Default: 0 + * [] specifies how many characters in , + * starting from the position, + * should be sorted + * Default: len(cString)-nIgnoreCharacters + * []) specifies whether the process should + * sort descending or not + * $RETURNS$ + * the string resulting from the sort process + * $DESCRIPTION$ + * The CHARSORT function sorts the characters within a string . + * With the parameters and , you can + * determine that only the substring from position +1 + * to position + within should + * be sorted. + * The sorting algorithm is determined with the other parameters. + * specifies the length of one element, i.e. there are + * / elements that are sorted. Note that + * surplus characters are not sorted but stay at their position. + * To do the sorting, the function uses the Quicksort algorithm implemented + * in the C-lib qsort() function. This algorithm needs to know how to compare + * and order two elements. This is done by comparing the ASCII values of + * a substring within each element. This substring is determined by the + * parameters and and the order + * by . + * By setting the CSETREF() switch to .T., one can omit the return value + * of the function, but one must then pass by reference. + * $EXAMPLES$ + * ? CHARSORT("qwert") // "eqrtw" + * ? CHARSORT("qwert", 2) // "erqwt" + * ? CHARSORT("b1a4a3a2a1", 2, 1) // "a2a1a3a4b1" + * ? CHARSORT("XXXqwert", 1, 1, 3) // "XXXeqrtw" + * ? CHARSORT("b1a4a3a2a1", 2, 1, 0, 1) // "a1b1a2a3a4" + * ? CHARSORT("384172852", 1, 1, 0, 0, 4) // "134872852" + * ? CHARSORT("qwert", .T.) // "wtrqe" + * $TESTS$ + * CHARSORT("qwert") == "eqrtw" + * CHARSORT("qwert", 2) == "erqwt" + * CHARSORT("b1a4a3a2a1", 2, 1) == "a2a1a3a4b1" + * CHARSORT("XXXqwert", 1, 1, 3) == "XXXeqrtw" + * CHARSORT("b1a4a3a2a1", 2, 1, 0, 1) == "a1b1a2a3a4" + * CHARSORT("384172852", 1, 1, 0, 0, 4) == "134872852" + * CHARSORT("qwert", .T.) == "wtrqe" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARSORT() is compatible with CT3's CHARSORT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charsort.c, library is ct3. + * $SEEALSO$ + * CSETREF() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/charswap.txt b/harbour/contrib/hbct/doc/en/charswap.txt new file mode 100644 index 0000000000..fe93ddb155 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/charswap.txt @@ -0,0 +1,85 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARSWAP() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Swap neighbouring characters in a string + * $SYNTAX$ + * CHARSWAP (<[@]cString>) -> cSwappedString + * $ARGUMENTS$ + * <[@]cString> is the string that should be processed + * $RETURNS$ + * a string where neighbour characters are swapped + * $DESCRIPTION$ + * The CHARSWAP() function loops through in steps of two + * characters and exchanges the characters from the odd and the even + * positions. + * By setting the CSETREF() switch to .T., one can omit the return value + * of this functin, but one must then pass by reference. + * $EXAMPLES$ + * ? CHARSWAP("0123456789") // "1032547698" + * ? CHARSWAP("ABCDEFGHIJK") // "BADCFEHGJIK" + * $TESTS$ + * CHARSWAP("0123456789") == "1032547698" + * CHARSWAP("ABCDEFGHIJK") == "BADCFEHGJIK" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CHARSWAP() is compatible with CT3's CHARSWAP(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charswap.c, library is libct. + * $SEEALSO$ + * WORDSWAP(),CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * WORDSWAP() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Swap neighbouring double characters in a string + * $SYNTAX$ + * WORDSWAP (<[@]cString> [, ]) -> cSwappedString + * $ARGUMENTS$ + * <[@]cString> is the string that should be processed + * [] specifies whether an additional swap should be + * done within the double characters + * Default: .F., no additional swap + * $RETURNS$ + * a string where neighbouring double characters are + * swapped + * $DESCRIPTION$ + * The WORDSWAP() function loops through in steps of four + * characters and exchanges the double characters from the first and + * second position with the one from the third and forth position. + * Additionally the function can perform a swap of the both char of + * each double character. + * By setting the CSETREF() switch to .T., one can omit the return value + * of this functin, but one must then pass by reference. + * $EXAMPLES$ + * ? WORDSWAP("1234567890") // "3412785690" + * ? WORDSWAP("1234567890", .t.) // "4321876590" + * $TESTS$ + * WORDSWAP("1234567890") == "3412785690" + * WORDSWAP("1234567890", .t.) == "4321876590" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * WORDSWAP() is compatible with CT3's WORDSWAP(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is charswap.c, library is libct. + * $SEEALSO$ + * CHARSWAP(),CSETREF() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/color.txt b/harbour/contrib/hbct/doc/en/color.txt new file mode 100644 index 0000000000..87ee0f55b3 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/color.txt @@ -0,0 +1,219 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * INVERTATTR() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * + * $SYNTAX$ + * + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * INVERTATTR() is compatible with CT3's INVERTATTR(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is color.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * COLORTON() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * + * $SYNTAX$ + * COLORTON ( ) -> + * $ARGUMENTS$ + * Designates the alphanumeric color attribute that is + * converted in NN/NN or CC/CC form. + * + * $RETURNS$ + * COLORTON() returns a number that corresponds to the combined numeric + * color attribute. + * + * $DESCRIPTION$ + * COLOR TO (N)umeric + * The function changes an alphanumeric color attribute from NN/NN or + * CC/CC into a combined numeric attribute. These combined attribute + * values are useful with the CA-Cl*pper Tools functions STRSCREEN(), + * SCREENMIX(), SCREENATTR(), and the CA-Cl*pper commands + * SAVE/RESTORE SCREEN. + * + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is color.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * NTOCOLOR() + * $CATEGORY$ + * HBCT video functions + * $ONELINER$ + * + * $SYNTAX$ + * NTOCOLOR ( , [] ) -> + * $ARGUMENTS$ + * Designates the value for the combined numeric color + * attributes. + * + * If designated as .F. or if the parameter is omitted, + * NTOCOLOR() returns a string with a numeric color code. + * When designated as .T., NTOCOLOR() returns a string with + * the CA-Cl*pper alpha color coding. + * + * $RETURNS$ + * NTOCOLOR() returns the designated color attribute in the NN/NN + * or CC/CC form. + * + * $DESCRIPTION$ + * NTOCOLOR() converts a color attribute returned from another function + * in numeric form, into the alphanumeric data format. Use this + * attribute in conjunction with the CA-Cl*pper SET COLOR TO command. + * + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is color.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ENHANCED() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * Select the "ENHANCED" color value for output + * $SYNTAX$ + * ENHANCED () -> + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * ENHANCED() is compatible with CT3's ENHANCED() + * $PLATFORMS$ + * All + * $FILES$ + * Source is color.c, library is libct. + * $SEEALSO$ + * STANDARD(),UNSELECTED() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * STANDARD() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * Select the "STANDARD" color value for output + * $SYNTAX$ + * STANDARD () -> + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * STANDARD() is compatible with CT3's STANDARD() + * $PLATFORMS$ + * All + * $FILES$ + * Source is color.c, library is libct. + * $SEEALSO$ + * ENHANCED(),UNSELECTED() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * UNSELECTED() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * Select the "UNSELECTED" color value for output + * $SYNTAX$ + * UNSELECTED () -> + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * UNSELECTED() is compatible with CT3's UNSELECTED() + * $PLATFORMS$ + * All + * $FILES$ + * Source is color.c, library is libct. + * $SEEALSO$ + * ENHANCED(),STANDARD() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/count.txt b/harbour/contrib/hbct/doc/en/count.txt new file mode 100644 index 0000000000..e021746e4d --- /dev/null +++ b/harbour/contrib/hbct/doc/en/count.txt @@ -0,0 +1,67 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * COUNTLEFT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Count a certain character at the beginning of a string + * $SYNTAX$ + * COUNTLEFT (, []) -> nCount + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * COUNTLEFT() is compatible with CT3's COUNTLEFT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is count.c, library is libct. + * $SEEALSO$ + * COUNTRIGHT() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * COUNTRIGHT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Count a certain character at the end of a string + * $SYNTAX$ + * COUNTRIGHT (, []) -> nCount + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * COUNTRIGHT() is compatible with CT3's COUNTRIGHT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is count.c, library is libct. + * $SEEALSO$ + * COUNTLEFT() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/ct.txt b/harbour/contrib/hbct/doc/en/ct.txt new file mode 100644 index 0000000000..b863cf3be7 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/ct.txt @@ -0,0 +1,75 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CTINIT() + * $CATEGORY$ + * CT3 general functions + * $ONELINER$ + * Initializes the CT3 library + * $SYNTAX$ + * CTINIT () -> lInitialized + * $ARGUMENTS$ + * None + * $RETURNS$ + * lInitialized .T. if the function has been correctly initialized + * $DESCRIPTION$ + * The CTINIT() function initializes the CT3 library. + * Identical code is declared as INIT FUNCTION, thus should be executed + * automatically at the beginning of the application, but it is a good + * idea to call it once again explicitly somewhere at the beginning of + * your program to check the initialization. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CTINIT() is a new function in Harbour's CT3 library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is ct.prg, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CTEXIT() + * $CATEGORY$ + * CT3 general functions + * $ONELINER$ + * Uninitializes the CT3 library + * $SYNTAX$ + * CTEXIT () -> nil + * $ARGUMENTS$ + * none + * $RETURNS$ + * nil + * $DESCRIPTION$ + * The CTEXIT() function uninitializes the CT3 library. + * Identical code is declared as EXIT FUNCTION, thus should be executed + * automatically at the end of the application, but it is a good idea + * to call it explicitly somewhere at the end of your program to make + * sure that the deinitialization takes place. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CTEXIT() is a new function in Harbour's CT3 library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is ct.prg, library is libct. + * $SEEALSO$ + * + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/ctc.txt b/harbour/contrib/hbct/doc/en/ctc.txt new file mode 100644 index 0000000000..8393151e09 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/ctc.txt @@ -0,0 +1,112 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CSETARGERR() + * $CATEGORY$ + * CT3 general functions + * $ONELINER$ + * Sets argument error behaviour + * $SYNTAX$ + * CSETARGERR ([]) -> + * $ARGUMENTS$ + * [] New argument error throwing mode + * $RETURNS$ + * The current or old argument error throwing mode. + * $DESCRIPTION$ + * All CT3 functions are very compliant in their reaction to wrong + * parameters. By using the CSETARGERR() function, you can make the + * library throw an error with the severity . It is then + * up to the error handler to substitute the return value. + * can be one of the severity modes defined in ct.ch: + * CT_ARGERR_WHOCARES corresponds to ES_WHOCARES + * CT_ARGERR_WARNING corresponds to ES_WARNING + * CT_ARGERR_ERROR corresponds to ES_ERROR + * CT_ARGERR_CATASTROPHIC corresponds to ES_CATASTROPHIC + * CT_ARGERR_IGNORE + * The last is the default behaviour and switches any argument error + * throwing off. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CSETARGERR() is a new function in Harbour's CT3 library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is ct.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CTCINIT() + * $CATEGORY$ + * CT3 general functions + * $ONELINER$ + * Initializes the CT3 library, C part + * $SYNTAX$ + * CTCINIT () -> lInitialized + * $ARGUMENTS$ + * None + * $RETURNS$ + * lInitialized .T. if the function has been correctly initialized + * $DESCRIPTION$ + * The CTCINIT() function initializes the C source part of the CT3 + * library. Do not call this function directly. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CTCINIT() is a new function in Harbour's CT3 library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is ctc.c, library is libct. + * $SEEALSO$ + * CTINIT(),CTEXIT() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CTCEXIT() + * $CATEGORY$ + * CT3 general functions + * $ONELINER$ + * Uninitializes the CT3 library, C part + * $SYNTAX$ + * CTCEXIT () -> nil + * $ARGUMENTS$ + * none + * $RETURNS$ + * nil + * $DESCRIPTION$ + * The CTCEXIT() function uninitializes the C part of the CT3 library. + * Do not call this function directly. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CTCEXIT() is a new function in Harbour's CT3 library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is ctc.c, library is libct. + * $SEEALSO$ + * CTINIT(),CTEXIT() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/ctmath.txt b/harbour/contrib/hbct/doc/en/ctmath.txt new file mode 100644 index 0000000000..f0776d90fb --- /dev/null +++ b/harbour/contrib/hbct/doc/en/ctmath.txt @@ -0,0 +1,69 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SETPREC() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Set precision of math functions + * $SYNTAX$ + * SETPREC () -> cEmptyString + * $ARGUMENTS$ + * digit count between 1 and 16, defaults to 16 + * $RETURNS$ + * cEmptyString this function always returns an empty string + * $DESCRIPTION$ + * Be aware that calls to this functions do _NOT_ affect the + * calculation precision of the math functions at the moment. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * SETPREC() is compatible with CT3's SETPREC. + * $PLATFORMS$ + * All + * $FILES$ + * Source is ctmath.c, library is ct3. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * GETPREC() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Get precision of math functions + * $SYNTAX$ + * GETPREC () -> nDigits + * $ARGUMENTS$ + * + * $RETURNS$ + * nDigits digit count between 1 and 16 + * $DESCRIPTION$ + * Be aware that calls to this functions do _NOT_ affect the + * calculation precision of the math functions at the moment. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * GETPREC() is compatible with CT3's GETPREC. + * $PLATFORMS$ + * All + * $FILES$ + * Source is ctmath.c, library is ct3. + * $SEEALSO$ + * + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/ctmath2.txt b/harbour/contrib/hbct/doc/en/ctmath2.txt new file mode 100644 index 0000000000..d79b5e3800 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/ctmath2.txt @@ -0,0 +1,186 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * FLOOR() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Rounds down a number to the next integer + * $SYNTAX$ + * FLOOR (nNumber) -> nDownRoundedNumber + * $ARGUMENTS$ + * number to round down + * $RETURNS$ + * the rounded number + * $DESCRIPTION$ + * The function FLOOR() determines the biggest integer that is smaller + * than . + * $EXAMPLES$ + * ? floor (1.1) --> 1.0 + * ? floor (-1.1) --> -2.0 + * $TESTS$ + * floor (1.1) == 1.0 + * floor (-1.1) == -2.0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * FLOOR() is compatible with CT3's FLOOR(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is math.c, library is libct. + * $SEEALSO$ + * CEILING + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CEILING() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Rounds up a number to the next integer + * $SYNTAX$ + * CEILING (nNumber) -> nUpRoundedNumber + * $ARGUMENTS$ + * number to round up + * $RETURNS$ + * the rounded number + * $DESCRIPTION$ + * The function CEILING() determines the smallest integer that is bigger + * than . + * $EXAMPLES$ + * ? ceiling (1.1) --> 2.0 + * ? ceiling (-1.1) --> -1.0 + * $TESTS$ + * ceiling (1.1) == 2.0 + * ceiling (-1.1) == -1.0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CEILING() is compatible with CT3's CEILING(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is math.c, library is libct. + * $SEEALSO$ + * FLOOR + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SIGN() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Sign of a number + * $SYNTAX$ + * SIGN (nNumber) -> nSign + * $ARGUMENTS$ + * a number + * $RETURNS$ + * sign of + * $DESCRIPTION$ + * The function SIGN() determines the sign of . + * If is > 0, then SIGN() returns 1 + * If is < 0, then SIGN() returns -1 + * If is == 0, then SIGN() returns 0 + * $EXAMPLES$ + * ? sign (1.1) --> 1 + * ? sign (-1.1) --> -1 + * ? sign (0.0) --> 0 + * $TESTS$ + * sign (1.1) == 1 + * sign (-1.1) == -1 + * sign (0.0) == 0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * SIGN() is compatible with CT3's SIGN(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is math.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * LOG10() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Decadic logarithm of a number + * $SYNTAX$ + * LOG10 (nNumber) -> nLogarithm + * $ARGUMENTS$ + * number to logarithm + * $RETURNS$ + * decadic logarithm of + * $DESCRIPTION$ + * The function LOG10() calculates the decadic logarithm of , + * i.e. 10^ == . + * $EXAMPLES$ + * ? log10 (10.0) --> 1.0 + * ? log10 (sqrt(10.0)) --> 0.5 + * $TESTS$ + * log10 (10.0) == 1.0 + * log10 (sqrt(10.0)) == 0.5 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * LOG10() is compatible with CT3's LOG10(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is math.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * FACT() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Calculates faculty + * $SYNTAX$ + * FACT (nNumber) -> nFaculty + * $ARGUMENTS$ + * number between 0 and 21 + * $RETURNS$ + * the faculty of + * $DESCRIPTION$ + * The function FACT() calculates the faculty to the integer given in + * . The faculty is defined as n! = 1*2*...*n and is often + * used in statistics. Note, that faculties above 21 are too big + * so that the function must return a -1. + * $EXAMPLES$ + * ? fact (0) --> 1 + * ? fact (1) --> 1 + * ? fact (4) --> 24 + * $TESTS$ + * fact (0) == 1 + * fact (1) == 1 + * fact (4) == 24 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * FACT() is compatible with CT3's FACT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is math.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/ctpad.txt b/harbour/contrib/hbct/doc/en/ctpad.txt new file mode 100644 index 0000000000..b4a7d58d07 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/ctpad.txt @@ -0,0 +1,67 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * PADLEFT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Fills string to a certain length on the left + * $SYNTAX$ + * PADLEFT (,, []) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * PADLEFT() is compatible with CT3's PADLEFT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is pad.c, library is libct. + * $SEEALSO$ + * PADRIGHT() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * PADRIGHT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Fills string to a certain length on the right + * $SYNTAX$ + * PADRIGHT (,, []) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * PADRIGHT() is compatible with CT3's PADRIGHT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is pad.c, library is libct. + * $SEEALSO$ + * PADLEFT() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/ctstr.txt b/harbour/contrib/hbct/doc/en/ctstr.txt new file mode 100644 index 0000000000..ef4777009f --- /dev/null +++ b/harbour/contrib/hbct/doc/en/ctstr.txt @@ -0,0 +1,171 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CSETREF() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Determine return value of reference sensitive CT3 string functions + * $SYNTAX$ + * CSETREF ([]) -> lOldSwitch + * $ARGUMENTS$ + * [] .T. -> suppress return value + * .F. -> do not suppress return value + * $RETURNS$ + * lOldSwitch old (if lNewSwitch is a logical value) or + * current state of the switch + * $DESCRIPTION$ + * Within the CT3 functions, the following functions do not + * change the length of a string passed as parameter while + * transforming this string: + * + * ADDASCII() BLANK() CHARADD() + * CHARAND() CHARMIRR() CHARNOT() + * CHAROR() CHARRELREP() CHARREPL() + * CHARSORT() CHARSWAP() CHARXOR() + * CRYPT() JUSTLEFT() JUSTRIGHT() + * POSCHAR() POSREPL() RANGEREPL() + * REPLALL() REPLLEFT() REPLRIGHT() + * TOKENLOWER() TOKENUPPER() WORDREPL() + * WORDSWAP() + * + * Thus, these functions allow to pass the string by reference [@] to + * the function so that it may not be necessary to return the transformed + * string. By calling CSETREF (.T.), the above mentioned functions return + * the value .F. instead of the transformed string if the string is + * passed by reference to the function. + * The switch is turned off (.F.) by default. + * + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * This function is fully CT3 compatible. + * $PLATFORMS$ + * All + * $FILES$ + * Source is ctstr.c, library is ct3. + * $SEEALSO$ + * ADDASCII() BLANK() CHARADD() + * CHARAND() CHARMIRR() CHARNOT() + * CHAROR() CHARRELREP() CHARREPL() + * CHARSORT() CHARSWAP() CHARXOR() + * CRYPT() JUSTLEFT() JUSTRIGHT() + * POSCHAR() POSREPL() RANGEREPL() + * REPLALL() REPLLEFT() REPLRIGHT() + * TOKENLOWER() TOKENUPPER() WORDREPL() + * WORDSWAP() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CSETATMUPA() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Determine "multi-pass" behaviour in some string functions + * $SYNTAX$ + * CSETATMUPA ([]) -> lOldSwitch + * $ARGUMENTS$ + * [] .T. -> turn "multi-pass" on + * .F. -> turn "multi-pass" off + * $RETURNS$ + * lOldSwitch old (if lNewSwitch is a logical value) or + * current state of the switch + * $DESCRIPTION$ + * CSETATMUPA determines how the following CT3 string functions + * + * ATNUM() AFTERATNUM() BEFORATNUM() + * ATREPL() NUMAT() ATADJUST() + * WORDTOCHAR() WORDREPL() + * + * perform their work. See the respective function documentation for a + * further description how the switch influences these functions. + * + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * This function is fully CT3 compatible. + * $PLATFORMS$ + * All + * $FILES$ + * Source is ctstr.c, library is ct3. + * $SEEALSO$ + * ATNUM() AFTERATNUM() BEFORATNUM() + * ATREPL() NUMAT() ATADJUST() + * WORDTOCHAR() WORDREPL() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SETATLIKE() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Determine scan behaviour in some string functions + * $SYNTAX$ + * SETATLIKE ([] [, <[@]cWildcard>]) --> nOldMode + * $ARGUMENTS$ + * [] CT_SETATLIKE_EXACT -> characters are compared exactly + * CT_SETATLIKE_WILDCARD -> characters are compared using + * a wildcard character + * The default value is CT_SETATLIKE_EXACT. + * [<[@]cWildcard>] determines the character that is subsequently used + * as a wildcard character for substring scanning. + * The default value is "?". + * NEW: If this parameter is passed by reference [@], + * the current wildcard character is stored in + * . + * $RETURNS$ + * nOldMode old (if nMode is a numeric value) or + * current state of the switch + * $DESCRIPTION$ + * In the following CT3 functions, strings are compared on a character + * base: + * + * ATADJUST() ATNUM() AFTERATNUM() + * BEFOREATNUM() ATREPL() NUMAT() + * STRDIFF() + * + * With the SETATLIKE function, one can determine when characters are + * considered to match within these functions. If CT_SETATLIKE_WILDCARD + * is set (e.g. "?"), then "?" matches every other character. + * + * can be one of the following values that are defined + * in ct.ch + * + * Definition | Value + * ----------------------|------ + * CT_SETATLIKE_EXACT | 0 + * CT_SETATLIKE_WILDCARD | 1 + * + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * This function is fully CT3 compatible, but allows to pass the + * second parameter by reference so that the current wildcard character + * can be determined. + * $PLATFORMS$ + * All + * $FILES$ + * Source is ctstr.c, header is ct.ch, library is ct3. + * $SEEALSO$ + * + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/datetime.txt b/harbour/contrib/hbct/doc/en/datetime.txt new file mode 100644 index 0000000000..525cc1c329 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/datetime.txt @@ -0,0 +1,195 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * BOM() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * _B_egin _O_f _M_onth + * $SYNTAX$ + * BOM ([]) -> dDateBeginOfMonth + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * BOM() is compatible with CT3's BOM(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is datetime.prg, library is libct. + * $SEEALSO$ + * EOM(),BOQ(),EOQ(),BOY(),EOY() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * EOM() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * _E_nd _O_f _M_onth + * $SYNTAX$ + * EOM ([]) -> dDateEndOfMonth + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * EOM() is compatible with CT3's EOM(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is datetime.prg, library is libct. + * $SEEALSO$ + * BOM(),BOQ(),EOQ(),BOY(),EOY() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * BOQ() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * _B_egin _O_f _Q_uarter + * $SYNTAX$ + * BOQ ([]) -> dDateBeginOfQuarter + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * BOQ() is compatible with CT3's BOQ(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is datetime.prg, library is libct. + * $SEEALSO$ + * BOM(),EOM(),EOQ(),BOY(),EOY() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * EOQ() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * _E_nd _O_f _Q_uarter + * $SYNTAX$ + * EOQ ([]) -> dDateEndOfQuarter + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * EOQ() is compatible with CT3's EOQ(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is datetime.prg, library is libct. + * $SEEALSO$ + * BOM(),EOM(),BOQ(),BOY(),EOY() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * BOY() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * _B_egin _O_f _Y_ear + * $SYNTAX$ + * BOY ([]) -> dDateBeginOfYear + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * BOY() is compatible with CT3's BOY(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is datetime.prg, library is libct. + * $SEEALSO$ + * BOM(),EOM(),BOQ(),EOQ(),EOY() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * EOY() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * _E_nd _O_f _Y_ear + * $SYNTAX$ + * EOY ([]) -> dDateEndOfYear + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * EOY() is compatible with CT3's EOY(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is datetime.prg, library is libct. + * $SEEALSO$ + * BOM(),EOM(),BOQ(),EOQ(),BOY() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/dattime2.txt b/harbour/contrib/hbct/doc/en/dattime2.txt new file mode 100644 index 0000000000..e3f3ee61e7 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/dattime2.txt @@ -0,0 +1,474 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CTODOW() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * convert name of day of the week to its ordinal number + * $SYNTAX$ + * CTODOW () -> nOrdinal + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * CTODOW() is compatible with CT3's CTODOW(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * NTOCDOW() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CTOMONTH() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * convert name of month to its ordinal number + * $SYNTAX$ + * CTOMONTH () -> nOrdinal + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * CTOMONTH() is compatible with CT3's CTOMONTH(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * NTOCMONTH() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * DMY() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * Returns the date as a string in DD Month YY format + * $SYNTAX$ + * DMY ([][, ]) -> cDateString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * Returns the date as a string in DD Month YY format. If lmode + * is TRUE, a "." is inserted after the DD + * TODO: add further documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * DMY() is compatible with CT3's DMY(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * MDY() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * MDY() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * Returns the date as a string in Month DD, YY or Month DD, YYYY + * $SYNTAX$ + * MDY ([]) -> cDateString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * Returns the date as a string in Month DD, YY or Month DD, YYYY + * If dDate is NULL, the system date is used + * TODO: add further documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * MDY() is compatible with CT3's MDY(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * DMY() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ADDMONTH() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * add months to a date + * $SYNTAX$ + * ADDMONTH ([,] ) -> dShiftedDate + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * ADDMONTH() is compatible with CT3's ADDMOTH(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * DOY() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * Determines the day of the year for a specific date + * $SYNTAX$ + * DMY ([]) -> nDayOfYear + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * Determines the day of the year for a specific date + * if dDate is invalid, returns 0 + * TODO: add further documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * DOY() is compatible with CT3's DOY(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ISLEAP() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * determines of year of date is a leap year + * $SYNTAX$ + * ISLEAP ([]) -> lIsLeap + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add further documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * ISLEAP() is compatible with CT3's ISLEAP(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * DAYSTOMONTH() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * Total number of days from first of Jan to beginning of nMonth. + * $SYNTAX$ + * DAYSTOMONTH (, ) -> nDaysToMonth + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * lLeap is FALSE for a non-leap year but TRUE if it is. If so and nMonth + * is greater than 2, ndays is incremented + * TODO: add further documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * DAYSTOMONTH() is a new function in Harbour's CT3 library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * DAYSINMONTH() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * DAYSINMONTH() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * Returns the number of days in month + * $SYNTAX$ + * DAYSINMONTH (, ) -> nDaysInMonth + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * DAYSINMONTH() is a new function in Harbour's CT3 library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * DAYSTOMONTH() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * QUARTER() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * Returns a number equal to the quarter in which a date falls + * $SYNTAX$ + * QUARTER ([]) -> nQuarter + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * Returns a number equal to the quarter in which ddate + * falls. If ddate is empty, the system date is employed. + * TODO: add further documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * QUARTER() is compatible with CT3's QUARTER(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * LASTDAYOM() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * Returns the the number of days in the month. + * $SYNTAX$ + * LASTDAYOM ([]) -> nDaysInMonth + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * can be a date or a month number. If empty uses the + * system date. If nMonth is a 2, lastdayom() will not know if it + * is a leap year or not. If dDate is invalid, returns 0 + * TODO: add further documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * LASTDAYOM() is compatible with CT3's LASTDAYOM(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * EOM() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * NTOCDOW() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * (num of day) -> day name + * $SYNTAX$ + * NTOCDOW () -> cDay + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * NTOCDOW() is compatible with CT3's NTOCDOW(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * CTODOW() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * NTOCMONTH() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * (num of month ) -> Month Name + * $SYNTAX$ + * NTOCMONTH () -> cMonth + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * NTOCMONTH() is compatible with CT3's NTOCMONTH(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * CTOMONTH() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * WEEK() + * $CATEGORY$ + * CT3 date and time functions + * $ONELINER$ + * Returns the calendar week a number + * $SYNTAX$ + * WEEK ([][, ]) -> nWeek + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * Returns the calendar week a number. If no date is specified, + * the system date is used. An empty date viz ctod(" / / ") + * returns 0. + * If is .T., week() will calculate the "simple week number", defined by + * - week #1 starts on January, 1st + * - week #(n+1) starts seven days after start of week #n + * If is .F. (default), the ISO8601 week number, defined by + * - weeks start on mondays + * - week #1 is the one that includes January, 4 + * will be calculated + * TODO: add further documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * WEEK() is compatible with CT3's WEEK(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is dattime2.prg, library is libct. + * $SEEALSO$ + * + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/dattime3.txt b/harbour/contrib/hbct/doc/en/dattime3.txt new file mode 100644 index 0000000000..9030c5627a --- /dev/null +++ b/harbour/contrib/hbct/doc/en/dattime3.txt @@ -0,0 +1,220 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * WAITPERIOD() + * $CATEGORY$ + * HBCT date and time functions + * $ONELINER$ + * Pauses a specified time in increments of 1/100 seconds + * $SYNTAX$ + * WAITPERIOD([]) --> lNotElapsed + * $ARGUMENTS$ + * Designates the waiting period at initialization in + * 1/100ths of seconds. Values from 1 to 8, 640, 000 (one day) are + * possible. + * $RETURNS$ + * WAITPERIOD() returns .T. , if the time span designated at initialization + * has not elapsed. + * $DESCRIPTION$ + * This function sets a time span for a xHarbour DO WHILE loop to run. + * The function must initialize prior to the loop, since you must specify + * the parameter in 1/100th seconds. Subsequently, the function + * can be implemented without a parameter for additional loop conditions. + * It returns .T., as long as the designated time span has not yet run out. + * + * Note + * + * The function notes the status of the internal timer at + * initialization. From that point on, the initialization should always + * precede the respective DO WHILE; otherwise, the time delay is + * incorrect. The passing of midnight (the time resets to the 0 value) + * is taken into account. + * $EXAMPLES$ + * Run a loop for 5 seconds: + * + * WAITPERIOD(500) // Initialization, 5 seconds + * DO WHILE .AND. .AND. WAITPERIOD() + * *... + * ENDDO + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * WAITPERIOD() is Clipper Tools compatible. + * $PLATFORMS$ + * Windows + * $FILES$ + * Source is dattime3.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TIMEVALID() + * $CATEGORY$ + * HBCT Date and Time Functions + * $ONELINER$ + * Determines whether a specIFied time is valid + * $SYNTAX$ + * TIMEVALID() --> lValid + * $ARGUMENTS$ + * Designates a character string that contains the time to + * test. + * $RETURNS$ + * TIMEVALID() RETURNs .T. when is a valid time; or .F. when + * is an invalid time. + * $DESCRIPTION$ + * With input that requires time manipulation, writing your own UDF to + * check time inputs was unavoidable up to now. TIMEVALID() permits + * Complete checking of a time designation. You can use this FUNCTION + * effectively with a VALID clause within a READ mask. + * + * Note + * + * Note the format for time designations. There must always be + * two digits for hours, minutes, seconds, and hundredths; otherwise, + * the time it is regarded as invalid. Valid examples are "12", + * "12:59", "12:59:59", and "12:59:59:99". By contrast, invalid + * examples are "24", "12:60", or "12:1", and/or "12:". IF you work + * with time strings that are not completely filled and that you need to + * check with TIMEVALID(), then they must be TRIMmed prior to the use of + * TIMEVALID() (see following Examples). + * $EXAMPLES$ + * Using the VALID clause with TRIM, all valid times are + * accepted, even IF no seconds or minutes are specIFied: + * + * cBegin := SPACE(11) + * @ 5, 10 SAY "Please input time for beginning work:"; + * GET cBegin VALID TIMEVALID(TRIM(cBegin)) + * READ + * + * Using a VALID clause without TRIM, hours and minutes must be + * specified, so that TIMEVALID() can confirm a valid time: + * + * cBegin := SPACE(5) + * @ 5, 10 SAY "Please input time for beginning work:"; + * GET cBegin VALID TIMEVALID(cBegin) + * READ + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * This function is CA-Cl*pper Tools compatible. + * $PLATFORMS$ + * Windows + * $FILES$ + * Source is dattime3.c, library is libct. + * $SEEALSO$ + * SETTIME() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SETTIME() + * $CATEGORY$ + * HBCT Date and Time Functions + * $ONELINER$ + * Sets the system clock + * $SYNTAX$ + * SETTIME(, []) --> lSet + * $ARGUMENTS$ + * Designates a character string that contains the time that + * is to become the system time. + * + * Designates whether the time should also be set in the + * CMOS-RAM of an AT. The default is do not write to CMOS-RAM. Note that in + * Windows plataform this adjust is automatic, therefore this parameter is + * without efect. + * $RETURNS$ + * The FUNCTION RETURNs .T. when the time is set successfully. + * $DESCRIPTION$ + * When you use this FUNCTION to convert the time into the system time from + * within your xHarbour application, all files acquire this time with + * each write procedure. + * $EXAMPLES$ + * Set the system time in each case; but the hardware clock only + * on an AT: + * + * cNewTime := "10:20:00" + * IF ISAT() + * SETTIME(cNewTime, .T.) + * ELSE + * SETTIME(cNewTime) + * ENDIF + * + * Or, more compactly: + * + * SETTIME(cNewTime, ISAT()) + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * This function is CA-Cl*pper Tools compatible. + * $PLATFORMS$ + * Windows + * $FILES$ + * Source is dattime3.c, library is libct. + * $SEEALSO$ + * SETDATE(),TIMEVALID() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SETDATE() + * $CATEGORY$ + * HBCT Date and Time Functions + * $ONELINER$ + * Sets the system date + * $SYNTAX$ + * SETDATE(, []) --> lSet + * $ARGUMENTS$ + * Designates which date to use to set the system date. + * + * Designates whether the date should also be set in the CMOS- + * RAM of an AT. The default is do not write (.F.). Note that in Windows + * plataform this adjust is automatic, therefore this parameter is without + * efect. + * $RETURNS$ + * SETDATE() RETURNs .T. when the date is successfully set. + * $DESCRIPTION$ + * When you use this FUNCTION to set the system date from within your + * xHarbour application, all files acquire this date with each write + * procedure. + * $EXAMPLES$ + * Set the system date in each case; but the hardware clock only + * on an AT: + * + * dNewDate := CTOD("07/30/91") + * IF ISAT() + * SETDATE(dNewDate, .T.) + * ELSE + * SETDATE(dNewDate) + * ENDIF + * + * Or, more compactly: + * + * SETDATE(dNewDate, ISAT()) + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * This function is CA-Cl*pper Tools compatible. + * $PLATFORMS$ + * Windows + * $FILES$ + * Source is dattime3.c, library is libct. + * $SEEALSO$ + * SETTIME() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/exponent.txt b/harbour/contrib/hbct/doc/en/exponent.txt new file mode 100644 index 0000000000..1f247a7a36 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/exponent.txt @@ -0,0 +1,92 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * MANTISSA() + * $CATEGORY$ + * CT3 number and bit manipulation functions + * $ONELINER$ + * Evaluate the mantissa of a floating point number + * $SYNTAX$ + * MANTISSA( ) --> nMantissa + * $ARGUMENTS$ + * Designate any Harbour number. + * $RETURNS$ + * MANTISSA() returns the mantissa of the number. + * $DESCRIPTION$ + * This function supplements EXPONENT() to return the mantissa of the + * number. + * + * Note: The mantissa value can be 0 or in the range of 1 to 2. + * + * The following calculation reproduces the original value: + * + * MANTISSA()* 2^EXPONENT() = + * + * + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * MANTISSA() is compatible with CT3's MANTISSA(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is exponent.c, library is libct. + * $SEEALSO$ + * EXPONENT() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * EXPONENT() + * $CATEGORY$ + * CT3 number and bit manipulation functions + * $ONELINER$ + * Evaluate the exponent of a floating point number + * $SYNTAX$ + * EXPONENT( ) --> nExponent + * $ARGUMENTS$ + * Designate any Harbour number. + * $RETURNS$ + * EXPONENT() returns the exponent of the number + * in base 2. + * $DESCRIPTION$ + * This function supplements MANTISSA() to return the exponent of the + * number. + * + * Values > 1 or values < -1 return a positive number 0 to 1023. + * + * Values < 1 or values > -1 return a negative number -1 to -1023. + * + * The EXPONENT( 0 ), return 0. + * + * The following calculation reproduces the original value: + * + * 2^EXPONENT() * MANTISSA() = + * + * + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * EXPONENT() is compatible with CT3's EXPONENT() + * $PLATFORMS$ + * All + * $FILES$ + * Source is exponent.c, library is libct. + * $SEEALSO$ + * MANTISSA() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/finan.txt b/harbour/contrib/hbct/doc/en/finan.txt new file mode 100644 index 0000000000..ed679a49bc --- /dev/null +++ b/harbour/contrib/hbct/doc/en/finan.txt @@ -0,0 +1,256 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * FV() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Future value of a capital + * $SYNTAX$ + * FV (nDeposit, nInterest, nPeriods) --> nFutureValue + * $ARGUMENTS$ + * amount of money invested per period + * rate of interest per period, 1 == 100% + * period count + * $RETURNS$ + * Total value of the capital after of + * paying and interest being + * paid every period and added to the capital (resulting + * in compound interest) + * $DESCRIPTION$ + * FV() calculates the value of a capital after periods. + * Starting with a value of 0, every period, + * (Dollars, Euros, Yens, ...) and an interest of for the + * current capital are added for the capital (=Percent/100). + * Thus, one gets the non-linear effects of compound interests: + * value in period 0 = 0 + * value in period 1 = ((value in period 0)*(1+/100)) + + * value in period 2 = ((value in period 1)*(1+/100)) + + * etc.... + * value in period = ((value in period -1)*(1+/100))< + + * = * sum from i=0 to -1 over (1+/100)^i + * = * ((1+/100)^n-1) / (/100) + * $EXAMPLES$ + * // Payment of 1000 per year for 10 years at a interest rate + * // of 5 per cent per year + * + * ? fv (1000, 0.05, 10) --> 12577.893 + * $TESTS$ + * fv (1000, 0.00, 10) == 10000.0 + * fv (1000, 0.05, 10) == 12577.893 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * FV() is compatible with CT3's FV(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is finan.c, library is libct. + * $SEEALSO$ + * PV(),PAYMENT(),PERIODS(),RATE() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * PV() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Present value of a loan + * $SYNTAX$ + * PV (nPayment, nInterest, nPeriods) --> nPresentValue + * $ARGUMENTS$ + * amount of money paid back per period + * rate of interest per period, 1 == 100% + * period count + * $RETURNS$ + * Present value of a loan when one is paying back + * per period at a rate of interest of + * per period + * $DESCRIPTION$ + * PV() calculates the present value of a loan that is paid back + * in payments of (Dollars, Euros, Yens,...) + * while the rate of interest is per period: + * debt in period 0 = + * debt in period 1 = ((debt in period 0)-)*(1+/100) + * debt in period 2 = ((debt in period 1)-)*(1+/100) + * etc... + * debt in period = ((debt in period -1)-)*(1+/100) + * -> has to be 0, so + * = *(1-(1+/100)^(-n))/(/100) + * $EXAMPLES$ + * // You can afford to pay back 100 Dollars per month for 5 years + * // at a interest rate of 0.5% per month (6% per year), so instead + * // of 6000 Dollars (the amount you will pay back) the bank will pay + * // you + * + * ? pv (100, 0.005, 60) --> 5172.56 + * $TESTS$ + * pv (100, 0.0, 60) == 6000.0 + * pv (100, 0.005, 60) == 5172.56 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * PV() is compatible with CT3's PV(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is finan.c, library is libct. + * $SEEALSO$ + * FV(),PAYMENT(),PERIODS(),RATE() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * PAYMENT() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Payments for a loan + * $SYNTAX$ + * PAYMENT (nLoan, nInterest, nPeriods) --> nPayment + * $ARGUMENTS$ + * amount of money you get from the bank + * rate of interest per period, 1 == 100% + * period count + * $RETURNS$ + * Periodical payment one has to make to pay the + * loan back + * $DESCRIPTION$ + * PAYMENT() calculates the payment one has to make periodically + * to pay back a loan within periods and for a + * rate of interest per period. + * debt in period 0 = + * debt in period 1 = ((debt in period 0)-)*(1+/100) + * debt in period 2 = ((debt in period 1)-)*(1+/100) + * etc... + * debt in period = ((debt in period -1)-)*(1+/100) + * -> has to be 0, so + * = *(/100)/(1-(1+/100)^(-n)) + * $EXAMPLES$ + * // You get a loan of 5172.56 at a interest rate of 0.5% per + * // month (6% per year). + * // For 5 years, you have to pay back every month + * + * ? payment (5172.56, 0.005, 60) --> 100.00 + * $TESTS$ + * payment (5172.56, 0.0, 60) == 86.21 + * payment (5172.56, 0.005, 60) == 100.00 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * PAYMENT() is compatible with CT3's PAYMENT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is finan.c, library is libct. + * $SEEALSO$ + * PV(),FV(),PERIODS(),RATE() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * PERIODS() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Number of periods for a loan + * $SYNTAX$ + * PERIODS (nLoan, nPayment, nInterest) --> nPeriods + * $ARGUMENTS$ + * amount of money you get from the bank + * amount of money you pay back per period + * rate of interest per period, 1 == 100% + * $RETURNS$ + * number of periods you need to pay the loan back + * $DESCRIPTION$ + * PERIODS() calculates the number of periods one needs to pay back + * a loan of with periodical payments of and for a + * rate of interest per period. + * debt in period 0 = + * debt in period 1 = ((debt in period 0)-)*(1+/100) + * debt in period 2 = ((debt in period 1)-)*(1+/100) + * etc... + * debt in period = ((debt in period -1)-)*(1+/100) + * -> has to be 0, so + * = -log(1-*(/100)/)/log(1+/100)) + * + * Note, however that in the case of nPayment <= *(/100), + * one would need infinite time to pay the loan back. The functions does + * then return -1. + * $EXAMPLES$ + * // You get a loan of 5172.56 at a interest rate of 0.5% per + * // month (6% per year). + * // You can afford to pay 100 back every month, so you need + * + * ? periods (5172.56, 100, 0.005) --> 60.0 + * + * // months to cancel the loan. + * $TESTS$ + * periods (5172.56, 100, 0.005) == 60.0 + * periods (5172.56, 100, 0.0) == 51.7256 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * PERIODS() is compatible with CT3's PERIODS(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is finan.c, library is libct. + * $SEEALSO$ + * PV(),FV(),PAYMENT(),RATE() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * RATE() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Estimate rate of interest for a loan + * $SYNTAX$ + * RATE (nLoan, nPayment, nPeriods) --> nRate + * $ARGUMENTS$ + * amount of money you get from the bank + * amount of money you pay back per period + * number of periods you pay the loan back + * $RETURNS$ + * estimated rate of interest per period, 1 == 100% + * $DESCRIPTION$ + * RATE() calculates the rate of interest per period for the given + * loan, payment per periods and number of periods. This is done with + * the same equation used in the PAYMENT() or PERIODS() function: + * + * = *(/100)/(1-(1+/100)^(-)) + * + * However, this equation can not be solved for in a "closed" + * manner, i.e. = ..., so that the result can only be estimated. + * $EXAMPLES$ + * // You get a loan of 5172.56, pay 100 back every month for + * // 5 years (60 months). The effective interest rate per + * // period (=month) is + * + * ? rate (5172.56, 100, 60) --> 0.005 + * + * $TESTS$ + * rate (5172.56, 100, 60.0) == 0.005 + * rate (6000.0, 100, 60.0) == 0.0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * RATE() is compatible with CT3's RATE(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is finan.c, library is libct. + * $SEEALSO$ + * PV(),FV(),PAYMENT(),PERIODS() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/ftoc.txt b/harbour/contrib/hbct/doc/en/ftoc.txt new file mode 100644 index 0000000000..8380f10ec1 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/ftoc.txt @@ -0,0 +1,86 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * FTOC() + * $CATEGORY$ + * CT3 number and bit manipulation functions + * $ONELINER$ + * + * $SYNTAX$ + * FTOC( ) --> cFloatingPointNumber + * + * $ARGUMENTS$ + * Designate any Harbour number. + * + * $RETURNS$ + * FTOC() return a string with the size of DOUBLE. + * ATTENTION: different implementations or platforms of Harbour, they + * could produce different format in the string returned by FTOC(). + * + * $DESCRIPTION$ + * Harbour internal numbers in Floating Point are stored in data type + * DOUBLE. FTOC() returns these bits as an string. In this way, + * numbers con be saved more compactly. + * + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is ftoc.c, library is libct. + * $SEEALSO$ + * CTOF(), XTOC() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CTOF() + * $CATEGORY$ + * CT3 number and bit manipulation functions + * $ONELINER$ + * + * $SYNTAX$ + * CTOF( ) --> nFloatingPointNumber + * + * $ARGUMENTS$ + * Designate a string that contains a Harbour + * number in flotaing point format. + * ATTENTION: different implementations or platforms of Harbour, they + * could produce different format in the string returned by FTOC(). + * + * $RETURNS$ + * CTOF() return the floating point number that corresponds to the + * string passed. + * + * $DESCRIPTION$ + * Character strings created with FTOC() or XTOC() are convert into + * Harbour floating point number + * + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is ftoc.c, library is libct. + * $SEEALSO$ + * FTOC(), XTOC() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/justify.txt b/harbour/contrib/hbct/doc/en/justify.txt new file mode 100644 index 0000000000..df59f45d1b --- /dev/null +++ b/harbour/contrib/hbct/doc/en/justify.txt @@ -0,0 +1,67 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * JUSTLEFT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Move characters from the beginning to the end of a string + * $SYNTAX$ + * JUSTLEFT (<[@]cString>, [|]) -> cJustifiedString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * JUSTLEFT() is compatible with CT3's JUSTLEFT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is justify.c, library is libct. + * $SEEALSO$ + * JUSTRIGHT() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * JUSTRIGHT() + * $CATEGORY$ + * Harbour Tools string functions + * $ONELINER$ + * Move characters from the end to the beginning of a string + * $SYNTAX$ + * JUSTRIGHT (<[@]cString>, [|]) -> cJustifiedString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * JUSTRIGHT() is compatible with CT3's JUSTRIGHT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is justify.c, library is libct. + * $SEEALSO$ + * JUSTLEFT() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/keyset.txt b/harbour/contrib/hbct/doc/en/keyset.txt new file mode 100644 index 0000000000..0f0b5c53c8 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/keyset.txt @@ -0,0 +1,131 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * KSETINS() + * $CATEGORY$ + * CT3 switch and state functions + * $ONELINER$ + * + * $SYNTAX$ + * KSETINS ([]) -> lOldSwitch + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * DOS + * $FILES$ + * Source is keyset.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * KSETCAPS() + * $CATEGORY$ + * CT3 switch and state functions + * $ONELINER$ + * + * $SYNTAX$ + * KSETCAPS ([]) -> lOldSwitch + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * DOS + * $FILES$ + * Source is keyset.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * KSETNUM() + * $CATEGORY$ + * CT3 switch and state functions + * $ONELINER$ + * + * $SYNTAX$ + * KSETNUM ([]) -> lOldSwitch + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * DOS + * $FILES$ + * Source is keyset.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * KSETSCROLL() + * $CATEGORY$ + * CT3 switch and state functions + * $ONELINER$ + * + * $SYNTAX$ + * KSETSCROLL ([]) -> lOldSwitch + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * DOS + * $FILES$ + * Source is keyset.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/misc1.txt b/harbour/contrib/hbct/doc/en/misc1.txt new file mode 100644 index 0000000000..c489e4eb50 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/misc1.txt @@ -0,0 +1,51 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * XTOC() + * $CATEGORY$ + * CT3 miscellaneous functions + * $ONELINER$ + * + * $SYNTAX$ + * XTOC( ) --> cValue + * + * $ARGUMENTS$ + * Designate an expression of some of the following data + * type: NUMBER, CHARACTER, DATE, LOGICAL. + * + * $RETURNS$ + * XTOC() return a string with the representation of data type of + * expValue. + * + * $DESCRIPTION$ + * Each data type always returns a string with a particular fixed length: + * + * ----------------------------------------------------------- + * Data Type Result Length Similar function + * ----------------------------------------------------------- + * Numeric sizeof( DOUBLE ) FTOC() + * Logical 1 + * Date 8 DTOS() + * String Unchanged + * ----------------------------------------------------------- + * + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is misc1.c, library is libct. + * $SEEALSO$ + * CTOF(), FTOC() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/num1.txt b/harbour/contrib/hbct/doc/en/num1.txt new file mode 100644 index 0000000000..6218965f54 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/num1.txt @@ -0,0 +1,115 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CELSIUS() + * $CATEGORY$ + * CT3 numeric functions + * $ONELINER$ + * Temperature conversion Fahrenheit to Celsius + * $SYNTAX$ + * CELSIUS (nDegreeFahrenheit) --> nDegreeCelsius + * $ARGUMENTS$ + * temperature in degree Fahrenheit + * $RETURNS$ + * temperate in degree Celsius + * $DESCRIPTION$ + * CELSIUS() converts temperature values measured in the Fahrenheit scale + * to the Celsius scale. + * $EXAMPLES$ + * // melting point of water in standard conditions + * ? celsius (32.0) --> 0.0 + * // boiling point of water in standard conditions + * ? celsius (212.0) --> 100.0 + * $TESTS$ + * celsius (32.0) == 0.0 + * celsius (212.0) == 100.0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * CELSIUS() is compatible with CT3's CELSIUS(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is num1.c, library is libct. + * $SEEALSO$ + * FAHRENHEIT() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * FAHRENHEIT() + * $CATEGORY$ + * CT3 numeric functions + * $ONELINER$ + * Temperature conversion Celsius to Fahrenheit + * $SYNTAX$ + * FAHRENHEIT (nDegreeCelsius) --> nDegreeFahrenheit + * $ARGUMENTS$ + * temperate in degree Celsius + * $RETURNS$ + * temperature in degree Fahrenheit + * $DESCRIPTION$ + * FAHRENHEIT() converts temperature values measured in the Celsius scale + * to the Fahrenheit scale. + * $EXAMPLES$ + * // melting point of water in standard conditions + * ? fahrenheit (0.0) --> 32.0 + * // boiling point of water in standard conditions + * ? fahrenheit (100.0) --> 212.0 + * $TESTS$ + * fahrenheit (0.0) == 32.0 + * celsius (100.0) == 212.0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * FAHRENHEIT() is compatible with CT3's FAHRENHEIT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is num1.c, library is libct. + * $SEEALSO$ + * CELSIUS() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * INFINITY() + * $CATEGORY$ + * CT3 numeric functions + * $ONELINER$ + * Returns the largest floating point number available in the system + * $SYNTAX$ + * INFINITY ([]) --> nLargestNumber + * $ARGUMENTS$ + * [] .T., if the function should return + * the maximum floating point value + * available (DBL_MAX) + * .F., function should try to return + * the same value as the original CT3 lib did + * Default: .F. + * $RETURNS$ + * the largest floating point number available in the system + * $DESCRIPTION$ + * INFINITY() returns the largest floating point number available + * in the system. For platform independance, this is set to DBL_MAX. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * INFINITY() must not necessarily return the same number as CT3's INFINITY(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is num1.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/numat.txt b/harbour/contrib/hbct/doc/en/numat.txt new file mode 100644 index 0000000000..2bb5bf6131 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/numat.txt @@ -0,0 +1,35 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * NUMAT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Number of occurrences of a sequence in a string + * $SYNTAX$ + * NUMAT (, , []) --> nCount + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * NUMAT() is compatible with CT3's NUMAT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is numat.c, library is libct. + * $SEEALSO$ + * CSETATMUPA(),SETATLIKE() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/numconv.txt b/harbour/contrib/hbct/doc/en/numconv.txt new file mode 100644 index 0000000000..e007f48bbc --- /dev/null +++ b/harbour/contrib/hbct/doc/en/numconv.txt @@ -0,0 +1,131 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * NTOC() + * $CATEGORY$ + * CT3 number and bit manipulation functions + * $ONELINER$ + * + * $SYNTAX$ + * NTOC ([, ][,][,]) -> + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is numconv.prg, library is libct. + * $SEEALSO$ + * CTON() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CTON() + * $CATEGORY$ + * CT3 number and bit manipulation functions + * $ONELINER$ + * + * $SYNTAX$ + * CTON ([, ][,]) -> + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is numconv.prg, library is libct. + * $SEEALSO$ + * NTOC() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * BITTOC() + * $CATEGORY$ + * CT3 number and bit manipulation functions + * $ONELINER$ + * + * $SYNTAX$ + * BITTOC (, [,]) -> + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is numconv.prg, library is libct. + * $SEEALSO$ + * CTOBIT() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CTOBIT() + * $CATEGORY$ + * CT3 number and bit manipulation functions + * $ONELINER$ + * + * $SYNTAX$ + * CTOBIT (, ) -> + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is numconv.prg, library is libct. + * $SEEALSO$ + * BITTOC() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/pos1.txt b/harbour/contrib/hbct/doc/en/pos1.txt new file mode 100644 index 0000000000..b9abee09e8 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/pos1.txt @@ -0,0 +1,132 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * POSALPHA() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Left-most position of a letter in a string + * $SYNTAX$ + * POSALPHA (, [], []) -> nPosition + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * POSALPHA() is compatible with CT3's POSALPHA(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is pos1.c, library is libct. + * $SEEALSO$ + * POSLOWER(),POSUPPER(),POSRANGE() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * POSLOWER() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Left-most position of a lowercase letter in a string + * $SYNTAX$ + * POSLOWER (, [], []) -> nPosition + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * POSLOWER() is compatible with CT3's POSLOWER(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is pos1.c, library is libct. + * $SEEALSO$ + * POSALPHA(),POSUPPER(),POSRANGE() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * POSRANGE() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Left-most position of a character from a set in a string + * $SYNTAX$ + * POSRANGE (, , , [], + * []) -> nPosition + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * POSRANGE() is compatible with CT3's POSRANGE(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is pos1.c, library is libct. + * $SEEALSO$ + * POSALPHA(),POSLOWER(),POSUPPER() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * POSUPPER() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Left-most position of an uppercase letter in a string + * $SYNTAX$ + * POSUPPER (, [], []) -> nPosition + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * POSUPPER() is compatible with CT3's POSUPPER(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is pos1.c, library is libct. + * $SEEALSO$ + * POSALPHA(),POSLOWER(),POSRANGE() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/pos2.txt b/harbour/contrib/hbct/doc/en/pos2.txt new file mode 100644 index 0000000000..673c419599 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/pos2.txt @@ -0,0 +1,131 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * POSCHAR() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Replace character at a certain position within a string + * $SYNTAX$ + * POSCHAR (<[@]cString>, , []) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * POSCHAR() is compatible with CT3's POSCHAR(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is pos2.c, library is libct. + * $SEEALSO$ + * POSDEL(),POSINS(),POSREPL(),CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * POSDEL() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Delete characters at a certain position within a string + * $SYNTAX$ + * POSDEL (, [], ) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * POSDEL() is compatible with CT3's POSDEL(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is pos2.c, library is libct. + * $SEEALSO$ + * POSCHAR(),POSINS(),POSREPL() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * POSINS() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Insert characters at a certain position within a string + * $SYNTAX$ + * POSINS (, , []) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * POSINS() is compatible with CT3's POSINS(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is pos2.c, library is libct. + * $SEEALSO$ + * POSCHAR,POSDEL(),POSREPL() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * POSREPL() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Replace characters at a certain position within a string + * $SYNTAX$ + * POSREPL (<[@]cString>, , []) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * POSREPL() is compatible with CT3's POSREPL(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is pos2.c, library is libct. + * $SEEALSO$ + * POSCHAR(),POSDEL(),POSINS(),CSETREF() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/posdiff.txt b/harbour/contrib/hbct/doc/en/posdiff.txt new file mode 100644 index 0000000000..06c7b075f5 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/posdiff.txt @@ -0,0 +1,67 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * POSDIFF() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * The left-most position there two string differ + * $SYNTAX$ + * POSDIFF (, , []) -> nPosition + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * POSDIFF() is compatible with CT3's POSDIFF(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is posdiff.c, library is libct. + * $SEEALSO$ + * POSEQUAL() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * POSEQUAL() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * The left-most position there two string begin to be equal + * $SYNTAX$ + * POSEQUAL (, , [], []) -> nPosition + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * POSEQUAL() is compatible with CT3's POSEQUAL(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is posdiff.c, library is libct. + * $SEEALSO$ + * POSDIFF() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/print.txt b/harbour/contrib/hbct/doc/en/print.txt new file mode 100644 index 0000000000..11582b79dd --- /dev/null +++ b/harbour/contrib/hbct/doc/en/print.txt @@ -0,0 +1,67 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * PRINTSTAT() + * $CATEGORY$ + * CT3 printer functions + * $ONELINER$ + * + * $SYNTAX$ + * PRINTSTAT ([]) -> nState + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * DOS + * $FILES$ + * Source is print.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * PRINTREADY() + * $CATEGORY$ + * CT3 printer functions + * $ONELINER$ + * + * $SYNTAX$ + * PRINTREADY ([]) -> lPrinterReady + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * DOS + * $FILES$ + * Library is libct. + * $SEEALSO$ + * + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/range.txt b/harbour/contrib/hbct/doc/en/range.txt new file mode 100644 index 0000000000..6b5d026ffb --- /dev/null +++ b/harbour/contrib/hbct/doc/en/range.txt @@ -0,0 +1,78 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * RANGEREM() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Remove characters within a certain ASCII range from a string + * $SYNTAX$ + * RANGEREM (, , ) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * ? rangerem ("0","9","year2002.dbf") // "year.dbf", remove all digits + * ? rangerem ("9","0","year2002.dbf") // "22", testing removal from "9" to chr(255) + * // and from chr(0) to "0" + * ? rangerem ("0","9","yearcurr.dbf") // "yearcurr.dbf", test leaving string untouched + * $TESTS$ + * rangerem ("0","9","year2002.dbf") == "year.dbf" + * rangerem ("9","0","year2002.dbf") == "22" + * rangerem ("0","9","yearcurr.dbf") == "yearcurr.dbf" + * $STATUS$ + * Started + * $COMPLIANCE$ + * RANGEREM() is compatible with CT3's RANGEREM(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is range.c, library is libct. + * $SEEALSO$ + * RANGEREPL() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * RANGEREPL + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Replace characters within a certain ASCII range from a string + * $SYNTAX$ + * RANGEREPL (, , + * <[@]cString>, ) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * ? rangerepl ("0","9","year2002.dbf","?") // "year????.dbf", replace all digits + * ? rangerepl ("9","0","year2002.dbf","?") // "????2??2????", testing replacement from "9" to chr(255) + * // and from chr(0) to "0" + * ? rangerepl ("0","9","yearcurr.dbf","?") // "yearcurr.dbf", test leaving string untouched + * $TESTS$ + * rangerepl ("0","9","year2002.dbf","?") == "year????.dbf" + * rangerepl ("9","0","year2002.dbf","?") == "????2??2????" + * rangerepl ("0","9","yearcurr.dbf","?") == "yearcurr.dbf" + * $STATUS$ + * Started + * $COMPLIANCE$ + * RANGEREPL() is compatible with CT3's RANGEREPL(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is range.c, library is libct. + * $SEEALSO$ + * RANGEREM() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/relation.txt b/harbour/contrib/hbct/doc/en/relation.txt new file mode 100644 index 0000000000..4eae5a91c3 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/relation.txt @@ -0,0 +1,70 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARRELA() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Character relation of two strings + * $SYNTAX$ + * CHARRELA (, , + * , ) -> nPosition + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * CHARRELA() is compatible with CT3's CHARRELA(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is relation.c, library is libct. + * $SEEALSO$ + * CHARRELREP() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARRELREP() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Relation dependant character replacement + * $SYNTAX$ + * CHARRELREP (, , + * , <[@]cString2>, + * ) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * CHARRELREP() is compatible with CT3's CHARRELREP(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is relation.c, library is libct. + * $SEEALSO$ + * CHARRELA(),CSETREF() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/remove.txt b/harbour/contrib/hbct/doc/en/remove.txt new file mode 100644 index 0000000000..58ad20f49d --- /dev/null +++ b/harbour/contrib/hbct/doc/en/remove.txt @@ -0,0 +1,99 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * REMALL() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Remove certain characters at the left and right of a string + * $SYNTAX$ + * REMALL (, []) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * REMALL() is compatible with CT3's REMALL(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is remove.c, library is libct. + * $SEEALSO$ + * REMLEFT(),REMRIGHT() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * REMLEFT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Remove certain characters at the left of a string + * $SYNTAX$ + * REMLEFT (, []) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * REMLEFT() is compatible with CT3's REMLEFT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is remove.c, library is libct. + * $SEEALSO$ + * REMALL(),REMRIGHT() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * REMRIGHT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Remove certain characters at the right of a string + * $SYNTAX$ + * REMRIGHT (, []) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * REMRIGHT() is compatible with CT3's REMRIGHT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is remove.c, library is libct. + * $SEEALSO$ + * REMALL(),REMLEFT() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/replace.txt b/harbour/contrib/hbct/doc/en/replace.txt new file mode 100644 index 0000000000..155d56d678 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/replace.txt @@ -0,0 +1,99 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * REPLALL() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Replace certain characters at the left and right of a string + * $SYNTAX$ + * REPLALL (, , []) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * REPLALL() is compatible with CT3's REPLALL(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is replace.c, library is libct. + * $SEEALSO$ + * REPLLEFT(),REPLRIGHT() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * REPLLEFT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Replace certain characters at the left of a string + * $SYNTAX$ + * REPLLEFT (, , []) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * REPLLEFT() is compatible with CT3's REPLLEFT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is replace.c, library is libct. + * $SEEALSO$ + * REPLALL(),REPLRIGHT() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * REPLRIGHT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Replace certain characters at the right of a string + * $SYNTAX$ + * REPLRIGHT (, , []) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * REPLRIGHT() is compatible with CT3's REPLRIGHT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is replace.c, library is libct. + * $SEEALSO$ + * REPLALL(),REPLLEFT() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/screen1.txt b/harbour/contrib/hbct/doc/en/screen1.txt new file mode 100644 index 0000000000..9525e579fa --- /dev/null +++ b/harbour/contrib/hbct/doc/en/screen1.txt @@ -0,0 +1,357 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SCREENATTR() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * + * $SYNTAX$ + * SCREENATTR ( [],[] ) -> + * $ARGUMENTS$ + * Designates the line from which to determine the attribute. + * The default is the cursor line. + * + * Designates the column from which to determine the + * attribute. The default is the cursor column. + * + * $RETURNS$ + * SCREENATTR() returns the attribute at the designated position. + * + * $DESCRIPTION$ + * SCREENATTR() returns the current screen attribute at and + * . You can query targeted attributes this way and save them + * to use later, or process them later with INVERTATTR(). + * + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is screen1.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SCREENMIX() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * + * $SYNTAX$ + * SCREENMIX (, , [], []) -> + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is screen1.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SAYSCREEN() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * + * $SYNTAX$ + * SAYSCREEN( , [], [] ) -> + * $ARGUMENTS$ + * - the string to output. Although undocumented, can be NIL. + * - row number, defaults to cursor row. + * - column number, defaults to cursor column. + * $RETURNS$ + * Returns an empty string. + * $DESCRIPTION$ + * Outputs a string at specified coordinates without changing character + * attributes. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is screen1.c, library is libct. + * $SEEALSO$ + * SCREENMIX() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * INVERTWIN() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * + * $SYNTAX$ + * + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * INVERTWIN() is compatible with CT3's INVERTWIN(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is color.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * UNTEXTWIN() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * + * $SYNTAX$ + * UNTEXTWIN(, , , , + * , + * [], + * []) --> cNull + * $ARGUMENTS$ + * Designates the line for the upper-left corner of the + * area. + * Designates the column for the upper-left corner of + * the area. + * Designates the line for the bottom-right corner of + * the area. + * Designates the line for the bottom-right column of + * the area. + * Replaces each + * character within the window, with the exception of those within the + * range of and + * . + * Designates the beginning of + * the bracketed area. The character can be number in the range of 0 to + * 255, or the character string type. The default value is 176. + * Designates the end of the bracketed + * area. The character can be number in the range of 0 to 255 or the + * character string type. The default value is 223. + * $RETURNS$ + * Returns a null string. + * $DESCRIPTION$ + * Replaces an area of characters from a region of the screen + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is screen1.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARWIN() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * + * $SYNTAX$ + * CHARWIN (, , , , [], + * []) --> + * $ARGUMENTS$ + * - top row number, default 0 + * - left column number, default 0 + * - top row number, default MaxRow() + * - right column number, default MaxCol() + * - new character for the screen area, + * as a numeric value in the range of 0 to + * 255 or as a character string, default value is the CLEARB. + * - character to exchange. Specify the parameter + * as a numeric in the range of 0 to 255 + * or as a character string. The default is to exchange all characters. + * $RETURNS$ + * Returns an empty string. + * $DESCRIPTION$ + * Exchanges particular characters in a screen area. + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is screen1.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * COLORWIN() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * + * $SYNTAX$ + * COLORWIN([], [], [], [], + * [], []) --> cNull + * $ARGUMENTS$ + * Designates the topmost line to begin processing. The + * default is the cursor line. + * Designates the leftmost column to begin processing. The + * default is the cursor column. + * Designates the bottommost line that is processed. + * The default is the last screen line or window line. + * Designates the rightmost column to clear. The default + * is the right screen border or window border. + * Designates the new attribute to replace the old + * one. The default is the standard attribute CLEARA. + * Designates the old character to exchange. The + * default is "exchange all attributes". + * $RETURNS$ + * Returns an empty string. + * $DESCRIPTION$ + * Exchanges particular attributes in a screen area + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is screen1.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SCREENTEXT() + * $CATEGORY$ + * CT video functions (Harbour extension) + * $ONELINER$ + * + * $SYNTAX$ + * SCREENTEXT(, , , ) + * $ARGUMENTS$ + * - top row number, default 0 + * - left column number, default 0 + * - top row number, default MaxRow() + * - right column number, default MaxCol() + * $RETURNS$ + * Returns string with characters taken from given screen region. + * $DESCRIPTION$ + * Returns string with characters taken from given screen region. + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is screen1.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * COLORREPL() + * $CATEGORY$ + * CT3 video functions + * $ONELINER$ + * + * $SYNTAX$ + * COLORREPL([], []) --> cNull + * $ARGUMENTS$ + * Designates the new attribute. The default is + * CLEARA. + * Designates the old attribute to exchange. The + * default is all existing attributes. + * $RETURNS$ + * Returns an empty string. + * $DESCRIPTION$ + * Exchanges particular screen attributes + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * + * $PLATFORMS$ + * All + * $FILES$ + * Source is screen1.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/strdiff.txt b/harbour/contrib/hbct/doc/en/strdiff.txt new file mode 100644 index 0000000000..68e73fc5cd --- /dev/null +++ b/harbour/contrib/hbct/doc/en/strdiff.txt @@ -0,0 +1,71 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * STRDIFF() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Evaluate the "Edit (Levensthein) Distance" of two strings + * $SYNTAX$ + * STRDIFF (, , [], [], + * []) -> + * $ARGUMENTS$ + * string at the "starting point" of the transformation process, default is "" + * string at the "end point" of the transformation process, default is "" + * penalty points for a replacement of one character, default is 3 + * penalty points for a deletion of one character, default is 6 + * penalty points for an insertion of one character, default is 1 + * $RETURNS$ + * penalty point sum of all operations needed to transform to + * $DESCRIPTION$ + * The STRDIFF() functions calculates the so called "Edit" or "Levensthein" distance of two strings. + * This distance is a measure for the number of single character replace/insert/delete operations (so called + * "point mutations") required to transform into and its value will be the smallest sum of + * the penalty points of the required operations. + * + * Be aware that this function is both quite time - O(len(cString1)*len(cString2)) - and memory consuming - + * O((len(cString1)+1)*(len(cString2)+1)*sizeof(int)) - so keep the strings as short as possible. + * E.g., on common 32 bit systems (sizeof(int) == 4), calling strdiff() with two strings of 1024 bytes + * in length will consume 4 MB of memory. To not impose unneeded restrictions, the function will only check if + * (len(cString1)+1)*(len(cString2)+1)*sizeof(int) <= UINT_MAX, although allocing UINT_MAX bytes will not + * work on most systems. If this simple check fails, -1 is returned. + * + * Also, be aware that there can be an overflow when the penalty points are summed up: Assuming that the + * number of transformation operations is in the order of max(len(cString1),len(cString2)), the penalty point + * sum, that is internally stored in an "int" variable, is in the order of + * (max(len(cString1),len(cString2))*max(nReplacementPenalty,nDeletionPenalty,nInsertionPentaly). + * The STRDIFF() does not do an overflow check due to time performance reasons. Future versions of STRDIFF() + * could use a type different to "int" to store the penalty point sum to save memory or to avoid overflows. + * + * The function is aware of the settings done by SETATLIKE(), that means that the wildchar character + * is considered equal to ALL characters. + * + * $EXAMPLES$ + * ? strdiff("ABC", "ADC") // 3, one character replaced + * ? strdiff("ABC", "AEC") // 3, dito + * ? strdiff("CBA", "ABC") // 6, two characters replaced + * ? strdiff("ABC", "AXBC") // 1, one character inserted + * ? strdiff("AXBC", "ABC") // 6, one character removed + * ? strdiff("AXBC", "ADC") // 9, one character removed and one replaced + * $TESTS$ + * strdiff("ABC", "ADC") == 3 + * strdiff("ABC", "AEC") == 3 + * strdiff("CBA", "ABC") == 6 + * strdiff("ABC", "AXBC") == 1 + * strdiff("AXBC", "ABC") == 6 + * strdiff("AXBC", "ADC") == 9 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * STRDIFF() is compatible with CT3's STRDIFF(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is strdiff.c, library is libct. + * $SEEALSO$ + * SETATLIKE() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/strswap.txt b/harbour/contrib/hbct/doc/en/strswap.txt new file mode 100644 index 0000000000..487b752b5a --- /dev/null +++ b/harbour/contrib/hbct/doc/en/strswap.txt @@ -0,0 +1,35 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * STRSWAP() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Swap the contents of two strings + * $SYNTAX$ + * STRSWAP (<[@]cString1>, <[@]cString2>) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * STRSWAP() is compatible with CT3's STRSWAP(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is strswap.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/tab.txt b/harbour/contrib/hbct/doc/en/tab.txt new file mode 100644 index 0000000000..cd55d70f0f --- /dev/null +++ b/harbour/contrib/hbct/doc/en/tab.txt @@ -0,0 +1,101 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TABEXPAND() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Replace tabulator control characters with fill characters + * $SYNTAX$ + * TABEXPAND (, [], [], + * [], [], + * []) -> cExpandedString + * $ARGUMENTS$ + * + * + * + * string indicating new line, + * default is the string returned by + * hb_osnewline() + * character indicating a tab stop, + * default is chr(9) + * .T., if the soft-CR used by MEMOEDIT() + * should be ignored as a newline indicator, + * default is .F. (functions uses chr(141)) + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * tabexpand("-"+chr(9)+"!") == "- !" + * tabexpand("----"+chr(9) +"!") == "---- !" + * tabexpand("-"+chr(9)+"!",, "+") == "-+++++++!" + * tabexpand("-"+chr(9)+ "!", 4) == "- !" + * tabexpand("----"+chr(9)+ "!", 8) == "---- !" + * tabexpand("----"+chr(9)+ "!", 8, "+") == "----++++!" + * tabexpand("-"+chr(9)+"!"+hb_osnewline()+"----"+chr(9)+ "!",, "+") == "-+++++++!"+hb_osnewline()+"----++++!" + * $STATUS$ + * Started + * $COMPLIANCE$ + * TABEXPAND() is compatible with CT3's TABEXPAND(), but there are + * three new parameters for a better fine control of the function's + * behaviour. + * $PLATFORMS$ + * All + * $FILES$ + * Source is tab.c, library is libct. + * $SEEALSO$ + * TABPACK() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TABPACK() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Pack fill characters to appropriate tab characters + * $SYNTAX$ + * TABPACK (, [], [], + * [], [], + * []) -> cPackedString + * $ARGUMENTS$ + * + * + * + * string indicating new line, + * default is the string returned by + * hb_osnewline() + * character indicating a tab stop, + * default is chr(9) + * .T., if the soft-CR used by MEMOEDIT() + * should be ignored as a newline indicator, + * default is .F. (functions uses chr(141)) + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * TABPACK() is compatible with CT3's TABPACK(), but there are + * three new parameters for a better fine control of the function's + * behaviour. + * $PLATFORMS$ + * All + * $FILES$ + * Source is tab.c, library is libct. + * $SEEALSO$ + * TABEXPAND() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/token1.txt b/harbour/contrib/hbct/doc/en/token1.txt new file mode 100644 index 0000000000..9261abdd45 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/token1.txt @@ -0,0 +1,330 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ATTOKEN() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Position of a token in a string + * $SYNTAX$ + * ATTOKEN (, [], + * [], []) -> nPosition + * $ARGUMENTS$ + * is the processed string + * [] is a list of characters separating the tokens + * in + * Default: chr(0)+chr(9)+chr(10)+chr(13)+chr(26)+ + * chr(32)+chr(32)+chr(138)+chr(141)+ + * ",.;:!\?/\\<>()#&%+-*" + * [] specifies the count of the token whose + * position should be calculated + * Default: last token + * [] specifies the maximum number of successive + * tokenizing characters that are combined as + * ONE token stop, e.g. specifying 1 can + * yield to empty tokens + * Default: 0, any number of successive tokenizing + * characters are combined as ONE token stop + * $RETURNS$ + * The start position of the specified token or + * 0 if such a token does not exist in . + * $DESCRIPTION$ + * The ATTOKEN() function calculates the start position of tne + * th token in . By setting the new + * parameter to a value different than 0, you can specify how many tokenizing + * characters are combined at most to one token stop. Be aware that + * this can result to empty tokens there the start position is not + * defined clearly. Then, ATTOKEN() returns the position there the + * token WOULD start if its length is larger than 0. To check for + * empty tokens, simply look if the character at the returned position + * is within the tokenizer list. + * $EXAMPLES$ + * attoken ("Hello, World!") --> 8 // empty strings after tokenizer + * // are not a token ! + * $TESTS$ + * attoken ("Hello, World!") == 8 + * attoken ("Hello, World!",,2) == 8 + * attoken ("Hello, World!",,2,1) == 7 + * attoken ("Hello, World!"," ",2,1) == 8 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * ATTOKEN() is compatible with CT3's ATTOKEN, but has an additional + * 4th parameter to let you specify a skip width equal to that in the + * TOKEN() function. + * $PLATFORMS$ + * All + * $FILES$ + * Source is token1.c, library is libct. + * $SEEALSO$ + * TOKEN(),NUMTOKEN(),TOKENLOWER(),TOKENUPPER(),TOKENSEP() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TOKEN() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Tokens of a string + * $SYNTAX$ + * TOKEN (, [], + * [], + * [<@cPreTokenSep>], [<@cPostTokenSep>]) -> cToken + * $ARGUMENTS$ + * is the processed string + * [] is a list of characters separating the tokens + * in + * Default: chr(0)+chr(9)+chr(10)+chr(13)+chr(26)+ + * chr(32)+chr(32)+chr(138)+chr(141)+ + * ",.;:!\?/\\<>()#&%+-*" + * [] specifies the count of the token that + * should be extracted + * Default: last token + * [] specifies the maximum number of successive + * tokenizing characters that are combined as + * ONE token stop, e.g. specifying 1 can + * yield to empty token + * Default: 0, any number of successive tokenizing + * characters are combined as ONE token stop + * [<@cPreTokenSep>] If given by reference, the tokenizer before + * the actual token will be stored + * [<@cPostTokenSep>] If given by reference, the tokenizer after + * the actual token will be stored + * $RETURNS$ + * the token specified by the parameters given above + * $DESCRIPTION$ + * The TOKEN() function extracts the th token from the + * string . In the course of this, the tokens in the + * string are separated by the character(s) specified in . + * The function may also extract empty tokens, if you specify a skip + * width other than zero. + * Be aware of the new 5th and 6th parameter there the TOKEN() function + * stores the tokenizing character before and after the extracted token. + * Therefore, additional calls to the TOKENSEP() function are not + * necessary. + * $EXAMPLES$ + * ? token ("Hello, World!") --> "World" + * ? token ("Hello, World!",,2,1) --> "" + * ? token ("Hello, World!",",",2,1) --> " World!" + * ? token ("Hello, World!"," ",2,1) --> "World!" + * $TESTS$ + * token ("Hello, World!") == "World" + * token ("Hello, World!",,2,1) == "" + * token ("Hello, World!",",",2,1) == " World!" + * token ("Hello, World!"," ",2,1) == "World!" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TOKEN() is compatible with CT3's TOKEN, but two additional + * parameters have been added there the TOKEN() function can store + * the tokenizers before and after the current token. + * $PLATFORMS$ + * All + * $FILES$ + * Source is token1.c, library is libct. + * $SEEALSO$ + * NUMTOKEN(),ATTOKEN(),TOKENLOWER(),TOKENUPPER(),TOKENSEP() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * NUMTOKEN() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Retrieves the number of tokens in a string + * $SYNTAX$ + * NUMTOKEN (, [], []) -> nTokenCount + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * + * $EXAMPLES$ + * + * $TESTS$ + * numtoken ("Hello, World!") == 2 + * numtoken ("This is good. See you! How do you do?",".!?") == 3 + * numtoken ("one,,three,four,,six",",",1) == 6 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * NUMTOKEN() is compatible with CT3's NUMTOKEN(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is token1.c, library is libct. + * $SEEALSO$ + * TOKEN(),ATTOKEN(),TOKENLOWER(),TOKENUPPER(),TOKENSEP() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TOKENLOWER() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Change the first letter of tokens to lower case + * $SYNTAX$ + * TOKENLOWER (<[@]cString>, [], [], + * []) -> cString + * $ARGUMENTS$ + * <[@]cString> is the processed string + * [] is a list of characters separating the tokens + * in + * Default: chr(0)+chr(9)+chr(10)+chr(13)+chr(26)+ + * chr(32)+chr(32)+chr(138)+chr(141)+ + * ",.;:!\?/\\<>()#&%+-*" + * [] specifies the number of tokens that + * should be processed + * Default: all tokens + * [] specifies the maximum number of successive + * tokenizing characters that are combined as + * ONE token stop, e.g. specifying 1 can + * yield to empty token + * Default: 0, any number of successive tokenizing + * characters are combined as ONE token stop + * $RETURNS$ + * the string with the lowercased tokens + * $DESCRIPTION$ + * The TOKENLOWER() function changes the first letter of tokens in + * to lower case. To do this, it uses the same tokenizing mechanism + * as the token() function. If TOKENLOWER() extracts a token that starts + * with a letter, this letter will be changed to lower case. + * You can omit the return value of this function by setting the CSETREF() + * switch to .T., but you must then pass by reference to get + * the result. + * $EXAMPLES$ + * ? tokenlower("Hello, World, here I am!") // "hello, world, here i am!" + * ? tokenlower("Hello, World, here I am!",,3) // "hello, world, here I am!" + * ? tokenlower("Hello, World, here I am!",",",3) // "hello, World, here I am!" + * ? tokenlower("Hello, World, here I am!"," W") // "hello, World, here i am!" + * $TESTS$ + * tokenlower("Hello, World, here I am!") == "hello, world, here i am!" + * tokenlower("Hello, World, here I am!",,3) == "hello, world, here I am!" + * tokenlower("Hello, World, here I am!",",",3) == "hello, World, here I am!" + * tokenlower("Hello, World, here I am!"," W") == "hello, World, here i am!" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TOKENLOWER() is compatible with CT3's TOKENLOWER(), + * but a new 4th parameter, has been added for + * synchronization with the the other token functions. + * $PLATFORMS$ + * All + * $FILES$ + * Source is token1.c, library is libct. + * $SEEALSO$ + * TOKEN(),NUMTOKEN(),ATTOKEN(),TOKENUPPER(),TOKENSEP(),CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TOKENUPPER() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Change the first letter of tokens to upper case + * $SYNTAX$ + * TOKENUPPER (<[@]cString>, [], [], + * []) -> cString + * $ARGUMENTS$ + * <[@]cString> is the processed string + * [] is a list of characters separating the tokens + * in + * Default: chr(0)+chr(9)+chr(10)+chr(13)+chr(26)+ + * chr(32)+chr(32)+chr(138)+chr(141)+ + * ",.;:!\?/\\<>()#&%+-*" + * [] specifies the number of tokens that + * should be processed + * Default: all tokens + * [] specifies the maximum number of successive + * tokenizing characters that are combined as + * ONE token stop, e.g. specifying 1 can + * yield to empty token + * Default: 0, any number of successive tokenizing + * characters are combined as ONE token stop + * $RETURNS$ + * the string with the uppercased tokens + * $DESCRIPTION$ + * The TOKENUPPER() function changes the first letter of tokens in + * to upper case. To do this, it uses the same tokenizing mechanism + * as the token() function. If TOKENUPPER() extracts a token that starts + * with a letter, this letter will be changed to upper case. + * You can omit the return value of this function by setting the CSETREF() + * switch to .T., but you must then pass by reference to get + * the result. + * $EXAMPLES$ + * ? tokenupper("Hello, world, here I am!") // "Hello, World, Here I Am!" + * ? tokenupper("Hello, world, here I am!",,3) // "Hello, World, Here I am!" + * ? tokenupper("Hello, world, here I am!",",",3) // "Hello, world, here I am!" + * ? tokenupper("Hello, world, here I am!"," w") // "Hello, wOrld, Here I Am!" + * $TESTS$ + * tokenupper("Hello, world, here I am!") == "Hello, World, Here I Am!" + * tokenupper("Hello, world, here I am!",,3) == "Hello, World, Here I am!" + * tokenupper("Hello, world, here I am!",",",3) == "Hello, world, here I am!" + * tokenupper("Hello, world, here I am!"," w") == "Hello, wOrld, Here I Am!" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TOKENUPPER() is compatible with CT3's TOKENUPPER(), + * but a new 4th parameter, has been added for + * synchronization with the the other token functions. + * $PLATFORMS$ + * All + * $FILES$ + * Source is token1.c, library is libct. + * $SEEALSO$ + * TOKEN(),NUMTOKEN(),ATTOKEN(),TOKENLOWER(),TOKENSEP(),CSETREF() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TOKENSEP() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Retrieves the token separators of the last token() call + * $SYNTAX$ + * TOKENSEP ([]) -> cSeparator + * $ARGUMENTS$ + * [] if set to .T., the token separator BEHIND the token + * retrieved from the token() call will be returned. + * Default: .F., returns the separator BEFORE the token + * $RETURNS$ + * Depending on the setting of , the separating character of the + * the token retrieved from the last token() call will be returned. + * These separating characters can now also be retrieved with the token() + * function. + * $DESCRIPTION$ + * When one does extract tokens from a string with the token() function, + * one might be interested in the separator characters that have been + * used to extract a specific token. To get this information you can + * either use the TOKENSEP() function after each token() call, or + * use the new 5th and 6th parameter of the token() function. + * $EXAMPLES$ + * see TOKEN() function + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TOKENSEP() is compatible with CT3's TOKENSEP(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is token1.c, library is libct. + * $SEEALSO$ + * TOKEN(),NUMTOKEN(),ATTOKEN(),TOKENLOWER(),TOKENUPPER() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/token2.txt b/harbour/contrib/hbct/doc/en/token2.txt new file mode 100644 index 0000000000..42322af1f6 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/token2.txt @@ -0,0 +1,394 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TOKENINIT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Initializes a token environment + * $SYNTAX$ + * TOKENINIT (<[@]cString>], [], [], + * [<@cTokenEnvironment>]) -> lState + * $ARGUMENTS$ + * <[@]cString> is the processed string + * is a list of characters separating the tokens + * in + * Default: chr(0)+chr(9)+chr(10)+chr(13)+chr(26)+ + * chr(32)+chr(32)+chr(138)+chr(141)+ + * ",.;:!\?/\\<>()#&%+-*" + * specifies the maximum number of successive + * tokenizing characters that are combined as + * ONE token stop, e.g. specifying 1 can + * yield to empty token + * Default: 0, any number of successive tokenizing + * characters are combined as ONE token stop + * <@cTokenEnvironment> is a token environment stored in a binary + * encoded string + * $RETURNS$ + * success of the initialization + * $DESCRIPTION$ + * The TOKENINIT() function initializes a token environment. A token + * environment is the information about how a string is to be tokenized. + * This information is created in the process of tokenization of the + * string - equal to the one used in the TOKEN() function + * with the help of the and parameters. + * + * This token environment can be very useful when large strings have + * to be tokenized since the tokenization has to take place only once + * whereas the TOKEN() function must always start the tokenizing process + * from scratch. + * + * Unlike CTIII, this function provides two mechanisms of storing the + * resulting token environment. If a variable is passed by reference + * as 4th parameter, the token environment is stored in this variable, + * otherwise the global token environment is used. Do not modify the + * token environment string directly ! + * + * Additionally, a counter is stored in the token environment, so that + * the tokens can successivly be obtained. This counter is first set to 1. + * When the TOKENINIT() function is called without a string a tokenize, + * the counter of either the global environment or the environment given + * by reference in the 4th parameter is rewind to 1. + * + * Additionally, unlike CTIII, tokeninit() does not need the string + * to be passed by reference, since one must provide the + * string in calls to TOKENNEXT() again. + * $EXAMPLES$ + * tokeninit (cString) // tokenize the string with default + * // rules and store the token environment globally + * // and eventually delete an old global TE + * tokeninit (@cString) // no difference in result, but eventually faster, + * // since the string must not be copied + * tokeninit() // rewind counter of global TE to 1 + * tokeninit ("1,2,3",",",1) // tokenize constant string, store in global TE + * tokeninit (cString,,1,@cTE1) // tokenize cString and store TE in + * // cTE1 only without overriding global TE + * tokeninit (cString,,1,cTE1) // tokenize cString and store TE in + * // GLOBAL TE since 4th parameter is + * // not given by reference !!! + * tokeninit (,,,@cTE1) // set counter in TE stored in cTE1 to 1 + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TOKENINIT() is compatible with CTIII's TOKENINIT(), + * but there is an additional parameter featuring local token environments. + * $PLATFORMS$ + * All + * $FILES$ + * Source is token2.c, library is libct. + * $SEEALSO$ + * TOKEN(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TOKENNEXT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Successivly obtains tokens from a string + * $SYNTAX$ + * TOKENNEXT (<[@]cString>, [], + * [<@cTokenEnvironment>]) -> cToken + * $ARGUMENTS$ + * <[@]cString> the processed string + * a token number + * <@cTokenEnvironment> a token environment + * $RETURNS$ + * a token from + * $DESCRIPTION$ + * With TOKENNEXT(), the tokens determined with the TOKENINIT() functions + * can be retrieved. To do this, TOKENNEXT() uses the information stored + * in either the global token environment or the local one supplied by + * . Note that, is supplied, this 3rd parameter has + * always to be passed by reference. + * + * If the 2nd parameter, is given, TOKENNEXT() simply returns + * the th token without manipulating the TE counter. Otherwise + * the token pointed to by the TE counter is returned and the counter + * is incremented by one. Like this, a simple loop with TOKENEND() can + * be used to retrieve all tokens of a string successivly. + * + * Note that does not have to be the same used in TOKENINIT(), + * so that one can do a "correlational tokenization", i.e. tokenize a string + * as if it was another! E.G. using TOKENINIT() with the string + * "AA,BBB" but calling TOKENNEXT() with "CCCEE" would + * give first "CC" and then "EE" (because "CCCEE" is not long enough). + * $EXAMPLES$ + * // default behavhiour + * tokeninit (cString) // initialize a TE + * do while (!tokenend()) + * ? tokennext (cString) // get all tokens successivly + * enddo + * ? tokennext (cString, 3) // get the 3rd token, counter will remain the same + * tokenexit() // free the memory used for the global TE + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TOKENNEXT() is compatible with CTIII's TOKENNEXT(), + * but there are two additional parameters featuring local token + * environments and optional access to tokens. + * $PLATFORMS$ + * All + * $FILES$ + * Source is token2.c, library is libct. + * $SEEALSO$ + * TOKENINIT(),TOKENEXIT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TOKENNUM() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Get the total number of tokens in a token environment + * $SYNTAX$ + * TOKENNUM ([<@cTokenEnvironment>]) -> nNumberofTokens + * $ARGUMENTS$ + * <@cTokenEnvironment> a token environment + * $RETURNS$ + * number of tokens in the token environment + * $DESCRIPTION$ + * The TOKENNUM() function can be used to retrieve the total number + * of tokens in a token environment. + * If the parameter <@cTokenEnvironment> is supplied (must be by + * reference), the information from this token environment is used, + * otherwise the global TE is used. + * $EXAMPLES$ + * tokeninit ("a.b.c.d", ".", 1) // initialize global TE + * ? tokennum() // --> 4 + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TOKENNUM() is a new function in Harbour's CTIII library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is token2.c, library is libct. + * $SEEALSO$ + * TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TOKENEND() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Check whether additional tokens are available with TOKENNEXT() + * $SYNTAX$ + * TOKENEND ([<@cTokenEnvironment>]) -> lTokenEnd + * $ARGUMENTS$ + * <@cTokenEnvironment> a token environment + * $RETURNS$ + * .T., if additional tokens are available + * $DESCRIPTION$ + * The TOKENEND() function can be used to check whether the next + * call to TOKENNEXT() would return a new token. This can not be + * decided with TOKENNEXT() alone, since an empty token cannot be + * distinguished from a "no more" tokens. + * If the parameter <@cTokenEnvironment> is supplied (must be by + * reference), the information from this token environment is used, + * otherwise the global TE is used. + * With a combination of TOKENEND() and TOKENNEXT(), all tokens from a + * string can be retrieved successivly (see example). + * $EXAMPLES$ + * tokeninit ("a.b.c.d", ".", 1) // initialize global TE + * do while (!tokenend()) + * ? tokennext ("a.b.c.d") // get all tokens successivly + * enddo + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TOKENEND() is compatible with CTIII's TOKENEND(), + * but there are is an additional parameter featuring local token environments. + * $PLATFORMS$ + * All + * $FILES$ + * Source is token2.c, library is libct. + * $SEEALSO$ + * TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TOKENEXIT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Release global token environment + * $SYNTAX$ + * TOKENEXIT () -> lStaticEnvironmentReleased + * $ARGUMENTS$ + * + * $RETURNS$ + * .T., if global token environment is successfully released + * $DESCRIPTION$ + * The TOKENEXIT() function releases the memory associated with the + * global token environment. One should use it for every tokeninit() + * using the global TE. Additionally, TOKENEXIT() is implicitly called + * from CTEXIT() to free the memory at library shutdown. + * $EXAMPLES$ + * tokeninit (cString) // initialize a TE + * do while (!tokenend()) + * ? tokennext (cString) // get all tokens successivly + * enddo + * ? tokennext (cString, 3) // get the 3rd token, counter will remain the same + * tokenexit() // free the memory used for the global TE + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TOKENEXIT() is a new function in Harbour's CTIII library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is token2.c, library is libct. + * $SEEALSO$ + * TOKENINIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TOKENAT() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Get start and end positions of tokens in a token environment + * $SYNTAX$ + * TOKENAT ([], [], + * [<@cTokenEnvironment>]) -> nPosition + * $ARGUMENTS$ + * .T., if TOKENAT() should return + * the position of the separator character + * BEHIND the token. + * Default: .F., return start position of a token. + * a token number + * <@cTokenEnvironment> a token environment + * $RETURNS$ + * + * $DESCRIPTION$ + * The TOKENAT() function is used to retrieve the start and end position + * of the tokens in a token environment. Note however that the position of + * last character of a token is given by tokenat (.T.)-1 !! + * + * If the 2nd parameter, is given, TOKENAT() returns the + * positions of the th token. Otherwise + * the token pointed to by the TE counter, i.e. the token that will + * be retrieved by TOKENNEXT() _NEXT_ is used. + * + * If the parameter <@cTokenEnvironment> is supplied (must be by + * reference), the information from this token environment is used, + * otherwise the global TE is used. + * $EXAMPLES$ + * + * $TESTS$ + * tokeninit (cString) // initialize a TE + * do while (!tokenend()) + * ? "From", tokenat(), "to", tokenat(.T.)-1 + * ? tokennext (cString) // get all tokens successivly + * enddo + * ? tokennext (cString, 3) // get the 3rd token, counter will remain the same + * tokenexit() // free the memory used for the global TE + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TOKENAT() is compatible with CTIII's TOKENAT(), + * but there are two additional parameters featuring local token + * environments and optional access to tokens. + * $PLATFORMS$ + * All + * $FILES$ + * Source is token2.c, library is libct. + * $SEEALSO$ + * TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),SAVETOKEN(),RESTTOKEN(),TOKENEND() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SAVETOKEN() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Save the global token environment + * $SYNTAX$ + * SAVETOKEN () -> cStaticTokenEnvironment + * $ARGUMENTS$ + * + * $RETURNS$ + * a binary string encoding the global TE + * $DESCRIPTION$ + * The SAVETOKEN() function can be used to store the global TE for future + * use or when two or more incremental tokenizers must the nested. + * Note however that the latter can now be solved with locally stored + * token environments. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * SAVETOKEN() is compatible with CTIII's SAVETOKEN(), + * $PLATFORMS$ + * All + * $FILES$ + * Source is token2.c, library is libct. + * $SEEALSO$ + * TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),RESTTOKEN(),TOKENEND() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * RESTTOKEN() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Restore global token environment + * $SYNTAX$ + * RESTTOKEN () -> cOldStaticEnvironment + * $ARGUMENTS$ + * a binary string encoding a TE + * $RETURNS$ + * a string encoding the old global TE + * $DESCRIPTION$ + * The RESTTOKEN() function restores the global TE to the one encoded + * in . This can either be the return value + * of SAVETOKEN() or the value stored in the 4th parameter in a + * TOKENINIT() call. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * RESTTOKEN() is compatible with CTIII's RESTTOKEN(), + * $PLATFORMS$ + * All + * $FILES$ + * Source is token2.c, library is libct. + * $SEEALSO$ + * TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),TOKENEND() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/trig.txt b/harbour/contrib/hbct/doc/en/trig.txt new file mode 100644 index 0000000000..6a11e268ba --- /dev/null +++ b/harbour/contrib/hbct/doc/en/trig.txt @@ -0,0 +1,548 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * PI() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Returns Pi, the perimeter-to-diameter-ratio of a circle + * $SYNTAX$ + * PI () -> nPi + * $ARGUMENTS$ + * + * $RETURNS$ + * the math constant Pi with maximum precision available + * $DESCRIPTION$ + * The function PI() can be used if the constant Pi is needed + * with maximum precision. One of the most known interpretations of this + * number is the constant perimeter-to-diameter-ratio of circles. + * $EXAMPLES$ + * // the diameter of a circle-like swimming pool is 3.4 meters, how + * // long is the perimeter ? + * + * ? str(PI()*3.4,5,3)+" meters" --> 10.681 meters + * $TESTS$ + * + * $STATUS$ + * Ready + * $COMPLIANCE$ + * PI() is compatible with CT3's PI(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SIN() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Sine of the argument + * $SYNTAX$ + * SIN (nRadiant) -> nSine + * $ARGUMENTS$ + * an angle size given in radiants + * $RETURNS$ + * the sine of + * $DESCRIPTION$ + * The function SIN() calculates the sine of an angle whose size is + * given in radiants (full angle equals 2*Pi - see DTOR() for angle size + * given in degress). + * A common geometric interpretation of the SIN() function is the + * counterkathede-hypotenuse-ratio of a right-angled triangle. + * $EXAMPLES$ + * ? sin (0.0) --> 0.0 + * ? sin (1.0) --> 0.8414... + * $TESTS$ + * sin (0.0) == 0.0 + * sin (PI()/4) == sqrt(1/2) + * sin (PI()/2) == 1.0 + * sin (PI()) == 0.0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * SIN() is compatible with CT3's SIN(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * COS() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Cosine of the argument + * $SYNTAX$ + * COS (nRadiant) -> nCosine + * $ARGUMENTS$ + * an angle size given in radiants + * $RETURNS$ + * the cosine of + * $DESCRIPTION$ + * The function COS() calculates the cosine of an angle whose size is + * given in radiants (full angle equals 2*Pi - see DTOR() for angle size + * given in degress). + * A common geometric interpretation of the COS() function is the + * ankathede-hypotenuse-ratio of a right-angled triangle. + * $EXAMPLES$ + * ? cos (0.0) --> 1.0 + * ? cos (1.0) --> 0.5403... + * $TESTS$ + * cos (0.0) == 1.0 + * cos (PI()/4) == sqrt(1/2) + * cos (PI()/2) == 0.0 + * cos (PI()) == -1.0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * COS() is compatible with CT3's COS(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TAN() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Tangent of the argument + * $SYNTAX$ + * TAN (nRadiant) -> nTangent + * $ARGUMENTS$ + * an angle size given in radiants + * $RETURNS$ + * the tangent of + * $DESCRIPTION$ + * The function TAN() calculates the tangent of an angle whose size is + * given in radiants (full angle equals 2*Pi - see DTOR() for angle size + * given in degress). + * A common geometric interpretation of the TAN() function is the + * counterkathede-ankathede-ratio of a right-angled triangle, or, + * tan(x) = sin(x)/cos(x). + * $EXAMPLES$ + * ? tan (0.0) --> 0.0 + * ? tan (1.0) --> 1.5574... + * $TESTS$ + * tan (0.0) == 0.0 + * tan (PI()/4) == 1 + * tan (PI()) == 0.0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TAN() is compatible with CT3's TAN(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * COT() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Cotangent of the argument + * $SYNTAX$ + * COT (nRadiant) -> nCotangent + * $ARGUMENTS$ + * an angle size given in radiants + * $RETURNS$ + * the cotangent of + * $DESCRIPTION$ + * The function COT() calculates the cotangent of an angle whose size is + * given in radiants (full angle equals 2*Pi - see DTOR() for angle size + * given in degress). + * A common geometric interpretation of the COT() function is the + * ankathede-counterkathede-ratio of a right-angled triangle, or, + * cot(x) = cos(x)/sin(x)=1/tan(x). + * $EXAMPLES$ + * ? cot (1.0) --> 0.6420... + * $TESTS$ + * cot (PI()/4) == 1 + * cot (PI()/2) == 0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * COT() is compatible with CT3's COT(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),TAN(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ASIN() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Arcus sine of the argument + * $SYNTAX$ + * ASIN (nSine) -> nRadiant + * $ARGUMENTS$ + * the sine of an angle + * $RETURNS$ + * the angle whose sine is + * $DESCRIPTION$ + * The function ASIN() is the inverse function of SIN(). It takes a + * sine value and returns the smallest(!) angle whose sine equals to the argument. + * The return value is given in radiants (full angle equals 2*Pi - + * see DTOR() if you need to convert it into degress). + * Note, that must be between -1 and 1 and that + * is always between -PI()/2 and PI()/2. + * $EXAMPLES$ + * ? asin (0.0) --> 0.0 + * ? asin (0.5) --> 0.5235... + * $TESTS$ + * asin (0.0) == 0.0 + * asin (sqrt(1/2)) == PI()/4 + * asin (1.0) == PI()/2 + * asin (0.0) == 0.0 // and not PI(), since the smallest angle is returned ! + * $STATUS$ + * Ready + * $COMPLIANCE$ + * ASIN() is compatible with CT3's ASIN(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),TAN(),COT(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ACOS() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Arcus cosine of the argument + * $SYNTAX$ + * ACOS (nCosine) -> nRadiant + * $ARGUMENTS$ + * the cosine of an angle + * $RETURNS$ + * the angle whose cosine is + * $DESCRIPTION$ + * The function ACOS() is the inverse function of COS(). It takes a + * cosine value and returns the smallest(!) angle whose cosine equals to the argument. + * The return value is given in radiants (full angle equals 2*Pi - + * see DTOR() if you need to convert it into degress). + * Note, that must be between -1 and 1 and that + * is always between 0 and PI(). + * $EXAMPLES$ + * ? acos (0.0) --> PI()/2 + * ? acos (0.5) --> 1.04719... + * $TESTS$ + * acos (0.0) == PI()/2 + * acos (sqrt(1/2)) == PI()/4 + * acos (1.0) == 0.0 + * acos (-1.0) == PI() + * acos (0.0) == PI()/2 // and not -PI()/2, although cos (-PI()/2) == 0.0 ! + * $STATUS$ + * Ready + * $COMPLIANCE$ + * ACOS() is compatible with CT3's ACOS(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),TAN(),COT(),ASIN(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ATAN() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Arcus tangent of the argument + * $SYNTAX$ + * ACOS (nTangent) -> nRadiant + * $ARGUMENTS$ + * the tangent of an angle + * $RETURNS$ + * the angle whose tangent is + * $DESCRIPTION$ + * The function ATAN() is the inverse function of TAN(). It takes a + * tangent value and returns the smallest(!) angle whose tangent equals to the argument. + * The return value is given in radiants between -PI()/2 and PI()/2 + * (full angle equals 2*Pi - see DTOR() if you need to convert it into degress). + * $EXAMPLES$ + * ? atan (0.0) --> 0.0 + * ? atan (0.5) --> 0.4636... + * $TESTS$ + * atan (0.0) == 0.0 + * atan (1.0) == PI()/4 + * atan (0.0) == 0.0 // and not PI(), although tan (PI()) == 0.0 ! + * $STATUS$ + * Ready + * $COMPLIANCE$ + * ATAN() is compatible with CT3's ATAN(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * ATN2() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Arcus tangent a sine and a cosine argument + * $SYNTAX$ + * ATN2 (nSine, nCosine) -> nRadiant + * $ARGUMENTS$ + * the sine of an angle + * the cosine of an angle + * $RETURNS$ + * the angle whose tangent is / + * $DESCRIPTION$ + * The function ATN2() is an alternate function for calculating + * the arcus tangent, atn2(x,y) = atan(x/y). + * It takes two arguments, the sine and the cosine + * of the angle that should be calculated. Thus, in contrast to the ATAN() + * function, ATN2() can distinguish whether the sine or the cosine has + * a negative sign (or both being positive or negative), so that + * the return value can be between -PI() and PI() and covers the full + * angle. + * The return value is given in radiants (full angle equals 2*Pi - + * see DTOR() if you need to convert it into degress). + * $EXAMPLES$ + * ? atn2 (0.0, 1.0) --> 0.0 + * ? atn2 (sqrt(1/2), sqrt(1/2)) --> PI()/4 + * $TESTS$ + * atn2 (0.0, 1.0) == 0.0 + * atn2 (sqrt(1/2),sqrt(1/2)) == PI()/4 + * atn2 (-sqrt(1/2),-sqrt(1/2)) == -3/4*PI() // atan() would return PI()/4 ! + * $STATUS$ + * Ready + * $COMPLIANCE$ + * ATN2() is compatible with CT3's ATN2(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SINH() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Hyperbolic Sine of the argument + * $SYNTAX$ + * SINH (nArea) -> nHyperbolicSine + * $ARGUMENTS$ + * the size of the area (see below) + * $RETURNS$ + * the hyperbolic sine of + * $DESCRIPTION$ + * The function SINH() calculates the hyperbolic sine of the argument. + * In analytical mathematics it is defined as 1/2*(exp(nArea)-exp(-nArea)). + * A common geometric interpretation of the SINH() function is the + * maximum y value of the points in the area with the given size , + * that is bound by the x axis, a straight line through the point of + * origin (this one is fixed by the area) and the hyperbola x^2-y^2=1. + * $EXAMPLES$ + * ? sinh (0.0) --> 0.0 + * ? sinh (1.0) --> 1.1752... + * $TESTS$ + * sinh (0.0) == 0.0 + * sinh (-0.5) == -sinh(0.5) + * $STATUS$ + * Ready + * $COMPLIANCE$ + * SINH() is new in Harbours CT3's library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),COSH(),TANH(),RTOD(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * COSH() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Hyperbolic Cosine of the argument + * $SYNTAX$ + * COSH (nArea) -> nHyperbolicCosine + * $ARGUMENTS$ + * the size of the area (see below) + * $RETURNS$ + * the hyperbolic cosine of + * $DESCRIPTION$ + * The function COSH() calculates the hyperbolic cosine of the argument. + * In analytical mathematics it is defined as 1/2*(exp(nArea)+exp(-nArea)). + * A common geometric interpretation of the COSH() function is the + * maximum x value of the points in the area with the given size , + * that is bound by the x axis, a straight line through the point of + * origin (this one is fixed by the area) and the hyperbola x^2-y^2=1. + * $EXAMPLES$ + * ? cosh (0.0) --> 1.0 + * ? cosh (1.0) --> 1.5430... + * $TESTS$ + * cosh (0.0) == 1.0 + * cosh (-0.5) == cosh(0.5) + * $STATUS$ + * Ready + * $COMPLIANCE$ + * COSH() is new in Harbours CT3's library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),TANH(),RTOD(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * TANH() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Hyperbolic Tangent of the argument + * $SYNTAX$ + * TANH (nArea) -> nHyperbolicTangent + * $ARGUMENTS$ + * the size of the area (see below) + * $RETURNS$ + * the hyperbolic tangent of + * $DESCRIPTION$ + * The function TANH() calculates the hyperbolic tangent of the argument. + * In analytical mathematics it is defined as SINH(x)/COSH(x). + * $EXAMPLES$ + * ? tanh (0.0) --> 0.0 + * ? tanh (1.0) --> 0.7615... + * $TESTS$ + * tanh (0.0) == 0.0 + * tanh (-0.5) == -tanh(0.5) + * $STATUS$ + * Ready + * $COMPLIANCE$ + * TANH() is new in Harbours CT3's library. + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),RTOD(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * RTOD() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Convert radiant to degree + * $SYNTAX$ + * RTOD (nRadiant) -> nDegree + * $ARGUMENTS$ + * the size of an angle in radiant + * $RETURNS$ + * the size of that angle in degree + * $DESCRIPTION$ + * The function RTOD() can be used to convert sizes of angles given + * in radiant (like those returned by the asin, acos or atan function) + * to degrees that are commonly used geometry and technics. + * $EXAMPLES$ + * ? rtod (PI()) --> 180 + * ? tanh (PI()/3) --> 60 + * $TESTS$ + * rtod (0.0) == 0.0 + * rtod (PI()) == 180.0 + * $STATUS$ + * Ready + * $COMPLIANCE$ + * RTOD() is compatible with CT3's RTOD(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),DTOR(),PI() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * DTOR() + * $CATEGORY$ + * CT3 math functions + * $ONELINER$ + * Convert degree to radiant + * $SYNTAX$ + * DTOR (nDegree) -> nRadiant + * $ARGUMENTS$ + * the size of that angle in degree + * $RETURNS$ + * the size of an angle in radiant + * $DESCRIPTION$ + * The function DTOR() can be used to convert sizes of angles given + * in degrees to radiant (as expected by sin, cos or tan functions). + * $EXAMPLES$ + * ? dtor (180) --> PI() + * ? dtor (60) --> PI()/3 + * $TESTS$ + * dtor (0.0) == 0.0 + * dtor (180.0) == PI() + * $STATUS$ + * Ready + * $COMPLIANCE$ + * DTOR() is compatible with CT3's DTOR(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is trig.c, library is libct. + * $SEEALSO$ + * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),PI() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/video.txt b/harbour/contrib/hbct/doc/en/video.txt new file mode 100644 index 0000000000..348ceaa433 --- /dev/null +++ b/harbour/contrib/hbct/doc/en/video.txt @@ -0,0 +1,145 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * CHARPIX() + * $CATEGORY$ + * HBCT video functions + * $ONELINER$ + * Gets the number of scan lines per character. + * $SYNTAX$ + * CHARPIX() --> nHeight + * $ARGUMENTS$ + * + * $RETURNS$ + * Returns the number of scan lines per character. + * $DESCRIPTION$ + * Returns the number of scan lines per character. + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * This function is xHarbour libct contrib + * $PLATFORMS$ + * DJGPP + * $FILES$ + * Source is video.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * VGAPALETTE() + * $CATEGORY$ + * HBCT video functions + * $ONELINER$ + * Changes VGA palette colors + * $SYNTAX$ + * VGAPALETTE([, [, , + * lValid + * $ARGUMENTS$ + * - the color to change in CA-Cl*pper color notation or + * as a number from 0 to 15. + * , , and specify the palette + * settings for the respective portions in the range from 0 to 63. + * If no RGB value is specified, the palette register is reset to + * its default value (currently unsupported). + * If the function is called without parameters, the palette registers for + * all colors are reset to their default values (currently unsupported). + * $RETURNS$ + * Returns .T. on success. + * $DESCRIPTION$ + * + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * This function is xHarbour libct contrib + * $PLATFORMS$ + * DJGPP + * $FILES$ + * Source is video.c, library is libct. + * $SEEALSO$ + * EGAPALETTE() FONTRESET() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * VIDEOTYPE() + * $CATEGORY$ + * HBCT video functions + * $ONELINER$ + * Detects supported video adapter modes + * $SYNTAX$ + * VIDEOTYPE() --> nMask + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: Finish documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * This function is xHarbour libct contrib + * $PLATFORMS$ + * DJGPP + * $FILES$ + * Source is video.c, library is libct. + * $SEEALSO$ + * ISCGA(), ISEGA(), ISHERCULES(), ISMCGA(), ISMONO(), ISPGA(), ISVGA() + * $END$ + */ + +/* $DOC$ + * $FUNCNAME$ + * SETFONT() + * $CATEGORY$ + * HBCT video functions + * $ONELINER$ + * Loads font from a string. + * $SYNTAX$ + * SETFONT(, [], [], []) --> nError + * or: + * SETFONT(, [], []) --> nError + * $ARGUMENTS$ + * Binary string containing a valid font definition. + * Number of a font area where the font must be loaded. + * First character code to be loaded. + * Number of characters to load. + * When .T., the function computes font height automatically. + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: Finish documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * This function is xHarbour libct contrib + * $PLATFORMS$ + * DJGPP + * $FILES$ + * Source is video.c, library is libct. + * $SEEALSO$ + * + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/wordrepl.txt b/harbour/contrib/hbct/doc/en/wordrepl.txt new file mode 100644 index 0000000000..ca6cf43e8e --- /dev/null +++ b/harbour/contrib/hbct/doc/en/wordrepl.txt @@ -0,0 +1,67 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * WORDREPL() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Replacement of double characters + * $SYNTAX$ + * WORDREPL (, <[@]cString>, + * , []) -> cString + * $ARGUMENTS$ + * is a string of double characters + * that should be replaced + * <[@]cString> is the processed string + * is a string of double characters that + * replace the one of + * [] sets the replacement method (see description) + * Default: .F. + * $RETURNS$ + * cString the processed string + * $DESCRIPTION$ + * The WORDREPL() takes the double characters of + * one after the other and searches for them in . + * For set to .F., this search is successful, if the double + * character sequence in starts at an odd position or at any + * position, if is set to .T. + * If this happens, the double character sequence will be replaced with + * the corresponding double character sequence of . + * If is shorter than + * the last double sequence of is used for + * the "rest" of . Note that the last double + * character sequence in "AABBC" is "BB" in this context !! + * After the replacement the function restarts the search in + * BEHIND the replacement if the CSETATMUPA() switch is turned off, or + * BEHIND the first character of the replacement if the switch is turned on. + * (see examples for this !) + * One can omit the return value of this function by setting the CSETREF() + * to .T., but one must then pass by reference to get a result. + * $EXAMPLES$ + * ? wordrepl("CC", "AABBCCDDEE", "XX") // "AABBXXDDEE" + * ? wordrepl("aa", "1aaaa", "ba") // "1abaa" + * ? wordrepl("aa", "1aaaa", "ba", .T.) // "1baba" + * csetatmupa(.T.) + * ? wordrepl("aa", "1aaaa", "ba") // "1abaa" + * ? wordrepl("aa", "1aaaa", "ba", .T.) // "1bbba" + * $TESTS$ + * wordrepl("CC", "AABBCCDDEE", "XX") == "AABBXXDDEE" + * wordrepl("aa", "1aaaa", "ba") == "1abaa" + * wordrepl("aa", "1aaaa", "ba", .T.) == "1baba" + * eval ({||csetatmupa(.T.),wordrepl("aa", "1aaaa", "ba")}) == "1abaa" + * eval ({||csetatmupa(.T.),wordrepl("aa", "1aaaa", "ba", .T.)}) == "1bbba" + * $STATUS$ + * Ready + * $COMPLIANCE$ + * WORDREPL() is compatible with CT3's WORDREPL(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is wordrepl.c, library is ct3. + * $SEEALSO$ + * CHARREPL(),RANGEREPL(),POSREPL(),CSETREF(),CSETATMUPA() + * $END$ + */ diff --git a/harbour/contrib/hbct/doc/en/wordtoch.txt b/harbour/contrib/hbct/doc/en/wordtoch.txt new file mode 100644 index 0000000000..8ed0fb37be --- /dev/null +++ b/harbour/contrib/hbct/doc/en/wordtoch.txt @@ -0,0 +1,36 @@ +/* + * $Id$ + */ + +/* $DOC$ + * $FUNCNAME$ + * WORDTOCHAR() + * $CATEGORY$ + * CT3 string functions + * $ONELINER$ + * Replace double with single characters + * $SYNTAX$ + * WORDTOCHAR (, , + * ) -> cString + * $ARGUMENTS$ + * + * $RETURNS$ + * + * $DESCRIPTION$ + * TODO: add documentation + * $EXAMPLES$ + * + * $TESTS$ + * + * $STATUS$ + * Started + * $COMPLIANCE$ + * WORDTOCHAR() is compatible with CT3's WORDTOCHAR(). + * $PLATFORMS$ + * All + * $FILES$ + * Source is wordtoch.c, library is libct. + * $SEEALSO$ + * CSETATMUPA(),CHARREPL(),WORDREPL() + * $END$ + */ diff --git a/harbour/contrib/hbct/exponent.c b/harbour/contrib/hbct/exponent.c index 2d1bf96d33..3264a602aa 100644 --- a/harbour/contrib/hbct/exponent.c +++ b/harbour/contrib/hbct/exponent.c @@ -57,46 +57,6 @@ /* undefine the following if you want to evaluate the mantissa and exponent from the doubles' bit representation */ /* #define CT_EXPONENT_MANTISSA_BIT 1 */ -/* $DOC$ - * $FUNCNAME$ - * MANTISSA() - * $CATEGORY$ - * CT3 number and bit manipulation functions - * $ONELINER$ - * Evaluate the mantissa of a floating point number - * $SYNTAX$ - * MANTISSA( ) --> nMantissa - * $ARGUMENTS$ - * Designate any Harbour number. - * $RETURNS$ - * MANTISSA() returns the mantissa of the number. - * $DESCRIPTION$ - * This function supplements EXPONENT() to return the mantissa of the - * number. - * - * Note: The mantissa value can be 0 or in the range of 1 to 2. - * - * The following calculation reproduces the original value: - * - * MANTISSA()* 2^EXPONENT() = - * - * - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * MANTISSA() is compatible with CT3's MANTISSA(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is exponent.c, library is libct. - * $SEEALSO$ - * EXPONENT() - * $END$ - */ - HB_FUNC( MANTISSA ) { @@ -147,52 +107,6 @@ HB_FUNC( MANTISSA ) } - -/* $DOC$ - * $FUNCNAME$ - * EXPONENT() - * $CATEGORY$ - * CT3 number and bit manipulation functions - * $ONELINER$ - * Evaluate the exponent of a floating point number - * $SYNTAX$ - * EXPONENT( ) --> nExponent - * $ARGUMENTS$ - * Designate any Harbour number. - * $RETURNS$ - * EXPONENT() returns the exponent of the number - * in base 2. - * $DESCRIPTION$ - * This function supplements MANTISSA() to return the exponent of the - * number. - * - * Values > 1 or values < -1 return a positive number 0 to 1023. - * - * Values < 1 or values > -1 return a negative number -1 to -1023. - * - * The EXPONENT( 0 ), return 0. - * - * The following calculation reproduces the original value: - * - * 2^EXPONENT() * MANTISSA() = - * - * - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * EXPONENT() is compatible with CT3's EXPONENT() - * $PLATFORMS$ - * All - * $FILES$ - * Source is exponent.c, library is libct. - * $SEEALSO$ - * MANTISSA() - * $END$ - */ - HB_FUNC( EXPONENT ) { diff --git a/harbour/contrib/hbct/fcopy.prg b/harbour/contrib/hbct/fcopy.prg index 5e4b2a895f..f0dd1c8a6f 100644 --- a/harbour/contrib/hbct/fcopy.prg +++ b/harbour/contrib/hbct/fcopy.prg @@ -66,7 +66,6 @@ * */ - #include "common.ch" #include "fileio.ch" diff --git a/harbour/contrib/hbct/files.c b/harbour/contrib/hbct/files.c index d9e50e3853..bcf58723f6 100644 --- a/harbour/contrib/hbct/files.c +++ b/harbour/contrib/hbct/files.c @@ -84,7 +84,6 @@ # include #endif - typedef struct { PHB_FFIND ffind; @@ -103,7 +102,6 @@ static HB_TSD_NEW( s_FFData, sizeof( HB_FFDATA ), NULL, hb_fileFindRelease ); #define HB_GET_FFDATA() ( ( PHB_FFDATA ) hb_stackGetTSD( &s_FFData ) ) - static PHB_FFIND _hb_fileStart( HB_BOOL fNext, HB_FATTR ulAttr ) { PHB_FFDATA pFFData = HB_GET_FFDATA(); @@ -191,7 +189,6 @@ HB_FUNC( FILETIME ) hb_retc( ffind ? ffind->szTime : NULL ); } - HB_FUNC( SETFATTR ) { int iResult; @@ -204,7 +201,6 @@ HB_FUNC( SETFATTR ) hb_retni( iResult ); } - HB_FUNC( SETFDATI ) { const char *szFile = hb_parc( 1 ); @@ -243,7 +239,6 @@ HB_FUNC( SETFDATI ) hb_retl( fResult ); } - HB_FUNC( FILEDELETE ) { HB_BOOL bReturn = HB_FALSE; @@ -288,26 +283,22 @@ HB_FUNC( FILEDELETE ) hb_retl( bReturn ); } - HB_FUNC( FILEMOVE ) { hb_retnint( hb_fsRename( hb_parcx( 1 ), hb_parcx( 2 ) ) ? 0 : - ( HB_MAXINT ) hb_fsOsError() ); } - HB_FUNC( RENAMEFILE ) { HB_FUNC_EXEC( FILEMOVE ); } - HB_FUNC( DELETEFILE ) { hb_retnint( hb_fsDelete( hb_parcx( 1 ) ) ? 0 : - ( HB_MAXINT ) hb_fsOsError() ); } - HB_FUNC( FILESMAX ) { #if defined( __DJGPP__ ) diff --git a/harbour/contrib/hbct/finan.c b/harbour/contrib/hbct/finan.c index 874ee990dd..eada3ff906 100644 --- a/harbour/contrib/hbct/finan.c +++ b/harbour/contrib/hbct/finan.c @@ -61,64 +61,10 @@ * */ - #include "ct.h" #include "ctmath.h" #include "hbmather.h" - -/* $DOC$ - * $FUNCNAME$ - * FV() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Future value of a capital - * $SYNTAX$ - * FV (nDeposit, nInterest, nPeriods) --> nFutureValue - * $ARGUMENTS$ - * amount of money invested per period - * rate of interest per period, 1 == 100% - * period count - * $RETURNS$ - * Total value of the capital after of - * paying and interest being - * paid every period and added to the capital (resulting - * in compound interest) - * $DESCRIPTION$ - * FV() calculates the value of a capital after periods. - * Starting with a value of 0, every period, - * (Dollars, Euros, Yens, ...) and an interest of for the - * current capital are added for the capital (=Percent/100). - * Thus, one gets the non-linear effects of compound interests: - * value in period 0 = 0 - * value in period 1 = ((value in period 0)*(1+/100)) + - * value in period 2 = ((value in period 1)*(1+/100)) + - * etc.... - * value in period = ((value in period -1)*(1+/100))< + - * = * sum from i=0 to -1 over (1+/100)^i - * = * ((1+/100)^n-1) / (/100) - * $EXAMPLES$ - * // Payment of 1000 per year for 10 years at a interest rate - * // of 5 per cent per year - * - * ? fv (1000, 0.05, 10) --> 12577.893 - * $TESTS$ - * fv (1000, 0.00, 10) == 10000.0 - * fv (1000, 0.05, 10) == 12577.893 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * FV() is compatible with CT3's FV(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is finan.c, library is libct. - * $SEEALSO$ - * PV(),PAYMENT(),PERIODS(),RATE() - * $END$ - */ - HB_FUNC( FV ) { if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) @@ -168,58 +114,6 @@ HB_FUNC( FV ) } } - -/* $DOC$ - * $FUNCNAME$ - * PV() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Present value of a loan - * $SYNTAX$ - * PV (nPayment, nInterest, nPeriods) --> nPresentValue - * $ARGUMENTS$ - * amount of money paid back per period - * rate of interest per period, 1 == 100% - * period count - * $RETURNS$ - * Present value of a loan when one is paying back - * per period at a rate of interest of - * per period - * $DESCRIPTION$ - * PV() calculates the present value of a loan that is paid back - * in payments of (Dollars, Euros, Yens,...) - * while the rate of interest is per period: - * debt in period 0 = - * debt in period 1 = ((debt in period 0)-)*(1+/100) - * debt in period 2 = ((debt in period 1)-)*(1+/100) - * etc... - * debt in period = ((debt in period -1)-)*(1+/100) - * -> has to be 0, so - * = *(1-(1+/100)^(-n))/(/100) - * $EXAMPLES$ - * // You can afford to pay back 100 Dollars per month for 5 years - * // at a interest rate of 0.5% per month (6% per year), so instead - * // of 6000 Dollars (the amount you will pay back) the bank will pay - * // you - * - * ? pv (100, 0.005, 60) --> 5172.56 - * $TESTS$ - * pv (100, 0.0, 60) == 6000.0 - * pv (100, 0.005, 60) == 5172.56 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * PV() is compatible with CT3's PV(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is finan.c, library is libct. - * $SEEALSO$ - * FV(),PAYMENT(),PERIODS(),RATE() - * $END$ - */ - HB_FUNC( PV ) { if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) @@ -269,56 +163,6 @@ HB_FUNC( PV ) } } - -/* $DOC$ - * $FUNCNAME$ - * PAYMENT() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Payments for a loan - * $SYNTAX$ - * PAYMENT (nLoan, nInterest, nPeriods) --> nPayment - * $ARGUMENTS$ - * amount of money you get from the bank - * rate of interest per period, 1 == 100% - * period count - * $RETURNS$ - * Periodical payment one has to make to pay the - * loan back - * $DESCRIPTION$ - * PAYMENT() calculates the payment one has to make periodically - * to pay back a loan within periods and for a - * rate of interest per period. - * debt in period 0 = - * debt in period 1 = ((debt in period 0)-)*(1+/100) - * debt in period 2 = ((debt in period 1)-)*(1+/100) - * etc... - * debt in period = ((debt in period -1)-)*(1+/100) - * -> has to be 0, so - * = *(/100)/(1-(1+/100)^(-n)) - * $EXAMPLES$ - * // You get a loan of 5172.56 at a interest rate of 0.5% per - * // month (6% per year). - * // For 5 years, you have to pay back every month - * - * ? payment (5172.56, 0.005, 60) --> 100.00 - * $TESTS$ - * payment (5172.56, 0.0, 60) == 86.21 - * payment (5172.56, 0.005, 60) == 100.00 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * PAYMENT() is compatible with CT3's PAYMENT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is finan.c, library is libct. - * $SEEALSO$ - * PV(),FV(),PERIODS(),RATE() - * $END$ - */ - HB_FUNC( PAYMENT ) { if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) @@ -368,61 +212,6 @@ HB_FUNC( PAYMENT ) } } - -/* $DOC$ - * $FUNCNAME$ - * PERIODS() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Number of periods for a loan - * $SYNTAX$ - * PERIODS (nLoan, nPayment, nInterest) --> nPeriods - * $ARGUMENTS$ - * amount of money you get from the bank - * amount of money you pay back per period - * rate of interest per period, 1 == 100% - * $RETURNS$ - * number of periods you need to pay the loan back - * $DESCRIPTION$ - * PERIODS() calculates the number of periods one needs to pay back - * a loan of with periodical payments of and for a - * rate of interest per period. - * debt in period 0 = - * debt in period 1 = ((debt in period 0)-)*(1+/100) - * debt in period 2 = ((debt in period 1)-)*(1+/100) - * etc... - * debt in period = ((debt in period -1)-)*(1+/100) - * -> has to be 0, so - * = -log(1-*(/100)/)/log(1+/100)) - * - * Note, however that in the case of nPayment <= *(/100), - * one would need infinite time to pay the loan back. The functions does - * then return -1. - * $EXAMPLES$ - * // You get a loan of 5172.56 at a interest rate of 0.5% per - * // month (6% per year). - * // You can afford to pay 100 back every month, so you need - * - * ? periods (5172.56, 100, 0.005) --> 60.0 - * - * // months to cancel the loan. - * $TESTS$ - * periods (5172.56, 100, 0.005) == 60.0 - * periods (5172.56, 100, 0.0) == 51.7256 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * PERIODS() is compatible with CT3's PERIODS(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is finan.c, library is libct. - * $SEEALSO$ - * PV(),FV(),PAYMENT(),RATE() - * $END$ - */ - HB_FUNC( PERIODS ) { if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) @@ -489,54 +278,6 @@ HB_FUNC( PERIODS ) } } - -/* $DOC$ - * $FUNCNAME$ - * RATE() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Estimate rate of interest for a loan - * $SYNTAX$ - * RATE (nLoan, nPayment, nPeriods) --> nRate - * $ARGUMENTS$ - * amount of money you get from the bank - * amount of money you pay back per period - * number of periods you pay the loan back - * $RETURNS$ - * estimated rate of interest per period, 1 == 100% - * $DESCRIPTION$ - * RATE() calculates the rate of interest per period for the given - * loan, payment per periods and number of periods. This is done with - * the same equation used in the PAYMENT() or PERIODS() function: - * - * = *(/100)/(1-(1+/100)^(-)) - * - * However, this equation can not be solved for in a "closed" - * manner, i.e. = ..., so that the result can only be estimated. - * $EXAMPLES$ - * // You get a loan of 5172.56, pay 100 back every month for - * // 5 years (60 months). The effective interest rate per - * // period (=month) is - * - * ? rate (5172.56, 100, 60) --> 0.005 - * - * $TESTS$ - * rate (5172.56, 100, 60.0) == 0.005 - * rate (6000.0, 100, 60.0) == 0.0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * RATE() is compatible with CT3's RATE(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is finan.c, library is libct. - * $SEEALSO$ - * PV(),FV(),PAYMENT(),PERIODS() - * $END$ - */ - HB_FUNC( RATE ) { if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) diff --git a/harbour/contrib/hbct/ftoc.c b/harbour/contrib/hbct/ftoc.c index 3f68c315ef..fea7e0c6c6 100644 --- a/harbour/contrib/hbct/ftoc.c +++ b/harbour/contrib/hbct/ftoc.c @@ -53,43 +53,6 @@ #include "ct.h" -/* $DOC$ - * $FUNCNAME$ - * FTOC() - * $CATEGORY$ - * CT3 number and bit manipulation functions - * $ONELINER$ - * $SYNTAX$ - * FTOC( ) --> cFloatingPointNumber - * - * $ARGUMENTS$ - * Designate any Harbour number. - * - * $RETURNS$ - * FTOC() return a string with the size of DOUBLE. - * ATTENTION: different implementations or platforms of Harbour, they - * could produce different format in the string returned by FTOC(). - * - * $DESCRIPTION$ - * Harbour internal numbers in Floating Point are stored in data type - * DOUBLE. FTOC() returns these bits as an string. In this way, - * numbers con be saved more compactly. - * - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is ftoc.c, library is libct. - * $SEEALSO$ - * CTOF(), XTOC() - * $END$ - */ - HB_FUNC( FTOC ) { char buf[ sizeof( double ) ]; @@ -99,45 +62,6 @@ HB_FUNC( FTOC ) hb_retclen( buf, sizeof( buf ) ); } - -/* $DOC$ - * $FUNCNAME$ - * CTOF() - * $CATEGORY$ - * CT3 number and bit manipulation functions - * $ONELINER$ - * $SYNTAX$ - * CTOF( ) --> nFloatingPointNumber - * - * $ARGUMENTS$ - * Designate a string that contains a Harbour - * number in flotaing point format. - * ATTENTION: different implementations or platforms of Harbour, they - * could produce different format in the string returned by FTOC(). - * - * $RETURNS$ - * CTOF() return the floating point number that corresponds to the - * string passed. - * - * $DESCRIPTION$ - * Character strings created with FTOC() or XTOC() are convert into - * Harbour floating point number - * - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is ftoc.c, library is libct. - * $SEEALSO$ - * FTOC(), XTOC() - * $END$ - */ - HB_FUNC( CTOF ) { if( hb_parclen( 1 ) >= sizeof( double ) ) diff --git a/harbour/contrib/hbct/justify.c b/harbour/contrib/hbct/justify.c index 3ca671781d..89c54b5cb8 100644 --- a/harbour/contrib/hbct/justify.c +++ b/harbour/contrib/hbct/justify.c @@ -52,10 +52,8 @@ * */ - #include "ct.h" - /* defines */ #define DO_JUSTIFY_JUSTLEFT 0 #define DO_JUSTIFY_JUSTRIGHT 1 @@ -163,69 +161,11 @@ static void do_justify( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * JUSTLEFT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Move characters from the beginning to the end of a string - * $SYNTAX$ - * JUSTLEFT (<[@]cString>, [|]) -> cJustifiedString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * JUSTLEFT() is compatible with CT3's JUSTLEFT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is justify.c, library is libct. - * $SEEALSO$ - * JUSTRIGHT() - * $END$ - */ - HB_FUNC( JUSTLEFT ) { do_justify( DO_JUSTIFY_JUSTLEFT ); } - -/* $DOC$ - * $FUNCNAME$ - * JUSTRIGHT() - * $CATEGORY$ - * Harbour Tools string functions - * $ONELINER$ - * Move characters from the end to the beginning of a string - * $SYNTAX$ - * JUSTRIGHT (<[@]cString>, [|]) -> cJustifiedString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * JUSTRIGHT() is compatible with CT3's JUSTRIGHT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is justify.c, library is libct. - * $SEEALSO$ - * JUSTLEFT() - * $END$ - */ - HB_FUNC( JUSTRIGHT ) { do_justify( DO_JUSTIFY_JUSTRIGHT ); diff --git a/harbour/contrib/hbct/keyset.c b/harbour/contrib/hbct/keyset.c index 17323240e7..b405d54370 100644 --- a/harbour/contrib/hbct/keyset.c +++ b/harbour/contrib/hbct/keyset.c @@ -86,125 +86,21 @@ static void SetGet( int iFlag ) hb_retl( ( iState & iFlag ) != 0 ); } - -/* $DOC$ - * $FUNCNAME$ - * KSETINS() - * $CATEGORY$ - * CT3 switch and state functions - * $ONELINER$ - * $SYNTAX$ - * KSETINS ([]) -> lOldSwitch - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * DOS - * $FILES$ - * Source is keyset.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( KSETINS ) { SetGet( HB_GTI_KBD_INSERT ); } - -/* $DOC$ - * $FUNCNAME$ - * KSETCAPS() - * $CATEGORY$ - * CT3 switch and state functions - * $ONELINER$ - * $SYNTAX$ - * KSETCAPS ([]) -> lOldSwitch - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * DOS - * $FILES$ - * Source is keyset.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( KSETCAPS ) { SetGet( HB_GTI_KBD_CAPSLOCK ); } - -/* $DOC$ - * $FUNCNAME$ - * KSETNUM() - * $CATEGORY$ - * CT3 switch and state functions - * $ONELINER$ - * $SYNTAX$ - * KSETNUM ([]) -> lOldSwitch - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * DOS - * $FILES$ - * Source is keyset.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( KSETNUM ) { SetGet( HB_GTI_KBD_NUMLOCK ); } - -/* $DOC$ - * $FUNCNAME$ - * KSETSCROLL() - * $CATEGORY$ - * CT3 switch and state functions - * $ONELINER$ - * $SYNTAX$ - * KSETSCROLL ([]) -> lOldSwitch - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * DOS - * $FILES$ - * Source is keyset.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( KSETSCROLL ) { SetGet( HB_GTI_KBD_SCROLOCK ); diff --git a/harbour/contrib/hbct/misc1.c b/harbour/contrib/hbct/misc1.c index be786d9350..4b5bdc7d78 100644 --- a/harbour/contrib/hbct/misc1.c +++ b/harbour/contrib/hbct/misc1.c @@ -52,51 +52,6 @@ #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * XTOC() - * $CATEGORY$ - * CT3 miscellaneous functions - * $ONELINER$ - * $SYNTAX$ - * XTOC( ) --> cValue - * - * $ARGUMENTS$ - * Designate an expression of some of the following data - * type: NUMBER, CHARACTER, DATE, LOGICAL. - * - * $RETURNS$ - * XTOC() return a string with the representation of data type of - * expValue. - * - * $DESCRIPTION$ - * Each data type always returns a string with a particular fixed length: - * - * ----------------------------------------------------------- - * Data Type Result Length Similar function - * ----------------------------------------------------------- - * Numeric sizeof( DOUBLE ) FTOC() - * Logical 1 - * Date 8 DTOS() - * String Unchanged - * ----------------------------------------------------------- - * - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is misc1.c, library is libct. - * $SEEALSO$ - * CTOF(), FTOC() - * $END$ - */ - HB_FUNC( XTOC ) { if( HB_ISCHAR( 1 ) ) diff --git a/harbour/contrib/hbct/misc2.c b/harbour/contrib/hbct/misc2.c index 995156f44a..50f68ea7b4 100644 --- a/harbour/contrib/hbct/misc2.c +++ b/harbour/contrib/hbct/misc2.c @@ -99,7 +99,6 @@ HB_FUNC( COMPLEMENT ) hb_ret(); } - HB_FUNC( NUL ) { hb_retc_null(); diff --git a/harbour/contrib/hbct/num1.c b/harbour/contrib/hbct/num1.c index 52de463aa9..b7468b5e04 100644 --- a/harbour/contrib/hbct/num1.c +++ b/harbour/contrib/hbct/num1.c @@ -61,48 +61,10 @@ * */ - #include "ct.h" #include "ctmath.h" #include -/* $DOC$ - * $FUNCNAME$ - * CELSIUS() - * $CATEGORY$ - * CT3 numeric functions - * $ONELINER$ - * Temperature conversion Fahrenheit to Celsius - * $SYNTAX$ - * CELSIUS (nDegreeFahrenheit) --> nDegreeCelsius - * $ARGUMENTS$ - * temperature in degree Fahrenheit - * $RETURNS$ - * temperate in degree Celsius - * $DESCRIPTION$ - * CELSIUS() converts temperature values measured in the Fahrenheit scale - * to the Celsius scale. - * $EXAMPLES$ - * // melting point of water in standard conditions - * ? celsius (32.0) --> 0.0 - * // boiling point of water in standard conditions - * ? celsius (212.0) --> 100.0 - * $TESTS$ - * celsius (32.0) == 0.0 - * celsius (212.0) == 100.0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * CELSIUS() is compatible with CT3's CELSIUS(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is num1.c, library is libct. - * $SEEALSO$ - * FAHRENHEIT() - * $END$ - */ - HB_FUNC( CELSIUS ) { if( HB_ISNUM( 1 ) ) @@ -132,44 +94,6 @@ HB_FUNC( CELSIUS ) } } - -/* $DOC$ - * $FUNCNAME$ - * FAHRENHEIT() - * $CATEGORY$ - * CT3 numeric functions - * $ONELINER$ - * Temperature conversion Celsius to Fahrenheit - * $SYNTAX$ - * FAHRENHEIT (nDegreeCelsius) --> nDegreeFahrenheit - * $ARGUMENTS$ - * temperate in degree Celsius - * $RETURNS$ - * temperature in degree Fahrenheit - * $DESCRIPTION$ - * FAHRENHEIT() converts temperature values measured in the Celsius scale - * to the Fahrenheit scale. - * $EXAMPLES$ - * // melting point of water in standard conditions - * ? fahrenheit (0.0) --> 32.0 - * // boiling point of water in standard conditions - * ? fahrenheit (100.0) --> 212.0 - * $TESTS$ - * fahrenheit (0.0) == 32.0 - * celsius (100.0) == 212.0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * FAHRENHEIT() is compatible with CT3's FAHRENHEIT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is num1.c, library is libct. - * $SEEALSO$ - * CELSIUS() - * $END$ - */ - HB_FUNC( FAHRENHEIT ) { if( HB_ISNUM( 1 ) ) @@ -199,42 +123,6 @@ HB_FUNC( FAHRENHEIT ) } } - -/* $DOC$ - * $FUNCNAME$ - * INFINITY() - * $CATEGORY$ - * CT3 numeric functions - * $ONELINER$ - * Returns the largest floating point number available in the system - * $SYNTAX$ - * INFINITY ([]) --> nLargestNumber - * $ARGUMENTS$ - * [] .T., if the function should return - * the maximum floating point value - * available (DBL_MAX) - * .F., function should try to return - * the same value as the original CT3 lib did - * Default: .F. - * $RETURNS$ - * the largest floating point number available in the system - * $DESCRIPTION$ - * INFINITY() returns the largest floating point number available - * in the system. For platform independance, this is set to DBL_MAX. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * INFINITY() must not necessarily return the same number as CT3's INFINITY(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is num1.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( INFINITY ) { if( hb_parl( 1 ) ) diff --git a/harbour/contrib/hbct/numat.c b/harbour/contrib/hbct/numat.c index 6ec22e3d6d..6d6898f256 100644 --- a/harbour/contrib/hbct/numat.c +++ b/harbour/contrib/hbct/numat.c @@ -54,35 +54,6 @@ #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * NUMAT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Number of occurrences of a sequence in a string - * $SYNTAX$ - * NUMAT (, , []) --> nCount - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * NUMAT() is compatible with CT3's NUMAT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is numat.c, library is libct. - * $SEEALSO$ - * CSETATMUPA(),SETATLIKE() - * $END$ - */ - HB_FUNC( NUMAT ) { if( ( HB_ISCHAR( 1 ) ) && ( HB_ISCHAR( 2 ) ) ) diff --git a/harbour/contrib/hbct/numconv.prg b/harbour/contrib/hbct/numconv.prg index 3e4e13df89..93861b0762 100644 --- a/harbour/contrib/hbct/numconv.prg +++ b/harbour/contrib/hbct/numconv.prg @@ -57,32 +57,6 @@ #define WORLD "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" -/* $DOC$ - * $FUNCNAME$ - * NTOC() - * $CATEGORY$ - * CT3 number and bit manipulation functions - * $ONELINER$ - * $SYNTAX$ - * NTOC ([, ][,][,]) -> - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is numconv.prg, library is libct. - * $SEEALSO$ - * CTON() - * $END$ - */ - FUNCTION NTOC( xNum, nBase, nLenght, cPad ) LOCAL cNum @@ -117,32 +91,6 @@ FUNCTION NTOC( xNum, nBase, nLenght, cPad ) RETURN cNum -/* $DOC$ - * $FUNCNAME$ - * CTON() - * $CATEGORY$ - * CT3 number and bit manipulation functions - * $ONELINER$ - * $SYNTAX$ - * CTON ([, ][,]) -> - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is numconv.prg, library is libct. - * $SEEALSO$ - * NTOC() - * $END$ - */ - FUNCTION CTON( xNum, nBase, lMode ) LOCAL i LOCAL nNum := 0 @@ -189,32 +137,6 @@ STATIC FUNCTION B10TOBN( nNum, nBase ) RETURN "" -/* $DOC$ - * $FUNCNAME$ - * BITTOC() - * $CATEGORY$ - * CT3 number and bit manipulation functions - * $ONELINER$ - * $SYNTAX$ - * BITTOC (, [,]) -> - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is numconv.prg, library is libct. - * $SEEALSO$ - * CTOBIT() - * $END$ - */ - FUNCTION BITTOC( nInteger, cBitPattern, lMode ) LOCAL cBinary LOCAL nI @@ -237,32 +159,6 @@ FUNCTION BITTOC( nInteger, cBitPattern, lMode ) RETURN Right( cString, Len( cBitPattern ) ) -/* $DOC$ - * $FUNCNAME$ - * CTOBIT() - * $CATEGORY$ - * CT3 number and bit manipulation functions - * $ONELINER$ - * $SYNTAX$ - * CTOBIT (, ) -> - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is numconv.prg, library is libct. - * $SEEALSO$ - * BITTOC() - * $END$ - */ - FUNCTION CTOBIT( cCharString, cBitPattern ) LOCAL nI, cString := "" diff --git a/harbour/contrib/hbct/pos1.c b/harbour/contrib/hbct/pos1.c index 7699ddbf0a..a8e6c980d1 100644 --- a/harbour/contrib/hbct/pos1.c +++ b/harbour/contrib/hbct/pos1.c @@ -187,138 +187,21 @@ static void do_pos1( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * POSALPHA() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Left-most position of a letter in a string - * $SYNTAX$ - * POSALPHA (, [], []) -> nPosition - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * POSALPHA() is compatible with CT3's POSALPHA(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is pos1.c, library is libct. - * $SEEALSO$ - * POSLOWER(),POSUPPER(),POSRANGE() - * $END$ - */ - HB_FUNC( POSALPHA ) { do_pos1( DO_POS1_POSALPHA ); } - -/* $DOC$ - * $FUNCNAME$ - * POSLOWER() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Left-most position of a lowercase letter in a string - * $SYNTAX$ - * POSLOWER (, [], []) -> nPosition - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * POSLOWER() is compatible with CT3's POSLOWER(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is pos1.c, library is libct. - * $SEEALSO$ - * POSALPHA(),POSUPPER(),POSRANGE() - * $END$ - */ - HB_FUNC( POSLOWER ) { do_pos1( DO_POS1_POSLOWER ); } - -/* $DOC$ - * $FUNCNAME$ - * POSRANGE() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Left-most position of a character from a set in a string - * $SYNTAX$ - * POSRANGE (, , , [], - * []) -> nPosition - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * POSRANGE() is compatible with CT3's POSRANGE(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is pos1.c, library is libct. - * $SEEALSO$ - * POSALPHA(),POSLOWER(),POSUPPER() - * $END$ - */ - HB_FUNC( POSRANGE ) { do_pos1( DO_POS1_POSRANGE ); } - -/* $DOC$ - * $FUNCNAME$ - * POSUPPER() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Left-most position of an uppercase letter in a string - * $SYNTAX$ - * POSUPPER (, [], []) -> nPosition - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * POSUPPER() is compatible with CT3's POSUPPER(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is pos1.c, library is libct. - * $SEEALSO$ - * POSALPHA(),POSLOWER(),POSRANGE() - * $END$ - */ - HB_FUNC( POSUPPER ) { do_pos1( DO_POS1_POSUPPER ); diff --git a/harbour/contrib/hbct/pos2.c b/harbour/contrib/hbct/pos2.c index 88498f6fe9..39842eaec2 100644 --- a/harbour/contrib/hbct/pos2.c +++ b/harbour/contrib/hbct/pos2.c @@ -52,38 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * POSCHAR() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Replace character at a certain position within a string - * $SYNTAX$ - * POSCHAR (<[@]cString>, , []) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * POSCHAR() is compatible with CT3's POSCHAR(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is pos2.c, library is libct. - * $SEEALSO$ - * POSDEL(),POSINS(),POSREPL(),CSETREF() - * $END$ - */ - HB_FUNC( POSCHAR ) { int iNoRet; @@ -170,35 +140,6 @@ HB_FUNC( POSCHAR ) } } - -/* $DOC$ - * $FUNCNAME$ - * POSDEL() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Delete characters at a certain position within a string - * $SYNTAX$ - * POSDEL (, [], ) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * POSDEL() is compatible with CT3's POSDEL(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is pos2.c, library is libct. - * $SEEALSO$ - * POSCHAR(),POSINS(),POSREPL() - * $END$ - */ - HB_FUNC( POSDEL ) { if( HB_ISCHAR( 1 ) ) @@ -264,35 +205,6 @@ HB_FUNC( POSDEL ) } } - -/* $DOC$ - * $FUNCNAME$ - * POSINS() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Insert characters at a certain position within a string - * $SYNTAX$ - * POSINS (, , []) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * POSINS() is compatible with CT3's POSINS(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is pos2.c, library is libct. - * $SEEALSO$ - * POSCHAR,POSDEL(),POSREPL() - * $END$ - */ - HB_FUNC( POSINS ) { if( HB_ISCHAR( 1 ) ) @@ -373,35 +285,6 @@ HB_FUNC( POSINS ) } } - -/* $DOC$ - * $FUNCNAME$ - * POSREPL() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Replace characters at a certain position within a string - * $SYNTAX$ - * POSREPL (<[@]cString>, , []) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * POSREPL() is compatible with CT3's POSREPL(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is pos2.c, library is libct. - * $SEEALSO$ - * POSCHAR(),POSDEL(),POSINS(),CSETREF() - * $END$ - */ - HB_FUNC( POSREPL ) { int iNoRet; diff --git a/harbour/contrib/hbct/posdiff.c b/harbour/contrib/hbct/posdiff.c index c3617ad9ab..1e53f18fde 100644 --- a/harbour/contrib/hbct/posdiff.c +++ b/harbour/contrib/hbct/posdiff.c @@ -52,38 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * POSDIFF() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * The left-most position there two string differ - * $SYNTAX$ - * POSDIFF (, , []) -> nPosition - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * POSDIFF() is compatible with CT3's POSDIFF(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is posdiff.c, library is libct. - * $SEEALSO$ - * POSEQUAL() - * $END$ - */ - HB_FUNC( POSDIFF ) { if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) ) @@ -153,35 +123,6 @@ HB_FUNC( POSDIFF ) } } - -/* $DOC$ - * $FUNCNAME$ - * POSEQUAL() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * The left-most position there two string begin to be equal - * $SYNTAX$ - * POSEQUAL (, , [], []) -> nPosition - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * POSEQUAL() is compatible with CT3's POSEQUAL(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is posdiff.c, library is libct. - * $SEEALSO$ - * POSDIFF() - * $END$ - */ - HB_FUNC( POSEQUAL ) { if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) ) diff --git a/harbour/contrib/hbct/print.c b/harbour/contrib/hbct/print.c index 1e4ba29327..2e79a7e093 100644 --- a/harbour/contrib/hbct/print.c +++ b/harbour/contrib/hbct/print.c @@ -52,7 +52,6 @@ * */ - #include "hbapi.h" #include "hbapifs.h" @@ -63,32 +62,6 @@ # endif #endif - -/* $DOC$ - * $FUNCNAME$ - * PRINTSTAT() - * $CATEGORY$ - * CT3 printer functions - * $ONELINER$ - * $SYNTAX$ - * PRINTSTAT ([]) -> nState - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * DOS - * $FILES$ - * Source is print.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( PRINTSTAT ) { HB_USHORT uiPort = ( HB_USHORT ) hb_parnidef( 1, 1 ); @@ -114,32 +87,6 @@ HB_FUNC( PRINTSTAT ) hb_retni( Status ); } - -/* $DOC$ - * $FUNCNAME$ - * PRINTREADY() - * $CATEGORY$ - * CT3 printer functions - * $ONELINER$ - * $SYNTAX$ - * PRINTREADY ([]) -> lPrinterReady - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * DOS - * $FILES$ - * Library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( PRINTREADY ) { char szLPT[ 8 ]; @@ -149,7 +96,6 @@ HB_FUNC( PRINTREADY ) hb_retl( hb_printerIsReady( szLPT ) ); } - HB_FUNC( PRINTSEND ) { #ifdef __DJGPP__ diff --git a/harbour/contrib/hbct/range.c b/harbour/contrib/hbct/range.c index 5072e261f0..b70652b012 100644 --- a/harbour/contrib/hbct/range.c +++ b/harbour/contrib/hbct/range.c @@ -52,45 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * RANGEREM() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Remove characters within a certain ASCII range from a string - * $SYNTAX$ - * RANGEREM (, , ) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * ? rangerem ("0","9","year2002.dbf") // "year.dbf", remove all digits - * ? rangerem ("9","0","year2002.dbf") // "22", testing removal from "9" to chr(255) - * // and from chr(0) to "0" - * ? rangerem ("0","9","yearcurr.dbf") // "yearcurr.dbf", test leaving string untouched - * $TESTS$ - * rangerem ("0","9","year2002.dbf") == "year.dbf" - * rangerem ("9","0","year2002.dbf") == "22" - * rangerem ("0","9","yearcurr.dbf") == "yearcurr.dbf" - * $STATUS$ - * Started - * $COMPLIANCE$ - * RANGEREM() is compatible with CT3's RANGEREM(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is range.c, library is libct. - * $SEEALSO$ - * RANGEREPL() - * $END$ - */ - HB_FUNC( RANGEREM ) { if( ( hb_parclen( 1 ) > 0 || HB_ISNUM( 1 ) ) && @@ -158,43 +121,6 @@ HB_FUNC( RANGEREM ) } } - -/* $DOC$ - * $FUNCNAME$ - * RANGEREPL - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Replace characters within a certain ASCII range from a string - * $SYNTAX$ - * RANGEREPL (, , - * <[@]cString>, ) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * ? rangerepl ("0","9","year2002.dbf","?") // "year????.dbf", replace all digits - * ? rangerepl ("9","0","year2002.dbf","?") // "????2??2????", testing replacement from "9" to chr(255) - * // and from chr(0) to "0" - * ? rangerepl ("0","9","yearcurr.dbf","?") // "yearcurr.dbf", test leaving string untouched - * $TESTS$ - * rangerepl ("0","9","year2002.dbf","?") == "year????.dbf" - * rangerepl ("9","0","year2002.dbf","?") == "????2??2????" - * rangerepl ("0","9","yearcurr.dbf","?") == "yearcurr.dbf" - * $STATUS$ - * Started - * $COMPLIANCE$ - * RANGEREPL() is compatible with CT3's RANGEREPL(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is range.c, library is libct. - * $SEEALSO$ - * RANGEREM() - * $END$ - */ - HB_FUNC( RANGEREPL ) { int iNoRef = ct_getref() && HB_ISBYREF( 3 ); diff --git a/harbour/contrib/hbct/relation.c b/harbour/contrib/hbct/relation.c index caf3f9b18b..a093f48b51 100644 --- a/harbour/contrib/hbct/relation.c +++ b/harbour/contrib/hbct/relation.c @@ -52,39 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * CHARRELA() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Character relation of two strings - * $SYNTAX$ - * CHARRELA (, , - * , ) -> nPosition - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * CHARRELA() is compatible with CT3's CHARRELA(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is relation.c, library is libct. - * $SEEALSO$ - * CHARRELREP() - * $END$ - */ - HB_FUNC( CHARRELA ) { if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) && HB_ISCHAR( 3 ) && HB_ISCHAR( 4 ) ) @@ -164,37 +133,6 @@ HB_FUNC( CHARRELA ) } } - -/* $DOC$ - * $FUNCNAME$ - * CHARRELREP() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Relation dependant character replacement - * $SYNTAX$ - * CHARRELREP (, , - * , <[@]cString2>, - * ) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * CHARRELREP() is compatible with CT3's CHARRELREP(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is relation.c, library is libct. - * $SEEALSO$ - * CHARRELA(),CSETREF() - * $END$ - */ - HB_FUNC( CHARRELREP ) { int iNoRet; diff --git a/harbour/contrib/hbct/remove.c b/harbour/contrib/hbct/remove.c index d33f04af95..c3f5d2f4c8 100644 --- a/harbour/contrib/hbct/remove.c +++ b/harbour/contrib/hbct/remove.c @@ -52,10 +52,8 @@ * */ - #include "ct.h" - /* defines */ #define DO_REMOVE_REMALL 0 #define DO_REMOVE_REMLEFT 1 @@ -134,103 +132,16 @@ static void do_remove( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * REMALL() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Remove certain characters at the left and right of a string - * $SYNTAX$ - * REMALL (, []) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * REMALL() is compatible with CT3's REMALL(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is remove.c, library is libct. - * $SEEALSO$ - * REMLEFT(),REMRIGHT() - * $END$ - */ - HB_FUNC( REMALL ) { do_remove( DO_REMOVE_REMALL ); } - -/* $DOC$ - * $FUNCNAME$ - * REMLEFT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Remove certain characters at the left of a string - * $SYNTAX$ - * REMLEFT (, []) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * REMLEFT() is compatible with CT3's REMLEFT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is remove.c, library is libct. - * $SEEALSO$ - * REMALL(),REMRIGHT() - * $END$ - */ - HB_FUNC( REMLEFT ) { do_remove( DO_REMOVE_REMLEFT ); } - -/* $DOC$ - * $FUNCNAME$ - * REMRIGHT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Remove certain characters at the right of a string - * $SYNTAX$ - * REMRIGHT (, []) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * REMRIGHT() is compatible with CT3's REMRIGHT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is remove.c, library is libct. - * $SEEALSO$ - * REMALL(),REMLEFT() - * $END$ - */ - HB_FUNC( REMRIGHT ) { do_remove( DO_REMOVE_REMRIGHT ); diff --git a/harbour/contrib/hbct/replace.c b/harbour/contrib/hbct/replace.c index 6d66b9d9b7..206461ae4e 100644 --- a/harbour/contrib/hbct/replace.c +++ b/harbour/contrib/hbct/replace.c @@ -52,10 +52,8 @@ * */ - #include "ct.h" - /* defines */ #define DO_REPLACE_REPLALL 0 #define DO_REPLACE_REPLLEFT 1 @@ -159,103 +157,16 @@ static void do_replace( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * REPLALL() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Replace certain characters at the left and right of a string - * $SYNTAX$ - * REPLALL (, , []) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * REPLALL() is compatible with CT3's REPLALL(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is replace.c, library is libct. - * $SEEALSO$ - * REPLLEFT(),REPLRIGHT() - * $END$ - */ - HB_FUNC( REPLALL ) { do_replace( DO_REPLACE_REPLALL ); } - -/* $DOC$ - * $FUNCNAME$ - * REPLLEFT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Replace certain characters at the left of a string - * $SYNTAX$ - * REPLLEFT (, , []) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * REPLLEFT() is compatible with CT3's REPLLEFT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is replace.c, library is libct. - * $SEEALSO$ - * REPLALL(),REPLRIGHT() - * $END$ - */ - HB_FUNC( REPLLEFT ) { do_replace( DO_REPLACE_REPLLEFT ); } - -/* $DOC$ - * $FUNCNAME$ - * REPLRIGHT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Replace certain characters at the right of a string - * $SYNTAX$ - * REPLRIGHT (, , []) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * REPLRIGHT() is compatible with CT3's REPLRIGHT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is replace.c, library is libct. - * $SEEALSO$ - * REPLALL(),REPLLEFT() - * $END$ - */ - HB_FUNC( REPLRIGHT ) { do_replace( DO_REPLACE_REPLRIGHT ); diff --git a/harbour/contrib/hbct/screen1.c b/harbour/contrib/hbct/screen1.c index d222236b44..dff3f94617 100644 --- a/harbour/contrib/hbct/screen1.c +++ b/harbour/contrib/hbct/screen1.c @@ -62,43 +62,6 @@ #include "hbapi.h" #include "hbapigt.h" -/* $DOC$ - * $FUNCNAME$ - * SCREENATTR() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * $SYNTAX$ - * SCREENATTR ( [],[] ) -> - * $ARGUMENTS$ - * Designates the line from which to determine the attribute. - * The default is the cursor line. - * - * Designates the column from which to determine the - * attribute. The default is the cursor column. - * - * $RETURNS$ - * SCREENATTR() returns the attribute at the designated position. - * - * $DESCRIPTION$ - * SCREENATTR() returns the current screen attribute at and - * . You can query targeted attributes this way and save them - * to use later, or process them later with INVERTATTR(). - * - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is screen1.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( SCREENATTR ) { int iRow, iCol; @@ -118,32 +81,6 @@ HB_FUNC( SCREENATTR ) hb_retni( iColor ); } - -/* $DOC$ - * $FUNCNAME$ - * SCREENMIX() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * $SYNTAX$ - * SCREENMIX (, , [], []) -> - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is screen1.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( SCREENMIX ) { HB_SIZE nLen = hb_parclen( 1 ); @@ -195,38 +132,6 @@ HB_FUNC( SCREENMIX ) hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * SAYSCREEN() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * $SYNTAX$ - * SAYSCREEN( , [], [] ) -> - * $ARGUMENTS$ - * - the string to output. Although undocumented, can be NIL. - * - row number, defaults to cursor row. - * - column number, defaults to cursor column. - * $RETURNS$ - * Returns an empty string. - * $DESCRIPTION$ - * Outputs a string at specified coordinates without changing character - * attributes. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is screen1.c, library is libct. - * $SEEALSO$ - * SCREENMIX() - * $END$ - */ - HB_FUNC( SAYSCREEN ) { HB_SIZE nLen = hb_parclen( 1 ); @@ -352,34 +257,6 @@ HB_FUNC( CLEARWIN ) hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * INVERTWIN() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * - * $SYNTAX$ - * - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * INVERTWIN() is compatible with CT3's INVERTWIN(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is color.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( INVERTWIN ) { int iTop, iLeft, iBottom, iRight; @@ -411,55 +288,6 @@ HB_FUNC( INVERTWIN ) hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * UNTEXTWIN() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * $SYNTAX$ - * UNTEXTWIN(, , , , - * , - * [], - * []) --> cNull - * $ARGUMENTS$ - * Designates the line for the upper-left corner of the - * area. - * Designates the column for the upper-left corner of - * the area. - * Designates the line for the bottom-right corner of - * the area. - * Designates the line for the bottom-right column of - * the area. - * Replaces each - * character within the window, with the exception of those within the - * range of and - * . - * Designates the beginning of - * the bracketed area. The character can be number in the range of 0 to - * 255, or the character string type. The default value is 176. - * Designates the end of the bracketed - * area. The character can be number in the range of 0 to 255 or the - * character string type. The default value is 223. - * $RETURNS$ - * Returns a null string. - * $DESCRIPTION$ - * Replaces an area of characters from a region of the screen - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is screen1.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( UNTEXTWIN ) { int iTop, iLeft, iBottom, iRight; @@ -507,44 +335,6 @@ HB_FUNC( UNTEXTWIN ) hb_retc_null(); } -/* $DOC$ - * $FUNCNAME$ - * CHARWIN() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * $SYNTAX$ - * CHARWIN (, , , , [], - * []) --> - * $ARGUMENTS$ - * - top row number, default 0 - * - left column number, default 0 - * - top row number, default MaxRow() - * - right column number, default MaxCol() - * - new character for the screen area, - * as a numeric value in the range of 0 to - * 255 or as a character string, default value is the CLEARB. - * - character to exchange. Specify the parameter - * as a numeric in the range of 0 to 255 - * or as a character string. The default is to exchange all characters. - * $RETURNS$ - * Returns an empty string. - * $DESCRIPTION$ - * Exchanges particular characters in a screen area. - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is screen1.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( CHARWIN ) { int iTop, iLeft, iBottom, iRight; @@ -586,47 +376,6 @@ HB_FUNC( CHARWIN ) hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * COLORWIN() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * $SYNTAX$ - * COLORWIN([], [], [], [], - * [], []) --> cNull - * $ARGUMENTS$ - * Designates the topmost line to begin processing. The - * default is the cursor line. - * Designates the leftmost column to begin processing. The - * default is the cursor column. - * Designates the bottommost line that is processed. - * The default is the last screen line or window line. - * Designates the rightmost column to clear. The default - * is the right screen border or window border. - * Designates the new attribute to replace the old - * one. The default is the standard attribute CLEARA. - * Designates the old character to exchange. The - * default is "exchange all attributes". - * $RETURNS$ - * Returns an empty string. - * $DESCRIPTION$ - * Exchanges particular attributes in a screen area - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is screen1.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( COLORWIN ) { int iTop, iLeft, iBottom, iRight; @@ -666,38 +415,6 @@ HB_FUNC( COLORWIN ) hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * SCREENTEXT() - * $CATEGORY$ - * CT video functions (Harbour extension) - * $ONELINER$ - * $SYNTAX$ - * SCREENTEXT(, , , ) - * $ARGUMENTS$ - * - top row number, default 0 - * - left column number, default 0 - * - top row number, default MaxRow() - * - right column number, default MaxCol() - * $RETURNS$ - * Returns string with characters taken from given screen region. - * $DESCRIPTION$ - * Returns string with characters taken from given screen region. - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is screen1.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( SCREENTEXT ) { int iTop, iLeft, iBottom, iRight; @@ -728,37 +445,6 @@ HB_FUNC( SCREENTEXT ) hb_retc_null(); } -/* $DOC$ - * $FUNCNAME$ - * COLORREPL() - * $CATEGORY$ - * CT3 video functions - * $ONELINER$ - * $SYNTAX$ - * COLORREPL([], []) --> cNull - * $ARGUMENTS$ - * Designates the new attribute. The default is - * CLEARA. - * Designates the old attribute to exchange. The - * default is all existing attributes. - * $RETURNS$ - * Returns an empty string. - * $DESCRIPTION$ - * Exchanges particular screen attributes - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * $PLATFORMS$ - * All - * $FILES$ - * Source is screen1.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( COLORREPL ) { int iMaxRow = hb_gtMaxRow(); diff --git a/harbour/contrib/hbct/setlast.c b/harbour/contrib/hbct/setlast.c index 930d0f588b..f86db10ff7 100644 --- a/harbour/contrib/hbct/setlast.c +++ b/harbour/contrib/hbct/setlast.c @@ -50,7 +50,6 @@ * */ - #include "hbapigt.h" HB_FUNC( SETLASTKEY ) diff --git a/harbour/contrib/hbct/strdiff.c b/harbour/contrib/hbct/strdiff.c index 96fbc547ed..a19cc098bf 100644 --- a/harbour/contrib/hbct/strdiff.c +++ b/harbour/contrib/hbct/strdiff.c @@ -52,79 +52,9 @@ * */ - #include "ct.h" #include - -/* $DOC$ - * $FUNCNAME$ - * STRDIFF() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Evaluate the "Edit (Levensthein) Distance" of two strings - * $SYNTAX$ - * STRDIFF (, , [], [], - * []) -> - * $ARGUMENTS$ - * string at the "starting point" of the transformation process, default is "" - * string at the "end point" of the transformation process, default is "" - * penalty points for a replacement of one character, default is 3 - * penalty points for a deletion of one character, default is 6 - * penalty points for an insertion of one character, default is 1 - * $RETURNS$ - * penalty point sum of all operations needed to transform to - * $DESCRIPTION$ - * The STRDIFF() functions calculates the so called "Edit" or "Levensthein" distance of two strings. - * This distance is a measure for the number of single character replace/insert/delete operations (so called - * "point mutations") required to transform into and its value will be the smallest sum of - * the penalty points of the required operations. - * - * Be aware that this function is both quite time - O(len(cString1)*len(cString2)) - and memory consuming - - * O((len(cString1)+1)*(len(cString2)+1)*sizeof(int)) - so keep the strings as short as possible. - * E.g., on common 32 bit systems (sizeof(int) == 4), calling strdiff() with two strings of 1024 bytes - * in length will consume 4 MB of memory. To not impose unneeded restrictions, the function will only check if - * (len(cString1)+1)*(len(cString2)+1)*sizeof(int) <= UINT_MAX, although allocing UINT_MAX bytes will not - * work on most systems. If this simple check fails, -1 is returned. - * - * Also, be aware that there can be an overflow when the penalty points are summed up: Assuming that the - * number of transformation operations is in the order of max(len(cString1),len(cString2)), the penalty point - * sum, that is internally stored in an "int" variable, is in the order of - * (max(len(cString1),len(cString2))*max(nReplacementPenalty,nDeletionPenalty,nInsertionPentaly). - * The STRDIFF() does not do an overflow check due to time performance reasons. Future versions of STRDIFF() - * could use a type different to "int" to store the penalty point sum to save memory or to avoid overflows. - * - * The function is aware of the settings done by SETATLIKE(), that means that the wildchar character - * is considered equal to ALL characters. - * - * $EXAMPLES$ - * ? strdiff("ABC", "ADC") // 3, one character replaced - * ? strdiff("ABC", "AEC") // 3, dito - * ? strdiff("CBA", "ABC") // 6, two characters replaced - * ? strdiff("ABC", "AXBC") // 1, one character inserted - * ? strdiff("AXBC", "ABC") // 6, one character removed - * ? strdiff("AXBC", "ADC") // 9, one character removed and one replaced - * $TESTS$ - * strdiff("ABC", "ADC") == 3 - * strdiff("ABC", "AEC") == 3 - * strdiff("CBA", "ABC") == 6 - * strdiff("ABC", "AXBC") == 1 - * strdiff("AXBC", "ABC") == 6 - * strdiff("AXBC", "ADC") == 9 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * STRDIFF() is compatible with CT3's STRDIFF(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is strdiff.c, library is libct. - * $SEEALSO$ - * SETATLIKE() - * $END$ - */ - #define MATRIXELEMENT(__row,__col) *(piPenalty+((__row)*(sStrLen2+1))+(__col)) static int min3( int a, int b, int c ) diff --git a/harbour/contrib/hbct/strswap.c b/harbour/contrib/hbct/strswap.c index a5d2b04836..0b7bc6bd8c 100644 --- a/harbour/contrib/hbct/strswap.c +++ b/harbour/contrib/hbct/strswap.c @@ -52,37 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * STRSWAP() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Swap the contents of two strings - * $SYNTAX$ - * STRSWAP (<[@]cString1>, <[@]cString2>) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * STRSWAP() is compatible with CT3's STRSWAP(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is strswap.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( STRSWAP ) { HB_SIZE sStrLen1, sStrLen2; diff --git a/harbour/contrib/hbct/tab.c b/harbour/contrib/hbct/tab.c index 41692472dd..4cce7542bf 100644 --- a/harbour/contrib/hbct/tab.c +++ b/harbour/contrib/hbct/tab.c @@ -52,60 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * TABEXPAND() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Replace tabulator control characters with fill characters - * $SYNTAX$ - * TABEXPAND (, [], [], - * [], [], - * []) -> cExpandedString - * $ARGUMENTS$ - * - * - * - * string indicating new line, - * default is the string returned by - * hb_osnewline() - * character indicating a tab stop, - * default is chr(9) - * .T., if the soft-CR used by MEMOEDIT() - * should be ignored as a newline indicator, - * default is .F. (functions uses chr(141)) - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * tabexpand("-"+chr(9)+"!") == "- !" - * tabexpand("----"+chr(9) +"!") == "---- !" - * tabexpand("-"+chr(9)+"!",, "+") == "-+++++++!" - * tabexpand("-"+chr(9)+ "!", 4) == "- !" - * tabexpand("----"+chr(9)+ "!", 8) == "---- !" - * tabexpand("----"+chr(9)+ "!", 8, "+") == "----++++!" - * tabexpand("-"+chr(9)+"!"+hb_osnewline()+"----"+chr(9)+ "!",, "+") == "-+++++++!"+hb_osnewline()+"----++++!" - * $STATUS$ - * Started - * $COMPLIANCE$ - * TABEXPAND() is compatible with CT3's TABEXPAND(), but there are - * three new parameters for a better fine control of the function's - * behaviour. - * $PLATFORMS$ - * All - * $FILES$ - * Source is tab.c, library is libct. - * $SEEALSO$ - * TABPACK() - * $END$ - */ - HB_FUNC( TABEXPAND ) { if( HB_ISCHAR( 1 ) ) @@ -263,50 +211,6 @@ HB_FUNC( TABEXPAND ) } } - -/* $DOC$ - * $FUNCNAME$ - * TABPACK() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Pack fill characters to appropriate tab characters - * $SYNTAX$ - * TABPACK (, [], [], - * [], [], - * []) -> cPackedString - * $ARGUMENTS$ - * - * - * - * string indicating new line, - * default is the string returned by - * hb_osnewline() - * character indicating a tab stop, - * default is chr(9) - * .T., if the soft-CR used by MEMOEDIT() - * should be ignored as a newline indicator, - * default is .F. (functions uses chr(141)) - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * TABPACK() is compatible with CT3's TABPACK(), but there are - * three new parameters for a better fine control of the function's - * behaviour. - * $PLATFORMS$ - * All - * $FILES$ - * Source is tab.c, library is libct. - * $SEEALSO$ - * TABEXPAND() - * $END$ - */ - HB_FUNC( TABPACK ) { if( HB_ISCHAR( 1 ) ) diff --git a/harbour/contrib/hbct/token1.c b/harbour/contrib/hbct/token1.c index 5af7163b7c..356002d584 100644 --- a/harbour/contrib/hbct/token1.c +++ b/harbour/contrib/hbct/token1.c @@ -58,10 +58,8 @@ * */ - #include "ct.h" - /* static const data */ static const char *s_pcSeparatorStr = "\x00" "\x09" "\x0A" "\x0C" "\x1A" "\x20" "\x8A" "\x8C" ",.;:!\?/\\<>()#&%+-*"; @@ -436,358 +434,31 @@ static void do_token1( int iSwitch ) } } - -/* $DOC$ - * $FUNCNAME$ - * ATTOKEN() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Position of a token in a string - * $SYNTAX$ - * ATTOKEN (, [], - * [], []) -> nPosition - * $ARGUMENTS$ - * is the processed string - * [] is a list of characters separating the tokens - * in - * Default: chr(0)+chr(9)+chr(10)+chr(13)+chr(26)+ - * chr(32)+chr(32)+chr(138)+chr(141)+ - * ",.;:!\?/\\<>()#&%+-*" - * [] specifies the count of the token whose - * position should be calculated - * Default: last token - * [] specifies the maximum number of successive - * tokenizing characters that are combined as - * ONE token stop, e.g. specifying 1 can - * yield to empty tokens - * Default: 0, any number of successive tokenizing - * characters are combined as ONE token stop - * $RETURNS$ - * The start position of the specified token or - * 0 if such a token does not exist in . - * $DESCRIPTION$ - * The ATTOKEN() function calculates the start position of tne - * th token in . By setting the new - * parameter to a value different than 0, you can specify how many tokenizing - * characters are combined at most to one token stop. Be aware that - * this can result to empty tokens there the start position is not - * defined clearly. Then, ATTOKEN() returns the position there the - * token WOULD start if its length is larger than 0. To check for - * empty tokens, simply look if the character at the returned position - * is within the tokenizer list. - * $EXAMPLES$ - * attoken ("Hello, World!") --> 8 // empty strings after tokenizer - * // are not a token ! - * $TESTS$ - * attoken ("Hello, World!") == 8 - * attoken ("Hello, World!",,2) == 8 - * attoken ("Hello, World!",,2,1) == 7 - * attoken ("Hello, World!"," ",2,1) == 8 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * ATTOKEN() is compatible with CT3's ATTOKEN, but has an additional - * 4th parameter to let you specify a skip width equal to that in the - * TOKEN() function. - * $PLATFORMS$ - * All - * $FILES$ - * Source is token1.c, library is libct. - * $SEEALSO$ - * TOKEN(),NUMTOKEN(),TOKENLOWER(),TOKENUPPER(),TOKENSEP() - * $END$ - */ - HB_FUNC( ATTOKEN ) { do_token1( DO_TOKEN1_ATTOKEN ); } - -/* $DOC$ - * $FUNCNAME$ - * TOKEN() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Tokens of a string - * $SYNTAX$ - * TOKEN (, [], - * [], - * [<@cPreTokenSep>], [<@cPostTokenSep>]) -> cToken - * $ARGUMENTS$ - * is the processed string - * [] is a list of characters separating the tokens - * in - * Default: chr(0)+chr(9)+chr(10)+chr(13)+chr(26)+ - * chr(32)+chr(32)+chr(138)+chr(141)+ - * ",.;:!\?/\\<>()#&%+-*" - * [] specifies the count of the token that - * should be extracted - * Default: last token - * [] specifies the maximum number of successive - * tokenizing characters that are combined as - * ONE token stop, e.g. specifying 1 can - * yield to empty token - * Default: 0, any number of successive tokenizing - * characters are combined as ONE token stop - * [<@cPreTokenSep>] If given by reference, the tokenizer before - * the actual token will be stored - * [<@cPostTokenSep>] If given by reference, the tokenizer after - * the actual token will be stored - * $RETURNS$ - * the token specified by the parameters given above - * $DESCRIPTION$ - * The TOKEN() function extracts the th token from the - * string . In the course of this, the tokens in the - * string are separated by the character(s) specified in . - * The function may also extract empty tokens, if you specify a skip - * width other than zero. - * Be aware of the new 5th and 6th parameter there the TOKEN() function - * stores the tokenizing character before and after the extracted token. - * Therefore, additional calls to the TOKENSEP() function are not - * necessary. - * $EXAMPLES$ - * ? token ("Hello, World!") --> "World" - * ? token ("Hello, World!",,2,1) --> "" - * ? token ("Hello, World!",",",2,1) --> " World!" - * ? token ("Hello, World!"," ",2,1) --> "World!" - * $TESTS$ - * token ("Hello, World!") == "World" - * token ("Hello, World!",,2,1) == "" - * token ("Hello, World!",",",2,1) == " World!" - * token ("Hello, World!"," ",2,1) == "World!" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TOKEN() is compatible with CT3's TOKEN, but two additional - * parameters have been added there the TOKEN() function can store - * the tokenizers before and after the current token. - * $PLATFORMS$ - * All - * $FILES$ - * Source is token1.c, library is libct. - * $SEEALSO$ - * NUMTOKEN(),ATTOKEN(),TOKENLOWER(),TOKENUPPER(),TOKENSEP() - * $END$ - */ - HB_FUNC( TOKEN ) { do_token1( DO_TOKEN1_TOKEN ); } - -/* $DOC$ - * $FUNCNAME$ - * NUMTOKEN() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Retrieves the number of tokens in a string - * $SYNTAX$ - * NUMTOKEN (, [], []) -> nTokenCount - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * $EXAMPLES$ - * $TESTS$ - * numtoken ("Hello, World!") == 2 - * numtoken ("This is good. See you! How do you do?",".!?") == 3 - * numtoken ("one,,three,four,,six",",",1) == 6 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * NUMTOKEN() is compatible with CT3's NUMTOKEN(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is token1.c, library is libct. - * $SEEALSO$ - * TOKEN(),ATTOKEN(),TOKENLOWER(),TOKENUPPER(),TOKENSEP() - * $END$ - */ - HB_FUNC( NUMTOKEN ) { do_token1( DO_TOKEN1_NUMTOKEN ); } -/* $DOC$ - * $FUNCNAME$ - * TOKENLOWER() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Change the first letter of tokens to lower case - * $SYNTAX$ - * TOKENLOWER (<[@]cString>, [], [], - * []) -> cString - * $ARGUMENTS$ - * <[@]cString> is the processed string - * [] is a list of characters separating the tokens - * in - * Default: chr(0)+chr(9)+chr(10)+chr(13)+chr(26)+ - * chr(32)+chr(32)+chr(138)+chr(141)+ - * ",.;:!\?/\\<>()#&%+-*" - * [] specifies the number of tokens that - * should be processed - * Default: all tokens - * [] specifies the maximum number of successive - * tokenizing characters that are combined as - * ONE token stop, e.g. specifying 1 can - * yield to empty token - * Default: 0, any number of successive tokenizing - * characters are combined as ONE token stop - * $RETURNS$ - * the string with the lowercased tokens - * $DESCRIPTION$ - * The TOKENLOWER() function changes the first letter of tokens in - * to lower case. To do this, it uses the same tokenizing mechanism - * as the token() function. If TOKENLOWER() extracts a token that starts - * with a letter, this letter will be changed to lower case. - * You can omit the return value of this function by setting the CSETREF() - * switch to .T., but you must then pass by reference to get - * the result. - * $EXAMPLES$ - * ? tokenlower("Hello, World, here I am!") // "hello, world, here i am!" - * ? tokenlower("Hello, World, here I am!",,3) // "hello, world, here I am!" - * ? tokenlower("Hello, World, here I am!",",",3) // "hello, World, here I am!" - * ? tokenlower("Hello, World, here I am!"," W") // "hello, World, here i am!" - * $TESTS$ - * tokenlower("Hello, World, here I am!") == "hello, world, here i am!" - * tokenlower("Hello, World, here I am!",,3) == "hello, world, here I am!" - * tokenlower("Hello, World, here I am!",",",3) == "hello, World, here I am!" - * tokenlower("Hello, World, here I am!"," W") == "hello, World, here i am!" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TOKENLOWER() is compatible with CT3's TOKENLOWER(), - * but a new 4th parameter, has been added for - * synchronization with the the other token functions. - * $PLATFORMS$ - * All - * $FILES$ - * Source is token1.c, library is libct. - * $SEEALSO$ - * TOKEN(),NUMTOKEN(),ATTOKEN(),TOKENUPPER(),TOKENSEP(),CSETREF() - * $END$ - */ - HB_FUNC( TOKENLOWER ) { do_token1( DO_TOKEN1_TOKENLOWER ); } - -/* $DOC$ - * $FUNCNAME$ - * TOKENUPPER() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Change the first letter of tokens to upper case - * $SYNTAX$ - * TOKENUPPER (<[@]cString>, [], [], - * []) -> cString - * $ARGUMENTS$ - * <[@]cString> is the processed string - * [] is a list of characters separating the tokens - * in - * Default: chr(0)+chr(9)+chr(10)+chr(13)+chr(26)+ - * chr(32)+chr(32)+chr(138)+chr(141)+ - * ",.;:!\?/\\<>()#&%+-*" - * [] specifies the number of tokens that - * should be processed - * Default: all tokens - * [] specifies the maximum number of successive - * tokenizing characters that are combined as - * ONE token stop, e.g. specifying 1 can - * yield to empty token - * Default: 0, any number of successive tokenizing - * characters are combined as ONE token stop - * $RETURNS$ - * the string with the uppercased tokens - * $DESCRIPTION$ - * The TOKENUPPER() function changes the first letter of tokens in - * to upper case. To do this, it uses the same tokenizing mechanism - * as the token() function. If TOKENUPPER() extracts a token that starts - * with a letter, this letter will be changed to upper case. - * You can omit the return value of this function by setting the CSETREF() - * switch to .T., but you must then pass by reference to get - * the result. - * $EXAMPLES$ - * ? tokenupper("Hello, world, here I am!") // "Hello, World, Here I Am!" - * ? tokenupper("Hello, world, here I am!",,3) // "Hello, World, Here I am!" - * ? tokenupper("Hello, world, here I am!",",",3) // "Hello, world, here I am!" - * ? tokenupper("Hello, world, here I am!"," w") // "Hello, wOrld, Here I Am!" - * $TESTS$ - * tokenupper("Hello, world, here I am!") == "Hello, World, Here I Am!" - * tokenupper("Hello, world, here I am!",,3) == "Hello, World, Here I am!" - * tokenupper("Hello, world, here I am!",",",3) == "Hello, world, here I am!" - * tokenupper("Hello, world, here I am!"," w") == "Hello, wOrld, Here I Am!" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TOKENUPPER() is compatible with CT3's TOKENUPPER(), - * but a new 4th parameter, has been added for - * synchronization with the the other token functions. - * $PLATFORMS$ - * All - * $FILES$ - * Source is token1.c, library is libct. - * $SEEALSO$ - * TOKEN(),NUMTOKEN(),ATTOKEN(),TOKENLOWER(),TOKENSEP(),CSETREF() - * $END$ - */ - HB_FUNC( TOKENUPPER ) { do_token1( DO_TOKEN1_TOKENUPPER ); } - -/* $DOC$ - * $FUNCNAME$ - * TOKENSEP() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Retrieves the token separators of the last token() call - * $SYNTAX$ - * TOKENSEP ([]) -> cSeparator - * $ARGUMENTS$ - * [] if set to .T., the token separator BEHIND the token - * retrieved from the token() call will be returned. - * Default: .F., returns the separator BEFORE the token - * $RETURNS$ - * Depending on the setting of , the separating character of the - * the token retrieved from the last token() call will be returned. - * These separating characters can now also be retrieved with the token() - * function. - * $DESCRIPTION$ - * When one does extract tokens from a string with the token() function, - * one might be interested in the separator characters that have been - * used to extract a specific token. To get this information you can - * either use the TOKENSEP() function after each token() call, or - * use the new 5th and 6th parameter of the token() function. - * $EXAMPLES$ - * see TOKEN() function - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TOKENSEP() is compatible with CT3's TOKENSEP(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is token1.c, library is libct. - * $SEEALSO$ - * TOKEN(),NUMTOKEN(),ATTOKEN(),TOKENLOWER(),TOKENUPPER() - * $END$ - */ - HB_FUNC( TOKENSEP ) { char cRet; diff --git a/harbour/contrib/hbct/token2.c b/harbour/contrib/hbct/token2.c index 0b192eb243..e5c2e839c3 100644 --- a/harbour/contrib/hbct/token2.c +++ b/harbour/contrib/hbct/token2.c @@ -60,16 +60,13 @@ * */ - #include "ct.h" #include "hbvm.h" - /* ==================================================================== */ /* static functions for token environment management */ /* ==================================================================== */ - #define TOKEN_ENVIRONMENT_STEP 100 typedef struct _TOKEN_POSITION @@ -80,7 +77,6 @@ typedef struct _TOKEN_POSITION } TOKEN_POSITION; typedef TOKEN_POSITION *TOKEN_ENVIRONMENT; - /* -------------------------------------------------------------------- */ /* alloc new token environment */ /* -------------------------------------------------------------------- */ @@ -283,90 +279,6 @@ static void sTokSet( TOKEN_ENVIRONMENT env ) s_sTokenEnvironment = env; } - -/* $DOC$ - * $FUNCNAME$ - * TOKENINIT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Initializes a token environment - * $SYNTAX$ - * TOKENINIT (<[@]cString>], [], [], - * [<@cTokenEnvironment>]) -> lState - * $ARGUMENTS$ - * <[@]cString> is the processed string - * is a list of characters separating the tokens - * in - * Default: chr(0)+chr(9)+chr(10)+chr(13)+chr(26)+ - * chr(32)+chr(32)+chr(138)+chr(141)+ - * ",.;:!\?/\\<>()#&%+-*" - * specifies the maximum number of successive - * tokenizing characters that are combined as - * ONE token stop, e.g. specifying 1 can - * yield to empty token - * Default: 0, any number of successive tokenizing - * characters are combined as ONE token stop - * <@cTokenEnvironment> is a token environment stored in a binary - * encoded string - * $RETURNS$ - * success of the initialization - * $DESCRIPTION$ - * The TOKENINIT() function initializes a token environment. A token - * environment is the information about how a string is to be tokenized. - * This information is created in the process of tokenization of the - * string - equal to the one used in the TOKEN() function - * with the help of the and parameters. - * - * This token environment can be very useful when large strings have - * to be tokenized since the tokenization has to take place only once - * whereas the TOKEN() function must always start the tokenizing process - * from scratch. - * - * Unlike CTIII, this function provides two mechanisms of storing the - * resulting token environment. If a variable is passed by reference - * as 4th parameter, the token environment is stored in this variable, - * otherwise the global token environment is used. Do not modify the - * token environment string directly ! - * - * Additionally, a counter is stored in the token environment, so that - * the tokens can successivly be obtained. This counter is first set to 1. - * When the TOKENINIT() function is called without a string a tokenize, - * the counter of either the global environment or the environment given - * by reference in the 4th parameter is rewind to 1. - * - * Additionally, unlike CTIII, tokeninit() does not need the string - * to be passed by reference, since one must provide the - * string in calls to TOKENNEXT() again. - * $EXAMPLES$ - * tokeninit (cString) // tokenize the string with default - * // rules and store the token environment globally - * // and eventually delete an old global TE - * tokeninit (@cString) // no difference in result, but eventually faster, - * // since the string must not be copied - * tokeninit() // rewind counter of global TE to 1 - * tokeninit ("1,2,3",",",1) // tokenize constant string, store in global TE - * tokeninit (cString,,1,@cTE1) // tokenize cString and store TE in - * // cTE1 only without overriding global TE - * tokeninit (cString,,1,cTE1) // tokenize cString and store TE in - * // GLOBAL TE since 4th parameter is - * // not given by reference !!! - * tokeninit (,,,@cTE1) // set counter in TE stored in cTE1 to 1 - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TOKENINIT() is compatible with CTIII's TOKENINIT(), - * but there is an additional parameter featuring local token environments. - * $PLATFORMS$ - * All - * $FILES$ - * Source is token2.c, library is libct. - * $SEEALSO$ - * TOKEN(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND() - * $END$ - */ - HB_FUNC( TOKENINIT ) { if( HB_ISCHAR( 1 ) ) @@ -514,65 +426,6 @@ HB_FUNC( TOKENINIT ) } } - -/* $DOC$ - * $FUNCNAME$ - * TOKENNEXT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Successivly obtains tokens from a string - * $SYNTAX$ - * TOKENNEXT (<[@]cString>, [], - * [<@cTokenEnvironment>]) -> cToken - * $ARGUMENTS$ - * <[@]cString> the processed string - * a token number - * <@cTokenEnvironment> a token environment - * $RETURNS$ - * a token from - * $DESCRIPTION$ - * With TOKENNEXT(), the tokens determined with the TOKENINIT() functions - * can be retrieved. To do this, TOKENNEXT() uses the information stored - * in either the global token environment or the local one supplied by - * . Note that, is supplied, this 3rd parameter has - * always to be passed by reference. - * - * If the 2nd parameter, is given, TOKENNEXT() simply returns - * the th token without manipulating the TE counter. Otherwise - * the token pointed to by the TE counter is returned and the counter - * is incremented by one. Like this, a simple loop with TOKENEND() can - * be used to retrieve all tokens of a string successivly. - * - * Note that does not have to be the same used in TOKENINIT(), - * so that one can do a "correlational tokenization", i.e. tokenize a string - * as if it was another! E.G. using TOKENINIT() with the string - * "AA,BBB" but calling TOKENNEXT() with "CCCEE" would - * give first "CC" and then "EE" (because "CCCEE" is not long enough). - * $EXAMPLES$ - * // default behavhiour - * tokeninit (cString) // initialize a TE - * do while (!tokenend()) - * ? tokennext (cString) // get all tokens successivly - * enddo - * ? tokennext (cString, 3) // get the 3rd token, counter will remain the same - * tokenexit() // free the memory used for the global TE - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TOKENNEXT() is compatible with CTIII's TOKENNEXT(), - * but there are two additional parameters featuring local token - * environments and optional access to tokens. - * $PLATFORMS$ - * All - * $FILES$ - * Source is token2.c, library is libct. - * $SEEALSO$ - * TOKENINIT(),TOKENEXIT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND() - * $END$ - */ - HB_FUNC( TOKENNEXT ) { if( HB_ISCHAR( 1 ) ) @@ -687,43 +540,6 @@ HB_FUNC( TOKENNEXT ) } } - -/* $DOC$ - * $FUNCNAME$ - * TOKENNUM() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Get the total number of tokens in a token environment - * $SYNTAX$ - * TOKENNUM ([<@cTokenEnvironment>]) -> nNumberofTokens - * $ARGUMENTS$ - * <@cTokenEnvironment> a token environment - * $RETURNS$ - * number of tokens in the token environment - * $DESCRIPTION$ - * The TOKENNUM() function can be used to retrieve the total number - * of tokens in a token environment. - * If the parameter <@cTokenEnvironment> is supplied (must be by - * reference), the information from this token environment is used, - * otherwise the global TE is used. - * $EXAMPLES$ - * tokeninit ("a.b.c.d", ".", 1) // initialize global TE - * ? tokennum() // --> 4 - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TOKENNUM() is a new function in Harbour's CTIII library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is token2.c, library is libct. - * $SEEALSO$ - * TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND() - * $END$ - */ - HB_FUNC( TOKENNUM ) { TOKEN_ENVIRONMENT sTokenEnvironment; @@ -753,50 +569,6 @@ HB_FUNC( TOKENNUM ) } } - -/* $DOC$ - * $FUNCNAME$ - * TOKENEND() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Check whether additional tokens are available with TOKENNEXT() - * $SYNTAX$ - * TOKENEND ([<@cTokenEnvironment>]) -> lTokenEnd - * $ARGUMENTS$ - * <@cTokenEnvironment> a token environment - * $RETURNS$ - * .T., if additional tokens are available - * $DESCRIPTION$ - * The TOKENEND() function can be used to check whether the next - * call to TOKENNEXT() would return a new token. This can not be - * decided with TOKENNEXT() alone, since an empty token cannot be - * distinguished from a "no more" tokens. - * If the parameter <@cTokenEnvironment> is supplied (must be by - * reference), the information from this token environment is used, - * otherwise the global TE is used. - * With a combination of TOKENEND() and TOKENNEXT(), all tokens from a - * string can be retrieved successivly (see example). - * $EXAMPLES$ - * tokeninit ("a.b.c.d", ".", 1) // initialize global TE - * do while (!tokenend()) - * ? tokennext ("a.b.c.d") // get all tokens successivly - * enddo - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TOKENEND() is compatible with CTIII's TOKENEND(), - * but there are is an additional parameter featuring local token environments. - * $PLATFORMS$ - * All - * $FILES$ - * Source is token2.c, library is libct. - * $SEEALSO$ - * TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN() - * $END$ - */ - HB_FUNC( TOKENEND ) { TOKEN_ENVIRONMENT sTokenEnvironment; @@ -827,45 +599,6 @@ HB_FUNC( TOKENEND ) } } - -/* $DOC$ - * $FUNCNAME$ - * TOKENEXIT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Release global token environment - * $SYNTAX$ - * TOKENEXIT () -> lStaticEnvironmentReleased - * $ARGUMENTS$ - * $RETURNS$ - * .T., if global token environment is successfully released - * $DESCRIPTION$ - * The TOKENEXIT() function releases the memory associated with the - * global token environment. One should use it for every tokeninit() - * using the global TE. Additionally, TOKENEXIT() is implicitly called - * from CTEXIT() to free the memory at library shutdown. - * $EXAMPLES$ - * tokeninit (cString) // initialize a TE - * do while (!tokenend()) - * ? tokennext (cString) // get all tokens successivly - * enddo - * ? tokennext (cString, 3) // get the 3rd token, counter will remain the same - * tokenexit() // free the memory used for the global TE - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TOKENEXIT() is a new function in Harbour's CTIII library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is token2.c, library is libct. - * $SEEALSO$ - * TOKENINIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),RESTTOKEN(),TOKENEND() - * $END$ - */ - HB_FUNC( TOKENEXIT ) { if( s_sTokenEnvironment != NULL ) @@ -877,63 +610,6 @@ HB_FUNC( TOKENEXIT ) hb_retl( HB_FALSE ); } - -/* $DOC$ - * $FUNCNAME$ - * TOKENAT() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Get start and end positions of tokens in a token environment - * $SYNTAX$ - * TOKENAT ([], [], - * [<@cTokenEnvironment>]) -> nPosition - * $ARGUMENTS$ - * .T., if TOKENAT() should return - * the position of the separator character - * BEHIND the token. - * Default: .F., return start position of a token. - * a token number - * <@cTokenEnvironment> a token environment - * $RETURNS$ - * - * $DESCRIPTION$ - * The TOKENAT() function is used to retrieve the start and end position - * of the tokens in a token environment. Note however that the position of - * last character of a token is given by tokenat (.T.)-1 !! - * - * If the 2nd parameter, is given, TOKENAT() returns the - * positions of the th token. Otherwise - * the token pointed to by the TE counter, i.e. the token that will - * be retrieved by TOKENNEXT() _NEXT_ is used. - * - * If the parameter <@cTokenEnvironment> is supplied (must be by - * reference), the information from this token environment is used, - * otherwise the global TE is used. - * $EXAMPLES$ - * $TESTS$ - * tokeninit (cString) // initialize a TE - * do while (!tokenend()) - * ? "From", tokenat(), "to", tokenat(.T.)-1 - * ? tokennext (cString) // get all tokens successivly - * enddo - * ? tokennext (cString, 3) // get the 3rd token, counter will remain the same - * tokenexit() // free the memory used for the global TE - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TOKENAT() is compatible with CTIII's TOKENAT(), - * but there are two additional parameters featuring local token - * environments and optional access to tokens. - * $PLATFORMS$ - * All - * $FILES$ - * Source is token2.c, library is libct. - * $SEEALSO$ - * TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),SAVETOKEN(),RESTTOKEN(),TOKENEND() - * $END$ - */ - HB_FUNC( TOKENAT ) { int iSeparatorPos = 0; @@ -987,39 +663,6 @@ HB_FUNC( TOKENAT ) hb_retns( psTokenPosition->sStartPos + 1 ); } - -/* $DOC$ - * $FUNCNAME$ - * SAVETOKEN() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Save the global token environment - * $SYNTAX$ - * SAVETOKEN () -> cStaticTokenEnvironment - * $ARGUMENTS$ - * $RETURNS$ - * a binary string encoding the global TE - * $DESCRIPTION$ - * The SAVETOKEN() function can be used to store the global TE for future - * use or when two or more incremental tokenizers must the nested. - * Note however that the latter can now be solved with locally stored - * token environments. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * SAVETOKEN() is compatible with CTIII's SAVETOKEN(), - * $PLATFORMS$ - * All - * $FILES$ - * Source is token2.c, library is libct. - * $SEEALSO$ - * TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),RESTTOKEN(),TOKENEND() - * $END$ - */ - HB_FUNC( SAVETOKEN ) { if( s_sTokenEnvironment != NULL ) @@ -1028,40 +671,6 @@ HB_FUNC( SAVETOKEN ) hb_retc_null(); } - -/* $DOC$ - * $FUNCNAME$ - * RESTTOKEN() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Restore global token environment - * $SYNTAX$ - * RESTTOKEN () -> cOldStaticEnvironment - * $ARGUMENTS$ - * a binary string encoding a TE - * $RETURNS$ - * a string encoding the old global TE - * $DESCRIPTION$ - * The RESTTOKEN() function restores the global TE to the one encoded - * in . This can either be the return value - * of SAVETOKEN() or the value stored in the 4th parameter in a - * TOKENINIT() call. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * RESTTOKEN() is compatible with CTIII's RESTTOKEN(), - * $PLATFORMS$ - * All - * $FILES$ - * Source is token2.c, library is libct. - * $SEEALSO$ - * TOKENINIT(),TOKENEXIT(),TOKENNEXT(),TOKENNUM(),TOKENAT(),SAVETOKEN(),TOKENEND() - * $END$ - */ - HB_FUNC( RESTTOKEN ) { TOKEN_ENVIRONMENT sTokenEnvironment = NULL; diff --git a/harbour/contrib/hbct/trig.c b/harbour/contrib/hbct/trig.c index a4fe6373b5..d908635540 100644 --- a/harbour/contrib/hbct/trig.c +++ b/harbour/contrib/hbct/trig.c @@ -74,88 +74,11 @@ #include "ctmath.h" #include "hbmather.h" - -/* $DOC$ - * $FUNCNAME$ - * PI() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Returns Pi, the perimeter-to-diameter-ratio of a circle - * $SYNTAX$ - * PI () -> nPi - * $ARGUMENTS$ - * $RETURNS$ - * the math constant Pi with maximum precision available - * $DESCRIPTION$ - * The function PI() can be used if the constant Pi is needed - * with maximum precision. One of the most known interpretations of this - * number is the constant perimeter-to-diameter-ratio of circles. - * $EXAMPLES$ - * // the diameter of a circle-like swimming pool is 3.4 meters, how - * // long is the perimeter ? - * - * ? str(PI()*3.4,5,3)+" meters" --> 10.681 meters - * $TESTS$ - * $STATUS$ - * Ready - * $COMPLIANCE$ - * PI() is compatible with CT3's PI(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR() - * $END$ - */ - HB_FUNC( PI ) { hb_retnd( CT_PI ); } - -/* $DOC$ - * $FUNCNAME$ - * SIN() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Sine of the argument - * $SYNTAX$ - * SIN (nRadiant) -> nSine - * $ARGUMENTS$ - * an angle size given in radiants - * $RETURNS$ - * the sine of - * $DESCRIPTION$ - * The function SIN() calculates the sine of an angle whose size is - * given in radiants (full angle equals 2*Pi - see DTOR() for angle size - * given in degress). - * A common geometric interpretation of the SIN() function is the - * counterkathede-hypotenuse-ratio of a right-angled triangle. - * $EXAMPLES$ - * ? sin (0.0) --> 0.0 - * ? sin (1.0) --> 0.8414... - * $TESTS$ - * sin (0.0) == 0.0 - * sin (PI()/4) == sqrt(1/2) - * sin (PI()/2) == 1.0 - * sin (PI()) == 0.0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * SIN() is compatible with CT3's SIN(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() - * $END$ - */ - HB_FUNC( SIN ) { if( HB_ISNUM( 1 ) ) @@ -193,47 +116,6 @@ HB_FUNC( SIN ) } } - -/* $DOC$ - * $FUNCNAME$ - * COS() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Cosine of the argument - * $SYNTAX$ - * COS (nRadiant) -> nCosine - * $ARGUMENTS$ - * an angle size given in radiants - * $RETURNS$ - * the cosine of - * $DESCRIPTION$ - * The function COS() calculates the cosine of an angle whose size is - * given in radiants (full angle equals 2*Pi - see DTOR() for angle size - * given in degress). - * A common geometric interpretation of the COS() function is the - * ankathede-hypotenuse-ratio of a right-angled triangle. - * $EXAMPLES$ - * ? cos (0.0) --> 1.0 - * ? cos (1.0) --> 0.5403... - * $TESTS$ - * cos (0.0) == 1.0 - * cos (PI()/4) == sqrt(1/2) - * cos (PI()/2) == 0.0 - * cos (PI()) == -1.0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * COS() is compatible with CT3's COS(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() - * $END$ - */ - HB_FUNC( COS ) { if( HB_ISNUM( 1 ) ) @@ -271,47 +153,6 @@ HB_FUNC( COS ) } } - -/* $DOC$ - * $FUNCNAME$ - * TAN() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Tangent of the argument - * $SYNTAX$ - * TAN (nRadiant) -> nTangent - * $ARGUMENTS$ - * an angle size given in radiants - * $RETURNS$ - * the tangent of - * $DESCRIPTION$ - * The function TAN() calculates the tangent of an angle whose size is - * given in radiants (full angle equals 2*Pi - see DTOR() for angle size - * given in degress). - * A common geometric interpretation of the TAN() function is the - * counterkathede-ankathede-ratio of a right-angled triangle, or, - * tan(x) = sin(x)/cos(x). - * $EXAMPLES$ - * ? tan (0.0) --> 0.0 - * ? tan (1.0) --> 1.5574... - * $TESTS$ - * tan (0.0) == 0.0 - * tan (PI()/4) == 1 - * tan (PI()) == 0.0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TAN() is compatible with CT3's TAN(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() - * $END$ - */ - HB_FUNC( TAN ) { if( HB_ISNUM( 1 ) ) @@ -349,45 +190,6 @@ HB_FUNC( TAN ) } } - -/* $DOC$ - * $FUNCNAME$ - * COT() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Cotangent of the argument - * $SYNTAX$ - * COT (nRadiant) -> nCotangent - * $ARGUMENTS$ - * an angle size given in radiants - * $RETURNS$ - * the cotangent of - * $DESCRIPTION$ - * The function COT() calculates the cotangent of an angle whose size is - * given in radiants (full angle equals 2*Pi - see DTOR() for angle size - * given in degress). - * A common geometric interpretation of the COT() function is the - * ankathede-counterkathede-ratio of a right-angled triangle, or, - * cot(x) = cos(x)/sin(x)=1/tan(x). - * $EXAMPLES$ - * ? cot (1.0) --> 0.6420... - * $TESTS$ - * cot (PI()/4) == 1 - * cot (PI()/2) == 0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * COT() is compatible with CT3's COT(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),TAN(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() - * $END$ - */ - HB_FUNC( COT ) { if( HB_ISNUM( 1 ) ) @@ -422,48 +224,6 @@ HB_FUNC( COT ) } } - -/* $DOC$ - * $FUNCNAME$ - * ASIN() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Arcus sine of the argument - * $SYNTAX$ - * ASIN (nSine) -> nRadiant - * $ARGUMENTS$ - * the sine of an angle - * $RETURNS$ - * the angle whose sine is - * $DESCRIPTION$ - * The function ASIN() is the inverse function of SIN(). It takes a - * sine value and returns the smallest(!) angle whose sine equals to the argument. - * The return value is given in radiants (full angle equals 2*Pi - - * see DTOR() if you need to convert it into degress). - * Note, that must be between -1 and 1 and that - * is always between -PI()/2 and PI()/2. - * $EXAMPLES$ - * ? asin (0.0) --> 0.0 - * ? asin (0.5) --> 0.5235... - * $TESTS$ - * asin (0.0) == 0.0 - * asin (sqrt(1/2)) == PI()/4 - * asin (1.0) == PI()/2 - * asin (0.0) == 0.0 // and not PI(), since the smallest angle is returned ! - * $STATUS$ - * Ready - * $COMPLIANCE$ - * ASIN() is compatible with CT3's ASIN(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),TAN(),COT(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() - * $END$ - */ - HB_FUNC( ASIN ) { if( HB_ISNUM( 1 ) ) @@ -501,49 +261,6 @@ HB_FUNC( ASIN ) } } - -/* $DOC$ - * $FUNCNAME$ - * ACOS() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Arcus cosine of the argument - * $SYNTAX$ - * ACOS (nCosine) -> nRadiant - * $ARGUMENTS$ - * the cosine of an angle - * $RETURNS$ - * the angle whose cosine is - * $DESCRIPTION$ - * The function ACOS() is the inverse function of COS(). It takes a - * cosine value and returns the smallest(!) angle whose cosine equals to the argument. - * The return value is given in radiants (full angle equals 2*Pi - - * see DTOR() if you need to convert it into degress). - * Note, that must be between -1 and 1 and that - * is always between 0 and PI(). - * $EXAMPLES$ - * ? acos (0.0) --> PI()/2 - * ? acos (0.5) --> 1.04719... - * $TESTS$ - * acos (0.0) == PI()/2 - * acos (sqrt(1/2)) == PI()/4 - * acos (1.0) == 0.0 - * acos (-1.0) == PI() - * acos (0.0) == PI()/2 // and not -PI()/2, although cos (-PI()/2) == 0.0 ! - * $STATUS$ - * Ready - * $COMPLIANCE$ - * ACOS() is compatible with CT3's ACOS(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),TAN(),COT(),ASIN(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() - * $END$ - */ - HB_FUNC( ACOS ) { if( HB_ISNUM( 1 ) ) @@ -581,45 +298,6 @@ HB_FUNC( ACOS ) } } - -/* $DOC$ - * $FUNCNAME$ - * ATAN() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Arcus tangent of the argument - * $SYNTAX$ - * ACOS (nTangent) -> nRadiant - * $ARGUMENTS$ - * the tangent of an angle - * $RETURNS$ - * the angle whose tangent is - * $DESCRIPTION$ - * The function ATAN() is the inverse function of TAN(). It takes a - * tangent value and returns the smallest(!) angle whose tangent equals to the argument. - * The return value is given in radiants between -PI()/2 and PI()/2 - * (full angle equals 2*Pi - see DTOR() if you need to convert it into degress). - * $EXAMPLES$ - * ? atan (0.0) --> 0.0 - * ? atan (0.5) --> 0.4636... - * $TESTS$ - * atan (0.0) == 0.0 - * atan (1.0) == PI()/4 - * atan (0.0) == 0.0 // and not PI(), although tan (PI()) == 0.0 ! - * $STATUS$ - * Ready - * $COMPLIANCE$ - * ATAN() is compatible with CT3's ATAN(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() - * $END$ - */ - HB_FUNC( ATAN ) { if( HB_ISNUM( 1 ) ) @@ -665,52 +343,6 @@ HB_FUNC( ATAN ) } } - -/* $DOC$ - * $FUNCNAME$ - * ATN2() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Arcus tangent a sine and a cosine argument - * $SYNTAX$ - * ATN2 (nSine, nCosine) -> nRadiant - * $ARGUMENTS$ - * the sine of an angle - * the cosine of an angle - * $RETURNS$ - * the angle whose tangent is / - * $DESCRIPTION$ - * The function ATN2() is an alternate function for calculating - * the arcus tangent, atn2(x,y) = atan(x/y). - * It takes two arguments, the sine and the cosine - * of the angle that should be calculated. Thus, in contrast to the ATAN() - * function, ATN2() can distinguish whether the sine or the cosine has - * a negative sign (or both being positive or negative), so that - * the return value can be between -PI() and PI() and covers the full - * angle. - * The return value is given in radiants (full angle equals 2*Pi - - * see DTOR() if you need to convert it into degress). - * $EXAMPLES$ - * ? atn2 (0.0, 1.0) --> 0.0 - * ? atn2 (sqrt(1/2), sqrt(1/2)) --> PI()/4 - * $TESTS$ - * atn2 (0.0, 1.0) == 0.0 - * atn2 (sqrt(1/2),sqrt(1/2)) == PI()/4 - * atn2 (-sqrt(1/2),-sqrt(1/2)) == -3/4*PI() // atan() would return PI()/4 ! - * $STATUS$ - * Ready - * $COMPLIANCE$ - * ATN2() is compatible with CT3's ATN2(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),SINH(),COSH(),TANH(),RTOD(),DTOR(),PI() - * $END$ - */ - HB_FUNC( ATN2 ) { if( HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) @@ -762,46 +394,6 @@ HB_FUNC( ATN2 ) } } - -/* $DOC$ - * $FUNCNAME$ - * SINH() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Hyperbolic Sine of the argument - * $SYNTAX$ - * SINH (nArea) -> nHyperbolicSine - * $ARGUMENTS$ - * the size of the area (see below) - * $RETURNS$ - * the hyperbolic sine of - * $DESCRIPTION$ - * The function SINH() calculates the hyperbolic sine of the argument. - * In analytical mathematics it is defined as 1/2*(exp(nArea)-exp(-nArea)). - * A common geometric interpretation of the SINH() function is the - * maximum y value of the points in the area with the given size , - * that is bound by the x axis, a straight line through the point of - * origin (this one is fixed by the area) and the hyperbola x^2-y^2=1. - * $EXAMPLES$ - * ? sinh (0.0) --> 0.0 - * ? sinh (1.0) --> 1.1752... - * $TESTS$ - * sinh (0.0) == 0.0 - * sinh (-0.5) == -sinh(0.5) - * $STATUS$ - * Ready - * $COMPLIANCE$ - * SINH() is new in Harbours CT3's library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),COSH(),TANH(),RTOD(),DTOR(),PI() - * $END$ - */ - HB_FUNC( SINH ) { if( HB_ISNUM( 1 ) ) @@ -846,46 +438,6 @@ HB_FUNC( SINH ) } } - -/* $DOC$ - * $FUNCNAME$ - * COSH() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Hyperbolic Cosine of the argument - * $SYNTAX$ - * COSH (nArea) -> nHyperbolicCosine - * $ARGUMENTS$ - * the size of the area (see below) - * $RETURNS$ - * the hyperbolic cosine of - * $DESCRIPTION$ - * The function COSH() calculates the hyperbolic cosine of the argument. - * In analytical mathematics it is defined as 1/2*(exp(nArea)+exp(-nArea)). - * A common geometric interpretation of the COSH() function is the - * maximum x value of the points in the area with the given size , - * that is bound by the x axis, a straight line through the point of - * origin (this one is fixed by the area) and the hyperbola x^2-y^2=1. - * $EXAMPLES$ - * ? cosh (0.0) --> 1.0 - * ? cosh (1.0) --> 1.5430... - * $TESTS$ - * cosh (0.0) == 1.0 - * cosh (-0.5) == cosh(0.5) - * $STATUS$ - * Ready - * $COMPLIANCE$ - * COSH() is new in Harbours CT3's library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),TANH(),RTOD(),DTOR(),PI() - * $END$ - */ - HB_FUNC( COSH ) { if( HB_ISNUM( 1 ) ) @@ -925,42 +477,6 @@ HB_FUNC( COSH ) } } - -/* $DOC$ - * $FUNCNAME$ - * TANH() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Hyperbolic Tangent of the argument - * $SYNTAX$ - * TANH (nArea) -> nHyperbolicTangent - * $ARGUMENTS$ - * the size of the area (see below) - * $RETURNS$ - * the hyperbolic tangent of - * $DESCRIPTION$ - * The function TANH() calculates the hyperbolic tangent of the argument. - * In analytical mathematics it is defined as SINH(x)/COSH(x). - * $EXAMPLES$ - * ? tanh (0.0) --> 0.0 - * ? tanh (1.0) --> 0.7615... - * $TESTS$ - * tanh (0.0) == 0.0 - * tanh (-0.5) == -tanh(0.5) - * $STATUS$ - * Ready - * $COMPLIANCE$ - * TANH() is new in Harbours CT3's library. - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),RTOD(),DTOR(),PI() - * $END$ - */ - HB_FUNC( TANH ) { if( HB_ISNUM( 1 ) ) @@ -1005,43 +521,6 @@ HB_FUNC( TANH ) } } - -/* $DOC$ - * $FUNCNAME$ - * RTOD() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Convert radiant to degree - * $SYNTAX$ - * RTOD (nRadiant) -> nDegree - * $ARGUMENTS$ - * the size of an angle in radiant - * $RETURNS$ - * the size of that angle in degree - * $DESCRIPTION$ - * The function RTOD() can be used to convert sizes of angles given - * in radiant (like those returned by the asin, acos or atan function) - * to degrees that are commonly used geometry and technics. - * $EXAMPLES$ - * ? rtod (PI()) --> 180 - * ? tanh (PI()/3) --> 60 - * $TESTS$ - * rtod (0.0) == 0.0 - * rtod (PI()) == 180.0 - * $STATUS$ - * Ready - * $COMPLIANCE$ - * RTOD() is compatible with CT3's RTOD(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),DTOR(),PI() - * $END$ - */ - HB_FUNC( RTOD ) { if( HB_ISNUM( 1 ) ) @@ -1069,42 +548,6 @@ HB_FUNC( RTOD ) } } - -/* $DOC$ - * $FUNCNAME$ - * DTOR() - * $CATEGORY$ - * CT3 math functions - * $ONELINER$ - * Convert degree to radiant - * $SYNTAX$ - * DTOR (nDegree) -> nRadiant - * $ARGUMENTS$ - * the size of that angle in degree - * $RETURNS$ - * the size of an angle in radiant - * $DESCRIPTION$ - * The function DTOR() can be used to convert sizes of angles given - * in degrees to radiant (as expected by sin, cos or tan functions). - * $EXAMPLES$ - * ? dtor (180) --> PI() - * ? dtor (60) --> PI()/3 - * $TESTS$ - * dtor (0.0) == 0.0 - * dtor (180.0) == PI() - * $STATUS$ - * Ready - * $COMPLIANCE$ - * DTOR() is compatible with CT3's DTOR(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is trig.c, library is libct. - * $SEEALSO$ - * SIN(),COS(),TAN(),COT(),ASIN(),ACOS(),ATAN(),ATN2(),SINH(),COSH(),TANH(),RTOD(),PI() - * $END$ - */ - HB_FUNC( DTOR ) { if( HB_ISNUM( 1 ) ) diff --git a/harbour/contrib/hbct/video.c b/harbour/contrib/hbct/video.c index bd17c18f37..d55f44136b 100644 --- a/harbour/contrib/hbct/video.c +++ b/harbour/contrib/hbct/video.c @@ -70,35 +70,6 @@ # include "ctvideo.ch" - -/* $DOC$ - * $FUNCNAME$ - * CHARPIX() - * $CATEGORY$ - * HBCT video functions - * $ONELINER$ - * Gets the number of scan lines per character. - * $SYNTAX$ - * CHARPIX() --> nHeight - * $ARGUMENTS$ - * $RETURNS$ - * Returns the number of scan lines per character. - * $DESCRIPTION$ - * Returns the number of scan lines per character. - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * This function is xHarbour libct contrib - * $PLATFORMS$ - * DJGPP - * $FILES$ - * Source is video.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( CHARPIX ) { # ifdef __DJGPP__ @@ -106,44 +77,6 @@ HB_FUNC( CHARPIX ) # endif } - -/* $DOC$ - * $FUNCNAME$ - * VGAPALETTE() - * $CATEGORY$ - * HBCT video functions - * $ONELINER$ - * Changes VGA palette colors - * $SYNTAX$ - * VGAPALETTE([, [, , - * lValid - * $ARGUMENTS$ - * - the color to change in CA-Cl*pper color notation or - * as a number from 0 to 15. - * , , and specify the palette - * settings for the respective portions in the range from 0 to 63. - * If no RGB value is specified, the palette register is reset to - * its default value (currently unsupported). - * If the function is called without parameters, the palette registers for - * all colors are reset to their default values (currently unsupported). - * $RETURNS$ - * Returns .T. on success. - * $DESCRIPTION$ - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * This function is xHarbour libct contrib - * $PLATFORMS$ - * DJGPP - * $FILES$ - * Source is video.c, library is libct. - * $SEEALSO$ - * EGAPALETTE() FONTRESET() - * $END$ - */ - HB_FUNC( VGAPALETTE ) { const char *color_string; @@ -207,35 +140,6 @@ HB_FUNC( VGAPALETTE ) # endif } - -/* $DOC$ - * $FUNCNAME$ - * VIDEOTYPE() - * $CATEGORY$ - * HBCT video functions - * $ONELINER$ - * Detects supported video adapter modes - * $SYNTAX$ - * VIDEOTYPE() --> nMask - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: Finish documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * This function is xHarbour libct contrib - * $PLATFORMS$ - * DJGPP - * $FILES$ - * Source is video.c, library is libct. - * $SEEALSO$ - * ISCGA(), ISEGA(), ISHERCULES(), ISMCGA(), ISMONO(), ISPGA(), ISVGA() - * $END$ - */ - HB_FUNC( VIDEOTYPE ) { # if defined( __DJGPP__ ) @@ -262,41 +166,6 @@ HB_FUNC( VIDEOTYPE ) # endif } - -/* $DOC$ - * $FUNCNAME$ - * SETFONT() - * $CATEGORY$ - * HBCT video functions - * $ONELINER$ - * Loads font from a string. - * $SYNTAX$ - * SETFONT(, [], [], []) --> nError - * or: - * SETFONT(, [], []) --> nError - * $ARGUMENTS$ - * Binary string containing a valid font definition. - * Number of a font area where the font must be loaded. - * First character code to be loaded. - * Number of characters to load. - * When .T., the function computes font height automatically. - * $RETURNS$ - * $DESCRIPTION$ - * TODO: Finish documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * This function is xHarbour libct contrib - * $PLATFORMS$ - * DJGPP - * $FILES$ - * Source is video.c, library is libct. - * $SEEALSO$ - * $END$ - */ - HB_FUNC( SETFONT ) { const char *font = hb_parcx( 1 ); diff --git a/harbour/contrib/hbct/wordrepl.c b/harbour/contrib/hbct/wordrepl.c index b0d15e9e5d..b394b5b3db 100644 --- a/harbour/contrib/hbct/wordrepl.c +++ b/harbour/contrib/hbct/wordrepl.c @@ -52,74 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * WORDREPL() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Replacement of double characters - * $SYNTAX$ - * WORDREPL (, <[@]cString>, - * , []) -> cString - * $ARGUMENTS$ - * is a string of double characters - * that should be replaced - * <[@]cString> is the processed string - * is a string of double characters that - * replace the one of - * [] sets the replacement method (see description) - * Default: .F. - * $RETURNS$ - * cString the processed string - * $DESCRIPTION$ - * The WORDREPL() takes the double characters of - * one after the other and searches for them in . - * For set to .F., this search is successful, if the double - * character sequence in starts at an odd position or at any - * position, if is set to .T. - * If this happens, the double character sequence will be replaced with - * the corresponding double character sequence of . - * If is shorter than - * the last double sequence of is used for - * the "rest" of . Note that the last double - * character sequence in "AABBC" is "BB" in this context !! - * After the replacement the function restarts the search in - * BEHIND the replacement if the CSETATMUPA() switch is turned off, or - * BEHIND the first character of the replacement if the switch is turned on. - * (see examples for this !) - * One can omit the return value of this function by setting the CSETREF() - * to .T., but one must then pass by reference to get a result. - * $EXAMPLES$ - * ? wordrepl("CC", "AABBCCDDEE", "XX") // "AABBXXDDEE" - * ? wordrepl("aa", "1aaaa", "ba") // "1abaa" - * ? wordrepl("aa", "1aaaa", "ba", .T.) // "1baba" - * csetatmupa(.T.) - * ? wordrepl("aa", "1aaaa", "ba") // "1abaa" - * ? wordrepl("aa", "1aaaa", "ba", .T.) // "1bbba" - * $TESTS$ - * wordrepl("CC", "AABBCCDDEE", "XX") == "AABBXXDDEE" - * wordrepl("aa", "1aaaa", "ba") == "1abaa" - * wordrepl("aa", "1aaaa", "ba", .T.) == "1baba" - * eval ({||csetatmupa(.T.),wordrepl("aa", "1aaaa", "ba")}) == "1abaa" - * eval ({||csetatmupa(.T.),wordrepl("aa", "1aaaa", "ba", .T.)}) == "1bbba" - * $STATUS$ - * Ready - * $COMPLIANCE$ - * WORDREPL() is compatible with CT3's WORDREPL(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is wordrepl.c, library is ct3. - * $SEEALSO$ - * CHARREPL(),RANGEREPL(),POSREPL(),CSETREF(),CSETATMUPA() - * $END$ - */ - HB_FUNC( WORDREPL ) { int iNoRet; diff --git a/harbour/contrib/hbct/wordtoch.c b/harbour/contrib/hbct/wordtoch.c index 449669dc7c..57ab232774 100644 --- a/harbour/contrib/hbct/wordtoch.c +++ b/harbour/contrib/hbct/wordtoch.c @@ -52,39 +52,8 @@ * */ - #include "ct.h" - -/* $DOC$ - * $FUNCNAME$ - * WORDTOCHAR() - * $CATEGORY$ - * CT3 string functions - * $ONELINER$ - * Replace double with single characters - * $SYNTAX$ - * WORDTOCHAR (, , - * ) -> cString - * $ARGUMENTS$ - * $RETURNS$ - * $DESCRIPTION$ - * TODO: add documentation - * $EXAMPLES$ - * $TESTS$ - * $STATUS$ - * Started - * $COMPLIANCE$ - * WORDTOCHAR() is compatible with CT3's WORDTOCHAR(). - * $PLATFORMS$ - * All - * $FILES$ - * Source is wordtoch.c, library is libct. - * $SEEALSO$ - * CSETATMUPA(),CHARREPL(),WORDREPL() - * $END$ - */ - HB_FUNC( WORDTOCHAR ) { int iMultiPass; diff --git a/harbour/contrib/hbnf/chdir.c b/harbour/contrib/hbnf/chdir.c index 2cdd955f14..aaa3c30d43 100644 --- a/harbour/contrib/hbnf/chdir.c +++ b/harbour/contrib/hbnf/chdir.c @@ -25,34 +25,34 @@ /* $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$ -*/ + * $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 diff --git a/harbour/contrib/hbnf/doc/en/aading.txt b/harbour/contrib/hbnf/doc/en/aading.txt new file mode 100644 index 0000000000..da397921a8 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/aading.txt @@ -0,0 +1,50 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/aavg.txt b/harbour/contrib/hbnf/doc/en/aavg.txt new file mode 100644 index 0000000000..46ffbc88ca --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/aavg.txt @@ -0,0 +1,38 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/acctadj.txt b/harbour/contrib/hbnf/doc/en/acctadj.txt new file mode 100644 index 0000000000..06d52387e1 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/acctadj.txt @@ -0,0 +1,60 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/acctmnth.txt b/harbour/contrib/hbnf/doc/en/acctmnth.txt new file mode 100644 index 0000000000..fbb93637d9 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/acctmnth.txt @@ -0,0 +1,57 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/acctqtr.txt b/harbour/contrib/hbnf/doc/en/acctqtr.txt new file mode 100644 index 0000000000..4ec011252f --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/acctqtr.txt @@ -0,0 +1,57 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/acctweek.txt b/harbour/contrib/hbnf/doc/en/acctweek.txt new file mode 100644 index 0000000000..eb9e42cdbf --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/acctweek.txt @@ -0,0 +1,57 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/acctyear.txt b/harbour/contrib/hbnf/doc/en/acctyear.txt new file mode 100644 index 0000000000..5b1853ba80 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/acctyear.txt @@ -0,0 +1,48 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/adessort.txt b/harbour/contrib/hbnf/doc/en/adessort.txt new file mode 100644 index 0000000000..85e7867f0d --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/adessort.txt @@ -0,0 +1,35 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/aemaxlen.txt b/harbour/contrib/hbnf/doc/en/aemaxlen.txt new file mode 100644 index 0000000000..70027f8341 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/aemaxlen.txt @@ -0,0 +1,48 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/aeminlen.txt b/harbour/contrib/hbnf/doc/en/aeminlen.txt new file mode 100644 index 0000000000..c640d0c4ef --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/aeminlen.txt @@ -0,0 +1,45 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/alt.txt b/harbour/contrib/hbnf/doc/en/alt.txt new file mode 100644 index 0000000000..9a329e46d4 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/alt.txt @@ -0,0 +1,30 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/amedian.txt b/harbour/contrib/hbnf/doc/en/amedian.txt new file mode 100644 index 0000000000..9899e9df70 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/amedian.txt @@ -0,0 +1,42 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/anomatch.txt b/harbour/contrib/hbnf/doc/en/anomatch.txt new file mode 100644 index 0000000000..58e7a42388 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/anomatch.txt @@ -0,0 +1,46 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/any2any.txt b/harbour/contrib/hbnf/doc/en/any2any.txt new file mode 100644 index 0000000000..cf5080bc09 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/any2any.txt @@ -0,0 +1,36 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/aredit.txt b/harbour/contrib/hbnf/doc/en/aredit.txt new file mode 100644 index 0000000000..7be154913c --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/aredit.txt @@ -0,0 +1,75 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/asum.txt b/harbour/contrib/hbnf/doc/en/asum.txt new file mode 100644 index 0000000000..b8ee011717 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/asum.txt @@ -0,0 +1,36 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/at2.txt b/harbour/contrib/hbnf/doc/en/at2.txt new file mode 100644 index 0000000000..ad1b80422a --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/at2.txt @@ -0,0 +1,81 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/bitclr.txt b/harbour/contrib/hbnf/doc/en/bitclr.txt new file mode 100644 index 0000000000..8bf9fab3f3 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/bitclr.txt @@ -0,0 +1,48 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/bitset.txt b/harbour/contrib/hbnf/doc/en/bitset.txt new file mode 100644 index 0000000000..1aab4a5d82 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/bitset.txt @@ -0,0 +1,49 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/blink.txt b/harbour/contrib/hbnf/doc/en/blink.txt new file mode 100644 index 0000000000..2efba5f22a --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/blink.txt @@ -0,0 +1,31 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/byt2bit.txt b/harbour/contrib/hbnf/doc/en/byt2bit.txt new file mode 100644 index 0000000000..7acb9db383 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/byt2bit.txt @@ -0,0 +1,45 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/byt2hex.txt b/harbour/contrib/hbnf/doc/en/byt2hex.txt new file mode 100644 index 0000000000..f0404d872b --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/byt2hex.txt @@ -0,0 +1,42 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/byteand.txt b/harbour/contrib/hbnf/doc/en/byteand.txt new file mode 100644 index 0000000000..048d5b87b8 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/byteand.txt @@ -0,0 +1,42 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/byteneg.txt b/harbour/contrib/hbnf/doc/en/byteneg.txt new file mode 100644 index 0000000000..4745ffac4d --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/byteneg.txt @@ -0,0 +1,40 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/bytenot.txt b/harbour/contrib/hbnf/doc/en/bytenot.txt new file mode 100644 index 0000000000..e38b43fd3b --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/bytenot.txt @@ -0,0 +1,40 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/byteor.txt b/harbour/contrib/hbnf/doc/en/byteor.txt new file mode 100644 index 0000000000..be73837fc8 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/byteor.txt @@ -0,0 +1,41 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/bytexor.txt b/harbour/contrib/hbnf/doc/en/bytexor.txt new file mode 100644 index 0000000000..94d3a1b467 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/bytexor.txt @@ -0,0 +1,41 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/calendar.txt b/harbour/contrib/hbnf/doc/en/calendar.txt new file mode 100644 index 0000000000..4b4bde0950 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/calendar.txt @@ -0,0 +1,74 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/caplock.txt b/harbour/contrib/hbnf/doc/en/caplock.txt new file mode 100644 index 0000000000..52ad1b6bba --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/caplock.txt @@ -0,0 +1,32 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/chdir.txt b/harbour/contrib/hbnf/doc/en/chdir.txt new file mode 100644 index 0000000000..dae1d5936e --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/chdir.txt @@ -0,0 +1,33 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/clrsel.txt b/harbour/contrib/hbnf/doc/en/clrsel.txt new file mode 100644 index 0000000000..72bb54619e --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/clrsel.txt @@ -0,0 +1,102 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/cntryset.txt b/harbour/contrib/hbnf/doc/en/cntryset.txt new file mode 100644 index 0000000000..6674c6809f --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/cntryset.txt @@ -0,0 +1,33 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/color2n.txt b/harbour/contrib/hbnf/doc/en/color2n.txt new file mode 100644 index 0000000000..48d7d51178 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/color2n.txt @@ -0,0 +1,31 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/ctrl.txt b/harbour/contrib/hbnf/doc/en/ctrl.txt new file mode 100644 index 0000000000..b9f41a8548 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/ctrl.txt @@ -0,0 +1,30 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/d2e.txt b/harbour/contrib/hbnf/doc/en/d2e.txt new file mode 100644 index 0000000000..1997fdb592 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/d2e.txt @@ -0,0 +1,38 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/datecnfg.txt b/harbour/contrib/hbnf/doc/en/datecnfg.txt new file mode 100644 index 0000000000..46d0adef9c --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/datecnfg.txt @@ -0,0 +1,78 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/dayofyr.txt b/harbour/contrib/hbnf/doc/en/dayofyr.txt new file mode 100644 index 0000000000..93c874a8e5 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/dayofyr.txt @@ -0,0 +1,63 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/daytobow.txt b/harbour/contrib/hbnf/doc/en/daytobow.txt new file mode 100644 index 0000000000..fecf99fa4d --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/daytobow.txt @@ -0,0 +1,40 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/dectobin.txt b/harbour/contrib/hbnf/doc/en/dectobin.txt new file mode 100644 index 0000000000..ac62d1baf5 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/dectobin.txt @@ -0,0 +1,25 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/descendn.txt b/harbour/contrib/hbnf/doc/en/descendn.txt new file mode 100644 index 0000000000..a9b16327d5 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/descendn.txt @@ -0,0 +1,26 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/dfile.txt b/harbour/contrib/hbnf/doc/en/dfile.txt new file mode 100644 index 0000000000..8728b5ffa4 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/dfile.txt @@ -0,0 +1,87 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/diskfunc.txt b/harbour/contrib/hbnf/doc/en/diskfunc.txt new file mode 100644 index 0000000000..e97ac35078 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/diskfunc.txt @@ -0,0 +1,52 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/dispc.txt b/harbour/contrib/hbnf/doc/en/dispc.txt new file mode 100644 index 0000000000..ee7a1c72d4 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/dispc.txt @@ -0,0 +1,64 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/dispmsg.txt b/harbour/contrib/hbnf/doc/en/dispmsg.txt new file mode 100644 index 0000000000..14daf41808 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/dispmsg.txt @@ -0,0 +1,95 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/dosver.txt b/harbour/contrib/hbnf/doc/en/dosver.txt new file mode 100644 index 0000000000..0a0ca55f64 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/dosver.txt @@ -0,0 +1,35 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/e2d.txt b/harbour/contrib/hbnf/doc/en/e2d.txt new file mode 100644 index 0000000000..539d7786ad --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/e2d.txt @@ -0,0 +1,33 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/easter.txt b/harbour/contrib/hbnf/doc/en/easter.txt new file mode 100644 index 0000000000..b607b359d8 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/easter.txt @@ -0,0 +1,29 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/elapmil.txt b/harbour/contrib/hbnf/doc/en/elapmil.txt new file mode 100644 index 0000000000..ce89a62e01 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/elapmil.txt @@ -0,0 +1,29 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/elapsed.txt b/harbour/contrib/hbnf/doc/en/elapsed.txt new file mode 100644 index 0000000000..94d5aa56ac --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/elapsed.txt @@ -0,0 +1,45 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/eltime.txt b/harbour/contrib/hbnf/doc/en/eltime.txt new file mode 100644 index 0000000000..d36a28e2b5 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/eltime.txt @@ -0,0 +1,29 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/findith.txt b/harbour/contrib/hbnf/doc/en/findith.txt new file mode 100644 index 0000000000..5d9cb464d6 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/findith.txt @@ -0,0 +1,38 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/firstday.txt b/harbour/contrib/hbnf/doc/en/firstday.txt new file mode 100644 index 0000000000..e85ac3190c --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/firstday.txt @@ -0,0 +1,31 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/floptst.txt b/harbour/contrib/hbnf/doc/en/floptst.txt new file mode 100644 index 0000000000..74f9b34e16 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/floptst.txt @@ -0,0 +1,54 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/ftattr.txt b/harbour/contrib/hbnf/doc/en/ftattr.txt new file mode 100644 index 0000000000..764e40e9c3 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/ftattr.txt @@ -0,0 +1,77 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/ftidle.txt b/harbour/contrib/hbnf/doc/en/ftidle.txt new file mode 100644 index 0000000000..53edc09676 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/ftidle.txt @@ -0,0 +1,43 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/ftisprn.txt b/harbour/contrib/hbnf/doc/en/ftisprn.txt new file mode 100644 index 0000000000..557482961c --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/ftisprn.txt @@ -0,0 +1,65 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/ftround.txt b/harbour/contrib/hbnf/doc/en/ftround.txt new file mode 100644 index 0000000000..38184bbc24 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/ftround.txt @@ -0,0 +1,66 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/fttext.txt b/harbour/contrib/hbnf/doc/en/fttext.txt new file mode 100644 index 0000000000..4ff63b1bcb --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/fttext.txt @@ -0,0 +1,717 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/gcd.txt b/harbour/contrib/hbnf/doc/en/gcd.txt new file mode 100644 index 0000000000..4d1af0018b --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/gcd.txt @@ -0,0 +1,30 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/getenvrn.txt b/harbour/contrib/hbnf/doc/en/getenvrn.txt new file mode 100644 index 0000000000..52f99af34a --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/getenvrn.txt @@ -0,0 +1,66 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/hex2dec.txt b/harbour/contrib/hbnf/doc/en/hex2dec.txt new file mode 100644 index 0000000000..85d38049de --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/hex2dec.txt @@ -0,0 +1,27 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/iamidle.txt b/harbour/contrib/hbnf/doc/en/iamidle.txt new file mode 100644 index 0000000000..64913c5f0a --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/iamidle.txt @@ -0,0 +1,41 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/invclr.txt b/harbour/contrib/hbnf/doc/en/invclr.txt new file mode 100644 index 0000000000..22ea3c0a9c --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/invclr.txt @@ -0,0 +1,26 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/isbit.txt b/harbour/contrib/hbnf/doc/en/isbit.txt new file mode 100644 index 0000000000..7dca126f92 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/isbit.txt @@ -0,0 +1,48 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/isbiton.txt b/harbour/contrib/hbnf/doc/en/isbiton.txt new file mode 100644 index 0000000000..55eb3884ea --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/isbiton.txt @@ -0,0 +1,34 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/isshare.txt b/harbour/contrib/hbnf/doc/en/isshare.txt new file mode 100644 index 0000000000..e50786f9cf --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/isshare.txt @@ -0,0 +1,32 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/kspeed.txt b/harbour/contrib/hbnf/doc/en/kspeed.txt new file mode 100644 index 0000000000..b3703ba289 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/kspeed.txt @@ -0,0 +1,68 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/lastday.txt b/harbour/contrib/hbnf/doc/en/lastday.txt new file mode 100644 index 0000000000..418027231b --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/lastday.txt @@ -0,0 +1,31 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/linked.txt b/harbour/contrib/hbnf/doc/en/linked.txt new file mode 100644 index 0000000000..bd5c163b28 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/linked.txt @@ -0,0 +1,47 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/madd.txt b/harbour/contrib/hbnf/doc/en/madd.txt new file mode 100644 index 0000000000..57c2794855 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/madd.txt @@ -0,0 +1,50 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/menu1.txt b/harbour/contrib/hbnf/doc/en/menu1.txt new file mode 100644 index 0000000000..a4ae33836a --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/menu1.txt @@ -0,0 +1,175 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/menutonf.txt b/harbour/contrib/hbnf/doc/en/menutonf.txt new file mode 100644 index 0000000000..7e74cf9257 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/menutonf.txt @@ -0,0 +1,196 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/metaph.txt b/harbour/contrib/hbnf/doc/en/metaph.txt new file mode 100644 index 0000000000..a296e221af --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/metaph.txt @@ -0,0 +1,36 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/miltime.txt b/harbour/contrib/hbnf/doc/en/miltime.txt new file mode 100644 index 0000000000..7f1fa59697 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/miltime.txt @@ -0,0 +1,132 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/min2dhm.txt b/harbour/contrib/hbnf/doc/en/min2dhm.txt new file mode 100644 index 0000000000..675a918f9b --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/min2dhm.txt @@ -0,0 +1,26 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/mkdir.txt b/harbour/contrib/hbnf/doc/en/mkdir.txt new file mode 100644 index 0000000000..c6168dfc29 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/mkdir.txt @@ -0,0 +1,35 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/month.txt b/harbour/contrib/hbnf/doc/en/month.txt new file mode 100644 index 0000000000..dc90abc891 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/month.txt @@ -0,0 +1,61 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/mouse1.txt b/harbour/contrib/hbnf/doc/en/mouse1.txt new file mode 100644 index 0000000000..312bb7d0ce --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/mouse1.txt @@ -0,0 +1,830 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/mouse2.txt b/harbour/contrib/hbnf/doc/en/mouse2.txt new file mode 100644 index 0000000000..00a59003dd --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/mouse2.txt @@ -0,0 +1,536 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/n2color.txt b/harbour/contrib/hbnf/doc/en/n2color.txt new file mode 100644 index 0000000000..62c53d4a0d --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/n2color.txt @@ -0,0 +1,27 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/netpv.txt b/harbour/contrib/hbnf/doc/en/netpv.txt new file mode 100644 index 0000000000..4a6caf20e7 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/netpv.txt @@ -0,0 +1,46 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/nooccur.txt b/harbour/contrib/hbnf/doc/en/nooccur.txt new file mode 100644 index 0000000000..297ece2829 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/nooccur.txt @@ -0,0 +1,38 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/ntow.txt b/harbour/contrib/hbnf/doc/en/ntow.txt new file mode 100644 index 0000000000..d9e5cb4f7b --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/ntow.txt @@ -0,0 +1,49 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/numlock.txt b/harbour/contrib/hbnf/doc/en/numlock.txt new file mode 100644 index 0000000000..7d58037b89 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/numlock.txt @@ -0,0 +1,44 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/nwlstat.txt b/harbour/contrib/hbnf/doc/en/nwlstat.txt new file mode 100644 index 0000000000..0177c782df --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/nwlstat.txt @@ -0,0 +1,34 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/nwsem.txt b/harbour/contrib/hbnf/doc/en/nwsem.txt new file mode 100644 index 0000000000..a7ecb65c97 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/nwsem.txt @@ -0,0 +1,349 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/nwuid.txt b/harbour/contrib/hbnf/doc/en/nwuid.txt new file mode 100644 index 0000000000..dcc50138d5 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/nwuid.txt @@ -0,0 +1,47 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/ontick.txt b/harbour/contrib/hbnf/doc/en/ontick.txt new file mode 100644 index 0000000000..843b5eb7a8 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/ontick.txt @@ -0,0 +1,49 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/origin.txt b/harbour/contrib/hbnf/doc/en/origin.txt new file mode 100644 index 0000000000..b460a1279c --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/origin.txt @@ -0,0 +1,39 @@ +/* + * $Id$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/page.txt b/harbour/contrib/hbnf/doc/en/page.txt new file mode 100644 index 0000000000..c11becef1a --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/page.txt @@ -0,0 +1,58 @@ +/* + * $Id$ + */ + +/* $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$ + */ + +/* $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$ + */ diff --git a/harbour/contrib/hbnf/doc/en/pchr.txt b/harbour/contrib/hbnf/doc/en/pchr.txt new file mode 100644 index 0000000000..4a41507748 --- /dev/null +++ b/harbour/contrib/hbnf/doc/en/pchr.txt @@ -0,0 +1,92 @@ +/* + * $Id$ + */ + +/* $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)) + *