static int read_num(void);
static void writefn(Job* job) {
+ job->writefn = NULL;
}
static void readfn(Job* job) {
+ job->readfn = NULL;
}
void colors_init(char* path) {
if (JobFds[njobs].events) njobs++;
}
/* Poll until a job is ready, call the functions based on events */
+ printf("poll(..., %d, %d)", njobs, ms);
long ret = poll(JobFds, njobs, ms);
+ printf(" => %ld\n", ret);
for (int i = 1; i < njobs; i++)
job_process(JobFds[i].fd, JobFds[i].revents);
/* reap zombie processes */
}
static void job_process(int fd, int events) {
- Job* job = NULL; // Get job by fd
+#if 0
+ Job* job = JobList; // Get job by fd
if (job->readfn && (events & POLLIN))
job->readfn(job);
if (job->writefn && (events & POLLOUT))
job->writefn(job);
if (!job->readfn && !job->writefn)
job_finish(job);
+#endif
}
static void job_finish(Job* job) {
}
static void set_path_prop(char* path) {
+#if 0
char pathbuf[PATH_MAX] = {0};
if (!path) return;
char *abspath = realpath(path, pathbuf);
if (!abspath) return;
- x11_prop_set("TIDE_FILE", (!abspath ? "" : abspath));
+ x11_prop_set("TIDE_FILE", abspath);
+#endif
}
void win_load(char* path) {
}
static bool update_focus(void) {
+ return false;
+#if 0
static int prev_x = 0, prev_y = 0;
int ptr_x, ptr_y;
bool changed = false;
prev_x = ptr_x, prev_y = ptr_y;
}
return changed;
+#endif
}
static void draw_glyphs(size_t x, size_t y, UGlyph* glyphs, size_t rlen, size_t ncols) {