Merge branch 'master' into gh-pages

This commit is contained in:
Jeff Parsons 2017-06-26 11:16:34 -07:00
commit 1480e7ab6c
12 changed files with 19 additions and 18 deletions

View file

@ -20,7 +20,7 @@ one of several JavaScript Machines in the [PCjs Project](https://github.com/jeff
includes:
* [PCx86](/docs/pcx86/), an x86-based emulator of the [IBM PC and PC-compatibles](/devices/pcx86/machine/)
* [PC8080](/modules/pc8080/), an 8080 machine emulator (e.g., [Space Invaders](/devices/pc8080/machine/invaders/) and the [VT100 Terminal](/devices/pc8080/machine/vt100/))
* [PC8080](/modules/pc8080/), an 8080 machine emulator (see [Space Invaders](/devices/pc8080/machine/invaders/) and the [VT100 Terminal](/devices/pc8080/machine/vt100/))
* [C1Pjs](/docs/c1pjs/), an emulation of the 6502-based [Ohio Scientific Challenger 1P](/devices/c1p/)
* [PDPjs](/docs/pdpjs/), a set of machine emulation modules supporting the DEC [PDP-10](/devices/pdp10/machine/) and [PDP-11](/devices/pdp11/machine/)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -3216,7 +3216,7 @@ DiskDump.prototype.convertOSIDiskToJSON = function()
};
/**
* convertToIMG()
* convertToIMG(fRaw)
*
* Converts the disk image data to a Buffer.
*
@ -3224,9 +3224,10 @@ DiskDump.prototype.convertOSIDiskToJSON = function()
* disk images under /tmp, using a name based on a hash of the source path).
*
* @this {DiskDump}
* @param {boolean} [fRaw] (used by httpapi.js to get the underlying Buffer)
* @return {Buffer|null} containing the disk image's raw data, or null if no data available (or parse error)
*/
DiskDump.prototype.convertToIMG = function()
DiskDump.prototype.convertToIMG = function(fRaw)
{
if (!this.bufDisk) {
@ -3391,7 +3392,7 @@ DiskDump.prototype.convertToIMG = function()
this.bufDisk = buf;
}
return this.bufDisk;
return (fRaw && this.bufDisk instanceof BufferPF)? this.bufDisk.buf : this.bufDisk;
};
/**

View file

@ -519,9 +519,9 @@ HTMLOut.filter = function(req, res, next)
HTMLOut.logError(err);
next(); // alternatively: res.status(404).send("Cannot GET " + req.path);
} else {
sData = sData.replace(/^([ \t]*import\s+\S+\s+from\s+(['"]).*?\1;)/gm, "// $1");
sData = sData.replace(/^([ \t]*import\s+\S+\s+from\s+['"].*?['"];)/gm, "// $1");
sData = sData.replace(/^([ \t]*export\s+default\s+\S+;)/gm, "// $1");
sData = sData.replace(/^([ \t]*var\s+\S+\s*=\s*require\((['"]).*?\1\);)/gm, "// $1");
sData = sData.replace(/^([ \t]*var\s+\S+\s*=\s*require\(['"].*?['"]\);)/gm, "// $1");
sData = sData.replace(/^([ \t]*(if\s+\(NODE\)\s*|)module\.exports\s*=\s*\S+;)/gm, "// $1");
res.set("Content-Type", "application/javascript");
res.status(200).send(sData);
@ -1643,7 +1643,7 @@ HTMLOut.prototype.getManifestXML = function(sToken, sIndent, aParms)
}
if (sNodeLink) {
if (str.endsWith(sNodeLink, ".json") && sNodeLink.indexOf("/disks/") === 0) {
if (str.endsWith(sNodeLink, ".json") && (!sNodeLink.indexOf("/apps/") || !sNodeLink.indexOf("/disks/"))) {
sOnClick = obj.genOnClick(sNodeLink);
}
sNodeValue = '<a href="' + net.encodeURL(sNodeLink, obj.req, obj.fDebug) + '"' + sOnClick + '>' + sNodeValue + '</a>';

View file

@ -715,7 +715,7 @@ HTTPAPI.processDumpAPI = function(req, res)
if (sDisk.indexOf("..") < 0 || req.app.settings.port == 8088) {
sFormat = req.query[DumpAPI.QUERY.FORMAT] || DumpAPI.FORMAT.JSON;
fComments = (req.query[DumpAPI.QUERY.COMMENTS]? true : false);
fComments = !!req.query[DumpAPI.QUERY.COMMENTS];
var sSize = req.query[DumpAPI.QUERY.MBHD];
if (sSize) {
sSize = (sSize * 1000).toString();
@ -751,7 +751,7 @@ HTTPAPI.processDumpAPI = function(req, res)
if (sFile.indexOf("..") < 0 || req.app.settings.port == 8088) {
sFormat = req.query[DumpAPI.QUERY.FORMAT] || DumpAPI.FORMAT.JSON;
fComments = (req.query[DumpAPI.QUERY.COMMENTS]? true : false);
fComments = !!req.query[DumpAPI.QUERY.COMMENTS];
var fDecimal;
if (req.query[DumpAPI.QUERY.DECIMAL]) {
fDecimal = (req.query[DumpAPI.QUERY.DECIMAL] == "true");
@ -793,7 +793,7 @@ HTTPAPI.dumpDisk = function(err, disk, res)
sAttachment = path.basename(disk.sDiskPath);
var i = sAttachment.lastIndexOf('.');
if (i > 0) sAttachment = sAttachment.substring(0, i+1) + DumpAPI.FORMAT.IMG;
sResponse = disk.convertToIMG();
sResponse = disk.convertToIMG(true);
} else {
// res.charset = "utf-8";
sMIMEType = "application/json; charset=utf-8";

View file

@ -252,7 +252,7 @@ class Keyboard extends Component {
control.onclick = function(kbd, sKey, simCode) {
return function onKeyboardBindingClick(event) {
if (!COMPILED && kbd.messageEnabled()) kbd.printMessage(sKey + " clicked", Messages.KEYS);
if (kbd.cmp) kbd.cmp.updateFocus();
if (kbd.cmp) kbd.cmp.updateFocus(true);
kbd.sInjectBuffer = ""; // actual key events should stop any injection currently in progress
kbd.updateShiftState(simCode, true); // future-proofing if/when any LOCK keys are added to CLICKCODES
kbd.addActiveKey(simCode, true);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -44182,7 +44182,7 @@ class Keyboard extends Component {
control.onclick = function(kbd, sKey, simCode) {
return function onKeyboardBindingClick(event) {
if (!COMPILED && kbd.messageEnabled()) kbd.printMessage(sKey + " clicked", Messages.KEYS);
if (kbd.cmp) kbd.cmp.updateFocus();
if (kbd.cmp) kbd.cmp.updateFocus(true);
kbd.sInjectBuffer = ""; // actual key events should stop any injection currently in progress
kbd.updateShiftState(simCode, true); // future-proofing if/when any LOCK keys are added to CLICKCODES
kbd.addActiveKey(simCode, true);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long