Changeset 58 for trunk/gsdl/src/library
- Timestamp:
- 1998-12-07T11:50:25+13:00 (26 years ago)
- Location:
- trunk/gsdl/src/library
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/library/browse.cpp
r36 r58 434 434 } else { 435 435 if (!info.c.empty()) { 436 (info.c, firstcontent);436 get_first_section(info.c, firstcontent); 437 437 return_text += link + *here + "." + firstcontent + "\">"; 438 438 return_text += info.t + "</a> "; … … 735 735 736 736 // sorts an array of sections alphabetically (i.e. by title, author depending 737 // on what classification is) 737 // on what classification is) or by date 738 738 void browseclass::sort_array (vector<text_t> &array, gdbmclass &gdbm, 739 739 const text_t &collection, const text_t classification) { 740 741 if ((classification[0] != 'T') && (classification[0] != 'A') && 742 (classification[0] != 'D')) return; 740 743 741 744 gdbm_info info; … … 759 762 tmparray = string_add(tmparray, &len, info.t.getcstr()); 760 763 761 } else {764 } else if (classification[0] == 'A') { 762 765 alphabetize_string_name(info.a); 763 766 info.a += ":#:" + *here; 764 767 tmparray = string_add(tmparray, &len, info.a.getcstr()); 768 769 } else { 770 info.i += ":#:" + *here; 771 tmparray = string_add(tmparray, &len, info.i.getcstr()); 765 772 } 766 773 here ++; -
trunk/gsdl/src/library/gdbmclass.cpp
r54 r58 711 711 712 712 static int compare_str (const void *e1, const void *e2) { 713 return my_stricmp(*((char**)e1), *((char**)e2));713 return _stricmp(*((char**)e1), *((char**)e2)); 714 714 } 715 715 -
trunk/gsdl/src/library/libinterface.cpp
r4 r58 240 240 else if (arg_a == "t") document_action (args, textout, logout); 241 241 else if (arg_a == "p") page_action (args, textout, logout); 242 else if ((arg_a.size() == 2) && (arg_a[0] == 'a')) auxiliary_action (args, textout, logout); 242 243 else 243 244 { … … 256 257 { 257 258 argconfigstr = 258 " a[p]" // action: q=query, b=browse, t=targetdoc, p=page259 "+a[p]" // action: q=query, b=browse, t=targetdoc, p=page, a1=auxiliary 259 260 "t[1]" // query type: 0=boolean, 1=ranked 260 261 "i[c]" // index: c=chapter, p=paragraph, t=title, b=book … … 262 263 "s[0]" // stemming: 0=off, 1=on 263 264 "+p[home]" // page 264 "+c[unu 2]"// collection265 "+c[unu]" // collection 265 266 "+r[1]" // results from 266 267 "+d[C.1]" // the target document … … 865 866 866 867 ///////////////////////////////////////////////////////////////////////////////////////// 868 // auxiliary_action is called to retrieve and display collection documents 869 // in formats other than those handled by document_action (i.e. those other 870 // than text). This should be overridden for collections needing to return 871 // images, postscript etc. You can have as many auxiliary actions as needed 872 // by setting arg_a to a1, a2, a3 etc. and testing arg["a"][1] within the 873 // auxiliary_action function. 874 // auxiliary_action defaults to calling document_action 875 876 void libinterface::auxiliary_action (cgiargsclass &args, ostream &textout, ostream &logout) { 877 document_action (args, textout, logout); 878 } 879 880 ///////////////////////////////////////////////////////////////////////////////////////// 867 881 // page is called when a standard html page is to be displayed 868 882 void libinterface::page_action (cgiargsclass &args, ostream &textout, ostream &logout) -
trunk/gsdl/src/library/libinterface.h
r4 r58 119 119 virtual void document_action (cgiargsclass &args, ostream &textout, ostream &logout); 120 120 virtual void page_action (cgiargsclass &args, ostream &textout, ostream &logout); 121 virtual void auxiliary_action (cgiargsclass &args, ostream &textout, ostream &logout); 121 122 122 123 virtual void displayresults (cgiargsclass &args, ostream &textout, ostream &logout,
Note:
See TracChangeset
for help on using the changeset viewer.