~ubuntu-branches/ubuntu/trusty/unrar-nonfree/trusty-proposed

« back to all changes in this revision

Viewing changes to unicode.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Meredith
  • Date: 2009-07-18 13:38:40 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090718133840-vt5vaf1zsmp8g55v
Tags: 1:3.9.5-1
* New upstream release
* Bumped standards version

Show diffs side-by-side

added added

removed removed

Lines of Context:
457
457
 
458
458
char* SupportDBCS::charnext(const char *s)
459
459
{
460
 
  return (char *)(IsLeadByte[*s] ? s+2:s+1);
 
460
  return (char *)(IsLeadByte[(byte)*s] ? s+2:s+1);
461
461
}
462
462
 
463
463
 
466
466
  size_t Length=0;
467
467
  while (*s!=0)
468
468
  {
469
 
    if (IsLeadByte[*s])
 
469
    if (IsLeadByte[(byte)*s])
470
470
      s+=2;
471
471
    else
472
472
      s++;
479
479
char* SupportDBCS::strchrd(const char *s, int c)
480
480
{
481
481
  while (*s!=0)
482
 
    if (IsLeadByte[*s])
 
482
    if (IsLeadByte[(byte)*s])
483
483
      s+=2;
484
484
    else
485
485
      if (*s==c)
493
493
void SupportDBCS::copychrd(char *dest,const char *src)
494
494
{
495
495
  dest[0]=src[0];
496
 
  if (IsLeadByte[src[0]])
 
496
  if (IsLeadByte[(byte)src[0]])
497
497
    dest[1]=src[1];
498
498
}
499
499
 
502
502
{
503
503
  const char *found=NULL;
504
504
  while (*s!=0)
505
 
    if (IsLeadByte[*s])
 
505
    if (IsLeadByte[(byte)*s])
506
506
      s+=2;
507
507
    else
508
508
    {