aboutsummaryrefslogtreecommitdiffstats
path: root/notifylist.c
diff options
context:
space:
mode:
Diffstat (limited to 'notifylist.c')
-rw-r--r--notifylist.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/notifylist.c b/notifylist.c
index d19355b..e2df6e8 100644
--- a/notifylist.c
+++ b/notifylist.c
@@ -7,6 +7,8 @@
#include <arg.h>
+#include "darray.h"
+
class INotify {
private:
public:
@@ -49,7 +51,57 @@ int main(int argc, char **argv)
if (helpArg->isUsed())
{
printf("Help\n");
+ return 0;
+ }
+
+ if (versionArg->isUsed())
+ {
+ printf("Version\n");
+ return 0;
+ }
+
+ if (pathArg->isUsed() and eventArg->isUsed())
+ {
+
+ }
+
+ #define N 10
+ DArray a = DArray(0,N);
+ int i;
+ //init
+ for (i=0;i<N;i++)
+ {
+ int *v = (int *)malloc(sizeof(int));
+ *v = 10;
+ a.push(v);
+ }
+ //list
+ for (i=0;i<a.count();i++)
+ {
+ int *val = (int *)a.get(i);
+ if (val != NULL)
+ {
+ printf("%d,",*val);
+ }
+ }
+ printf("\n");
+ //set
+ for (i=0;i<a.count();i++)
+ {
+ int *val = (int *)a.get(i);
+ *val = i;
+ a.set(i,(void *)val);
+ }
+ //list
+ for (i=0;i<a.count();i++)
+ {
+ int *val = (int *)a.get(i);
+ if (val != NULL)
+ {
+ printf("%d,",*val);
+ }
}
+ printf("\n");
return 0;
} \ No newline at end of file