[BACK]Return to io.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / windows / asir32gui

Diff for /OpenXM_contrib2/windows/asir32gui/io.c between version 1.8 and 1.13

version 1.8, 2013/11/29 08:21:29 version 1.13, 2019/03/28 14:34:35
Line 11 
Line 11 
 #define ASIR_KEYNAME "SoftWare\\Fujitsu\\Asir\\1999.03.31"  #define ASIR_KEYNAME "SoftWare\\Fujitsu\\Asir\\1999.03.31"
   
 #define MAXHIST 256  #define MAXHIST 256
 #define HISTORY "history"  #define HISTORY "asirgui_history"
   
 static int use_current_dir;  static int use_current_dir;
   
Line 143  const char *get_helpdir() {
Line 143  const char *get_helpdir() {
     return helpdir;      return helpdir;
 }  }
   
   const char *get_locale_lang_iso639() {
       static int  initialized;
       static char lang[16] = {0}; /* ISO 639-1 two letter code */
       if( !initialized ) {
           if(GetLocaleInfo(GetUserDefaultLCID(), LOCALE_SISO639LANGNAME, lang, 16)==0) {
                           return NULL;
                   }
           initialized = 1;
       }
       return (const char *)lang;
   }
   
 BOOL Init_IO(char *errmsg) {  BOOL Init_IO(char *errmsg) {
         int i;          int i;
         char *av[BUFSIZ];          char *av[BUFSIZ];
Line 154  BOOL Init_IO(char *errmsg) {
Line 166  BOOL Init_IO(char *errmsg) {
         char notify[100],notify_ack[100],intr[100],intr_ack[100],kill[100];          char notify[100],notify_ack[100],intr[100],intr_ack[100],kill[100];
         char name[BUFSIZ],qname[BUFSIZ],home[BUFSIZ];          char name[BUFSIZ],qname[BUFSIZ],home[BUFSIZ];
   
   #if _MSC_VER < 1910
         _setargv();          _setargv();
   #endif
         if ( !strcmp(__argv[0],"debuggui") ) {          if ( !strcmp(__argv[0],"debuggui") ) {
                 asirgui_kind = ASIRGUI_DEBUG;                  asirgui_kind = ASIRGUI_DEBUG;
                 hRead = atoi(__argv[1]);                  hRead = atoi(__argv[1]);
Line 201  BOOL Init_IO(char *errmsg) {
Line 215  BOOL Init_IO(char *errmsg) {
                 if ( get_rootdir(name,len,errmsg) == FALSE ) {                  if ( get_rootdir(name,len,errmsg) == FALSE ) {
                         return FALSE;                          return FALSE;
                 }                  }
 //              sprintf(AsirExe,"%s\\bin\\engine.exe",name);                  sprintf(AsirExe,"%s\\bin\\engine.exe",name);
                 sprintf(AsirExe,"d:\\cygwin\\home\\noro\\new\\OpenXM_contrib2\\windows\\engine2000\\debug\\engine.exe");  //              sprintf(AsirExe,"d:\\cygwin\\home\\noro\\new\\OpenXM_contrib2\\windows\\engine2000\\debug\\engine.exe");
                 if ( !getenv("HOME") ) {                  if ( !getenv("HOME") ) {
                         sprintf(home,"HOME=%s",name);                          sprintf(home,"HOME=%s",name);
                         _putenv(home);                          _putenv(home);
Line 302  static char history_errmsg[BUFSIZ];
Line 316  static char history_errmsg[BUFSIZ];
 void init_input_history()  void init_input_history()
 {  {
         char rootdir[BUFSIZ];          char rootdir[BUFSIZ];
         get_rootdir(rootdir,sizeof(rootdir),history_errmsg);          char *env = getenv("TEMP");
         sprintf(history_path,"%s\\bin\\%s",rootdir,HISTORY);          if( env ) {
                   sprintf(history_path,"%s\\%s",env,HISTORY);
           }else {
                   get_rootdir(rootdir,sizeof(rootdir),history_errmsg);
                   sprintf(history_path,"%s\\bin\\%s",rootdir,HISTORY);
           }
         init_hist(MAXHIST);          init_hist(MAXHIST);
 }  }
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.13

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>