Changeset 898eb15 for global.c


Ignore:
Timestamp:
Jul 24, 2009, 12:59:23 AM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
ab225e0
Parents:
004d683
git-author:
Anders Kaseorg <andersk@mit.edu> (07/23/09 23:17:32)
git-committer:
Anders Kaseorg <andersk@mit.edu> (07/24/09 00:59:23)
Message:
Lose g->searchactive in favor of g->searchstring != NULL.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    rd43edd2 r898eb15  
    6565  owl_fmtext_init_colorpair_mgr(&(g->cpmgr));
    6666  g->debug=OWL_DEBUG;
    67   g->searchactive=0;
    6867  g->searchstring=NULL;
    6968  g->starttime=time(NULL); /* assumes we call init only a start time */
     
    709708
    710709int owl_global_is_search_active(owl_global *g) {
    711   if (g->searchactive) return(1);
    712   return(0);
    713 }
    714 
    715 void owl_global_set_search_active(owl_global *g, char *string) {
    716   g->searchactive=1;
     710  if (g->searchstring != NULL) return(1);
     711  return(0);
     712}
     713
     714void owl_global_set_search_string(owl_global *g, char *string) {
    717715  if (g->searchstring != NULL) owl_free(g->searchstring);
    718   g->searchstring=owl_strdup(string);
    719 }
    720 
    721 void owl_global_set_search_inactive(owl_global *g) {
    722   g->searchactive=0;
     716  g->searchstring = string ? owl_strdup(string) : NULL;
    723717}
    724718
Note: See TracChangeset for help on using the changeset viewer.