summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-02-09 20:49:15 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-02-09 20:49:15 +0000
commitec218f423abf60b6e776d7a5a9ebee408de45a60 (patch)
tree47304e931ff78ad6dc62226d845ec6faa7b0af2e /src/main.c
parent601a366b8c665f760463259552fedd7be43e5754 (diff)
- oprava chyby, pri zmeneni zbrane zo samopala, alebo lassera ( informoval xHire )
- prepis sietoveho protokolu, teraz je bezpecnejsi git-svn-id: http://opensvn.csie.org/tuxanci_ng@3 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 16cd11e..e6fb709 100644
--- a/src/main.c
+++ b/src/main.c
@@ -87,6 +87,34 @@ char* getParam(char *s)
return NULL;
}
+char* getParamElse(char *s1, char *s2)
+{
+ char *ret;
+ ret = getParam(s1);
+
+ if( ret == NULL)
+ {
+ return s2;
+ }
+
+ return ret;
+}
+
+bool_t isParamFlag(char *s)
+{
+ int i;
+
+ for( i = 0 ; i < my_argc ; i++ )
+ {
+ if( strcmp(s, my_argv[i]) == 0 )
+ {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
char *getString(int n)
{
char str[STR_NUM_SIZE];