131 |
if (!strcmp(cmode,"r")) |
if (!strcmp(cmode,"r")) |
132 |
rc = open(cname, O_RDONLY); |
rc = open(cname, O_RDONLY); |
133 |
else if (!strcmp(cmode,"w")) |
else if (!strcmp(cmode,"w")) |
134 |
rc = open(cname, O_WRONLY); |
rc = open(cname, O_WRONLY | O_CREAT); |
135 |
else if (!strcmp(cmode,"a")) |
else if (!strcmp(cmode,"a")) |
136 |
rc = open(cname, O_WRONLY | O_APPEND); |
rc = open(cname, O_WRONLY | O_CREAT | O_APPEND); |
137 |
else if (!strcmp(cmode, "rw")) |
else if (!strcmp(cmode, "rw")) |
138 |
rc = open(cname, O_RDWR | O_CREAT); |
rc = open(cname, O_RDWR | O_CREAT); |
139 |
else if (!strcmp(cmode, "rwa")) |
else if (!strcmp(cmode, "rwa")) |