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

View File

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

View File

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