static void quicksort(uint32_t* const start, uint32_t* const stop)\r
{\r
uint32_t *it = start + 1, *rit = stop;\r
-\r
+ uint32_t tmp;\r
if(it > rit)\r
return;\r
\r
- while(it < rit)\r
- if(*it <= *start)\r
+ while(it < rit) {\r
+ if(*it <= *start) {\r
++it;\r
- else if(*rit > *start)\r
+ } else if(*rit > *start) {\r
--rit;\r
- else\r
- *it ^= (*it ^= *rit, *rit ^= *it);\r
+ } else {\r
+ tmp = *it;\r
+ *it = *rit;\r
+ *rit = tmp;\r
+ }\r
+ }\r
\r
if(*rit >= *start)\r
--rit;\r
- if(rit != start)\r
- *rit ^= (*rit ^= *start, *start ^= *rit);\r
+ if(rit != start) {\r
+ tmp = *rit;\r
+ *rit = *start;\r
+ *start = tmp;\r
+ }\r
\r
quicksort(start, rit - 1);\r
quicksort(rit + 1, stop);\r
{\r
int out;\r
uint8_t ret;\r
-\r
+ uint32_t tmp;\r
s->odd &= 0xffffff;\r
- s->odd ^= (s->odd ^= s->even, s->even ^= s->odd);\r
+ tmp = s->odd;\r
+ s->odd = s->even;\r
+ s->even = tmp;\r
\r
out = s->even & 1;\r
out ^= LF_POLY_EVEN & (s->even >>= 1);\r
LDFLAGS = $(COMMON_FLAGS)
CFLAGS = -std=c99 -I. -I../include -I../common -I/opt/local/include -I../liblua -Wall $(COMMON_FLAGS) -g -O4
LUAPLATFORM = generic
+
+platform = $(shell uname)
ifneq (,$(findstring MINGW,$(platform)))
-CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui
-QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4
-MOC = $(QTDIR)/bin/moc
-LUAPLATFORM = mingw
-else ifeq ($(platform),Darwin)
-CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O4
-QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
-MOC = $(shell pkg-config --variable=moc_location QtCore)
-LUAPLATFORM = macosx
+ CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui
+ ifneq ($(wildcard $(QTDIR)/include/QtWidgets),)
+ CXXFLAGS += -I$(QTDIR)/include/QtWidgets
+ QTLDLIBS = -L$(QTDIR)/lib -lQt5Core -lQt5Gui -lQt5Widgets
+ else
+ QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4
+ endif
+ MOC = $(QTDIR)/bin/moc
+ LUAPLATFORM = mingw
else
-CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O4
-QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
-MOC = $(shell pkg-config --variable=moc_location QtCore)
-LDLIBS += -ldl
-
-# Below is a variant you can use if you have problems compiling with QT5 on ubuntu. see http://www.proxmark.org/forum/viewtopic.php?id=1661 for more info.
-#MOC = /usr/lib/x86_64-linux-gnu/qt4/bin/moc
-LUAPLATFORM = linux
+ CXXFLAGS = $(shell pkg-config --cflags Qt5Core Qt5Widgets 2>/dev/null) -Wall -O4
+ QTLDLIBS = $(shell pkg-config --libs Qt5Core Qt5Widgets 2>/dev/null)
+ MOC = $(shell pkg-config --variable=host_bins Qt5Core)/moc
+ ifeq ($(QTLDLIBS), )
+ CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -O4
+ QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
+ MOC = $(shell pkg-config --variable=moc_location QtCore)
+ endif
+ ifeq ($(platform),Darwin)
+ LUAPLATFORM = macosx
+ else
+ LUALIB += -ldl
+ LDLIBS += -ltermcap -lncurses
+ LUAPLATFORM = linux
+ endif
endif
#define OVERLAYSTQ7020_H
#include <QtCore/QVariant>
-#include <QtGui/QAction>
-#include <QtGui/QApplication>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QFormLayout>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QHeaderView>
-#include <QtGui/QLabel>
-#include <QtGui/QPushButton>
-#include <QtGui/QSlider>
-#include <QtGui/QSpacerItem>
-#include <QtGui/QTabWidget>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QWidget>
+#include <QAction>
+#include <QApplication>
+#include <QButtonGroup>
+#include <QFormLayout>
+#include <QHBoxLayout>
+#include <QHeaderView>
+#include <QLabel>
+#include <QPushButton>
+#include <QSlider>
+#include <QSpacerItem>
+#include <QTabWidget>
+#include <QVBoxLayout>
+#include <QWidget>
QT_BEGIN_NAMESPACE
void retranslateUi(QWidget *Form)
{
- Form->setWindowTitle(QApplication::translate("Form", "Overlays", 0, QApplication::UnicodeUTF8));
- label->setText(QApplication::translate("Form", "Window size", 0, QApplication::UnicodeUTF8));
+ Form->setWindowTitle(QApplication::translate("Form", "Overlays", 0));
+ label->setText(QApplication::translate("Form", "Window size", 0));
label_5->setText(QString());
- tabWidget_overlays->setTabText(tabWidget_overlays->indexOf(tab), QApplication::translate("Form", "Autocorrelate", 0, QApplication::UnicodeUTF8));
- tabWidget_overlays->setTabText(tabWidget_overlays->indexOf(tab_3), QApplication::translate("Form", "Askdemod", 0, QApplication::UnicodeUTF8));
- label_2->setText(QApplication::translate("Form", "Up", 0, QApplication::UnicodeUTF8));
+ tabWidget_overlays->setTabText(tabWidget_overlays->indexOf(tab), QApplication::translate("Form", "Autocorrelate", 0));
+ tabWidget_overlays->setTabText(tabWidget_overlays->indexOf(tab_3), QApplication::translate("Form", "Askdemod", 0));
+ label_2->setText(QApplication::translate("Form", "Up", 0));
label_6->setText(QString());
- label_3->setText(QApplication::translate("Form", "Down", 0, QApplication::UnicodeUTF8));
+ label_3->setText(QApplication::translate("Form", "Down", 0));
label_7->setText(QString());
- tabWidget_overlays->setTabText(tabWidget_overlays->indexOf(tab_2), QApplication::translate("Form", "Dirthreshold", 0, QApplication::UnicodeUTF8));
- pushButton_apply->setText(QApplication::translate("Form", "Apply", 0, QApplication::UnicodeUTF8));
- pushButton_sticky->setText(QApplication::translate("Form", "Sticky", 0, QApplication::UnicodeUTF8));
- label_4->setText(QApplication::translate("Form", "TextLabel", 0, QApplication::UnicodeUTF8));
+ tabWidget_overlays->setTabText(tabWidget_overlays->indexOf(tab_2), QApplication::translate("Form", "Dirthreshold", 0));
+ pushButton_apply->setText(QApplication::translate("Form", "Apply", 0));
+ pushButton_sticky->setText(QApplication::translate("Form", "Sticky", 0));
+ label_4->setText(QApplication::translate("Form", "TextLabel", 0));
} // retranslateUi
};