build do
env = Environment.new
env["CC"] = "./acc"
+ env["CFLAGS"] << "-g"
env["CPPPATH"] += %w[. inc /usr/X11/include]
env["LIBPATH"] += %w[. /usr/X11/lib]
env.Command("", "tests/libedit",
"CMD" => ["${_SOURCES}"],
"CMD_DESC" => "TEST")
-end
\ No newline at end of file
+ env.depends("${prefix}/bin", "")
+ # Install the compiled binaries
+ Dir.glob("bin/*").each{|bin| env.Install("${prefix}/bin", bin) }
+end
typedef void* (*Reducer)(Node* node, void* accum);
-typedef void (*Iterator)(Node* node);
-
typedef struct Client {
Node mnode, tnode;
Window win;
} GrowState;
typedef struct Column {
- struct Column *next;
+ struct Column* next;
struct Client* clients;
int flags, x, w;
} Column;
return (list ? list_reduce(list->next, rfn, rfn(list, accum)) : accum);
}
-void list_each(Node* list, Iterator ifn) {
- if (!list) return;
- ifn(list);
- list_each(list->next, ifn);
-}
-
size_t list_count(Node* curr) {
size_t nclients = 0;
for (; curr; curr = curr->next, nclients++);
static void xredraw(XConf* x) {
/* force update the title */
win_title(NULL);
+
+ /* determine draw height such that we can draw both regions */
+ int height = x->tagfont->height * 2 + 7;
+ if (height < x->height) height = x->height;
+
/* determine the size of the regions */
- size_t maxtagrows = ((x->height/4) / x->tagfont->height);
+ size_t maxtagrows = ((height/4) / x->tagfont->height);
size_t tagrows = view_limitrows(win_view(TAGS), maxtagrows);
size_t tagregsz = (tagrows * x->tagfont->height) + 7;
- size_t editrows = (x->height - tagregsz) / x->font->height ;
+ size_t editrows = (height - tagregsz) / x->font->height ;
+
/* draw the regions to the window */
int olddiv = Divider;
drawcsr csr = { .w = x->width, .h = x->height };