Ignore:
Timestamp:
1999-01-19T14:38:20+13:00 (25 years ago)
Author:
rjmcnab
Message:

Made the source more portable.

Location:
trunk/gsdl/src/colservr
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/colservr/gdbmclass.cpp

    r112 r114  
    1212/*
    1313   $Log$
     14   Revision 1.3  1999/01/19 01:38:15  rjmcnab
     15
     16   Made the source more portable.
     17
    1418   Revision 1.2  1999/01/12 01:51:01  rjmcnab
    1519
     
    3135#include <string.h>
    3236
    33 #ifndef USE_OBJECTSPACE
     37#if defined(GSDL_NEED_STRINGS_H)
     38#include <strings.h>
     39#endif
     40
     41#if defined(GSDL_USE_OBJECTSPACE)
     42#  include <ospace\std\algorithm>
     43#elif defined(GSDL_USE_STL_H)
     44#  if defined(GSDL_USE_ALGO_H)
     45#    include <algo.h>
     46#  else
     47#    include <algorithm.h>
     48#  endif
     49#else
    3450#  include <algorithm>
    35 #else
    36 #  include <ospace\std\algorithm>
    3751#endif
    3852
  • trunk/gsdl/src/colservr/mgsearch.cpp

    r112 r114  
    1212/*
    1313   $Log$
     14   Revision 1.3  1999/01/19 01:38:17  rjmcnab
     15
     16   Made the source more portable.
     17
    1418   Revision 1.2  1999/01/12 01:51:02  rjmcnab
    1519
     
    2327
    2428
     29#include "gsdlconf.h"
    2530#include "mgsearch.h"
    2631
     
    3035#include <ctype.h>
    3136
    32 #ifdef __GNUG__
     37#if defined(GSDL_USE_OBJECTSPACE)
     38#  include <ospace\std\iostream>
     39#elif defined(GSDL_USE_IOS_H)
    3340#  include <iostream.h>
    34 #  include <gdbm.h>
    35 
    3641#else
    37 #  ifndef USE_OBJECTSPACE
    38 #    include <iostream>
    39 #  else
    40 #    include <ospace\std\iostream>
    41 #  endif
    42 
     42#  include <iostream>
     43#endif
     44
     45#if defined(__WIN32__)
    4346// gdbm stuff
    4447#  include "autoconf.h"
     
    4649#  include "gdbmconst.h"
    4750#  include "gdbm.h"
     51#else
     52#  include <gdbm.h>
    4853#endif
     54
    4955 
    5056#include <assert.h>
     
    203209// it assumes that cache_num is set up correctly to point to
    204210// a suitable result cache
    205 int ourquerycallback(char *UDoc, int ULen, int DocNum,
     211int ourquerycallback(char *UDoc, int /*ULen*/, int DocNum,
    206212             float Weight, void *info) {
    207213
     
    227233// This callback is called once for each term in the query
    228234int termfreqcallback(char *Word, int ULen,  int Freq,
    229              float Weight,  void *info) {
     235             float /*Weight*/,  void *info) {
    230236  queryresultsclass *queryresults = (queryresultsclass *)info;
    231237
     
    241247
    242248// this callback is called once for each variation of each term
    243 int termscallback(char *Word, int ULen, int Freq,
    244           float Weight, void *info) {
     249int termscallback(char *Word, int ULen, int /*Freq*/,
     250          float /*Weight*/, void *info) {
    245251
    246252  text_t term;
     
    253259
    254260// This callback is for getting document text
    255 int doctextcallback(char *Word, int ULen,  int Freq,
    256             float Weight,  void *info) {
     261int doctextcallback(char *Word, int ULen,  int /*Freq*/,
     262            float /*Weight*/,  void *info) {
    257263  text_t *output = (text_t *)info;
    258264  if (output == NULL) return 0;
  • trunk/gsdl/src/colservr/querycache.cpp

    r112 r114  
    1212/*
    1313   $Log$
     14   Revision 1.3  1999/01/19 01:38:17  rjmcnab
     15
     16   Made the source more portable.
     17
    1418   Revision 1.2  1999/01/12 01:51:02  rjmcnab
    1519
     
    9498  for (i=0; i < maxcachesize; i++)
    9599    {
    96       if (resultcache[i].accessnum < minaccessnum)
     100      if (resultcache[i].accessnum < minaccessnum) {
     101    minaccessnum = resultcache[i].accessnum;
    97102    minaccessi = i;
     103      }
    98104    }
    99105
    100   return i;
     106  return minaccessi;
    101107}
    102108
  • trunk/gsdl/src/colservr/queryinfo.h

    r110 r114  
    1515
    1616
     17#include "gsdlconf.h"
    1718#include "text_t.h"
    1819
    19 #ifndef USE_OBJECTSPACE
     20#if defined(GSDL_USE_OBJECTSPACE)
     21#  include <ospace\std\vector>
     22#  include <ospace\std\algorithm>
     23#elif defined(GSDL_USE_STL_H)
     24#  include <vector.h>
     25#  if defined(GSDL_USE_ALGO_H)
     26#    include <algo.h>
     27#  else
     28#    include <algorithm.h>
     29#  endif
     30#else
    2031#  include <vector>
    2132#  include <algorithm>
    22 #else
    23 #  include <ospace\std\vector>
    24 #  include <ospace\std\algorithm>
    2533#endif
    2634
     
    7583{
    7684public:
     85  docresultclass(void) {docnum=-1;docweight=0.0;};
     86  ~docresultclass(void) {};
     87
    7788  int docnum;
    7889  float docweight;
Note: See TracChangeset for help on using the changeset viewer.