Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/teraterm/vtterm.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7402 by doda, Tue Jan 22 04:13:13 2019 UTC revision 7405 by zmatsuo, Fri Jan 25 12:37:39 2019 UTC
# Line 36  Line 36 
36  #include <mbstring.h>  #include <mbstring.h>
37  #include <locale.h>  #include <locale.h>
38  #include <ctype.h>  #include <ctype.h>
39    #include <crtdbg.h>
40    #include <tchar.h>
41    
42  #include "buffer.h"  #include "buffer.h"
43  #include "ttwinman.h"  #include "ttwinman.h"
# Line 50  Line 52 
52  #include "telnet.h"  #include "telnet.h"
53  #include "ttime.h"  #include "ttime.h"
54  #include "clipboar.h"  #include "clipboar.h"
55    #include "../ttpcmn/language.h"
56    
57  #include "vtterm.h"  #include "vtterm.h"
58    
59    #ifdef _DEBUG
60    #define malloc(l)     _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
61    #define realloc(p, l) _realloc_dbg((p), (l), _NORMAL_BLOCK, __FILE__, __LINE__)
62    #define free(p)       _free_dbg((p), _NORMAL_BLOCK)
63    #define strdup(s)         _strdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
64    #define _strdup(s)        _strdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
65    #endif
66    
67  void ParseFirst(BYTE b);  void ParseFirst(BYTE b);
68    
69  #define MAPSIZE(x) (sizeof(x)/sizeof((x)[0]))  #define MAPSIZE(x) (sizeof(x)/sizeof((x)[0]))
# Line 342  void ResetTerminal() /*reset variables b Line 353  void ResetTerminal() /*reset variables b
353    
354  void ResetCharSet()  void ResetCharSet()
355  {  {
356            char *result;
357          if (ts.Language==IdJapanese) {          if (ts.Language==IdJapanese) {
358                  Gn[0] = IdASCII;                  Gn[0] = IdASCII;
359                  Gn[1] = IdKatakana;                  Gn[1] = IdKatakana;
# Line 382  void ResetCharSet() Line 394  void ResetCharSet()
394          cv.KanjiIn = ts.KanjiIn;          cv.KanjiIn = ts.KanjiIn;
395          cv.KanjiOut = ts.KanjiOut;          cv.KanjiOut = ts.KanjiOut;
396    
397          setlocale(LC_ALL, ts.Locale);          // ロケールの設定
398            // wctomb のため
399            result = setlocale(LC_ALL, ts.Locale);
400        if (result == NULL) {
401                    // おかしなLocale文字列がセットされている?
402                    // defaultをセットしておく
403                    strcpy(ts.Locale, DEFAULT_LOCALE);
404                    result = setlocale(LC_ALL, ts.Locale);
405            }
406            ts.CodePage = atoi(strrchr(result, '.')+1);
407  }  }
408    
409  void ResetKeypadMode(BOOL DisabledModeOnly)  void ResetKeypadMode(BOOL DisabledModeOnly)

Legend:
Removed from v.7402  
changed lines
  Added in v.7405

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26