Skip to content
Snippets Groups Projects
Commit b19c15f3 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

Pb with HOME on WinNT

parent 9981bf30
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,8 @@ public :
char *display; // forced display host:0.0 under X11
int terminal; // show we print to the terminal console?
char *editor; // text editor command (with included '%s')
char home_dir[NAME_STR_L]; // the home directory
char home_dir[NAME_STR_L], tmp_dir[NAME_STR_L];
// the home and tmp directories
int position[2]; // position of the menu window on the screen
int gl_position[2]; // position of the graphic window on the screen
......
// $Id: Options.cpp,v 1.20 2001-05-21 13:01:13 geuzaine Exp $
// $Id: Options.cpp,v 1.21 2001-05-21 13:19:05 geuzaine Exp $
#include "Gmsh.h"
#include "GmshUI.h"
......@@ -22,8 +22,11 @@ void Init_Options(int num){
char *tmp;
// Home directory
#if !defined(WIN32) // Some WinNT systems have bad HOME variables...
if((tmp = getenv("HOME"))) strcpy(CTX.home_dir, tmp);
else if((tmp = getenv("TMP"))) strcpy(CTX.home_dir, tmp);
else
#endif
if((tmp = getenv("TMP"))) strcpy(CTX.home_dir, tmp);
else if((tmp = getenv("TEMP"))) strcpy(CTX.home_dir, tmp);
else strcpy(CTX.home_dir, "");
if(strlen(CTX.home_dir)){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment