diff nodejs/coord.cc @ 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 84853c8559cf
children 379fd510ba38
line wrap: on
line diff
--- a/nodejs/coord.cc	Tue Sep 14 00:25:44 2010 +0800
+++ b/nodejs/coord.cc	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
 #include <stdio.h>
 #include <v8.h>
 
@@ -83,7 +85,7 @@
 	WRAP(*child_hdl, NULL);
 	child_hdl->Dispose();
 	delete child_hdl;
-	
+
 	/* Invalidate members of a coord */
 	FOR_COORD_SHAPES(child, mem) {
 	    mem_hdl = (Persistent<Object> *)mb_prop_get(&mem->obj.props,
@@ -107,9 +109,9 @@
     coord_t *child, *last_child;
     shape_t *mem, *last_mem;
     int r;
-    
+
     rdman_coord_changed(rdman, coord);
-    
+
     last_child = NULL;
     FOR_COORDS_POSTORDER(coord, child) {
 	if(last_child != NULL) {
@@ -117,7 +119,7 @@
 	    if(r != OK)
 		THROW_noret("Unknown error");
 	}
-	
+
 	/* Free members of a coord */
 	last_mem = NULL;
 	FOR_COORD_SHAPES(child, mem) {
@@ -149,7 +151,7 @@
     Persistent<Object> *self_hdl;
     subject_t *subject;
     Handle<Value> subject_o;
-    
+
     /* Keep associated js object in property store for retrieving,
      * later, without create new js object.
      */
@@ -179,14 +181,14 @@
 		int idx, float v, const char **err) {
     Handle<Object> js_rt;
     redraw_man_t *rdman;
-    
+
     if(idx < 0 || idx >= 6) {
         *err = "Invalid index: out of range";
         return 0;
     }
 
     coord_get_matrix(coord)[idx] = v;
-    
+
     js_rt = GET(self, "mbrt")->ToObject();
     rdman = xnjsmb_rt_rdman(js_rt);
     rdman_coord_changed(rdman, coord);
@@ -201,7 +203,7 @@
     Persistent<Object> *shape_hdl;
     redraw_man_t *rdman;
     int r;
-    
+
     js_rt = GET(self, "mbrt")->ToObject();
     rdman = xnjsmb_rt_rdman(js_rt);
     r = rdman_add_shape(rdman, shape, coord);
@@ -219,10 +221,10 @@
 xnjsmb_coord_remove(coord_t *coord, Handle<Object> self) {
     Handle<Object> js_rt;
     redraw_man_t *rdman;
-    
+
     if(!GET(self, "valid")->ToBoolean()->Value()) /* Invalidated object */
 	THROW_noret("Invalid object");
-    
+
     js_rt = GET(self, "mbrt")->ToObject();
     rdman = xnjsmb_rt_rdman(js_rt);
 
@@ -234,11 +236,11 @@
 xnjsmb_coord_show(coord_t *coord, Handle<Object> self) {
     Handle<Object> js_rt;
     redraw_man_t *rdman;
-    
+
     js_rt = GET(self, "mbrt")->ToObject();
     ASSERT(js_rt != NULL);
     rdman = xnjsmb_rt_rdman(js_rt);
-    
+
     coord_show(coord);
     rdman_coord_changed(rdman, coord);
 }
@@ -247,11 +249,11 @@
 xnjsmb_coord_hide(coord_t *coord, Handle<Object> self) {
     Handle<Object> js_rt;
     redraw_man_t *rdman;
-    
+
     js_rt = GET(self, "mbrt")->ToObject();
     ASSERT(js_rt != NULL);
     rdman = xnjsmb_rt_rdman(js_rt);
-    
+
     coord_hide(coord);
     rdman_coord_changed(rdman, coord);
 }
@@ -261,11 +263,11 @@
 			 float opacity) {
     Handle<Object> js_rt;
     redraw_man_t *rdman;
-    
+
     js_rt = GET(self, "mbrt")->ToObject();
     ASSERT(js_rt != NULL);
     rdman = xnjsmb_rt_rdman(js_rt);
-    
+
     coord_set_opacity(coord, opacity);
     rdman_coord_changed(rdman, coord);
 }
@@ -296,7 +298,7 @@
 	xnjsmb_auto_coord_init();
 	init_flag = 1;
     }
-    
+
     rdman = xnjsmb_rt_rdman(js_rt);
     root = rdman_get_root(rdman);
     obj = xnjsmb_auto_coord_new(root).As<Object>();