void CFLTKEditor::Find() { char *pcVal; pcVal = (char *) fl_input("Search String:", GetSearchString()); if (pcVal != NULL) { // User entered a string - go find it! strcpy(GetSearchString(), pcVal); Find2(); } }
logical ODE_SearchReplace :: GetData (char *scope, logical do_replace, CTX_GUIBase *ctxptr ) { static const RegExp deregex_search("([][*.^${}()?\\\\])", "\\\\$1"); static const RegExp deregex_replace("([\\\\$])","\\\\$1"); std::string search; std::string replace; logical term = NO; BEGINSEQ if ( Initialize(scope,do_replace) ) ERROR if ( ctxptr->ExecuteWindow(this,"FORM_SearchReplace", do_replace ? "Replace" : "Search",NO) ) ERROR if ( !IsRegExp() ) { search = GetSearchString(); replace = GetReplaceString(); deregex_search.Replace(search); deregex_replace.Replace(replace); search_string.SetValue(const_cast<char *>(search.c_str())); replace_string.SetValue(const_cast<char *>(replace.c_str())); } RECOVER term = YES; ENDSEQ return(term); }
int filterdirlist(char *fileName) { /* * Exclude "." files and files containing the string "sao". */ GlobalDataObjectType *gd; gd = GetGlobalDataObject(); #if 0 GetSearchString ( gd ); #endif if ( fileName[0] == '.' || ( strstr ( fileName, GetSearchString(gd) ) == NULL ) ) return(0); return(1); }
void CFLTKEditor::Find2() { if (GetSearchString()[0] == 0) { // Search string is blank; get a new one... Find(); return; } int iPos = GetEditor()->insert_position(); int iFound = GetTextBuffer()->search_forward(iPos, GetSearchString(), &iPos); if (iFound) { // Found a match; select and update the position... GetTextBuffer()->select(iPos, iPos + (int) strlen(GetSearchString())); GetEditor()->insert_position(iPos + (int) strlen(GetSearchString())); GetEditor()->show_insert_position(); } else { fl_alert("No occurrences of \'%s\' found!", GetSearchString()); } }
void PirateBaySearcher::FormURLs() { v_urls.clear(); char url[1024+1]; Log("PirateBaySearcher::FormURLs()"); for(unsigned int i = 0; i < (*v_project_data).size(); i++) { ProjectData pd = (*v_project_data)[i]; // http://thepiratebay.org/search.php?q=family%20guy&audio=&video=&apps=&games=&other=&what=search&orderby=&page=0 strcpy(url, "http://thepiratebay.org/search.php?q="); vector<string> items = GetSearchString(pd.m_search_strings); for(unsigned int j=0; j < items.size(); j++) { if(j!=0) strcat(url, "%20"); strcat(url, items[j].c_str()); } strcat(url, "&audio=&video=&apps=&games=&other=&what=search&orderby=&page="); v_urls.push_back(url); } }