Commit 2a83cd87 authored by rswindell's avatar rswindell
Browse files

Use require() to get the definitions we need instead of conditional load()ing

or copy/pasted definitions (e.g. USER_ANSI)
parent 53c06b66
......@@ -7,7 +7,7 @@ if(argc < 1) {
var fname = argv[0];
graphic = new Graphic(argv[1],argv[2]);
graphic.cpm_eof = false;
if(!graphic.load(fname))
alert("Load failure");
else {
......
// $Id$
const FM_ANON =(1<<1);
const USER_ANSI =(1<<1);
require("userdefs.js", 'USER_ANSI');
// Avatar support here:
if(!(bbs.file_attr&FM_ANON) && console.term_supports(USER_ANSI)) {
......
......@@ -10,9 +10,8 @@
// If you do not want the avatar right-justified, copy this file to your
// mods directory and change that parameter below.
load('smbdefs.js');
var USER_ANSI =(1<<1);
var USER_NO_EXASCII =(1<<15);
require("smbdefs.js", 'MSG_ANONYMOUS');
require("userdefs.js", 'USER_ANSI');
// Avatar support here:
if(!(bbs.msg_attr&MSG_ANONYMOUS)
......
......@@ -4,9 +4,9 @@
// Don't forget to include or exclude the blank line after if do
// (or don't) want a blank line separating message headers and body text
load("smbdefs.js");
load("text.js");
var USER_ANSI =(1<<1);
require("text.js", 'MsgAttr');
require("smbdefs.js", 'MSG_ANONYMOUS');
require("userdefs.js", 'USER_ANSI');
// ported from sbbs_t::show_msgattr():
function show_msgattr(msg_attr, msg_auxattr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment