Random fixes

This commit is contained in:
Alexander S. Aganichev 2002-10-05 21:13:23 +00:00
parent 2b647df906
commit 293685cd8e
6 changed files with 29 additions and 21 deletions

View File

@ -12,6 +12,10 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
- Fixed lastread problem after edit externutils (PGP, etc.).
- Oops, EchoAreaDefaults was not applied to the includes. Fixed.
+ Added EchoAreaDefaults support to Fidoconfig parser. + Added EchoAreaDefaults support to Fidoconfig parser.
+ Synchronet configuration parser now will use short description + Synchronet configuration parser now will use short description

View File

@ -585,7 +585,12 @@ int GMenuEditfile::Run(GMsg* __msg) {
default: default:
if(finaltag >= TAG_UTILS) { if(finaltag >= TAG_UTILS) {
XlatName __oldxlatimport;
// Save current charset
strcpy(__oldxlatimport, AA->Xlatimport());
AA->SetXlatimport(CFG->xlatlocalset);
ExternUtil(__msg, EDIT->SaveUtil.Number(finaltag-TAG_UTILS)); ExternUtil(__msg, EDIT->SaveUtil.Number(finaltag-TAG_UTILS));
AA->SetXlatimport(__oldxlatimport);
BodyView->Use(AA, __msg, _topline); BodyView->Use(AA, __msg, _topline);
BodyView->Paint(); BodyView->Paint();
} }

View File

@ -613,7 +613,6 @@ int ExternUtil(GMsg *msg, ExtUtil *extutil) {
if(tmpfile[0] != NUL) if(tmpfile[0] != NUL)
WipeFile(tmpfile, 0); WipeFile(tmpfile, 0);
reader_keyok = true;
return YES; return YES;
} }
@ -665,11 +664,11 @@ void ExternUtilMenu(GMsg* msg) {
extutil.utilno = 0; extutil.utilno = 0;
strxcpy(extutil.cmdline, cmdline, sizeof(extutil.cmdline)); strxcpy(extutil.cmdline, cmdline, sizeof(extutil.cmdline));
extutil.options = CFG->externoptions; extutil.options = CFG->externoptions;
ExternUtil(msg, &extutil); reader_keyok = ExternUtil(msg, &extutil);
} }
} }
else { else {
ExternUtil(msg, &CFG->externutil[n-1]); reader_keyok = ExternUtil(msg, &CFG->externutil[n-1]);
} }
} }
for(n=CFG->externutil.size()+1; n; n--) for(n=CFG->externutil.size()+1; n; n--)

View File

@ -45,7 +45,6 @@
#include <sys/nls.h> #include <sys/nls.h>
#define tolower(c) _nls_tolower((unsigned char)(c)) #define tolower(c) _nls_tolower((unsigned char)(c))
#define toupper(c) _nls_toupper((unsigned char)(c)) #define toupper(c) _nls_toupper((unsigned char)(c))
#endif
#elif defined(__WIN32__) #elif defined(__WIN32__)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -55,19 +54,20 @@ __inline__ int toupper(int c) { return tu[c]; }
} }
#else #else
extern char tl[256], tu[256]; extern char tl[256], tu[256];
#define tolower(c) tl[(int)(unsigned char)c] #define tolower(c) tl[(int)(unsigned char)(c)]
#define toupper(c) tu[(int)(unsigned char)c] #define toupper(c) tu[(int)(unsigned char)(c)]
#endif #endif
#endif #endif
// ------------------------------------------------------------------ // ------------------------------------------------------------------
// NLS chars detected by converting to lower or upper case and in case they don't match they treated as characters
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
// NLS chars detected by converting to lower or upper case and in case they don't match they treated as characters extern __inline__ int isxalnum(char c) { return isascii(c) ? isalnum(c) : (c != tolower(c)) || (c != toupper(c)); }
__inline__ int isxalnum(char c) { return isascii(c) ? isalnum(c) : (c != tolower(c)) || (c != toupper(c)); }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -267,8 +267,9 @@ protected:
void ReadFMail116(FILE* fp, char* path, char* file, char* options); void ReadFMail116(FILE* fp, char* path, char* file, char* options);
#endif #endif
#ifndef GCFG_NOFIDOCONF #ifndef GCFG_NOFIDOCONF
AreaCfg echoareadefaults;
bool ReadHPTLine(FILE* f, std::string* s, bool add=false, int state=0); bool ReadHPTLine(FILE* f, std::string* s, bool add=false, int state=0);
void ReadHPTFile(char* path, char* file, char* options, char* origin, int group); void ReadHPTFile(char* path, char* file, char* origin, int group);
#endif #endif
#ifndef GCFG_NOIMAIL #ifndef GCFG_NOIMAIL
void ReadIMail160(char* options, char* file, char* impath); void ReadIMail160(char* options, char* file, char* impath);

View File

@ -155,7 +155,7 @@ void gareafile::gettok(char** key, char** val) {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
void gareafile::ReadHPTFile(char* path, char* file, char* options, char* origin, int group) { void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
const word CRC_ADDRESS = 0xFDD6; const word CRC_ADDRESS = 0xFDD6;
const word CRC_INCLUDE = 0x379B; const word CRC_INCLUDE = 0x379B;
@ -170,7 +170,7 @@ void gareafile::ReadHPTFile(char* path, char* file, char* options, char* origin,
const word CRC_COMMENTCHAR = 0xE2CC; const word CRC_COMMENTCHAR = 0xE2CC;
const word CRC_ECHOAREADEFAULTS = 0x2CBB; const word CRC_ECHOAREADEFAULTS = 0x2CBB;
AreaCfg aa, ad; AreaCfg aa;
Path buf2; Path buf2;
FILE* fp = fsopen(file, "rb", sharemode); FILE* fp = fsopen(file, "rb", sharemode);
@ -181,7 +181,6 @@ void gareafile::ReadHPTFile(char* path, char* file, char* options, char* origin,
std::cout << "* Reading " << file << std::endl; std::cout << "* Reading " << file << std::endl;
aa.reset(); aa.reset();
ad.reset();
std::string s; std::string s;
while(ReadHPTLine(fp, &s)) { while(ReadHPTLine(fp, &s)) {
@ -191,10 +190,6 @@ void gareafile::ReadHPTFile(char* path, char* file, char* options, char* origin,
char *alptr = throw_xstrdup(s.c_str()); char *alptr = throw_xstrdup(s.c_str());
char *ptr = alptr; char *ptr = alptr;
aa.type = GMB_NONE;
aa.msgbase = fidomsgtype;
aa.groupid = group;
char* key; char* key;
char* val = ptr; char* val = ptr;
gettok(&key, &val); gettok(&key, &val);
@ -221,7 +216,7 @@ void gareafile::ReadHPTFile(char* path, char* file, char* options, char* origin,
if(strchg(buf2, '[', '%') != 0) if(strchg(buf2, '[', '%') != 0)
strchg(buf2, ']', '%'); strchg(buf2, ']', '%');
MakePathname(buf2, path, buf2); MakePathname(buf2, path, buf2);
ReadHPTFile(path, buf2, options, origin, group); ReadHPTFile(path, buf2, origin, group);
break; break;
case CRC_COMMENTCHAR: case CRC_COMMENTCHAR:
if((strlen(val) == 3) and (val[0] == val[2]) and strpbrk(val, "\'\"")) if((strlen(val) == 3) and (val[0] == val[2]) and strpbrk(val, "\'\""))
@ -239,11 +234,11 @@ void gareafile::ReadHPTFile(char* path, char* file, char* options, char* origin,
aa.type = GMB_LOCAL; aa.type = GMB_LOCAL;
break; break;
case CRC_ECHOAREA: case CRC_ECHOAREA:
aa = ad; aa = echoareadefaults;
aa.type = GMB_ECHO; aa.type = GMB_ECHO;
break; break;
case CRC_ECHOAREADEFAULTS: case CRC_ECHOAREADEFAULTS:
ad.reset(); echoareadefaults.reset();
aa.type = GMB_DEFAULT; aa.type = GMB_DEFAULT;
break; break;
} }
@ -346,7 +341,7 @@ void gareafile::ReadHPTFile(char* path, char* file, char* options, char* origin,
AddNewArea(aa); AddNewArea(aa);
break; break;
case GMB_DEFAULT: case GMB_DEFAULT:
ad = aa; echoareadefaults = aa;
break; break;
default: default:
break; break;
@ -404,7 +399,11 @@ void gareafile::ReadHPT(char* tag) {
CfgJAMSMAPIHighwater(true); CfgJAMSMAPIHighwater(true);
ReadHPTFile(path, file, options, origin, defaultgroup); echoareadefaults.type = GMB_NONE;
echoareadefaults.msgbase = fidomsgtype;
echoareadefaults.groupid = defaultgroup;
ReadHPTFile(path, file, origin, defaultgroup);
} }