static CHAR DBCSInfo[12] = { 0 };
static BYTE DBCSInfo[12] = { 0 };
static int isleadbyte(int c){  static BOOL bDBCSFilled=FALSE;  static CHAR DBCSInfo[12] = { 0 };  /* According to the Control Program Guide&Ref,                                             12 bytes is sufficient */  CHAR *curr;  BOOL retval = FALSE;  if( !bDBCSFilled ) {    COUNTRYCODE ctrycodeInfo = { 0 };    APIRET rc = NO_ERROR;    ctrycodeInfo.country = 0;     /* Current Country */    ctrycodeInfo.codepage = 0;    /* Current Codepage */    rc = DosQueryDBCSEnv( sizeof( DBCSInfo ),                          &ctrycodeInfo,                          DBCSInfo );    if( rc != NO_ERROR ) {      /* we had an error, do something? */      return FALSE;    }    bDBCSFilled=TRUE;  }  curr = DBCSInfo;  /* DBCSInfo returned by DosQueryDBCSEnv is terminated with two '0' bytes in a row */  while(( *curr != 0 ) && ( *(curr+1) != 0)) {    if(( c >= *curr ) && ( c <= *(curr+1) )) {      retval=TRUE;      break;    }    curr+=2;  }  return retval;}