pcjs/modules/shared/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2014-12-15 17:23:10 -08:00
..
component.js Suppress serial interrupt messages unless SERIAL messages enabled 2014-12-14 21:41:02 -08:00
defines.js 80286 triple-fault happily resets now 2014-11-17 17:26:19 -08:00
diskapi.js Fixed a problem with the right SHIFT key, and with webkit browsers when pressing/releasing both SHIFT keys together 2014-12-15 17:23:10 -08:00
dumpapi.js my_modules is simply modules now 2014-11-11 08:19:48 -08:00
embed.js Cleaned up debugger message handling 2014-11-30 12:56:59 -08:00
externs.js Starting work on v1.16.4: fixed command-line (Node) version of PCjs 2014-12-11 20:28:29 -08:00
netlib.js my_modules is simply modules now 2014-11-11 08:19:48 -08:00
nodebug.js my_modules is simply modules now 2014-11-11 08:19:48 -08:00
proclib.js my_modules is simply modules now 2014-11-11 08:19:48 -08:00
README.md my_modules is simply modules now 2014-11-11 08:19:48 -08:00
reportapi.js my_modules is simply modules now 2014-11-11 08:19:48 -08:00
sockets.js my_modules is simply modules now 2014-11-11 08:19:48 -08:00
strlib.js Support for call gates and stack-switching on call/retf/iret instructions 2014-11-24 18:09:11 -08:00
userapi.js my_modules is simply modules now 2014-11-11 08:19:48 -08:00
usrlib.js my_modules is simply modules now 2014-11-11 08:19:48 -08:00
weblib.js Enhanced INT return handling, and reorganized some disks. 2014-12-13 10:09:13 -08:00

Shared Sources

This folder contains a mix of shared code, with some files used only by Node (server) modules, some used only by Browser (client) modules, and others used by both.

At the moment, only a few files are completely agnostic; eg: strlib.js and usrlib.js. One give-away is that neither contain references to any globals (although references to each other would be fine).

netlib.js is appropriate only for Node modules, because it contains code that relies on Node's global Buffer object, as indicated by:

/* global Buffer: false */

And weblib.js is appropriate only for client modules, because it contains code that relies on the browser's global window object, as indicated by:

/* global window: true */

We declare window modifiable (true) so that defines.js can set global.window to false when running within Node, allowing any other code to test the existence of window with a simple:

if (window) {...}

instead of:

if (typeof window !== "undefined") {...}