home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / exename.c < prev    next >
C/C++ Source or Header  |  1993-10-14  |  1KB  |  53 lines

  1. /*
  2.  * GT CLIPPER STANDARD HEADER
  3.  *
  4.  * File......: exename.c
  5.  * Author....: Andy M Leighton
  6.  * BBS.......: The Dark Knight Returns
  7.  * Net/Node..: 050/069
  8.  * User Name.: Andy Leighton
  9.  * Date......: $Date$
  10.  * Revision..: $Revision$
  11.  *
  12.  * This is an original work by Andy Leighton and is placed in the
  13.  * public domain.
  14.  *
  15.  * Modification history:
  16.  * ---------------------
  17.  *
  18.  * $Log$
  19.  *
  20.  */
  21.  
  22. /*
  23.  *  $DOC$
  24.  *  $FUNCNAME$
  25.  *      GT_EXENAME()
  26.  *  $CATEGORY$
  27.  *      Environment
  28.  *  $ONELINER$
  29.  *      Return the name of the .EXE.
  30.  *  $SYNTAX$
  31.  *      GT_exename() --> cName
  32.  *  $ARGUMENTS$
  33.  *      None
  34.  *  $RETURNS$
  35.  *      cName   - The name of the EXE
  36.  *  $DESCRIPTION$
  37.  *      Get the name of the exe file ran up
  38.  *      Reads the PSP segment to find the executable name.
  39.  *  $EXAMPLES$
  40.  *      ? "Currently running " + GT_exename()
  41.  *  $END$
  42.  */
  43.  
  44. #include "extend.h"
  45.  
  46. extern unsigned int _psp;
  47.  
  48. CLIPPER
  49. GT_exename()
  50. {
  51.    _retc((unsigned char *)(_psp * (unsigned int )(16 - 44)));
  52. }
  53.