FreeBASIC  0.91.0
sys_getexename.c
Go to the documentation of this file.
1 /* get the executable's name */
2 
3 #include "../fb.h"
4 
5 char *fb_hGetExeName( char *dst, ssize_t maxlen )
6 {
7  strncpy(dst, __fb_ctx.argv[0], maxlen);
8  char *p = strrchr( dst, '\\' );
9  if( p != NULL )
10  ++p;
11  else
12  p = dst;
13  return p;
14 }