*
*/
static void cleanup_rbar_dir() {
+#ifdef DZEN
+ return;
+#endif
struct dirent *ent;
DIR *dir;
char pathbuf[strlen(wmii_path)+256+1];
*
*/
static void create_file(const char *name) {
+#ifdef DZEN
+ return;
+#endif
char pathbuf[strlen(wmii_path)+256+1];
int fd;
int flags = O_CREAT | O_WRONLY;
*/
static void setup(void) {
unsigned int i;
- struct stat statbuf;
char pathbuf[512];
+#ifndef DZEN
+ struct stat statbuf;
/* Wait until wmii_path/rbar exists */
for (; stat(wmii_path, &statbuf) < 0; sleep(interval));
+#endif
cleanup_rbar_dir();
if (wlan_interface)
if (handle == NULL)
die("Could not open configfile\n");
char dest_name[512], dest_value[512], whole_buffer[1026];
- struct stat stbuf;
+
while (!feof(handle)) {
char *ret;
if ((ret = fgets(whole_buffer, 1024, handle)) == whole_buffer) {
interval = atoi(dest_value);
OPT("wmii_path")
{
+#ifndef DZEN
static glob_t globbuf;
+ struct stat stbuf;
if (glob(dest_value, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf) < 0)
die("glob() failed\n");
wmii_path = strdup(globbuf.gl_pathc > 0 ? globbuf.gl_pathv[0] : dest_value);
}
if (wmii_path[strlen(wmii_path)-1] != '/')
die("wmii_path is not terminated by /\n");
+#endif
}
OPT("run_watch")
{
}
fclose(handle);
+#ifndef DZEN
if (wmii_path == NULL)
exit(EXIT_FAILURE);
+#endif
return result;
}