Diff for /np2/win9x/sstpmsg.cpp between versions 1.5 and 1.6

version 1.5, 2004/06/04 16:11:03 version 1.6, 2005/02/07 14:46:14
Line 153  const INFOPROC *inf; Line 153  const INFOPROC *inf;
 const INFOPROC  *infterm;  const INFOPROC  *infterm;
   
         inf = infoproc;          inf = infoproc;
         infterm = infoproc + (sizeof(infoproc) / sizeof(INFOPROC));          infterm = infoproc + NELEMENTS(infoproc);
         while(inf < infterm) {          while(inf < infterm) {
                 if (!milstr_cmp(key, inf->key)) {                  if (!milstr_cmp(key, inf->key)) {
                         inf->proc(dst, maxlen, ex);                          inf->proc(dst, maxlen, ex);
Line 169  static const NP2INFOEX sstpex = {"\\n",  Line 169  static const NP2INFOEX sstpex = {"\\n", 
   
 // ----  // ----
   
 static const BYTE prs2[] = {0xaa,0xac,0xae,0xb0,0xb2,0xbe,0xf0,0x9f,  static const UINT8 prs2[] = {0xaa,0xac,0xae,0xb0,0xb2,0xbe,0xf0,0x9f,
                                                         0xa1,0xa3,0xa5,0xa7,0xe1,0xe3,0xe5,0xc1,                                                           0xa1,0xa3,0xa5,0xa7,0xe1,0xe3,0xe5,0xc1,
                                                         0xb8,0xa0,0xa2,0xa4,0xa6,0xa8,0xa9,0xab,                                                           0xb8,0xa0,0xa2,0xa4,0xa6,0xa8,0xa9,0xab,
                                                         0xad,0xaf,0xb1,0xb3,0xb5,0xb7,0xb9,0xbb,                                                           0xad,0xaf,0xb1,0xb3,0xb5,0xb7,0xb9,0xbb,
                                                         0xbd,0xbf,0xc2,0xc4,0xc6,0xc8,0xc9,0xca,                                                           0xbd,0xbf,0xc2,0xc4,0xc6,0xc8,0xc9,0xca,
                                                         0xcb,0xcc,0xcd,0xd0,0xd3,0xd6,0xd9,0xdc,                                                           0xcb,0xcc,0xcd,0xd0,0xd3,0xd6,0xd9,0xdc,
                                                         0xdd,0xde,0xdf,0xe0,0xe2,0xe4,0xe6,0xe7,                                                           0xdd,0xde,0xdf,0xe0,0xe2,0xe4,0xe6,0xe7,
                                                         0xe8,0xe9,0xea,0xeb,0xed,0xf1,0xb4,0xb8};                                                           0xe8,0xe9,0xea,0xeb,0xed,0xf1,0xb4,0xb8};
   
 #define GETSSTPDAT1(a) {                                                                \  #define GETSSTPDAT1(a) {                                                                \
                                 (a) = last;                                                             \                                  (a) = last;                                                             \
Line 187  static const BYTE prs2[] = {0xaa,0xac,0x Line 187  static const BYTE prs2[] = {0xaa,0xac,0x
   
 static char *sstpsolve(char *buf, const unsigned char *dat) {  static char *sstpsolve(char *buf, const unsigned char *dat) {
   
         BYTE    c;          UINT8   c;
         BYTE    last;          UINT8   last;
   
         last = 0x80;          last = 0x80;
         while(1) {          while(1) {
Line 216  static char *sstpsolve(char *buf, const  Line 216  static char *sstpsolve(char *buf, const 
                         *buf++ = c;                          *buf++ = c;
                 }                  }
                 else if (c == 0x7f) {                  else if (c == 0x7f) {
                         BYTE ms;                          UINT8 ms;
                         GETSSTPDAT1(ms);                          GETSSTPDAT1(ms);
                         if (!ms) {                          if (!ms) {
                                 break;                                  break;
Line 232  static char *sstpsolve(char *buf, const  Line 232  static char *sstpsolve(char *buf, const 
                         }                          }
                 }                  }
                 else if (c == 0x80) {                  else if (c == 0x80) {
                         BYTE c2;                          UINT8 c2;
                         GETSSTPDAT1(c2);                          GETSSTPDAT1(c2);
                         if (c2) {                          if (c2) {
                                 *buf++ = c2;                                  *buf++ = c2;
Line 243  static char *sstpsolve(char *buf, const  Line 243  static char *sstpsolve(char *buf, const 
                 }                  }
                 else if (c >= 0xf0) {                  else if (c >= 0xf0) {
                         int i;                          int i;
                         const BYTE *p;                          const UINT8 *p;
                         i = c - 0xf0;                          i = c - 0xf0;
                         if (c == 0xff) {                          if (c == 0xff) {
                                 BYTE c2;                                  UINT8 c2;
                                 GETSSTPDAT1(c2);                                  GETSSTPDAT1(c2);
                                 if (!c2) {                                  if (!c2) {
                                         break;                                          break;
Line 260  static char *sstpsolve(char *buf, const  Line 260  static char *sstpsolve(char *buf, const 
                         buf = sstpsolve(buf, p);                          buf = sstpsolve(buf, p);
                 }                  }
                 else if ((c >= 0xa0) && (c < 0xe0)) {                  else if ((c >= 0xa0) && (c < 0xe0)) {
                         *buf++ = (BYTE)0x82;                          *buf++ = (UINT8)0x82;
                         *buf++ = prs2[c-0xa0];                          *buf++ = prs2[c-0xa0];
                 }                  }
                 else {                  else {
                         BYTE c2;                          UINT8 c2;
                         GETSSTPDAT1(c2);                          GETSSTPDAT1(c2);
                         if (c2) {                          if (c2) {
                                 *buf++ = c;                                  *buf++ = c;

Removed from v.1.5  
changed lines
  Added in v.1.6


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