Ejemplo n.º 1
0
bool WordList_hasWord (WordList me, const wchar *word) {
	long p, d;
	int cf;
	if (wcslen (word) > 3333) return false;
	Longchar_genericizeW (word, buffer);
	if (! my length) my length = wcslen (my string);
	p = my length / 2, d = p / 2;
	while (d > 20) {
		p = gotoStart (me, p);
		cf = compare (buffer, my string + p);
		if (cf == 0) return true;
		if (cf < 0) p -= d; else p += d;
		d /= 2;
	}
	p = gotoStart (me, p);
	cf = compare (buffer, my string + p);
	if (cf == 0) return true;
	if (cf > 0) {
		for (;;) {
			p = gotoNext (me, p);
			if (p >= my length) return false;
			cf = compare (buffer, my string + p);
			if (cf == 0) return true;
			if (cf < 0) return false;
		}
	} else {
		for (;;) {
			p = gotoPrevious (me, p);
			if (p < 0) return false;
			cf = compare (buffer, my string + p);
			if (cf == 0) return true;
			if (cf > 0) return false;
		}
	}
	return false;   // should not occur
}
Ejemplo n.º 2
0
void MemoryEditor::prevData() {
  gotoPrevious(QHexEdit::UsageRead | QHexEdit::UsageWrite);
}
Ejemplo n.º 3
0
void MemoryEditor::prevUnknown() {
  gotoPrevious(0);
}
Ejemplo n.º 4
0
void MemoryEditor::prevCode() {
  gotoPrevious(QHexEdit::UsageExec);
}