~ubuntu-branches/ubuntu/lucid/swftools/lucid

« back to all changes in this revision

Viewing changes to lib/pdf/xpdf/GlobalParams.cc

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2009-04-30 05:22:19 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090430052219-l1n64qofzeq5pej8
Tags: 0.9.0-0ubuntu1
* New upstream release (LP: #369931)
  - patches/01_manpages: edited to match updated version of src/pdf2swf.1 and
    src/wav2swf.1
  - patches/02_faq: edited to match updated version of FAQ
  - patches/04_makefile: edited to delete the patch on lib/Makefile.in and 
    src/Makefile.in (applied upstream)
  - deleted patch 99_configure_for_python2.5_and_2.6 (applied upstream)
  - debian/swftools.doc: deleted installation of TODO and 
    pdf2swf/HOWTO_pdf2swf as they don't exist anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
1137
1137
  deleteGList(tokens, GString);
1138
1138
}
1139
1139
 
 
1140
static char is_absolute(char*filename)
 
1141
{
 
1142
    int l = strlen(filename);
 
1143
    if(filename[0] == '/' || filename[0] == '\\') 
 
1144
        return 1;
 
1145
    if(l>2 && filename[1]==':' && (filename[2]=='\\' || filename[2]=='/'))
 
1146
        return 1;
 
1147
    return 0;
 
1148
}
 
1149
 
1140
1150
static GString* qualify_filename(GString*path, GString*filename)
1141
1151
{
1142
1152
  GString*fullpath = 0;
1143
1153
  char*prefix = "/usr/local/share/xpdf/";
1144
1154
 
1145
 
  if (filename->getChar(0) != '\\' && filename->getChar(0) != '/') {
 
1155
  if (!is_absolute(filename->getCString())) {
1146
1156
    /* relative path */
1147
1157
    fullpath = path->copy();
1148
1158
    fullpath->append(filename);
1179
1189
  }
1180
1190
  name = qualify_filename(this->path, (GString *)tokens->get(1));
1181
1191
  if (!(f = fopen(name->getCString(), "r"))) {
1182
 
    error(-1, "Couldn't open 'nameToUnicode' file '%s'",
1183
 
          name->getCString());
 
1192
    error(-1, "Couldn't open 'nameToUnicode' file '%s' using path '%s'",
 
1193
          name->getCString(), path->getCString());
1184
1194
    return;
1185
1195
  }
1186
1196
  line2 = 1;