Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

htsearch.h File Reference

#include "htatom.h"
#include "htdialog.h"
#include "htexcept.h"
#include "htformat.h"
#include "htobj.h"
#include "htstring.h"
#include "stream.h"
#include <sys/types.h>
#include "regex.h"

Go to the source code of this file.

Classes

class  ht_evalstr_search_form
struct  ht_evalstr_search_form_data
class  ht_expr_search_form
struct  ht_expr_search_form_data
class  ht_expr_search_request
class  ht_fxbin_search_request
class  ht_hexascii_search_form
struct  ht_hexascii_search_form_data
class  ht_regex_search_exception
class  ht_regex_search_request
class  ht_replace_bin_context
class  ht_replace_dialog
class  ht_replace_hexascii_search_form
struct  ht_replace_hexascii_search_form_data
class  ht_search_bin_context
class  ht_search_dialog
struct  ht_search_dialog_mode
class  ht_vregex_search_form
struct  ht_vregex_search_form_data

Defines

#define SC_PHYSICAL   0
#define SC_VISUAL   1
#define ST_FXBIN   0
#define SF_FXBIN_CASEINSENSITIVE   1
#define SF_FXBIN_IDLE   2
#define ST_REGEX   1
#define SF_REGEX_CASEINSENSITIVE   1
#define SF_REGEX_IDLE   2
#define ST_EXPR   3
#define MAX_SEARCH_DIALOG_MODES   16
#define MAX_REPLACE_DIALOG_MODES   16
#define SEARCHMODE_BIN   1
#define SEARCHMODE_EVALSTR   2
#define SEARCHMODE_VREGEX   4
#define SEARCHMODE_EXPR   8
#define SFBIN_CASEINSENSITIVE   1

Typedefs

typedef ht_view *(* create_form_func )(bounds *b, HT_ATOM histid)
typedef void(* create_desc_func )(char *buf, int buflen, ht_view *form)

Functions

ht_search_requestsearch_dialog (ht_format_viewer *format, UINT searchmodes, viewer_pos *start, viewer_pos *end)
UINT replace_dialog (ht_format_viewer *format, UINT searchmodes, bool *cancelled)
Objectcreate_search_bin_context (ht_streamfile *file, FILEOFS ofs, UINT len, byte *pat, UINT patlen, UINT flags, UINT *return_ofs, bool *return_success)
bool search_bin_process (Object *context, ht_text *progress_indicator)
ht_viewcreate_form_hexascii (bounds *b, HT_ATOM histid)
void create_desc_hexascii (char *buf, int buflen, ht_view *f)
ht_search_resultlinear_bin_search (ht_search_request *search, FILEOFS start, FILEOFS end, ht_streamfile *file, FILEOFS fofs, dword fsize)
Objectcreate_replace_bin_context (ht_streamfile *file, FILEOFS ofs, UINT len, byte *repl, UINT repllen, UINT *return_repllen)
bool replace_bin_process (Object *context, ht_text *progress_indicator)


Define Documentation

#define MAX_REPLACE_DIALOG_MODES   16
 

Definition at line 256 of file htsearch.h.

Referenced by ht_replace_dialog::insert_replace_mode().

#define MAX_SEARCH_DIALOG_MODES   16
 

Definition at line 226 of file htsearch.h.

Referenced by ht_search_dialog::insert_search_mode().

#define SC_PHYSICAL   0
 

Definition at line 42 of file htsearch.h.

Referenced by ht_text_viewer::continue_search(), ht_format_viewer::continue_search(), ht_uformat_viewer::handlemsg(), ht_physical_search_result::ht_physical_search_result(), replace_dialog(), ht_text_viewer::search(), ht_linear_sub::search(), ht_analy_sub::search(), search_dialog(), ht_text_viewer::show_search_result(), ht_format_viewer::show_search_result(), and text_search_dialog().

#define SC_VISUAL   1
 

Definition at line 43 of file htsearch.h.

Referenced by ht_format_viewer::continue_search(), ht_uformat_viewer::handlemsg(), ht_visual_search_result::ht_visual_search_result(), search_dialog(), ht_aviewer::searchForXRefs(), ht_format_viewer::show_search_result(), and ht_uformat_viewer::vsearch().

#define SEARCHMODE_BIN   1
 

Definition at line 287 of file htsearch.h.

Referenced by ht_text_viewer::func(), hthex_init(), httext_init(), ht_clipboard_viewer::init(), and ht_aviewer::init().

#define SEARCHMODE_EVALSTR   2
 

Definition at line 288 of file htsearch.h.

Referenced by hthex_init(), httext_init(), ht_clipboard_viewer::init(), and ht_aviewer::init().

#define SEARCHMODE_EXPR   8
 

Definition at line 290 of file htsearch.h.

Referenced by hthex_init(), ht_clipboard_viewer::init(), and ht_aviewer::init().

#define SEARCHMODE_VREGEX   4
 

Definition at line 289 of file htsearch.h.

Referenced by ht_uformat_viewer::init().

#define SF_FXBIN_CASEINSENSITIVE   1
 

Definition at line 47 of file htsearch.h.

#define SF_FXBIN_IDLE   2
 

Definition at line 48 of file htsearch.h.

#define SF_REGEX_CASEINSENSITIVE   1
 

Definition at line 51 of file htsearch.h.

Referenced by create_request_vregex(), ht_regex_search_request::ht_regex_search_request(), and ht_aviewer::searchForXRefs().

#define SF_REGEX_IDLE   2
 

Definition at line 52 of file htsearch.h.

#define SFBIN_CASEINSENSITIVE   1
 

Definition at line 320 of file htsearch.h.

Referenced by create_search_bin_context(), linear_bin_search(), and search_bin_process().

#define ST_EXPR   3
 

Definition at line 54 of file htsearch.h.

Referenced by ht_expr_search_request::ht_expr_search_request(), ht_linear_sub::search(), and ht_analy_sub::search().

#define ST_FXBIN   0
 

Definition at line 46 of file htsearch.h.

Referenced by ht_fxbin_search_request::ht_fxbin_search_request(), ht_linear_sub::search(), and ht_analy_sub::search().

#define ST_REGEX   1
 

Definition at line 50 of file htsearch.h.

Referenced by ht_regex_search_request::ht_regex_search_request(), and ht_uformat_viewer::vsearch().


Typedef Documentation

typedef void(* create_desc_func)(char *buf, int buflen, ht_view *form)
 

Definition at line 57 of file htsearch.h.

typedef ht_view*(* create_form_func)(bounds *b, HT_ATOM histid)
 

Definition at line 56 of file htsearch.h.


Function Documentation

void create_desc_hexascii char *  buf,
int  buflen,
ht_view f
 

Definition at line 139 of file htsearch.cc.

References buf, ht_view::databuf_get(), ht_hexascii_search_form_data::end, escape_special(), ht_io_exception, NULL, ht_hexascii_search_form_data::options, ht_hexascii_search_form_data::start, and ht_hexascii_search_form_data::str.

ht_view* create_form_hexascii bounds *  b,
HT_ATOM  histid
 

Definition at line 110 of file htsearch.cc.

References find_atom(), HT_ATOM, and ht_hexascii_search_form::init().

Object* create_replace_bin_context ht_streamfile file,
FILEOFS  ofs,
UINT  len,
byte *  repl,
UINT  repllen,
UINT return_repllen
 

Definition at line 1195 of file htsearch.cc.

References ht_replace_bin_context::buf, byte, file, ht_replace_bin_context::file, FILEOFS, len, ht_replace_bin_context::len, malloc(), ht_replace_bin_context::o, ht_replace_bin_context::ofs, ht_replace_bin_context::repl, REPLACE_COPY_BUF_SIZE, ht_replace_bin_context::repllen, ht_replace_bin_context::return_repllen, UINT, and ht_replace_bin_context::z.

Referenced by create_replace_hexascii_context().

Object* create_search_bin_context ht_streamfile file,
FILEOFS  ofs,
UINT  len,
byte *  pat,
UINT  patlen,
UINT  flags,
UINT return_ofs,
bool *  return_success
 

Definition at line 480 of file htsearch.cc.

References ht_search_bin_context::buf, bufdowncase(), ht_search_bin_context::bufptr, byte, ht_search_bin_context::c, file, ht_search_bin_context::file, ht_search_bin_context::file_end, FILEOFS, ht_search_bin_context::flags, len, ht_search_bin_context::len, malloc(), NULL, ht_search_bin_context::o, ht_search_bin_context::ofs, ht_search_bin_context::pat, ht_search_bin_context::patlen, ht_search_bin_context::return_ofs, ht_search_bin_context::return_success, SEARCH_BUF_SIZE, SFBIN_CASEINSENSITIVE, and UINT.

Referenced by linear_bin_search().

ht_search_result* linear_bin_search ht_search_request search,
FILEOFS  start,
FILEOFS  end,
ht_streamfile file,
FILEOFS  fofs,
dword  fsize
 

Definition at line 1506 of file htsearch.cc.

References create_search_bin_context(), ht_fxbin_search_request::data, ht_fxbin_search_request::data_size, execute_process(), file, FILEOFS, ht_search_request::flags, NULL, ht_physical_search_result::offset, search_bin_process(), SFBIN_CASEINSENSITIVE, and ht_physical_search_result::size.

Referenced by ht_text_viewer::search(), ht_linear_sub::search(), and ht_analy_sub::search().

bool replace_bin_process Object context,
ht_text progress_indicator
 

Definition at line 1216 of file htsearch.cc.

References ht_replace_bin_context::buf, ht_streamfile::extend(), ht_replace_bin_context::file, ht_streamfile::get_size(), ht_io_exception, ht_replace_bin_context::len, ht_replace_bin_context::o, ht_replace_bin_context::ofs, ht_stream::read(), ht_replace_bin_context::repl, REPLACE_COPY_BUF_SIZE, ht_replace_bin_context::repllen, ht_replace_bin_context::return_repllen, ht_streamfile::seek(), ht_text::settext(), size, ht_streamfile::truncate(), UINT, ht_stream::write(), and ht_replace_bin_context::z.

UINT replace_dialog ht_format_viewer format,
UINT  searchmodes,
bool *  cancelled
 

Definition at line 1046 of file htsearch.cc.

References align_center, app, btmask_all, btmask_cancel, btmask_no, btmask_yes, button_all, button_cancel, button_no, button_yes, cmd_vstate_restore, ht_search_method::create_desc, ht_replace_method::create_form, ht_search_method::create_form, ht_replace_method::create_replace_context, ht_search_method::create_request, ht_replace_dialog::done(), errorbox, execute_process(), FILEOFS, find_atom(), ht_format_viewer::get_current_offset(), ht_format_viewer::get_file(), ht_replace_dialog::get_replace_modeform(), ht_replace_dialog::get_replace_modeid(), ht_search_dialog::get_search_modeform(), ht_search_dialog::get_search_modeid(), ht_view::getbounds(), ht_replace_method::histid, ht_search_method::histid, ht_replace_dialog::init(), insert_history_entry(), ht_replace_dialog::insert_replace_mode(), ht_search_dialog::insert_search_mode(), lastreplacemodeid, lastsearchmodeid, msg_filesize_changed, msgbox(), ht_replace_method::name, ht_search_method::name, NULL, ht_physical_search_result::offset, search_pos::offset, ht_format_viewer::psearch(), ht_replace_dialog::replace_mode_xgroup, ht_replace_method::replace_process, ht_dialog::run(), SC_PHYSICAL, screen, ht_search_method::search_class, ht_search_method::search_mode_mask, ht_search_dialog::search_mode_xgroup, ht_replace_dialog::select_replace_mode(), ht_search_dialog::select_search_mode(), ht_view::sendmsg(), ht_format_viewer::show_search_result(), ht_physical_search_result::size, genericdrawbuf::size, UINT, and ht_format_viewer::vstate_save().

Referenced by ht_uformat_viewer::handlemsg().

bool search_bin_process Object context,
ht_text progress_indicator
 

Definition at line 512 of file htsearch.cc.

References ht_search_bin_context::buf, bufdowncase(), ht_search_bin_context::bufptr, ht_search_bin_context::c, ht_search_bin_context::file, ht_search_bin_context::file_end, ht_search_bin_context::flags, ht_snprintf(), ht_search_bin_context::len, ht_search_bin_context::o, ht_search_bin_context::ofs, ht_search_bin_context::pat, ht_search_bin_context::patlen, ht_stream::read(), ht_search_bin_context::return_ofs, ht_search_bin_context::return_success, SEARCH_BUF_SIZE, ht_streamfile::seek(), ht_text::settext(), and SFBIN_CASEINSENSITIVE.

Referenced by linear_bin_search().

ht_search_request* search_dialog ht_format_viewer format,
UINT  searchmodes,
viewer_pos start,
viewer_pos end
 

Definition at line 955 of file htsearch.cc.

References ht_search_method::create_desc, ht_search_method::create_form, ht_search_method::create_request, ht_search_dialog::done(), errorbox, find_atom(), ht_search_dialog::get_search_modeform(), ht_search_dialog::get_search_modeid(), ht_view::getbounds(), ht_search_method::histid, ht_io_exception, ht_search_dialog::init(), insert_history_entry(), ht_search_dialog::insert_search_mode(), lastsearchmodeid, ht_search_method::name, NULL, search_pos::offset, ht_format_viewer::offset_to_pos(), search_pos::pos, ht_format_viewer::pos_to_offset(), ht_dialog::run(), SC_PHYSICAL, SC_VISUAL, screen, ht_search_method::search_class, ht_search_method::search_mode_mask, ht_search_dialog::search_mode_xgroup, ht_search_dialog::select_search_mode(), genericdrawbuf::size, and UINT.

Referenced by ht_uformat_viewer::handlemsg().


Generated on Fri May 7 21:15:49 2004 by doxygen 1.3.5