bool NewKey(int Type, int Id, int Keynr, void *Key, int Keylen);
bool NewKeyParse(char *line, const char *reason);
void HouseKeeping(void);
+#ifdef TESTER
+ void TestExternalUpdate(void);
+#endif
};
extern cPlainKeys keys;
### Targets:
-all: testECM testEMM testN1Emu testN2Emu testN2RunEmu
+all: testECM testEMM testN1Emu testN2Emu testN2RunEmu testTPS testExtAU
testECM.o: testECM.c compat.h
testECM: testECM.o $(SHAREDOBJS) $(NOBJS)
testTPS: testTPS.o $(SHAREDOBJS) $(NOBJS)
$(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
+testExtAU.o: testExtAU.c compat.h
+testExtAU: testExtAU.o $(SHAREDOBJS) $(NOBJS)
+ $(CXX) $(CXXFLAGS) -rdynamic $^ $(LIBS) -o $@
+
filterhelper: filterhelper.o
$(CXX) $(CXXFLAGS) $^ -o $@
clean:
--- /dev/null
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#define TESTER
+#include "data.h"
+#include "scsetup.h"
+#include "compat.h"
+
+void cPlainKeys::TestExternalUpdate(void)
+{
+ Lock();
+ Start();
+ Unlock();
+ while(Active()) {
+ printf("."); fflush(stdout);
+ cCondWait::SleepMs(600);
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ if(argc<3) {
+ printf("usage: %s <lib-dir> <plugin-dir> <extau>\n",argv[0]);
+ return 1;
+ }
+ DllsLoad(argv[1]);
+ InitAll(argv[2]);
+ LogAll();
+
+ ScSetup.AutoUpdate=1;
+ externalAU=argv[3];
+ keys.TestExternalUpdate();
+}