Пример #1
0
static int
xremove(int argc, char *argv[]) {
	char *file;

	ARGBEGIN{
	default:
		usage();
	}ARGEND;

	file = EARGF(usage());
	if(ixp_remove(client, file) == 0)
		fatal("Can't remove file '%s': %s\n", file, ixp_errbuf());
	return 0;
}
Пример #2
0
static int
xremove(int argc, char *argv[]) {
	char *file;

	ARGBEGIN{
	default:
		usage();
	}ARGEND;

	file = EARGF(usage());
	do {
		if(!ixp_remove(client, file))
			fprint(2, "%s: Can't remove file '%s': %r\n", argv0, file);
	}while((file = ARGF()));
	return 0;
}
Пример #3
0
static PyObject *
Wmii_remove(Wmii *self, PyObject *args)
{
    const char *file;

    if (!PyArg_ParseTuple(args, "s", &file)) {
        PyErr_SetString(PyExc_TypeError, "Wmii.remove() takes exactly 1 argument");
        return NULL;
    }

    if (!ixp_remove(self->client, file))
    {
        PyErr_SetObject(PyExc_IOError, PyString_FromFormat("Can't remove file '%s'\n", file));
        return NULL;
    }
    Py_RETURN_NONE;
}