Changeset 957


Ignore:
Timestamp:
2000-02-22T10:45:08+13:00 (24 years ago)
Author:
sjboddie
Message:

gsdlhome now set from gsdlsite.cfg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cstr/src/recpt/cstrlibrarymain.cpp

    r911 r957  
    2828/*
    2929   $Log$
     30   Revision 1.3  2000/02/21 21:45:08  sjboddie
     31   gsdlhome now set from gsdlsite.cfg
     32
    3033   Revision 1.2  2000/02/06 21:25:22  sjboddie
    3134   updated cstr
     
    6770#include "htmlbrowserclass.h"
    6871
    69 #include "gsdlhome.h"
    70 
     72#include "recptconfig.h"
    7173
    7274int main () {
     
    7779  text_tarray collections;
    7880  collections.push_back ("cstr");
     81
     82  // get gsdlhome (if we fail the error will be picked up later -- in
     83  // cgiwrapper)
     84  text_t gsdlhome;
     85  site_cfg_read (gsdlhome);
    7986
    8087  text_tarray::const_iterator thiscol = collections.begin();
     
    127134  recpt.add_converter ("u", &utf8inconvert, &utf8outconvert);
    128135
    129   mapinconvertclass gbinconvert;
    130   gbinconvert.setmapfile (GSDL_GSDLHOME, "gbku", 0x25a1);
    131   mapoutconvertclass gboutconvert;
    132   gboutconvert.setmapfile (GSDL_GSDLHOME, "ugbk", 0xa1f5);
    133   recpt.add_converter ("g", &gbinconvert, &gboutconvert);
     136  if (!gsdlhome.empty()) {
     137    mapinconvertclass gbinconvert;
     138    gbinconvert.setmapfile (gsdlhome, "gbku", 0x25a1);
     139    mapoutconvertclass gboutconvert;
     140    gboutconvert.setmapfile (gsdlhome, "ugbk", 0xa1f5);
     141    recpt.add_converter ("g", &gbinconvert, &gboutconvert);
     142  }
    134143
    135144  // the list of actions. Note: these actions will become invalid
Note: See TracChangeset for help on using the changeset viewer.