[Anet-checkins] CVS: ANet/ANet_Daemon/Linux Makefile,1.4,1.5 main.c,1.3,1.4
Status: Abandoned
Brought to you by:
benad
From: Benoit N. <be...@us...> - 2001-12-01 01:48:13
|
Update of /cvsroot/anet/ANet/ANet_Daemon/Linux In directory usw-pr-cvs1:/tmp/cvs-serv1955/Linux Modified Files: Makefile main.c Log Message: Added argument string parser/generator Index: Makefile =================================================================== RCS file: /cvsroot/anet/ANet/ANet_Daemon/Linux/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile 2001/11/17 00:06:25 1.4 --- Makefile 2001/12/01 01:48:09 1.5 *************** *** 11,14 **** --- 11,17 ---- @$(MAKE) -f Makefile_real.out + build_clean: + rm -f *.o + clean: rm -f anetd Index: main.c =================================================================== RCS file: /cvsroot/anet/ANet/ANet_Daemon/Linux/main.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** main.c 2001/11/11 17:55:42 1.3 --- main.c 2001/12/01 01:48:09 1.4 *************** *** 2,7 **** --- 2,9 ---- #include <stdlib.h> #include "Modules.h" + #include "Args.h" void MemoryTest(); + void ArgsTest(); int main(int argc, char **argv) *************** *** 10,14 **** //Do some stuff here... ! MemoryTest(); printf("Closing ANet daemon...\n"); --- 12,17 ---- //Do some stuff here... ! //MemoryTest(); ! ArgsTest(); printf("Closing ANet daemon...\n"); *************** *** 27,29 **** --- 30,44 ---- printf("Size = %d\n", (int)(GetMemoryBlockSize(tag))); DeleteMemoryBlock(tag); + } + + void ArgsTest() + { + int argc = 5; + char *argv[5] = {"-c","\"3des\"","-vw","--hello-w","hello"}; + char *args = (char*)(malloc(40)); + char *val = (char*)(malloc(40)); + + MakeArgumentString(argc, argv, args, 40); + printf("%d\n", GetArgument(args, "hello-w", val, 40)); + printf("%s\n", val); } |