void search_backward(void) { char *p, *string, tmp[BLOCK_SEARCH_SIZE], tmpstr[BLOCK_SEARCH_SIZE]; int quit, sizea, sizeb; INT blockstart; if (!searchA(&string, &sizea, tmp, sizeof(tmp))) return; quit = -1; blockstart = base + cursor - sizea + 1; do { blockstart -= BLOCK_SEARCH_SIZE - sizea + 1; sizeb = BLOCK_SEARCH_SIZE; if (blockstart < 0) { sizeb -= -blockstart; blockstart = 0; } if (sizeb < sizea) quit = -3; else { if (LSEEK_(fd, blockstart) == -1) { quit = -3; break; } if (sizeb != read(fd, tmp, sizeb)) quit = -3; else if (getch() != ERR) quit = -2; else if ((p = mymemrmem(tmp, sizeb, string, sizea))) quit = p - tmp; } sprintf(tmpstr,"searching... 0x%08llX", (long long) blockstart); nodelay(stdscr, TRUE); displayTwoLineMessage(tmpstr, "(press any key to cancel)"); } while (quit == -1); searchB(quit + (quit >= 0 ? blockstart : 0), string); }
int FormFunc::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: infoLUpdated((*reinterpret_cast< QString(*)>(_a[1]))); break; case 1: searchB(); break; case 2: nextB(); break; case 3: prevB(); break; case 4: clrB(); break; case 5: playB(); break; case 6: downloadB(); break; case 7: setPage(); break; case 8: abortB(); break; case 9: timeOut(); break; case 10: mnuTPopup(); break; case 11: mnuQPopup(); break; case 12: copyAddr(); break; case 13: delQueueEntry(); break; case 14: dwnPB(); break; case 15: copyAddr2(); break; case 16: chPage((*reinterpret_cast< bool(*)>(_a[1]))); break; case 17: queueB(); break; case 18: searchAddressAfterThr(); break; case 19: openInBrowser(); break; case 20: updateInfoL((*reinterpret_cast< QString(*)>(_a[1]))); break; case 21: infoL((*reinterpret_cast< QString(*)>(_a[1]))); break; default: ; } _id -= 22; } return _id; }