Changeset 3142:b253e272baf9 in roaraudio for libroaross/libroaross.c
- Timestamp:
- 01/15/10 12:22:10 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroaross/libroaross.c
r3141 r3142 238 238 239 239 // ------------------------------------- 240 // central open function: 241 // ------------------------------------- 242 243 static int _open_file (const char *pathname, int flags) { 244 return -1; 245 } 246 247 // ------------------------------------- 240 248 // emulated functions follow: 241 249 // ------------------------------------- 242 250 243 251 int open(const char *pathname, int flags, ...) { 244 mode_t mode = 0; 252 int ret; 253 mode_t mode = 0; 245 254 va_list args; 246 255 247 256 _init(); 257 258 _os.write(1, "DOOF!\n", 6); 259 260 ret = _open_file(pathname, flags); 261 262 switch (ret) { 263 case -2: // continue as normal, use _op.open() 264 break; 265 case -1: // pass error to caller 266 return -1; 267 break; 268 default: // return successfully opened pointer to caller 269 return ret; 270 break; 271 } 248 272 249 273 if (flags & O_CREAT) {
Note: See TracChangeset
for help on using the changeset viewer.