Lines Matching defs:mode
63 int mode; /* file mode (O_RDONLY, etc.) */
91 const char *mode = NULL;
94 open(device, mode) (for consistency with builtin open())
95 open(mode) (for backwards compatibility)
98 if (!PyArg_ParseTuple(arg, "s|s:open", &devicename, &mode))
100 if (mode == NULL) { /* only one arg supplied */
101 mode = devicename;
105 if (strcmp(mode, "r") == 0)
107 else if (strcmp(mode, "w") == 0)
109 else if (strcmp(mode, "rw") == 0)
112 PyErr_SetString(OSSAudioError, "mode must be 'r', 'w', or 'rw'");
132 /* And (try to) put it back in blocking mode so we get the
152 self->mode = imode;
330 mode once we're in non-blocking mode! */
466 /* NB. writeall() is only useful in non-blocking mode: according to
469 write() in blocking mode consumes the whole buffer. In blocking
470 mode, the behaviour of write() and writeall() from Python is
728 if (self->mode == O_RDONLY)
943 switch(self->mode) {
954 /* From newossobject(), self->mode can only be one
962 {"mode", (getter)oss_mode_getter, (setter)NULL, NULL},