Changeset 1fd0b25 for global.c


Ignore:
Timestamp:
Aug 17, 2002, 10:31:35 AM (19 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
37c27cf
Parents:
8509c08
Message:
Added the 'search' command.
'/' is a keybinding for 'search'
'?' is a keybinding for 'search -r'
Fixed stristr, which was completely broken
renamed owl_fmtext_ztext_stylestrip to owl_function_ztext_styletsrip
     and put it in functions.c
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    re1c4636 r1fd0b25  
    5858  g->colorpairs=COLOR_PAIRS;
    5959  g->debug=OWL_DEBUG;
     60  g->searchactive=0;
     61  g->searchstring=NULL;
    6062  g->starttime=time(NULL); /* assumes we call init only a start time */
    6163  strcpy(g->buffercommand, "");
     
    593595  return(0);
    594596}
     597
     598int owl_global_is_search_active(owl_global *g) {
     599  if (g->searchactive) return(1);
     600  return(0);
     601}
     602
     603void owl_global_set_search_active(owl_global *g, char *string) {
     604  g->searchactive=1;
     605  if (g->searchstring != NULL) owl_free(g->searchstring);
     606  g->searchstring=owl_strdup(string);
     607}
     608
     609void owl_global_set_search_inactive(owl_global *g) {
     610  g->searchactive=0;
     611}
     612
     613char *owl_global_get_search_string(owl_global *g) {
     614  if (g->searchstring==NULL) return("");
     615  return(g->searchstring);
     616}
Note: See TracChangeset for help on using the changeset viewer.