A fix for directories that contain both a manifest-based machine reference and Markdown-based machine definition (to avoid having redundant machines)

This commit is contained in:
Jeff Parsons 2016-04-16 15:16:31 -07:00
commit 82766dbfdf
11 changed files with 175 additions and 11 deletions

View file

@ -16,7 +16,7 @@
<keyboard ref="/devices/pc/keyboard/us83-buttons-minimal.xml"/> <keyboard ref="/devices/pc/keyboard/us83-buttons-minimal.xml"/>
<chipset id="chipset" model="5160" sw1="01001001"/> <chipset id="chipset" model="5160" sw1="01001001"/>
<hdc ref="/disks/pc/fixed/10mb/pcdos200-win101-cga.xml"/> <hdc ref="/disks/pc/fixed/10mb/pcdos200-win101-cga.xml"/>
<serial id="com1" adapter="1" binding="print"/> <serial id="com1" adapter="1"/>
<serial id="com2" adapter="2"/> <serial id="com2" adapter="2"/>
<mouse serial="com2"/> <mouse serial="com2"/>
</machine> </machine>

View file

@ -18,4 +18,7 @@
<control type="description" binding="swdesc" left="0px"/> <control type="description" binding="swdesc" left="0px"/>
</chipset> </chipset>
<hdc id="hdcXT" drives='[{name:"10Mb Hard Disk",type:3}]'/> <hdc id="hdcXT" drives='[{name:"10Mb Hard Disk",type:3}]'/>
<serial id="com1" adapter="1" binding="print"/>
<serial id="com2" adapter="2"/>
<mouse serial="com2"/>
</machine> </machine>

View file

@ -16,4 +16,7 @@
<keyboard ref="/devices/pc/keyboard/us83-buttons-minimal.xml"/> <keyboard ref="/devices/pc/keyboard/us83-buttons-minimal.xml"/>
<hdc id="hdcXT" drives='[{name:"10Mb Hard Disk",type:3}]'/> <hdc id="hdcXT" drives='[{name:"10Mb Hard Disk",type:3}]'/>
<chipset id="chipset" model="5160" sw1="01001001"/> <chipset id="chipset" model="5160" sw1="01001001"/>
<serial id="com1" adapter="1"/>
<serial id="com2" adapter="2"/>
<mouse serial="com2"/>
</machine> </machine>

View file

@ -37,10 +37,12 @@ computer diagnostics, programming tools, and more.
### Applications ### Applications
* [IBM TopView](apps/ibm/topview/)
* [Lotus 1-2-3](apps/lotus/123/) * [Lotus 1-2-3](apps/lotus/123/)
* [MicroPro WordStar](apps/micropro/wordstar/) * [MicroPro WordStar](apps/micropro/wordstar/)
* [Microsoft Chart](apps/microsoft/chart/) * [Microsoft Chart](apps/microsoft/chart/)
* [Microsoft Word](apps/microsoft/word/) * [Microsoft Word](apps/microsoft/word/)
* [Sunny Hill Omniview](apps/sunnyhill/omniview/)
### Games ### Games

View file

@ -9,6 +9,7 @@ PC Applications
Information is available for applications from these vendors: Information is available for applications from these vendors:
* [IBM](ibm/)
* [Lotus](lotus/) * [Lotus](lotus/)
* [MicroPro](micropro/) * [MicroPro](micropro/)
* [Microsoft](microsoft/) * [Microsoft](microsoft/)

View file

@ -0,0 +1,12 @@
---
layout: page
title: IBM Applications
permalink: /disks/pc/apps/ibm/
---
IBM Applications
---
Information is available for these IBM applications:
* [TopView](topview/)

View file

@ -0,0 +1,103 @@
---
layout: page
title: TopView 1.01
permalink: /disks/pc/apps/ibm/topview/1.01/
machines:
- type: pc
id: ibm5160
config: /devices/pc/machine/5160/cga/640kb/machine.xml
autoMount:
A:
path: /disks/pc/dos/ibm/2.00/PCDOS200-DISK1.json
B:
path: /disks/pc/apps/ibm/topview/1.01/TOPVIEW101-PROGRAM.json
---
TopView 1.01
---
{% include machine.html id="ibm5160" %}
### Directory of TopView 1.01 (Program)
Volume in drive A is TV101032885
Directory of A:\
TV PIF 13946 03-28-85 12:00p
TV PII 1408 03-28-85 12:00p
ADD EXT 16384 03-28-85 12:00p
ATRIBUTE DEF 32 03-28-85 12:00p
AUTOPIF 369 03-28-85 12:00p
CHANGE EXT 13568 03-28-85 12:00p
CLOCK COM 3682 03-28-85 12:00p
CLOCK PLB 2071 03-28-85 12:00p
COLORS EXT 10752 03-28-85 12:00p
COLORS PIF 369 03-28-85 12:00p
DELETE EXT 6400 03-28-85 12:00p
DOS EXT 39168 03-28-85 12:00p
DOSHELP PLB 10237 03-28-85 12:00p
DW1 TBL 51 03-28-85 12:00p
DW2 TBL 51 03-28-85 12:00p
EW TBL 55 03-28-85 12:00p
FD BAT 6163 03-28-85 12:00p
FDPGM COM 187 03-28-85 12:00p
FDR BAT 46 03-28-85 12:00p
FILTER EXT 3905 03-28-85 12:00p
G BAT 33 03-28-85 12:00p
PCW TBL 55 03-28-85 12:00p
PDIO EXT 3072 03-28-85 12:00p
PDIOKEYB EXT 3072 03-28-85 12:00p
PDIOMICP EXT 3222 03-28-85 12:00p
PDIOMICS EXT 3209 03-28-85 12:00p
PDIOMSY1 EXT 3096 03-28-85 12:00p
PDIOVIS1 EXT 3214 03-28-85 12:00p
PE TBL 44 03-28-85 12:00p
PROFED TBL 65 03-28-85 12:00p
PROGRAMS COM 11520 03-28-85 12:00p
PROGRAMS HLP 9979 03-28-85 12:00p
SETSYS EXT 11008 03-28-85 12:00p
SETUP BAT 74 03-28-85 12:00p
SYSTEM 84 03-28-85 12:00p
TUTORPIF 369 03-28-85 12:00p
TV COM 43264 03-28-85 12:00p
TV EXT 49972 03-28-85 12:00p
WA TBL 56 03-28-85 12:00p
WELCOME EXT 2560 03-28-85 12:00p
WP TBL 53 03-28-85 12:00p
VENDOR-# DO1 0 07-04-83 12:00a
42 file(s) 276865 bytes
Total files listed:
42 file(s) 276865 bytes
57344 bytes free
### Directory of TopView 1.01 (Tutorial)
Volume in drive A is TUT110784
Directory of A:\
CALC EXE 56549 11-07-84 12:00p
CALC PIF 369 11-07-84 12:00p
CALC PLB 5133 11-07-84 12:00p
ERROR LIB 8765 11-07-84 12:00p
GASWAP BAT 758 11-07-84 12:00p
INSTRUCT GRA 2540 11-07-84 12:00p
INSTRUCT WRT 2734 11-07-84 12:00p
LESSON1 LIB 56019 11-07-84 12:00p
LESSON2 LIB 10256 11-07-84 12:00p
LESSON3 LIB 10083 11-07-84 12:00p
LESSON4 LIB 43072 11-07-84 12:00p
OCRS PIF 369 11-07-84 12:00p
QUD PNL 121 11-07-84 12:00p
QUIT PNL 139 11-07-84 12:00p
TUTORIAL EXT 6556 11-07-84 12:00p
TUTORIAL PIF 369 11-07-84 12:00p
WASWAP BAT 1190 11-07-84 12:00p
VENDOR-# DO1 0 07-04-83 12:00a
18 file(s) 205022 bytes
Total files listed:
18 file(s) 205022 bytes
146432 bytes free

View file

@ -0,0 +1,12 @@
---
layout: page
title: TopView
permalink: /disks/pc/apps/ibm/topview/
---
TopView
---
Information is available for these versions of TopView:
* [TopView 1.01](1.01/)

View file

@ -2,11 +2,25 @@
layout: page layout: page
title: Omniview 386 4.30 title: Omniview 386 4.30
permalink: /disks/pc/apps/sunnyhill/omniview/4.30/ permalink: /disks/pc/apps/sunnyhill/omniview/4.30/
machines:
- type: pc
id: compaq386
config: /devices/pc/machine/compaq/deskpro386/vga/4096kb/machine.xml
autoMount:
A:
path: /disks/pc/dos/ibm/3.30/PCDOS330-DISK1-720K.json
B:
path: /disks/pc/apps/sunnyhill/omniview/4.30/OMNIVIEW386-430.json
--- ---
Omniview 386 4.30 Omniview 386 4.30
--- ---
The COMPAQ DeskPro 386 machine below is recommended for Omniview 386 4.30.
A [directory listing](#directory-of-omniview-386-430) is also provided.
{% include machine.html id="compaq386" %}
### Directory of Omniview 386 4.30 ### Directory of Omniview 386 4.30
Volume in drive A is OMNIVIEW Volume in drive A is OMNIVIEW

View file

@ -1464,7 +1464,7 @@ HTMLOut.prototype.getMachineXML = function(sToken, sIndent, aParms, sXMLFile, sS
s = m.convertMD(" ").trim(); s = m.convertMD(" ").trim();
obj.processMachines(m.getMachines(), m.getBuildOptions(), function doneProcessXMLMachines() { obj.processMachines(m.getMachines(), m.getBuildOptions(), function doneProcessXMLMachines() {
obj.getMarkdownFile(obj.sFile, sToken, sIndent, aParms, s, true); obj.getMarkdownFile(obj.sFile, sToken, sIndent, aParms, s, sXMLFile);
}); });
return; return;
} }
@ -1689,7 +1689,7 @@ HTMLOut.prototype.getManifestXML = function(sToken, sIndent, aParms)
}; };
/** /**
* getMarkdownFile(sFile, sToken, sIndent, aParms, sPrevious, fMachineXML) * getMarkdownFile(sFile, sToken, sIndent, aParms, sPrevious, sMachineFile)
* *
* If sFile exists in the current directory, open it, convert it, and prepare for replacement. * If sFile exists in the current directory, open it, convert it, and prepare for replacement.
* *
@ -1699,9 +1699,9 @@ HTMLOut.prototype.getManifestXML = function(sToken, sIndent, aParms)
* @param {string} [sIndent] * @param {string} [sIndent]
* @param {Array.<string>} [aParms] * @param {Array.<string>} [aParms]
* @param {string|null} [sPrevious] is text, if any, that should precede the file * @param {string|null} [sPrevious] is text, if any, that should precede the file
* @param {boolean} [fMachineXML] true if a machine.xml file has already been processed by the caller * @param {string} [sMachineFile] name (if any) of machine.xml file already processed by the caller
*/ */
HTMLOut.prototype.getMarkdownFile = function(sFile, sToken, sIndent, aParms, sPrevious, fMachineXML) HTMLOut.prototype.getMarkdownFile = function(sFile, sToken, sIndent, aParms, sPrevious, sMachineFile)
{ {
var obj = this; var obj = this;
@ -1731,8 +1731,11 @@ HTMLOut.prototype.getMarkdownFile = function(sFile, sToken, sIndent, aParms, sPr
} }
} }
} else { } else {
var m = new MarkOut(s, sIndent, obj.req, aParms, obj.fDebug, fMachineXML, obj.sExt == "md"); var m = new MarkOut(s, sIndent, obj.req, aParms, obj.fDebug, sMachineFile, obj.sExt == "md");
s = m.convertMD(" ").trim(); s = m.convertMD(" ").trim();
if (sMachineFile && m.hasMachines()) sPrevious = null;
/* /*
* If the Markdown document begins with a heading, stuff that into the <title> tag; * If the Markdown document begins with a heading, stuff that into the <title> tag;
* it would be cleaner if this replacement could be performed by getTitle(), but unfortunately, * it would be cleaner if this replacement could be performed by getTitle(), but unfortunately,

View file

@ -95,10 +95,10 @@ var sDefaultFile = "./README.md";
* @param {Object} [req] is the web server's (ie, Express) request object, if any * @param {Object} [req] is the web server's (ie, Express) request object, if any
* @param {Array.<string>|null} [aParms] is an array of overrides to use (see below) * @param {Array.<string>|null} [aParms] is an array of overrides to use (see below)
* @param {boolean} [fDebug] turns on debugging features (eg, debug comments, special URL encodings, etc) * @param {boolean} [fDebug] turns on debugging features (eg, debug comments, special URL encodings, etc)
* @param {boolean} [fMachineXML] true if a machine.xml file has already been processed by the caller * @param {string} [sMachineFile] name of any machine.xml file already processed by the caller
* @param {boolean} [fAutoHeading] true to automatically generate a page heading * @param {boolean} [fAutoHeading] true to automatically generate a page heading
*/ */
function MarkOut(sMD, sIndent, req, aParms, fDebug, fMachineXML, fAutoHeading) function MarkOut(sMD, sIndent, req, aParms, fDebug, sMachineFile, fAutoHeading)
{ {
this.sMD = sMD; this.sMD = sMD;
this.sIndent = (sIndent || ""); this.sIndent = (sIndent || "");
@ -111,7 +111,7 @@ function MarkOut(sMD, sIndent, req, aParms, fDebug, fMachineXML, fAutoHeading)
this.sClassImageLabel = this.sClassImage + "-label"; this.sClassImageLabel = this.sClassImage + "-label";
} }
this.fDebug = fDebug; this.fDebug = fDebug;
this.fMachineXML = fMachineXML; this.sMachineFile = sMachineFile;
this.fAutoHeading = fAutoHeading; this.fAutoHeading = fAutoHeading;
this.sHTML = null; this.sHTML = null;
this.aIDs = []; // this keeps track of auto-generated ID attributes for page elements, to insure uniqueness this.aIDs = []; // this keeps track of auto-generated ID attributes for page elements, to insure uniqueness
@ -266,6 +266,17 @@ MarkOut.prototype.getMachines = function()
return this.aMachines; return this.aMachines;
}; };
/**
* hasMachines()
*
* @this {MarkOut}
* @return {boolean} true if machine(s) exist, false if not
*/
MarkOut.prototype.hasMachines = function()
{
return this.aMachines.length > 0;
};
/** /**
* getBuildOptions() * getBuildOptions()
* *
@ -1136,12 +1147,12 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
while ((aMatch = reIncludes.exec(sBlock))) { while ((aMatch = reIncludes.exec(sBlock))) {
sReplacement = ""; sReplacement = "";
sMachineID = aMatch[2]; sMachineID = aMatch[2];
if (!this.fMachineXML && this.aMachineDefs[sMachineID]) { if (this.aMachineDefs[sMachineID]) {
var machine = this.aMachineDefs[sMachineID]; var machine = this.aMachineDefs[sMachineID];
sMachine = machine['type'] || "pc"; sMachine = machine['type'] || "pc";
sMachineOptions = ((sMachine.indexOf("-dbg") > 0 || machine['debugger'] == "true")? "debugger" : ""); sMachineOptions = ((sMachine.indexOf("-dbg") > 0 || machine['debugger'] == "true")? "debugger" : "");
sMachine = sMachine.replace("-dbg", "").toUpperCase(); sMachine = sMachine.replace("-dbg", "").toUpperCase();
sMachineXMLFile = machine['config'] || "machine.xml"; sMachineXMLFile = machine['config'] || this.sMachineFile || "machine.xml";
sMachineXSLFile = machine['template'] || ""; sMachineXSLFile = machine['template'] || "";
sMachineVersion = ((machine['uncompiled'] == "true")? "uncompiled" : ""); sMachineVersion = ((machine['uncompiled'] == "true")? "uncompiled" : "");
sMachineParms = machine['parms'] || ""; sMachineParms = machine['parms'] || "";