Files
harbour-core/harbour/contrib/hbnf/origin.c
Viktor Szakats 8012581cbe 2007-12-01 02:42 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
- contrib/libct
   + contrib/hbct
   - contrib/libgt
   + contrib/hbgt
   - contrib/libnf
   + contrib/hbnf
   * contrib/Makefile
   * contrib/make_b32_all.bat
   * contrib/make_vc_all.bat
   * utils/hbmake/hbmutils.prg
     * Contrib lib rename continued.
2007-12-01 01:43:13 +00:00

69 lines
1.6 KiB
C

/*
* $Id$
*/
/*
* File......: ORIGIN.C
* Author....: Steve Larsen
* CIS ID....: 76370,1532
*
* This is an original work by K. Stephan Larsen and is placed in the
* public domain.
*
* Modification history:
* ---------------------
*
* Rev 1.1 09 Nov 1992 22:35:52 GLENN
* Function was inadvertently named origin() instead of ft_origin() when
* it went from an .asm to a .c file. Renamed it back to ft_origin().
*
* Rev 1.0 03 Oct 1992 02:13:54 GLENN
* Initial revision.
*
*/
/* $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
* $INCLUDE$
* extend.h
* $SEEALSO$
* FT_WHEREIS() FT_TREE()
* $END$
*/
#include "hbapi.h"
HB_FUNC( FT_ORIGIN )
{
hb_retc( hb_cmdargARGV()[ 0 ] );
}