This is a port of the "nanfor" library for FlagShip (32bit and 64bit mode). Copyright/License: the original source was posted public domain by different authors, see the header of each source file. The FlagShip port and source modification was posted as public domain (or GPL in Linux terms) by Jan Balek, multisoft Datentechnik, Germany. You may freely use and modify the attached source. If you detect any bug or have improved it, please forward the fixed source file (in .zip attachment) to multisoft (see address in the README.txt file) to be able to made these fixes available to other users too :-) --------------------------------------------------------------------------------------------- Files and directories: README.txt Introduction, this file nanfor_FlagShip Directory containing source of Nanfor lib for FlagShip nanfor_manual_html Directory containing Nanfor documentation in HTML format nfsrc305_orig_source.zip Original Nanfor source, used by this port nflib305_orig_clipper.zip Original Nanfor library for Clipper (DOS/16bit only) How to use: - FlagShip for Windows (VFS7 and newer) for BCC: in FlagShip console, issue cd nanfor_FlagShip make -f Makefile.bcc # create or rebuild Nanfor.lib make -f Makefile.bcc test # test Nanfor.lib make -f Makefile.bcc install # copy Nanfor.lib to \lib make -f Makefile.bcc clean # optional, remove objects, old executables and lib - FlagShip for Windows (VFS7 and newer) for MSVC6: in FlagShip console, issue cd nanfor_FlagShip nmake -f Makefile.msc # create or rebuild Nanfor.lib nmake -f Makefile.msc test # test Nanfor.lib nmake -f Makefile.msc install # copy Nanfor.lib to \lib nmake -f Makefile.msc clean # optional, remove objects, old executables and lib - FlagShip for Linux (VFS7 and newer): issue cd nanfor_FlagShip make -f Makefile.lix # create or rebuild libNanfor.a make -f Makefile.lix test # test libNanfor.a sudo make -f Makefile.lix install # copy libNanfor.a to /usr/local/lib make -f Makefile.lix clean # optional, remove objects, old executables and lib Using the Nanfor library with your application: - FlagShip for Windows: in FlagShip console, issue FlagShip myapplic*prg Nanfor.lib or FlagShip myapplic*prg C:\thisDir\nanfor_FlagShip\Nanfor.lib - FlagShip for Linux: issue FlagShip myapplic*prg -L/usr/local/lib -lNanfor or FlagShip myapplic*prg -L/thisDir/nanfor_FlagShip -lNanfor Overview of this port: Function Available Description ------------------+---------+---------------------------------------------------------------- 1. Array FT_AADDITION() yes Add elements unique of source array to target array FT_AAVG() yes Average numeric values in an array FT_ADESSORT() yes Sort an array in descending order FT_AEMAXLEN() yes Find longest element within an array FT_AEMINLEN() yes Find shortest element within an array FT_AMEDIAN() yes Find middle value in array, or average of two middle values FT_ANOMATCHES() yes Find the number of array elements meeting a condition FT_AREDIT() yes 2 dimensional array editing function using TBrowse FT_ASUM() yes Sum the elements of an array FT_RESTARR() yes Restore a Clipper array from a disc file FT_SAVEARR() yes Save Clipper array to a disc file. 2. Conversion FT_BYT2BIT() yes Convert byte to string of 1's and 0's FT_BYT2HEX() yes Convert byte to hexadecimal version of its binary value FT_D2E() yes Convert decimal to scientific notation FT_DEC2BIN() yes Convert decimal to binary FT_DESCEND() yes Create a descending index key value FT_E2D() yes Convert scientific notation string to a decimal FT_ESCCODE() yes Convert Lotus style escape codes FT_HEX2DEC() yes Convert a hex number to decimal FT_INVCLR() yes Get the inverse of a color FT_NTOW() yes Translate numeric value to words FT_SQZN() yes Compress a numeric value into a character string FT_STOD() yes Convert a date string to a Clipper date data type FT_UNSQZN() yes Uncompress a numeric compressed by FT_SQZN() FT_XTOY() yes Convert from any data type to any other data type 3. DOS/BIOS FT_CHDIR() yes Change the current directory FT_DEFAULT() yes Retrieve and optionally change the current default drive FT_DOSVER() no Return the current DOS major and minor version as a string FT_DSKFREE() yes/FS2 Return the amount of available disk space FT_DSKSIZE() yes/FS2 Return the maximum capacity of a fixed disk FT_FLOPTST() no Test diskette drive status FT_IAMIDLE() no Inform the operating system that the application is idle. FT_INP() no Retrieve a byte from a specified I/O port FT_INT86() no Execute a software interrupt FT_ISPRINT() no Check printer status FT_ISSHARE() no Determine if DOS "Share" is installed FT_MKDIR() yes/FS2 Create a subdirectory FT_OUTP() no Write a byte to a specified I/O port FT_PEEK() no Retrieve a byte from a specified memory location. FT_POKE() no Write a byte to a specified memory location FT_REBOOT() no Force a warm or cold boot FT_RMDIR() yes/FS2 Delete a subdirectory FT_SETDATE() yes/FS2 Set the DOS system date FT_SETTIME() yes/FS2 Set the DOS system time FT_SYSMEM() yes/* Determine the amount of conventional memory installed FT_TEMPFIL() yes/FS2 Create a file with a unique name 4. Date/Time FT_ACCTADJ() yes Adjust beginning or ending fiscal pd. dates to acctg. dates FT_ACCTMONTH() yes Return accounting month data FT_ACCTQTR() yes Return accounting quarter data FT_ACCTWEEK() yes Return accounting week data FT_ACCTYEAR() yes Return accounting year data FT_ADDWKDY() yes Return true number of days to add given number of workdays FT_CALENDAR() yes Display date/time calendar, find a date, return calendar data. FT_CIV2MIL() yes Convert usual civilian format time to military time. FT_DATECNFG() yes Set beginning of year/week for FT_ date functions FT_DAYOFYR() yes Return calendar, fiscal or accounting day data FT_DAYTOBOW() yes Calculate no. of days between date and beginning of week FT_DOY() yes Find number of day within year FT_EASTER() yes Return the date of Easter FT_ELAPMIN() yes Return difference, in minutes, between two mil format times. FT_ELAPSED() yes Return elapsed time between two days and/or times FT_ELTIME() yes Compute difference between times in hours, minutes, seconds. FT_FDAY() yes Return first day of the month FT_LDAY() yes Return last day of the month FT_MADD() yes Add or subtract months to/from a date FT_MIL2CIV() yes Convert time in military format to civilian format. FT_MIL2MIN() yes Convert time in military format to number of minute of day. FT_MIN2DHM() yes Convert numeric minutes to days, hours and minutes. FT_MIN2MIL() yes Convert minute of day to military format time. FT_MONTH() yes Return Calendar or Fiscal Month Data FT_QTR() yes Return Calendar or Fiscal Quarter Data. FT_SYS2MIL() yes Convert system time to military time format. FT_WEEK() yes Return calendar or fiscal week data FT_WORKDAYS() yes Return number of work days between two dates FT_WOY() yes Find number of week within year FT_YEAR() yes Return calendar or fiscal year data 5. Environment FT_GETE() yes Return the entire current environment FT_LINKED() yes Determine if a function was linked in FT_ORIGIN() yes Report the drive, path and filename of the current program FT_RESTSETS() yes Restore status of all SET command settings FT_SAVESETS() yes Save the status of all the SET command settings FT_SETCENTURY() yes Check/Set the CENTURY Setting 6. Event FT_IDLE() yes Generate an idle event to allow incremental garbage collection. FT_ONIDLE() yes Evaluate a designated code block during idle states. FT_ONTICK() yes/FS2 Evaluate a designated code block at a designated interval. 7. File i/o FT_DFCLOSE() yes Close file displayed by FT_DISPFILE() FT_DFSETUP() yes Set up parameters for FT_DISPFILE() FT_DISPFILE() yes/simpl Browse a text file FT_FAPPEND() yes Appends a line to the currently selected text file FT_FBOF() yes Determine if attempt to skip past beginning of text file FT_FDELETE() yes Deletes a line from the currently selected text file FT_FEOF() yes Determine if end of text file has been encountered FT_FERROR() yes Return the error code for a text file operation FT_FGOBOT() yes Go to the last record in a text file FT_FGOTO() yes Move record pointer to specific record in a text file FT_FGOTOP() yes Go to the first record in a text file FT_FINSERT() yes Inserts a line in the currently selected text file FT_FLASTRE() yes Get the no. of records in the currently selected text file FT_FREADLN() yes Read a line from the currently selected text file FT_FRECNO() yes Return the current record number of a text file FT_FSELECT() yes Select a text file workarea FT_FSKIP() yes Move the record pointer to a new position in a text file FT_FUSE() yes Open or close a text file for use by the FT_F* functions FT_FWRITELN() yes Write a line to the currently selected text file 1. Game FT_PEGS() yes FT_PEGS GAME (all work and no play...) 2. Keyboard/Mouse FT_ALT() yes Determine status of the Alt key FT_CAPLOCK() yes Determine and optionally change the status of CapLock key FT_CTRL() yes Determine status of the Ctrl key FT_LASTKEY() yes Force LastKey() to return a programmer-defined value. FT_MBUTPRS() yes Retrieve button press status FT_MBUTREL() yes Get mouse button release information FT_MCONOFF() no Turn mouse cursur off if in specified region FT_MCURSOR() yes Set the mouse cursor FT_MDBLCLK() yes Return true if a double click was detected FT_MDEFCRS() no Define the mouse cursor FT_MGETCOORD() yes Get mouse cursor position (text coord.) and button status FT_MGETPAGE() no Get the display page for the mouse pointer FT_MGETPOS() yes Get mouse cursor position and button status FT_MGETSENS() no Get the mouse sensitivity parameters FT_MGETX() yes Get mouse cursor row position FT_MGETY() yes Get mouse cursor column position FT_MHIDECRS() yes Decrement internal mouse cursor flag and hide mouse cursor FT_MINIT() yes Initialize the mouse driver, vars and return status of mouse FT_MINREGION() yes Test if the mouse cursor is in the passed region FT_MMICKEYS() yes Get mickeys FT_MRESET() yes Reset mouse driver and return status of mouse FT_MSETCOORD() yes Position the mouse cursor using text screen coordinates FT_MSETPAGE() no Set the display page for the mouse pointer FT_MSETPOS() yes Position the mouse cursor using virtual screen coordinates FT_MSETSENS() no Set the mouse sensitivity parameters FT_MSHOWCRS() yes Increment internal cursor flag and display mouse cursor FT_MVERSION() yes Get the mouse driver version FT_MXLIMIT() no Set vertical bounds of mouse using virtual screen coord. FT_MYLIMIT() no Set horiz. bounds of mouse using virtual screen coordinates FT_NUMLOCK() yes Return status of NumLock key FT_PRTSCR() no Enable or disable the Print Screen key FT_PUTKEY() yes Stuff a keystroke into the keyboard buffer FT_SCANCODE() yes/* Wait for keypress and return keyboard scan code FT_SETKEYS() yes/FS2 Get array of keys redirected via the SetKey() or SET KEY FT_SETRATE() no Set the keyboard delay and repeat rate on PC/AT & PS/2 FT_SHIFT() yes Determine status of shift key FT_SINKEY() yes Replacement for INKEY() that tests for SET KEY procedures 3. Math FT_GCD() yes Calculate greatest common divisor of two numbers FT_NETPV() yes Calculate net present value FT_RAND1() yes Generate a random number FT_ROUND() yes Rounds a number to a specific place 4. Menus/Prompts FT_ADDER() yes Pop up a simple calculator FT_BLINK() yes Display a blinking message on the screen FT_BRWSWHL() yes Browse an indexed database limited to a while condition FT_CLRSEL() yes User Selectable Colour Routine FT_DISPMSG() yes Display a message and optionally waits for a keypress FT_FILL() yes Declare menu options for FT_MENU1() FT_MENU1() yes Pulldown menu system FT_MENU2() yes Vertical lightbar menu FT_MENUTO() yes Execute light bar menu using prompts created with @...PROMPT FT_PENDING() yes Display same-line pending messages after a wait. FT_PICKDAY() yes Picklist of days of week FT_PROMPT() yes Define a menu item for use with FT_MenuTo() FT_SLEEP yes Wait for a specified amount of time FT_XBOX() yes Display a self-sizing message box and message 5. NetWare FT_NWLSTAT() no Return the current Novell NetWare logical station number FT_NWSEMCLOSE() no Close a NetWare semaphore FT_NWSEMEX() no Examine a NetWare semaphore's value and open count FT_NWSEMLOCK() no Perform a semaphore "lock" FT_NWSEMOPEN() no Open or create a NetWare semaphore FT_NWSEMSIG() no Signal a NetWare semaphore (increment) FT_NWSEMUNLOCK() no "Unlock" a semaphore locked by FT_NWSEMLOCK() FT_NWSEMWAIT() no Wait on a NetWare semaphore (decrement) FT_NWUID() no Return the current Novell NetWare User ID 6. String FT_AT2() yes Find position of the nth occurrence of a substring FT_BITCLR() yes Clear (reset) selected bit in a byte FT_BITSET() yes Set selected bit in a byte FT_BYTEAND() yes Perform bit-wise AND on two ASCII characters (bytes) FT_BYTENEG() yes Perform bit-wise negation on an ASCII character FT_BYTENOT() yes Perform bit-wise NOT on an ASCII character (byte) FT_BYTEOR() yes Perform bit-wise OR on two ASCII characters (bytes) FT_BYTEXOR() yes Perform bit-wise XOR on two ASCII characters (bytes) FT_COLOR2N() yes Returns the numeric complement of a Clipper color string FT_FINDITH() yes Find the "ith" occurrence of a substring within a string FT_ISBIT() yes Test the status of an individual bit FT_ISBITON() yes Determine the state of individual bits in a number FT_METAPH() yes Convert a character string to MetaPhone format FT_N2COLOR() yes Returns the string complement of a Clipper color number FT_NOOCCUR() yes Find the number of times one string occurs in another FT_PCHR() yes Convert printer control codes FT_PROPER() yes Convert a string to proper-name case 7. Video FT_ADAPTER() yes Report the type of video adapter installed FT_CLS() yes Clear screen FT_GETMODE() no Get the video mode FT_GETVCUR() no Return info about the cursor on a specified video page FT_GETVPG() yes/term Get the currently selected video page FT_POPVID() yes Restore previously saved video states. FT_PUSHVID() yes Save current video states on internal stack. FT_RESTATT() yes/term Restore the attribute bytes of a specified screen region. FT_REVATTR() yes/term Reverse colors of specified screen coordinates FT_REVCHR() yes/term Reverse the color of a single character on the screen FT_RGNSTACK() yes Push or pop a saved screen region on or off the stack FT_RSTRGN() yes Restore region of the screen saved with FT_SAVRGN() FT_SAVEATT() yes/term Save the attribute bytes of a specified screen region. FT_SAVRGN() yes Save a screen region for later display FT_SETATTR() yes/term Change color attributes of screen region FT_SETMODE() no Set the video mode FT_SETVCUR() no Set the cursor position on a specified video page FT_SETVPG() no Set the current video page FT_SHADOW() no Draw a non-destructive shadow on the screen FT_VIDSTR() yes Display string on screen in specified attribute FT_WRTCHR() yes Display character on screen 8. CPMI (case sensitive) cpmiAllocateDOSMem() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiAllocateSelector() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiFarCallReal() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiFreeDOSMem() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiFreeSelector() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiGetBase() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiGetLimit() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiInt86() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiIsProtected() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiMakeAlias() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiProtectedPtr() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiRealPtr() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiResizeDOSMem() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiSeg2Sel() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiSetBase() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiSetLimit() no Not applicable for Windows 32/64 nor for Linux 32/64 cpmiWillGPF() no Not applicable for Windows 32/64 nor for Linux 32/64 Notes (availability): yes function is available no not applicable, function returns fix value yes/term available for Terminal i/o mode yes/FS2 available, requires FS2 Toolbox yes/simpl available in simplified form yes/* available by emulation, returns emulated value *eof*