Diff for /np2/win9x/sstpmsg.cpp between versions 1.9 and 1.11

version 1.9, 2005/03/19 20:46:07 version 1.11, 2007/12/28 20:36:40
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        "strres.h"  #include        "strres.h"
 #include        "np2.h"  #include        "np2.h"
   #include        "oemtext.h"
 #include        "scrnmng.h"  #include        "scrnmng.h"
 #include        "sysmng.h"  #include        "sysmng.h"
 #include        "sstp.h"  #include        "sstp.h"
Line 10 Line 11
 #include        "sound.h"  #include        "sound.h"
 #include        "fmboard.h"  #include        "fmboard.h"
 #include        "np2info.h"  #include        "np2info.h"
 #if defined(OSLANG_UTF8) || defined(OSLANG_UCS2)  
 #include        "oemtext.h"  
 #endif  
   
   
 static const OEMCHAR cr[] = OEMTEXT("\\n");  static const OEMCHAR cr[] = OEMTEXT("\\n");
Line 245  static OEMCHAR *sstpsolve(OEMCHAR *buf,  Line 243  static OEMCHAR *sstpsolve(OEMCHAR *buf, 
 #if defined(OSLANG_UTF8) || defined(OSLANG_UCS2)  #if defined(OSLANG_UTF8) || defined(OSLANG_UCS2)
                                 sjis[0] = c2;                                  sjis[0] = c2;
                                 sjis[1] = '\0';                                  sjis[1] = '\0';
                                 oemtext_sjistooem(buf, 4, sjis, 1);                                  buf += oemtext_sjistooem(buf, 4, sjis, 1);
                                 buf += OEMSTRLEN(buf);  
 #else  #else
                                 *buf++ = c2;                                  *buf++ = c2;
 #endif  #endif
Line 278  static OEMCHAR *sstpsolve(OEMCHAR *buf,  Line 275  static OEMCHAR *sstpsolve(OEMCHAR *buf, 
                         sjis[0] = (UINT8)0x82;                          sjis[0] = (UINT8)0x82;
                         sjis[1] = prs2[c-0xa0];                          sjis[1] = prs2[c-0xa0];
                         sjis[2] = '\0';                          sjis[2] = '\0';
                         oemtext_sjistooem(buf, 4, sjis, 2);                          buf += oemtext_sjistooem(buf, 4, sjis, 2);
                         buf += OEMSTRLEN(buf);  
 #else  #else
                         buf[0] = (UINT8)0x82;                          buf[0] = (UINT8)0x82;
                         buf[1] = prs2[c-0xa0];                          buf[1] = prs2[c-0xa0];
Line 294  static OEMCHAR *sstpsolve(OEMCHAR *buf,  Line 290  static OEMCHAR *sstpsolve(OEMCHAR *buf, 
                                 sjis[0] = c;                                  sjis[0] = c;
                                 sjis[1] = c2;                                  sjis[1] = c2;
                                 sjis[2] = '\0';                                  sjis[2] = '\0';
                                 oemtext_sjistooem(buf, 4, sjis, 2);                                  buf += oemtext_sjistooem(buf, 4, sjis, 2);
                                 buf += OEMSTRLEN(buf);  
 #else  #else
                                 buf[0] = c;                                  buf[0] = c;
                                 buf[1] = c2;                                  buf[1] = c2;
Line 314  static OEMCHAR *sstpsolve(OEMCHAR *buf,  Line 309  static OEMCHAR *sstpsolve(OEMCHAR *buf, 
   
 // -------------------------------  // -------------------------------
   
   static const UINT8 *prcs[4] = {k_keropi, k_winx68k, k_t98next, k_anex86};
   
 static int check_keropi(void) {  static int check_keropi(void) {
   
         OEMCHAR buf[64];          UINT    i;
   
         sstpsolve(buf, k_keropi);          for (i=0; i<NELEMENTS(prcs); i++) {
         if (FindWindow(buf, NULL)) {                  OEMCHAR buf[64];
                 return(1);                  sstpsolve(buf, prcs[i]);
         }  #if defined(OSLANG_UTF8)
         sstpsolve(buf, k_winx68k);                  TCHAR tchr[64];
         if (FindWindow(buf, NULL)) {                  oemtotchar(tchr, NELEMENTS(tchr), buf, -1);
                 return(2);  #else
         }                  const TCHAR *tchr = buf;
         sstpsolve(buf, k_t98next);  #endif
         if (FindWindow(NULL, buf)) {                  if (FindWindow(tchr, NULL)) {
                 return(3);                          return(i + 1);
         }                  }
         sstpsolve(buf, k_anex86);  
         if (FindWindow(NULL, buf)) {  
                 return(4);  
         }          }
         return(0);          return(0);
 }  }
Line 342  static int check_keropi(void) { Line 336  static int check_keropi(void) {
   
 void sstpmsg_welcome(void) {  void sstpmsg_welcome(void) {
   
         int             kero;          UINT    kero;
         OEMCHAR *p;          OEMCHAR *p;
         OEMCHAR buf[512];          OEMCHAR buf[512];
   
Line 389  void sstpmsg_welcome(void) { Line 383  void sstpmsg_welcome(void) {
                                         case 0:                                          case 0:
                                                 p = sstpsolve(p, s_keropi1);                                                  p = sstpsolve(p, s_keropi1);
                                                 break;                                                  break;
   
                                         case 1:                                          case 1:
                                                 p = sstpsolve(p, s_keropi2);                                                  p = sstpsolve(p, s_keropi2);
                                                 break;                                                  break;
   
                                         default:                                          default:
                                                 p = sstpsolve(p, s_keropi3);                                                  p = sstpsolve(p, s_keropi3);
                                                 break;                                                  break;

Removed from v.1.9  
changed lines
  Added in v.1.11


RetroPC.NET-CVS <cvs@retropc.net>