This commit is contained in:
Ren RenJuan 2014-01-19 05:13:48 +00:00
parent 220bb60e93
commit b3502f14d8
4 changed files with 108 additions and 80 deletions

155
.cproject
View File

@ -55,53 +55,8 @@
<storageModule moduleId="refreshScope"/> <storageModule moduleId="refreshScope"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"> <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
<buildTargets> <buildTargets>
<target name="libACTK1_0.so" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>libACTK1_0.so</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="tests" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>tests</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="dirs" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>dirs</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="dclean" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>dclean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="all" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>false</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="clean" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget> <buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
@ -109,7 +64,6 @@
</target> </target>
<target name="all" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="all" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget> <buildTarget>all</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
@ -117,14 +71,68 @@
</target> </target>
<target name="tests" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="tests" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>tests</buildTarget> <buildTarget>tests</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders> <runAllBuilders>true</runAllBuilders>
</target> </target>
<target name="libACTK1_0.so" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>libACTK1_0.so</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="tests" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>tests</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="dirs" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>dirs</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="dclean" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>dclean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="all" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>all</buildTarget>
<stopOnError>false</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="xsd2xml" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>xsd2xml</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="clean" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget> <buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
@ -132,6 +140,7 @@
</target> </target>
<target name="dirs" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="dirs" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>dirs</buildTarget> <buildTarget>dirs</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
@ -139,6 +148,7 @@
</target> </target>
<target name="ausreg_cd" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="ausreg_cd" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>ausreg_cd</buildTarget> <buildTarget>ausreg_cd</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
@ -146,6 +156,7 @@
</target> </target>
<target name="apig-cli" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="apig-cli" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>apig-cli</buildTarget> <buildTarget>apig-cli</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
@ -153,36 +164,13 @@
</target> </target>
<target name="build/commander.o" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="build/commander.o" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>build/commander.o</buildTarget> <buildTarget>build/commander.o</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders> <runAllBuilders>true</runAllBuilders>
</target> </target>
<target name="AusRegEPPTK.so" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="tests" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>tests</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="cliever" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="cliever" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>cliever</buildTarget> <buildTarget>cliever</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
@ -190,6 +178,7 @@
</target> </target>
<target name="clean" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="clean" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget> <buildTarget>clean</buildTarget>
<stopOnError>false</stopOnError> <stopOnError>false</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
@ -197,6 +186,7 @@
</target> </target>
<target name="distclean" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="distclean" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>distclean</buildTarget> <buildTarget>distclean</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
@ -204,11 +194,36 @@
</target> </target>
<target name="build/ausreg-md" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="build/ausreg-md" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand> <buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>build/ausreg-md</buildTarget> <buildTarget>build/ausreg-md</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders> <runAllBuilders>true</runAllBuilders>
</target> </target>
<target name="AusRegEPPTK.so" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="tests" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>tests</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
</buildTargets> </buildTargets>
</storageModule> </storageModule>
</cproject> </cproject>

View File

@ -80,6 +80,7 @@ include $(foreach name,$(srcs_all),$(basename $(name)).d)
vpath %.cpp ./ \ vpath %.cpp ./ \
./se\ ./se\
./OTE \ ./OTE \
./xsd2xml \
./se/secDNS\ ./se/secDNS\
./xml\ ./xml\
./common\ ./common\
@ -150,6 +151,10 @@ libACTK1_0.so:
$(BUILD_LIB_DIR)/libACTK1_0.so: $(objs) $(BUILD_LIB_DIR)/libACTK1_0.so: $(objs)
$(CXX) $(LDFLAGS) $(PRODORDEV) -shared $(ARTKOBJS) -o $@ $(CXX) $(LDFLAGS) $(PRODORDEV) -shared $(ARTKOBJS) -o $@
xsd2xml:
$(BUILD_OBJ_DIR)/xsd2xml: build/parser.o
$(CXX) build/parser.o -o build/xsd2xml -o $@
doc: doc:
doxygen etc/Doxyfile doxygen etc/Doxyfile

View File

@ -47,6 +47,7 @@ void mdCommander::doHeader() {
} }
int mdCommander::selectArg() { int mdCommander::selectArg() {
bool didSelect = false;
char legend1[80]="Elements: ",selection[10]; char legend1[80]="Elements: ",selection[10];
int i, wrow=5; int i, wrow=5;
@ -57,10 +58,16 @@ int mdCommander::selectArg() {
mvprintw(wrow,2,(char *)legend1); mvprintw(wrow,2,(char *)legend1);
say((char *)"Select arg string type"); while (!didSelect) {
say((char *)"Select element to edit");
prompt(true); prompt(true);
mvgetstr(row-1,2,selection); mvgetstr(row-1,2,selection);
thisArg = atoi(selection); thisArg = atoi(selection);
if (thisArg >= 1 and thisArg <= eppArgs[commandsNow[cmdNow]].n + 1)
didSelect = true;
else beep();
} -
thisArg--;
} }
void mdCommander::getArgStringsByType() { void mdCommander::getArgStringsByType() {
@ -112,7 +119,7 @@ void mdCommander::driver() {
initscr(); initscr();
cbreak(); cbreak();
getmaxyx(stdscr,row,col); getmaxyx(stdscr,row,col);
if (row < 30 || col < 80) { if (row < 30 || col < 80) { beep();
std::cerr << "Terminal too small for AC commander."; std::cerr << "Terminal too small for AC commander.";
} }
greet(); greet();
@ -125,7 +132,7 @@ void mdCommander::driver() {
while(next != '\012') { while(next != '\012') {
next = mvgetch(row-1,2+i); next = mvgetch(row-1,2+i);
rawString[i++] = next; rawString[i++] = next;
if (i > (sizeof(rawString) - 1)) { if (i > (sizeof(rawString) - 1)) { beep();
say((char *)"Max length exceeded!"); say((char *)"Max length exceeded!");
continue; continue;
} }
@ -215,7 +222,7 @@ void mdCommander::driver() {
sendCommand(cmdNow); sendCommand(cmdNow);
doHeader(); doHeader();
} }
else say((char *)"Invalid Command Index"); else {beep(); say((char *)"Invalid Command Index");}
break; break;
case 'X': case 'X':
if (!targetCmd) {targetCmd = 0; x = true;} if (!targetCmd) {targetCmd = 0; x = true;}
@ -224,7 +231,7 @@ void mdCommander::driver() {
flushCommand(targetCmd,x); flushCommand(targetCmd,x);
doHeader(); doHeader();
} }
else say((char *)"Invalid Command Index"); else {say((char *)"Invalid Command Index"); beeo*();}
break; break;
} }
continue; continue;
@ -258,7 +265,7 @@ void mdCommander::driver() {
system(work); system(work);
shm.remove("ausreg-cd-global"); shm.remove("ausreg-cd-global");
sprintf(work,"rm /tmp/ausreg-cd.lock"); sprintf(work,"rm /tmp/ausreg-cd.lock");
shm.remove("ausreg-cd-global"); system(work);
sprintf(work,"rm /tmp/ausreg-cd-ui.log"); sprintf(work,"rm /tmp/ausreg-cd-ui.log");
system(work); system(work);
sprintf(work,"rm /tmp/ausreg-cd.log"); sprintf(work,"rm /tmp/ausreg-cd.log");
@ -283,7 +290,7 @@ void mdCommander::greet() {
const char *title="AusReg Cliever Commander", const char *title="AusReg Cliever Commander",
*warn="NB: this program is meant to be powerful and fast, not safe or user friendly", *warn="NB: this program is meant to be powerful and fast, not safe or user friendly",
*prompt="Enter ? or command", *prompt="Enter ? or command",
*advise="Please rm /tmp/ausreg-cd.lock-when done so others can use on this host"; *advise="When done: rm /tmp/ausreg-cd.lock to make this program available for others on this host";
sprintf(theBanner,banner,thisConfig->shellProcess,thisConfig->daemonProcess); sprintf(theBanner,banner,thisConfig->shellProcess,thisConfig->daemonProcess);
mvprintw(0,(col-strlen(banner))/2,"%s",theBanner); mvprintw(0,(col-strlen(banner))/2,"%s",theBanner);
@ -490,7 +497,8 @@ const char *befehlJetzt = cmdNames[commandsNow[cmdNow]];
if (!run) { if (!run) {
if (!argsNow[cmdNow]) { if (!argsNow[cmdNow]) {
selectArg(); selectArg();
say((char *)"Enter arg string(s), just enter to end"); sprintf(sp,"Enter strings for '%s', enter to end",eppArgs[commandsNow[cmdNow]].names[thisArg]);
say(sp);
getArgStringsByType(); getArgStringsByType();
} else { } else {
nocbreak(); nocbreak();