From 0534ee90776d507ffe9bd37e7727bf0419d16c47 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Sat, 9 Sep 2017 20:53:35 +0200 Subject: [PATCH] all-in-one: format source code --- allinone/build.js | 12 ++++++------ allinone/header.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/allinone/build.js b/allinone/build.js index ced8001..60b6c28 100644 --- a/allinone/build.js +++ b/allinone/build.js @@ -7,7 +7,7 @@ function load(filename) { if (/[\/\\]/.test(filename)) return fs.readFileSync(filename, 'utf8'); - var PATH = [ '.', 'include', 'src' ]; + var PATH = ['.', 'include', 'src']; for (;;) { var dir = PATH.shift(); try { @@ -50,14 +50,14 @@ function lines(filename) { } function comment(s) { - return ''; //'/* ' + s + '*/' + return ''; //'/* ' + s + '*/' } function include(line, filename) { var key = path.basename(filename).toLowerCase(); if (included[key]) return comment(line); - console.error("Including: " + key); + console.error('Including: ' + key); included[key] = true; return lines(filename); } @@ -78,8 +78,8 @@ for (var i = 2; i < process.argv.length; i++) { } var patterns = [ - {re : /^\s*#include\s*"([^"]*)".*$/, fn : include}, - {re : /^\s*#include\s*<([^"]*)>.*$/, fn : include_sys} + {re: /^\s*#include\s*"([^"]*)".*$/, fn: include}, + {re: /^\s*#include\s*<([^"]*)>.*$/, fn: include_sys} ] restart: for (var lno = 0; lno < source.length;) { @@ -90,7 +90,7 @@ restart: for (var lno = 0; lno < source.length;) { if (match) { var repl = pattern.fn.apply(null, match); if (repl != null && repl !== line) { - source.splice.apply(source, [ lno, 1 ].concat(repl)); + source.splice.apply(source, [lno, 1].concat(repl)); continue restart; } } diff --git a/allinone/header.h b/allinone/header.h index 04b62c4..02f3f45 100644 --- a/allinone/header.h +++ b/allinone/header.h @@ -1,2 +1,2 @@ #define EPOLL_INTERNAL static -#define EPOLL_INTERNAL_EXTERN static \ No newline at end of file +#define EPOLL_INTERNAL_EXTERN static