remove global exit() function; remove unused variables

This commit is contained in:
Jeff Williams 2012-10-08 03:51:35 -07:00
parent 8bc3354154
commit 1228a8f794

View File

@ -117,15 +117,6 @@ function dump() {
} }
} }
/**
Cause the VM running jsdoc to exit running.
@param {number} [n = 0] The exit status.
*/
function exit(n) {
n = n || 0;
java.lang.System.exit(n);
}
function installPlugins(plugins, p) { function installPlugins(plugins, p) {
var dictionary = require('jsdoc/tag/dictionary'), var dictionary = require('jsdoc/tag/dictionary'),
parser = p || app.jsdoc.parser; parser = p || app.jsdoc.parser;
@ -225,8 +216,7 @@ function main() {
* @return {string} A URI that meets the operating system's requirements, or the original path. * @return {string} A URI that meets the operating system's requirements, or the original path.
*/ */
function pathToUri(_path) { function pathToUri(_path) {
var result = _path, var result = _path;
scheme;
if (env.vm === 'rhino') { if (env.vm === 'rhino') {
result = new java.io.File(result).toURI() + ''; result = new java.io.File(result).toURI() + '';
@ -242,8 +232,7 @@ function main() {
* @return {string} A path that meets the operating system's requirements. * @return {string} A path that meets the operating system's requirements.
*/ */
function uriToPath(uri) { function uriToPath(uri) {
var result = uri, var result = uri;
scheme;
if (env.vm === 'rhino') { if (env.vm === 'rhino') {
result = new java.io.File( new java.net.URI(result) ) + ''; result = new java.io.File( new java.net.URI(result) ) + '';
@ -338,10 +327,10 @@ function main() {
if (env.opts.help) { if (env.opts.help) {
console.log( jsdoc.opts.parser.help() ); console.log( jsdoc.opts.parser.help() );
exit(0); process.exit(0);
} else if (env.opts.test) { } else if (env.opts.test) {
include('test/runner.js'); include('test/runner.js');
exit(0); process.exit(0);
} }
if (env.conf.plugins) { if (env.conf.plugins) {
@ -388,7 +377,7 @@ function main() {
if (env.opts.explain) { if (env.opts.explain) {
console.log(docs); console.log(docs);
exit(0); process.exit(0);
} }
// load this module anyway to ensure root instance exists // load this module anyway to ensure root instance exists
@ -452,5 +441,5 @@ catch(e) {
} }
finally { finally {
env.run.finish = new Date(); env.run.finish = new Date();
exit(); process.exit(0);
} }