Commits

Anonymous committed 2f44a0d

code style

Comments (0)

Files changed (3)

-src/.*\.o
+\.o$
+.dylib$
   context.Dispose();
 };
 
-ErlDrvData V8Data::castOut() { return reinterpret_cast<ErlDrvData>(this); };
+ErlDrvData V8Data::castOut() { 
+  return reinterpret_cast<ErlDrvData>(this); 
+};
 
 V8Data *V8Data::castIn(ErlDrvData data) {
   return reinterpret_cast<V8Data *>(data);
   terms[1] = driver_mk_atom(msg);
 };
 
-void *AsyncData::castOut() { return reinterpret_cast<void *>(this); };
+void *AsyncData::castOut() {
+  return reinterpret_cast<void *>(this); 
+};
 
 AsyncData *AsyncData::castIn(void *data) {
   return reinterpret_cast<AsyncData *>(data);
 //
 
 ErlDrvEntry driver_entry = {
-  init,    // init driver
-  start,   // open_port
-  stop,    // close_port
-  output,  // output		
+  init, // init driver
+  start, // open_port
+  stop, // close_port
+  output, // output		
   NULL,			/* ready_input */
   NULL,			/* ready_output */ 
   "v8erl", // driver name
 
 static int init() {
   global_template = erl_global();
-  term_template   = erl_term_template();
+  term_template = erl_term_template();
   return 0;
 }
 
 }
 
 static ErlDrvData start(ErlDrvPort port, char *cmd) {
-  if (port == NULL) { return ERL_DRV_ERROR_GENERAL; } // why?
-  else { 
+  if (port == NULL) { 
+    return ERL_DRV_ERROR_GENERAL; // why?
+  } else { 
     Handle<Context> context = Context::New(NULL, global_template);
     V8Data *data = new V8Data(port, context);
     return data->castOut(); 
 
   Handle<String> script = String::New(adata->buf, adata->len);
   Handle<Script> compiled = Script::Compile(script);
-  if (compiled.IsEmpty()) { adata->setError("compiler_error"); } 
-  else                    { adata->setResult(compiled->Run()); }
+  if (compiled.IsEmpty()) {
+    adata->setError("compiler_error"); 
+  } else { 
+    adata->setResult(compiled->Run()); 
+  }
 }
 
 
   }
 
   if (terms != NULL) {
-    terms[tlen]   = ERL_DRV_LIST;
+    terms[tlen] = ERL_DRV_LIST;
     terms[tlen+1] = alen;
   }
   tlen += 2;
   }
 
   if (terms != NULL) {
-    terms[tlen]   = ERL_DRV_LIST;
+    terms[tlen] = ERL_DRV_LIST;
     terms[tlen+1] = olen;
     terms[tlen+2] = ERL_DRV_TUPLE;
     terms[tlen+3] = 2;