~ubuntu-branches/ubuntu/utopic/vflib3/utopic-proposed

« back to all changes in this revision

Viewing changes to src/ccv.c

  • Committer: Bazaar Package Importer
  • Author(s): Masayuki Hatta (mhatta)
  • Date: 2004-02-14 17:51:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040214175141-7qz0vcbttivnifq8
Tags: 3.6.13-3
Now check whether /var/lib/defoma/vflib3.d exists - closes: #179714

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
  /* Snarfed from 'jis2sjis()' in UJIP by Ken R Lunde. */
192
192
  c1 = code_point / 0x100;
193
193
  c2 = code_point % 0x100;
 
194
  if (   (c1 < 0x21) || (0x7e < c1) || (c2 < 0x21) || (0x7e < c2) ){
 
195
    return -1;
 
196
  }
194
197
  row_offset  = (c1 < 95) ? 112 : 176;
195
198
  cell_offset = (c1 % 2) ? ((c2 > 95) ? 32 : 31) : 126;
196
199
  c1 = ((c1 + 1) >> 1) + row_offset;
197
200
  c2 += cell_offset;
 
201
 
198
202
  return c1*0x100 + c2;
199
203
}
200
204
 
973
977
  ccvi = &ccv_tbl[ccvi_index];
974
978
  c1 = code_point / ccvi->block_size;
975
979
  c2 = code_point % ccvi->block_size;
 
980
 
976
981
  if (   (c1 < ccvi->c1min) || (ccvi->c1max < c1)
977
982
      || (c2 < ccvi->c2min) || (ccvi->c2max < c2) ){
978
983
    return -1;
993
998
  ccvi = &ccv_tbl[ccvi_index];
994
999
  c1 = code_point / ccvi->block_size;
995
1000
  c2 = code_point % ccvi->block_size;
 
1001
 
996
1002
  if (   (c1 < ccvi->c1min) || (ccvi->c1max < c1)
997
1003
      || (c2 < ccvi->c2min) || (ccvi->c2max < c2) ){
998
1004
    return -1;