multi-line grep
[tridge/junkcode.git] / foo2.c
1
2 FILE *fopen(const char *fname, char *rw)
3 {
4
5 }
6
7 struct vnode *vn;
8
9 struct dentry *de;
10
11 void *opendir();
12
13
14 int myfunction(struct SysCtx *ctx, const char *name)
15
16
17
18
19 foo_fopen(FILE *f, char *rw)
20 {
21
22 }
23
24
25 foo_free() OR pools ?
26
27
28 main()
29 {
30         FILE f;
31
32         foo_fopen(&f, "w");
33
34 }
35
36 struct Sys_SrvName {
37         char *srvname;
38         char *adminname;
39         char *location;
40 }
41
42 static void dans_set_ip(SysCtx *ctx, SYS_IP *ip)
43 {
44         Sys_PushMemCtx(ctx);
45         foo(ctx, ip);
46         Sys_PopMemCtx(ctx);
47 }
48
49 void dans_func(void)
50 {
51         struct Sys_SrvName *buf;
52         SysCtx *ctx;
53
54         ctx = Sys_InitCtx();
55
56         Sys_Lock(ctx);
57         Sys_GetSrvName(ctx, &buf);
58
59         printf("Current is %s - %s - %s\n",
60                buf->srvname, buf->adminname, buf->location);
61
62         Sys_Free(ctx, buf->location);
63
64         ctx_asprintf(ctx, &buf->location, "newloc");
65         ctx_asprintf(ctx, &buf->srvname, "%s - srvnamenew", buf->srvname);
66
67         if (my_var > 3) {
68                 int fd;
69                 foo2();
70                 fd = Sys_OpenAlan(ctx, "/tmp/xxx",O_RDONLY);
71                 if (fd == -1) {
72                         return SYS_FAILURE;
73                 }
74         }
75
76         Sys_SetSrvName(ctx, buf);
77
78         Sys_UnLock(ctx);
79
80         Sys_CtxNew(ctx);
81 }
82
83
84 main()
85 {
86         dans_func(ctx);
87 }