Changeset 1123 for trunk/gsdl/src


Ignore:
Timestamp:
2000-04-18T16:02:02+12:00 (24 years ago)
Author:
kjm18
Message:

added basepath to LoadData, needed if text and index are in different directories

Location:
trunk/gsdl/src/mgpp/text
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/mgpp/text/TextGet.cpp

    r855 r1123  
    478478
    479479void TextData::Clear () {
    480   cd.Clear(); // not implemented
     480  cd.Clear();
    481481  textFile = NULL;
    482482  textIdxFile = NULL;
     
    485485}
    486486
    487 bool TextData::LoadData (char *textname) {
     487bool TextData::LoadData (char *basepath, char *textname) {
     488 
     489  if (textname[0] == '\0') return false;
     490 
     491  // set the basepath
     492  set_basepath(basepath);
     493 
    488494  // load the compression dictionary
    489495  if (!OpenLoadCompDict (textname, cd)) return false;
  • trunk/gsdl/src/mgpp/text/TextGet.h

    r855 r1123  
    4242  // loads compression dictionary, the compressed text header,
    4343  // and all level informaiton
    44   bool LoadData (char *textname);
     44  bool LoadData (char *basepath, char *textname);
    4545  bool UnloadData ();
    4646};
  • trunk/gsdl/src/mgpp/text/mg_decompress_text.cpp

    r856 r1123  
    3434  int ch;
    3535  char *filename = "";
     36  char *basePath = "";
    3637  UCArray level;
    3738  SetCStr (level, "Document");
     
    4748      break;
    4849    case 'd':
     50      basePath = optarg;
    4951      set_basepath (optarg);
    5052      break;
     
    6264  // load up the text information
    6365  TextData td;
    64   if (!td.LoadData (filename)) {
     66  if (!td.LoadData (basePath, filename)) {
    6567    FatalError (1, "Couldn't load text information for \"%s\"", filename);
    6668  }
     
    9092  return 0;
    9193}
     94
     95
Note: See TracChangeset for help on using the changeset viewer.