int G_is_absolute_path(const char *path) { if (G_is_dirsep(path[0]) #ifdef __MINGW32__ || (isalpha(path[0]) && (path[1] == ':') && G_is_dirsep(path[2])) #endif ) return 1; else return 0; }
/*! \brief Set program name Program name set to name (name will be returned by G_program_name*()) Extension like .exe or .py is stripped from program name. \param s program name */ void G_set_program_name(const char *s) { int i; char *temp; i = strlen(s); while (--i >= 0) { if (G_is_dirsep(s[i])) { s += i + 1; break; } } /* strip extension from program name */ temp = G_store(s); G_basename(temp, "exe"); G_basename(temp, "py"); name = G_store(temp); G_debug(1, "G_set_program_name(): %s", name); G_free(temp); }