Changeset 584


Ignore:
Timestamp:
1999-09-15T10:03:27+12:00 (25 years ago)
Author:
sjboddie
Message:

now reads in collections from a file to avoid recompiling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/librarymain.cpp

    r547 r584  
    2828/*
    2929   $Log$
     30   Revision 1.11  1999/09/14 22:03:27  sjboddie
     31   now reads in collections from a file to avoid recompiling
     32
    3033   Revision 1.10  1999/09/08 00:51:11  sjboddie
    3134   removed old interface stuff
     
    8689#include "authenaction.h"
    8790
     91#include "gsdlhome.h"
    8892
    8993int main () {
    9094  receptionist recpt;
    9195  nullproto nproto;
    92  
    93   // add a collection server for each collection
     96
    9497  text_tarray collections;
    95   collections.push_back ("gberg");
    96   collections.push_back ("hdl");
    97   collections.push_back ("cstr");
    98   collections.push_back ("tcc");
    99   collections.push_back ("niupepa");
    100   collections.push_back ("tidbits");
    101   collections.push_back ("hcibib");
    102   collections.push_back ("csbib");
    103   collections.push_back ("bbcsa");
     98
     99  ifstream collist (GSDL_GSDLHOME "/etc/collections.txt");
     100  if (!collist) {
     101    exit(1);
     102  }
     103  char collection[100];
     104  while (!collist.eof()) {
     105    collist.getline (collection, 100);
     106    if (collection[0] != '\0')
     107      collections.push_back (collection);
     108  }
     109  collist.close();
    104110
    105111  text_tarray::const_iterator thiscol = collections.begin();
Note: See TracChangeset for help on using the changeset viewer.