Mercurial > MadButterfly
diff nodejs/X_supp_njs.c @ 822:586e50f82c1f
Unify coding style tag for emacs and vim.
author | Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com> |
---|---|
date | Tue, 14 Sep 2010 01:08:39 +0800 |
parents | cedfe4966fd6 |
children | c18058fb48ee |
line wrap: on
line diff
--- a/nodejs/X_supp_njs.c Tue Sep 14 00:25:44 2010 +0800 +++ b/nodejs/X_supp_njs.c Tue Sep 14 01:08:39 2010 +0800 @@ -1,3 +1,5 @@ +// -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- +// vim: sw=4:ts=8:sts=4 /*! \brief Implement X11 backend for nodejs plugin. * * Since nodejs use libev to handle event loops, part of X11 backend @@ -26,7 +28,7 @@ mb_timeval_t now, tmo; ev_tstamp tout; int r; - + tman = X_MB_tman(rt->xrt); get_now(&now); r = mb_tman_next_timeout(tman, &now, &tmo); @@ -50,7 +52,7 @@ rdman = X_MB_rdman(rt->xrt); _X_MB_handle_x_event_for_nodejs(rt->xrt); rdman_redraw_changed(rdman); - + if(rt->enable_timer == 0) /* no installed timeout */ set_next_timeout(rt); } @@ -62,7 +64,7 @@ redraw_man_t *rdman; mb_timeval_t now; extern int _X_MB_flush_x_conn_for_nodejs(void *rt); - + tman = X_MB_tman(rt->xrt); get_now(&now); mb_tman_handle_timeout(tman, &now); @@ -70,7 +72,7 @@ rdman = X_MB_rdman(rt->xrt); rdman_redraw_changed(rdman); _X_MB_flush_x_conn_for_nodejs(rt->xrt); - + set_next_timeout(rt); } @@ -106,7 +108,7 @@ ev_io_stop(&rt->iowatcher); if(rt->enable_timer) ev_timer_stop(&rt->tmwatcher); - + X_MB_free(rt->xrt); free(rt); } @@ -118,7 +120,7 @@ extern int _X_MB_flush_x_conn_for_nodejs(void *rt); _X_MB_flush_x_conn_for_nodejs(xrt); - + return r; } @@ -126,7 +128,7 @@ X_njs_MB_new(char *display_name, int w, int h) { njs_runtime_t *rt; void *xrt; - + rt = (njs_runtime_t *)malloc(sizeof(njs_runtime_t)); ASSERT(rt != NULL); @@ -135,7 +137,7 @@ rt->xrt = xrt; rt->enable_io = 0; rt->enable_timer = 0; /* no timer, now */ - + return rt; }