home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / nfsrc21.zip / ORIGIN.C < prev    next >
C/C++ Source or Header  |  1992-10-03  |  2KB  |  67 lines

  1. /*
  2.  * File......: ORIGIN.C 
  3.  * Author....: Steve Larsen
  4.  * CIS ID....: 76370,1532
  5.  * Date......: $Date:   03 Oct 1992 02:13:54  $
  6.  * Revision..: $Revision:   1.0  $
  7.  * Log file..: $Logfile:   C:/nanfor/src/origin.c_v  $
  8.  *
  9.  * This is an original work by K. Stephan Larsen and is placed in the
  10.  * public domain.
  11.  *
  12.  * Modification history:
  13.  * ---------------------
  14.  *
  15.  * $Log:   C:/nanfor/src/origin.c_v  $
  16.  * 
  17.  *    Rev 1.0   03 Oct 1992 02:13:54   GLENN
  18.  * Initial revision.
  19.  *
  20.  */
  21.  
  22. #include "extend.h"
  23.  
  24. /* $DOC$
  25.  * $FUNCNAME$
  26.  *    FT_ORIGIN()
  27.  * $CATEGORY$
  28.  *    Environment
  29.  * $ONELINER$
  30.  *    Report the drive, path and filename of the current program
  31.  * $SYNTAX$
  32.  *    FT_ORIGIN() -> cString
  33.  * $ARGUMENTS$
  34.  *    None
  35.  * $RETURNS$
  36.  *    A string containing the full drive/directory/filename of
  37.  *    the currently executing file.
  38.  * $DESCRIPTION$
  39.  *    Often users will install multiple copies of application software,
  40.  *    especially on networks and in situations where the user is trying
  41.  *    to get around a copy protection scheme.
  42.  *
  43.  *    This function enables you to learn the name and source location
  44.  *    of the currently executing file, so that you may take whatever
  45.  *    action you need to.
  46.  *
  47.  *    Requires DOS v3.xx and above.
  48.  * $EXAMPLES$
  49.  *    cMyFile := FT_ORIGIN()
  50.  *
  51.  *    IF cMyFile <> "C:\APPDIR\MYFILE.EXE"
  52.  *       ?"Incorrect startup file.  Please remove/rename and start again"
  53.  *       QUIT
  54.  *    ENDIF
  55.  * $INCLUDE$
  56.  *    extend.h
  57.  * $SEEALSO$
  58.  *    FT_WHEREIS() FT_TREE()
  59.  * $END$
  60.  */
  61.  
  62. CLIPPER origin( void )
  63. {
  64.    extern char **__argv;
  65.    _retc(  *__argv  );
  66. }
  67.