Changeset 3176


Ignore:
Timestamp:
2002-06-24T16:58:25+12:00 (21 years ago)
Author:
jrm21
Message:

in the "Word count" freqmsg, we now print out terms with digits,
provided there is at least 1 non-digit character in it.

File:
1 edited

Legend:

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

    r3159 r3176  
    3535#include "htmlutils.h" // for html_safe in do_action
    3636#include "gsdltools.h"
     37#include <stdlib.h> // for strtol
    3738
    3839void colinfo_t::clear () {
     
    13941395  TermInfo_tarray::const_iterator end_term = response.termInfo.end();
    13951396  while (this_term != end_term) {
     1397    // check that the term doesn't consist completely of digits...
    13961398    char *term = (*this_term).term.getcstr();
    1397     if(term[0]<'0' || term[0] >'9'){
     1399    char *lastchar;
     1400    strtol(term,&lastchar,10);
     1401    if(*lastchar != '\0'){
    13981402      freqmsg += (*this_term).term + ": " + (*this_term).freq;
    13991403      if ((this_term + 1) != end_term)
Note: See TracChangeset for help on using the changeset viewer.