Commit 91c304b7 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. RFC822HEADER).
parent 059f5dff
const RFC822HEADER = 0xb0; // from smbdefs.h
const SMTPRECEIVED = 0xd3;
const FIDOSEENBY = 0xa2;
const FIDOPATH = 0xa3;
require("utf8_ascii.js", 'utf8_ascii');
require("smbdefs.js", 'RFC822HEADER');
MsgBase.HeaderPrototype.get_rfc822_header=function(force_update, unfold)
{
......
......@@ -4,12 +4,9 @@
// $Id$
if(!js.global || js.global.NET_INTERNET==undefined)
load("sbbsdefs.js");
if(!js.global || js.global.mail_get_name==undefined)
load("mailutil.js"); // mail_get_name() and mail_get_address()
const RFC822HEADER = 0xb0; // from smbdefs.h
require("sbbsdefs.js", 'NET_INTERNET');
require("smbdefs.js", 'RFC822HEADER');
require("mailutil.js", 'mail_get_name');
// Parses raw RFC822-formatted messages for use with SMTP Mail Processors
// Returns an array of header fields parsed from the msgtxt
......
......@@ -5,13 +5,8 @@
// $Id$
if(!js.global || js.global.mail_get_name==undefined)
load("mailutil.js");
FIDOCTRL = 0xa0 // from smbdefs.h
FIDOSEENBY = 0xa2 // from smbdefs.h
FIDOPATH = 0xa3 // from smbdefs.h
RFC822HEADER = 0xb0 // from smbdefs.h
require("mailutil.js", 'mail_get_name');
require("smbdefs.js", 'RFC822HEADER');
function write_news_header(hdr,writeln)
{
......
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