EditMsgSize removed, TEMPPATH used for temporary files storage instead of GOLDPATH, more accurate error handling in JAM, fix formatting
This commit is contained in:
parent
b6740ee13d
commit
b92274e3f8
@ -12,6 +12,12 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
! Removed keyword EditMsgSize. The message will always be loaded
|
||||
completely.
|
||||
|
||||
! Temporary files will be created in the TEMPPATH rather than
|
||||
GOLDPATH.
|
||||
|
||||
! URLHANDLER now accepts externutil options just like EXTERNUTIL (with
|
||||
the exception of utility number of course), and global EXTERNOPTIONS
|
||||
are no longer affected to the utility execution behaviour.
|
||||
|
@ -515,7 +515,6 @@ GoldedCfgEdit::GoldedCfgEdit() {
|
||||
HeaderFirst(EDITHEADERFIRST_YES);
|
||||
Internal(true);
|
||||
Menu(true);
|
||||
MsgSize(512000L);
|
||||
QuoteMargin(75);
|
||||
SaveMenu(true);
|
||||
UnDelete(50);
|
||||
|
@ -154,7 +154,6 @@ const word CRC_EDITHEADERFIRST = 0xE583;
|
||||
const word CRC_EDITINTERNAL = 0xC2EA;
|
||||
const word CRC_EDITMENU = 0x833E;
|
||||
const word CRC_EDITMIXCASE = 0x5814;
|
||||
const word CRC_EDITMSGSIZE = 0xCF31;
|
||||
const word CRC_EDITOR = 0xF1C3;
|
||||
const word CRC_EDITORFILE = 0xA49C;
|
||||
const word CRC_EDITQUOTEMARGIN = 0xACC7;
|
||||
|
@ -302,7 +302,6 @@ SwitchE:
|
||||
case CRC_EDITINTERNAL : CfgEditinternal (); break;
|
||||
case CRC_EDITMENU : CfgEditmenu (); break;
|
||||
case CRC_EDITMIXCASE : CfgEditmixcase (); break;
|
||||
case CRC_EDITMSGSIZE : CfgEditmsgsize (); break;
|
||||
case CRC_EDITOR : CfgEditor (); break;
|
||||
case CRC_EDITORFILE : CfgEditorfile (); break;
|
||||
case CRC_EDITQUOTEMARGIN : CfgEditquotemargin (); break;
|
||||
|
@ -244,13 +244,6 @@ void CfgEditmixcase() {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CfgEditmsgsize() {
|
||||
|
||||
EDIT->MsgSize(atol(val));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CfgEditor() {
|
||||
|
||||
EDIT->External(val);
|
||||
|
@ -153,7 +153,6 @@ void CfgEditheaderfirst ();
|
||||
void CfgEditinternal ();
|
||||
void CfgEditmenu ();
|
||||
void CfgEditmixcase ();
|
||||
void CfgEditmsgsize ();
|
||||
void CfgEditor ();
|
||||
void CfgEditorfile ();
|
||||
void CfgEditquotemargin ();
|
||||
|
@ -431,7 +431,6 @@ protected:
|
||||
int hdrnodepos;
|
||||
int hdrnodelen;
|
||||
int headerfirst;
|
||||
long msgsize;
|
||||
int quotemargin;
|
||||
int replyre;
|
||||
char softcrxlat;
|
||||
@ -488,7 +487,6 @@ public:
|
||||
bool Internal() { return cfg.internal; }
|
||||
bool Menu() { return cfg.menu; }
|
||||
bool MixCase() { return cfg.mixcase; }
|
||||
long MsgSize() { return cfg.msgsize; }
|
||||
int QuoteMargin() { return cfg.quotemargin; }
|
||||
int ReplyRe() { return cfg.replyre; }
|
||||
bool SaveMenu() { return cfg.savemenu; }
|
||||
@ -520,7 +518,6 @@ public:
|
||||
void Internal(bool s) { cfg.internal = s; }
|
||||
void Menu(bool s) { cfg.menu = s; }
|
||||
void MixCase(bool s) { cfg.mixcase = s; }
|
||||
void MsgSize(long s) { cfg.msgsize = s; }
|
||||
void QuoteMargin(int s) { cfg.quotemargin = s; }
|
||||
void ReplyRe(int s) { cfg.replyre = s; }
|
||||
void SaveMenu(bool s) { cfg.savemenu = s; }
|
||||
|
@ -212,7 +212,7 @@ static void WriteMsgs(GMsg* msg) {
|
||||
else if(target & WRITE_CLIPBRD) {
|
||||
overwrite = YES;
|
||||
strcpy(ofname, AA->Outputfile());
|
||||
mktemp(strcpy(fname, AddPath(CFG->goldpath, "GDXXXXXX")));
|
||||
mktemp(strcpy(fname, AddPath(CFG->temppath, "GDXXXXXX")));
|
||||
AA->SetOutputfile(fname);
|
||||
}
|
||||
w_info(NULL);
|
||||
@ -309,7 +309,7 @@ static void WriteMsgs(GMsg* msg) {
|
||||
else if(target & WRITE_CLIPBRD) {
|
||||
w_info(LNG->Wait);
|
||||
|
||||
mktemp(strcpy(fname, AddPath(CFG->goldpath, "GDXXXXXX")));
|
||||
mktemp(strcpy(fname, AddPath(CFG->temppath, "GDXXXXXX")));
|
||||
|
||||
AA->LoadMsg(msg, msg->msgno, prnmargin);
|
||||
SaveLines(MODE_WRITE, fname, msg, prnmargin, true);
|
||||
|
@ -933,7 +933,7 @@ void IEclass::editimport(Line* __line, char* __filename, bool imptxt) {
|
||||
Path cmdline;
|
||||
|
||||
isPipe = YES;
|
||||
mktemp(strxcpy(tmpfile, AddPath(CFG->goldpath, "GIXXXXXX"), sizeof(Path)));
|
||||
mktemp(strxcpy(tmpfile, AddPath(CFG->temppath, "GIXXXXXX"), sizeof(Path)));
|
||||
strxmerge(cmdline, sizeof(Path), filenamebuf.c_str()+1, " > ", tmpfile, NULL);
|
||||
ShellToDos(cmdline, "", NO, NO);
|
||||
filenamebuf = tmpfile;
|
||||
|
@ -1002,8 +1002,7 @@ void Initialize(int argc, char* argv[]) {
|
||||
update_statuslinef(LNG->LockShareCap, LNG->Checking);
|
||||
WideLog = &LOG;
|
||||
WideDebug = cmdlinedebughg;
|
||||
WideMsgSize = EDIT->MsgSize();
|
||||
WideCanLock = CFG->sharemode ? TestLockPath(CFG->goldpath) : false;
|
||||
WideCanLock = CFG->sharemode ? TestLockPath(CFG->temppath) : false;
|
||||
WideSharemode = CFG->sharemode;
|
||||
WideUsernames = CFG->username.size();
|
||||
WideUsername = new const char*[WideUsernames];
|
||||
|
@ -535,7 +535,7 @@ int ExternUtil(GMsg *msg, ExtUtil *extutil) {
|
||||
strchg(buf, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR);
|
||||
strischg(cmdline, "@file", buf);
|
||||
if(striinc("@tmpfile", cmdline)) {
|
||||
mktemp(strcpy(tmpfile, AddPath(CFG->goldpath, "GDXXXXXX")));
|
||||
mktemp(strcpy(tmpfile, AddPath(CFG->temppath, "GDXXXXXX")));
|
||||
SaveLines(mode, tmpfile, msg, 79);
|
||||
strcpy(buf, tmpfile);
|
||||
strchg(buf, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR);
|
||||
@ -768,7 +768,7 @@ void UUDecode(GMsg* msg) {
|
||||
|
||||
if((*CFG->uudecodepath == NUL) or is_dir(CFG->uudecodepath)) {
|
||||
|
||||
mktemp(strcpy(infile, AddPath(CFG->goldpath, "GDXXXXXX")));
|
||||
mktemp(strcpy(infile, AddPath(CFG->temppath, "GDXXXXXX")));
|
||||
strcpy(outfile, CFG->uudecodepath);
|
||||
|
||||
GMenuDomarks MenuDomarks;
|
||||
|
@ -203,7 +203,7 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
|
||||
}
|
||||
if(strieql(tplfile, "built-in") or not fexist(tplfile) or CFG->tpl.empty()) {
|
||||
tmptpl = YES; // Create a temporary template
|
||||
mktemp(strcpy(tplfile, AddPath(CFG->goldpath, "GDXXXXXX")));
|
||||
mktemp(strcpy(tplfile, AddPath(CFG->temppath, "GDXXXXXX")));
|
||||
fp = fsopen(tplfile, "wt", CFG->sharemode);
|
||||
if(fp) {
|
||||
fputs("@header= @oecho (@caddr) @align{79}{=}\n", fp);
|
||||
|
@ -38,12 +38,6 @@ uint WideSharemode = SH_DENYNO;
|
||||
int WideDispsoftcr = false;
|
||||
int WidePersonalmail = 0;
|
||||
|
||||
#if defined(GOLD_16BIT)
|
||||
long WideMsgSize = 64000L;
|
||||
#else
|
||||
long WideMsgSize = 512000L;
|
||||
#endif
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
|
@ -271,7 +271,6 @@ const int PM_LISTONLY = 0x0004;
|
||||
extern glog* WideLog;
|
||||
extern int WideDebug;
|
||||
extern int WideCanLock;
|
||||
extern long WideMsgSize;
|
||||
extern const char** WideUsername;
|
||||
extern int WideUsernames;
|
||||
extern uint WideSharemode;
|
||||
|
@ -129,15 +129,12 @@ int FidoArea::load_message(int __mode, gmsg* __msg, FidoHdr& __hdr) {
|
||||
// If message text is used
|
||||
if(__mode & GMSG_TXT) {
|
||||
|
||||
// Get length of message text and adjust if necessary
|
||||
long _fillen = filelength(_fh);
|
||||
long _txtlen = _fillen >= sizeof(FidoHdr) ? _fillen - sizeof(FidoHdr) : 0;
|
||||
if((_txtlen+256) > WideMsgSize)
|
||||
_txtlen = WideMsgSize;
|
||||
uint _alloclen = (uint)(_txtlen+256);
|
||||
// Get length of message text
|
||||
size_t _fillen = filelength(_fh);
|
||||
uint _txtlen = (uint) ((_fillen >= sizeof(FidoHdr)) ? (_fillen - sizeof(FidoHdr)) : 0);
|
||||
|
||||
// Allocate space for the message text
|
||||
__msg->txt = (char*)throw_calloc(1, _alloclen);
|
||||
__msg->txt = (char*)throw_calloc(1, _txtlen+256);
|
||||
|
||||
// Read the message text
|
||||
read(_fh, __msg->txt, (uint)_txtlen);
|
||||
|
@ -163,16 +163,11 @@ int _HudsArea<msgn_t, rec_t, attr_t, board_t, last_t, __HUDSON>::load_message(in
|
||||
// If message text is used
|
||||
if(__mode & GMSG_TXT) {
|
||||
|
||||
// Get length of message text and adjust if necessary
|
||||
// Get length of message text
|
||||
uint _numrecs = __hdr.numrecs;
|
||||
long _txtlen = (long)(_numrecs+1)*256L;
|
||||
if(_txtlen > WideMsgSize) {
|
||||
_txtlen = WideMsgSize;
|
||||
_numrecs = (uint)(_txtlen/256L);
|
||||
}
|
||||
|
||||
// Allocate memory for message text
|
||||
__msg->txt = (char*)throw_realloc(__msg->txt, (_numrecs+1)*256);
|
||||
__msg->txt = (char*)throw_realloc(__msg->txt, _numrecs*256+256);
|
||||
*__msg->txt = NUL;
|
||||
|
||||
// Read message text and convert it to a NUL-terminated C string
|
||||
|
@ -56,6 +56,15 @@ int JamArea::load_message(int __mode, gmsg* __msg, JamHdr& __hdr) {
|
||||
lseekset(data->fhjhr, _idx.hdroffset);
|
||||
read(data->fhjhr, &__hdr, sizeof(JamHdr));
|
||||
|
||||
if(strncmp(__hdr.signature, "JAM", 4) != 0) {
|
||||
WideLog->printf("! Invalid signature found in %s (msgno %ld).", path(), __msg->msgno);
|
||||
WideLog->printf(": Info: Your msgbase is corrupted.");
|
||||
WideLog->printf("+ Advice: Run a msgbase index rebuild/recover utility.");
|
||||
|
||||
GFTRK(NULL);
|
||||
return false;
|
||||
}
|
||||
|
||||
__msg->link.to_set(__hdr.replyto);
|
||||
__msg->link.first_set(__hdr.reply1st);
|
||||
__msg->link.next_set(__hdr.replynext);
|
||||
@ -327,11 +336,7 @@ int JamArea::load_message(int __mode, gmsg* __msg, JamHdr& __hdr) {
|
||||
uint _kludgelen1 = strlen(_kludges);
|
||||
uint _kludgelen2 = strlen(_kludges2);
|
||||
uint _kludgelen = _kludgelen1 + _kludgelen2;
|
||||
|
||||
// Make sure the msg size is within user/system limits
|
||||
ulong _msgsize = __hdr.txtlen;
|
||||
if((_msgsize+_kludgelen) > (uint) WideMsgSize)
|
||||
_msgsize = WideMsgSize - _kludgelen;
|
||||
|
||||
// Allocate memory for the message text
|
||||
__msg->txt = (char*)throw_realloc(_kludges, (uint)(_msgsize+_kludgelen+256));
|
||||
|
@ -92,10 +92,7 @@ int PcbArea::load_message(int __mode, gmsg* __msg, PcbHdr& __hdr) {
|
||||
strtrim(strncpy(__msg->re, __hdr.subject, 25));
|
||||
strtrim(strncpy(__msg->pcboard.password, __hdr.password, 12));
|
||||
|
||||
// Make sure the msg size is within user/system limits
|
||||
uint _msgsize = (uint)__msg->txtlength;
|
||||
if(_msgsize > WideMsgSize)
|
||||
_msgsize = (uint)WideMsgSize;
|
||||
|
||||
// Allocate memory for the message text
|
||||
__msg->txt = (char*)throw_realloc(__msg->txt, _msgsize+256);
|
||||
|
@ -170,14 +170,11 @@ int WCatArea::load_message(int __mode, gmsg* __msg, WCatHdr& __hdr) {
|
||||
// If message text is requested
|
||||
if(__mode & GMSG_TXT) {
|
||||
|
||||
// Get length of message text
|
||||
uint _txtlen = __hdr.msgbytes;
|
||||
if((_txtlen+256) > WideMsgSize)
|
||||
_txtlen = (uint)WideMsgSize;
|
||||
uint _alloclen = (uint)(_txtlen+256);
|
||||
|
||||
// Get length of message text and adjust if necessary
|
||||
// Allocate space for the message text
|
||||
__msg->txt = (char*)throw_calloc(1, _alloclen);
|
||||
__msg->txt = (char*)throw_calloc(1, _txtlen+256);
|
||||
|
||||
// Read the message text
|
||||
read(_fhdat, __msg->txt, _txtlen);
|
||||
@ -185,7 +182,7 @@ int WCatArea::load_message(int __mode, gmsg* __msg, WCatHdr& __hdr) {
|
||||
// Convert kludge char from NUL to CTRL-A
|
||||
char* p = __msg->txt;
|
||||
for(int n=0; n<_txtlen; n++,p++) {
|
||||
if(!*p)
|
||||
if(*p == '\0')
|
||||
*p = CTRL_A;
|
||||
}
|
||||
}
|
||||
|
@ -132,14 +132,11 @@ int XbbsArea::load_message(int __mode, gmsg* __msg, XbbsHdr& __hdr) {
|
||||
// If message text is requested
|
||||
if(__mode & GMSG_TXT) {
|
||||
|
||||
// Get length of message text
|
||||
uint _txtlen = __hdr.length;
|
||||
if((_txtlen+256) > WideMsgSize)
|
||||
_txtlen = WideMsgSize;
|
||||
uint _alloclen = (uint)(_txtlen+256);
|
||||
|
||||
// Get length of message text and adjust if necessary
|
||||
// Allocate space for the message text
|
||||
__msg->txt = (char*)throw_calloc(1, _alloclen);
|
||||
__msg->txt = (char*)throw_calloc(1, _txtlen+256);
|
||||
|
||||
// Read the message text
|
||||
lseekset(data->fhtext, __hdr.start);
|
||||
|
@ -3871,6 +3871,13 @@ AREALISTFORMAT "AM D C4PU4N E G "]]></eg>
|
||||
<item>
|
||||
<ident/YES/
|
||||
</item>
|
||||
<label>
|
||||
Notes:
|
||||
</label>
|
||||
<item>
|
||||
The same effect is achieved by skipping <ident/G/ letter in the
|
||||
<ref target=AREALISTFORMAT><kw/AREALISTFORMAT/</ref> definition.
|
||||
</item>
|
||||
<label>
|
||||
Processed by:
|
||||
</label>
|
||||
@ -3978,7 +3985,8 @@ AREALISTFORMAT "AM D C4PU4N E G "]]></eg>
|
||||
</label>
|
||||
<item>
|
||||
<ref target=AREALISTFORMAT><kw/AREALISTFORMAT/</ref>,
|
||||
<ref target=AREALISTECHOMAX><kw/AREALISTECHOMAX/</ref>
|
||||
<ref target=AREALISTECHOMAX><kw/AREALISTECHOMAX/</ref>,
|
||||
<ref target=AREALISTTYPE><kw/AREALISTTYPE/</ref>
|
||||
</item>
|
||||
</list>
|
||||
</div2>
|
||||
@ -4108,7 +4116,7 @@ mbutil link -clean
|
||||
</div2>
|
||||
<div2 id=AREALISTSORT>
|
||||
<head>
|
||||
AREALISTSORT <sortspec=<q></q>>
|
||||
AREALISTSORT
|
||||
</head>
|
||||
<list type=gloss>
|
||||
<label>
|
||||
@ -4290,6 +4298,12 @@ mbutil link -clean
|
||||
defined with the <ref target=AREASCANSORT><kw/AREASCANSORT/</ref>
|
||||
keyword.
|
||||
</item>
|
||||
<label>
|
||||
Processed by:
|
||||
</label>
|
||||
<item>
|
||||
Mail reader.
|
||||
</item>
|
||||
<label>
|
||||
See also:
|
||||
</label>
|
||||
@ -4316,40 +4330,75 @@ AREALISTSORT -U+TE</eg>
|
||||
</item>
|
||||
</list>
|
||||
</div2>
|
||||
<div2 id=AREALISTTYPE>
|
||||
<head>
|
||||
AREALISTTYPE
|
||||
</head>
|
||||
<list type=gloss>
|
||||
<label>
|
||||
Synopsis:
|
||||
</label>
|
||||
<item>
|
||||
<kw/AREALISTTYPE/ <ident>NEW/LAST</ident>
|
||||
</item>
|
||||
<label>
|
||||
Description:
|
||||
</label>
|
||||
<item>
|
||||
Defines the contents of the 4th column (the one after the <gi/Total/
|
||||
column).
|
||||
</item>
|
||||
<label>
|
||||
Parameters:
|
||||
</label>
|
||||
<item>
|
||||
<table rows=2 cols=2>
|
||||
<row>
|
||||
<cell>
|
||||
<ident/NEW/
|
||||
</cell>
|
||||
<cell>
|
||||
Displays the amount of new (unread) msgs (Actually number of
|
||||
messages after lastread mark).
|
||||
</cell>
|
||||
</row>
|
||||
<row>
|
||||
<cell>
|
||||
<ident/LAST/
|
||||
</cell>
|
||||
<cell>
|
||||
Displays the number of the last msg read.
|
||||
</cell>
|
||||
</row>
|
||||
</table>
|
||||
</item>
|
||||
<label>
|
||||
Default:
|
||||
</label>
|
||||
<item>
|
||||
<ident/NEW/
|
||||
</item>
|
||||
<label>
|
||||
Processed by:
|
||||
</label>
|
||||
<item>
|
||||
Mail reader.
|
||||
</item>
|
||||
<label>
|
||||
See also:
|
||||
</label>
|
||||
<item>
|
||||
<ref target=AREALISTFORMAT><kw/AREALISTFORMAT/</ref>,
|
||||
<ref target=AREALISTGROUPID><kw/AREALISTGROUPID/</ref>,
|
||||
<ref target=AREALISTNOS><kw/AREALISTNOS/</ref>
|
||||
</item>
|
||||
</list>
|
||||
</div2>
|
||||
|
||||
|
||||
<!-- finished here -->
|
||||
|
||||
|
||||
<div2 id=AREALISTTYPE>
|
||||
<head>
|
||||
AREALISTTYPE <(new)/last>
|
||||
</head>
|
||||
<p>
|
||||
Defines the contents of the 4th column (the one after the <q>Total</q>
|
||||
column).
|
||||
<table rows=2 cols=2>
|
||||
<row>
|
||||
<cell>
|
||||
New
|
||||
</cell>
|
||||
<cell>
|
||||
Displays the amount of new (unread) msgs.
|
||||
</cell>
|
||||
</row>
|
||||
<row>
|
||||
<cell>
|
||||
Last
|
||||
</cell>
|
||||
<cell>
|
||||
Displays the number of the last msg read.
|
||||
</cell>
|
||||
</row>
|
||||
</table>
|
||||
</p>
|
||||
</div2>
|
||||
|
||||
|
||||
<div2>
|
||||
<head>
|
||||
AREAPATH <path>
|
||||
@ -5731,21 +5780,6 @@ AREASEP !C "Group C" C Local]]></eg>
|
||||
These would be re-cased to "Odinn Sorensen".
|
||||
</p>
|
||||
</div2>
|
||||
<div2>
|
||||
<head>
|
||||
EDITMSGSIZE <bytes>
|
||||
</head>
|
||||
<p>
|
||||
(64000 in DOS, 512000 in all others)
|
||||
</p>
|
||||
<p>
|
||||
This lets you limit the size of loaded msgs. <name>GoldED+</name> currently
|
||||
cannot handle msgs larger than 64k in the DOS version (all other
|
||||
platforms do not have this limit). This keyword ensures that the
|
||||
system will not get confused and possibly crash or exit, if a
|
||||
message was encountered that was larger than 64k.
|
||||
</p>
|
||||
</div2>
|
||||
<div2>
|
||||
<head>
|
||||
EDITOR <commandline> [@file] [@line]
|
||||
@ -9966,7 +10000,8 @@ ones or remove them.
|
||||
MAPDRIVE MAPPATH
|
||||
MATCHAKA AKAMATCH
|
||||
MAXCOLS SCREENMAXCOL
|
||||
MAXMSGSIZE EDITMSGSIZE
|
||||
MAXMSGSIZE (removed)
|
||||
EDITMSGSIZE (removed)
|
||||
MAXROWS SCREENMAXROW
|
||||
MIXCASE EDITMIXCASE
|
||||
MULTIQBBS (removed)
|
||||
|
Reference in New Issue
Block a user