EditMsgSize removed, TEMPPATH used for temporary files storage instead of GOLDPATH, more accurate error handling in JAM, fix formatting

This commit is contained in:
Alexander S. Aganichev
2001-12-15 23:56:43 +00:00
parent b6740ee13d
commit b92274e3f8
21 changed files with 115 additions and 108 deletions

View File

@@ -515,7 +515,6 @@ GoldedCfgEdit::GoldedCfgEdit() {
HeaderFirst(EDITHEADERFIRST_YES);
Internal(true);
Menu(true);
MsgSize(512000L);
QuoteMargin(75);
SaveMenu(true);
UnDelete(50);

View File

@@ -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;

View File

@@ -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;

View File

@@ -244,13 +244,6 @@ void CfgEditmixcase() {
// ------------------------------------------------------------------
void CfgEditmsgsize() {
EDIT->MsgSize(atol(val));
}
// ------------------------------------------------------------------
void CfgEditor() {
EDIT->External(val);

View File

@@ -153,7 +153,6 @@ void CfgEditheaderfirst ();
void CfgEditinternal ();
void CfgEditmenu ();
void CfgEditmixcase ();
void CfgEditmsgsize ();
void CfgEditor ();
void CfgEditorfile ();
void CfgEditquotemargin ();

View File

@@ -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; }

View File

@@ -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);

View File

@@ -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;

View File

@@ -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];

View File

@@ -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;

View File

@@ -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);