#include <j2k/Fred/Standard.hpp>#include <j2k/Fred/String/Str-fn.hpp>Go to the source code of this file.
Functions | |
| char * | scanParam (char *s, size_t *len) |
| void | testParser () |
| int | select (char **array, size_t i, size_t max) |
| void | main () |
Variables | |
| char | s [] |
| char * | array [12] |
| size_t | array_sz |
|
|
Definition at line 100 of file pktparser.cpp. |
|
||||||||||||
|
Definition at line 13 of file pktparser.cpp. Referenced by testParser().
|
|
||||||||||||||||
|
Definition at line 45 of file pktparser.cpp. Referenced by main().
00046 {
00047 printf( "[%d, %d]", i, max );
00048
00049 char* s2 = strlwr( array[i] );
00050 char* opt = NULL;
00051
00052 if ( (i+1) <= max ) {
00053 opt = strlwr( array[i+1] );
00054 }
00055
00056 if ( !strcmp( s2, "blksize" ) || !strcmp( s2, "blocksize" ) )
00057 {
00058 long bsize = atol( opt );
00059 // option.setBlockSize( bsize );
00060 printf("BlockSize[%d]", bsize );
00061 return 1;
00062 } else
00063 if ( !strcmp( s2, "timeout" ) )
00064 {
00065 size_t t = atol( opt );
00066 // option.setTimeOut( t );
00067 printf("Timeout[%d]", t );
00068 return 1;
00069 } else
00070 if ( !strcmp( s2, "tsize" ) )
00071 {
00072 size_t sz = atol( opt );
00073 // option.setFileSize( sz );
00074 printf("FileSize[%d]", sz );
00075 return 1;
00076 } else
00077 if ( !strcmp( s2, "wsize" ) || !strcmp( s2, "windowsize" ) )
00078 {
00079 long wsize = atol( opt );
00080 // option.setWindowSize( wsize );
00081 printf("WindowSize[%d]", wsize );
00082 return 1;
00083 }
00084
00085 if ( i == 0 ) {
00086 // option.setFilename( array[i] );
00087 printf("Filename[%s]", array[i] );
00088 return 0;
00089 }
00090
00091 if ( i == 1 ) {
00092 // option.setMode( array[i] );
00093 printf("Mode[%s]", array[i] );
00094 return 0;
00095 }
00096
00097 return 0;
00098 }
|
|
|
Definition at line 29 of file pktparser.cpp. Referenced by main().
|
|
|
Definition at line 26 of file pktparser.cpp. |
|
|
Definition at line 27 of file pktparser.cpp. |
|
|
Initial value: { '0', '1', \
'h', 'e', 'l', 'l', 'o', '.', 'h', 'p', 'p', '\0', \
'o', 'c', 't', 'e', 't', '\0', \
'b', 'l', 'k', 's', 'i', 'z', 'e', '\0', \
'2', '0', '4', '8', '\0', \
'w', 's', 'i', 'z', 'e', '\0', \
'7', '\0', 'f', 'r', '\0'
}Definition at line 4 of file pktparser.cpp. Referenced by JObject::getClass(), and JObject::toString().
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001