Ignore:
Timestamp:
Aug 27, 2010, 11:00:52 AM (11 years ago)
Author:
Silvan Scherrer
Message:

poppler update to 0.14.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/mypoppler/poppler/CharCodeToUnicode.cc

    r277 r461  
    1919// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
    2020// Copyright (C) 2008 Vasile Gaburici <gaburici@cs.umd.edu>
     21// Copyright (C) 2010 William Bader <williambader@hotmail.com>
     22// Copyright (C) 2010 Jakub Wilk <ubanus@users.sf.net>
    2123//
    2224// To see a description of the changes please see the Changelog file that
     
    125127  CharCodeToUnicode *ctu;
    126128  int line, n, i;
     129  char *tokptr;
    127130
    128131  if (!(f = fopen(fileName->getCString(), "r"))) {
     
    143146  while (getLine(buf, sizeof(buf), f)) {
    144147    ++line;
    145     if (!(tok = strtok(buf, " \t\r\n")) ||
     148    if (!(tok = strtok_r(buf, " \t\r\n", &tokptr)) ||
    146149        sscanf(tok, "%x", &u0) != 1) {
    147150      error(-1, "Bad line (%d) in unicodeToUnicode file '%s'",
     
    150153    }
    151154    n = 0;
    152     while ((tok = strtok(NULL, " \t\r\n"))) {
     155    while ((tok = strtok_r(NULL, " \t\r\n", &tokptr))) {
    153156      if (n >= uBufSize)
    154157      {
     
    308311          break;
    309312        }
    310         if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
    311               n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>')) {
     313        if (!(((n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>') ||
     314               (n1 == 4 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' && tok1[1] == '0' && tok1[2] == '0')) &&
     315              ((n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>') ||
     316               (n2 == 4 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>' && tok1[1] == '0' && tok1[2] == '0')))) {
    312317          error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
    313318          continue;
Note: See TracChangeset for help on using the changeset viewer.