Random fixes
This commit is contained in:
parent
542867d190
commit
5c40b1a909
@ -12,6 +12,21 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
! AREALISTGROUPORDER now supports #num format entries.
|
||||
|
||||
! You can now use area groups in the *SCAN* keywords: just prepend the
|
||||
'>' character before the group, i.e.:
|
||||
|
||||
AREASCAN >#12
|
||||
AREASCANEXCL >G
|
||||
|
||||
- When calling unpacker the path to the area will be converted to the
|
||||
full qualified path.
|
||||
|
||||
! EditNewline now deletes the selected block.
|
||||
|
||||
- Fixed exit from the locked/non-existing JAM areas.
|
||||
|
||||
- Fixed small bug in UUE decoder which prevents unsorted multipart UUE
|
||||
from decoding.
|
||||
|
||||
|
@ -601,10 +601,7 @@ bool AreaList::GetAreaFirstPart(AreaCfg& aa, char*& key, char*& val) {
|
||||
|
||||
// Get group (letter)
|
||||
getkeyval(&key, &val);
|
||||
if(*key == '#')
|
||||
aa.groupid = atoi(key+1)+0x8000u;
|
||||
else
|
||||
aa.groupid = (isupper(*key) ? *key : 0);
|
||||
aa.groupid = getgroup(key);
|
||||
|
||||
// Get type
|
||||
word crc = getkeyvalcrc(&key, &val);
|
||||
@ -931,10 +928,7 @@ void AreaList::GetAreaDesc(char* val) {
|
||||
getkeyval(&key, &val);
|
||||
if(*key) {
|
||||
if(*key != '-') {
|
||||
if(*key == '#')
|
||||
aa->set_groupid(atoi(key+1)+0x8000u);
|
||||
else
|
||||
aa->set_groupid(toupper(*key));
|
||||
aa->set_groupid(getgroup(key));
|
||||
}
|
||||
|
||||
// Get aka (optional)
|
||||
|
@ -35,6 +35,17 @@ extern char v7nodeflags[16][9];
|
||||
extern char v7modemtype[8][9];
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
int getgroup(const char *key)
|
||||
{
|
||||
if(*key == '#')
|
||||
return atoi(key+1)+0x8000u;
|
||||
else
|
||||
return (isupper(*key) ? *key : 0);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Read GOLDED.CFG
|
||||
|
||||
@ -156,19 +167,22 @@ void WriteGoldGed() {
|
||||
|
||||
// Check scan in/excludes
|
||||
for(i = CFG->areascan.begin(); i != CFG->areascan.end(); i++) {
|
||||
if(strwild((*AL.item)->echoid(), i->c_str())) {
|
||||
const char *current = i->c_str();
|
||||
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
|
||||
(*AL.item)->set_scan(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(i = CFG->areascanexcl.begin(); i != CFG->areascanexcl.end(); i++) {
|
||||
if(strwild((*AL.item)->echoid(), i->c_str())) {
|
||||
const char *current = i->c_str();
|
||||
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
|
||||
(*AL.item)->set_scanexcl(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(i = CFG->areascanincl.begin(); i != CFG->areascanincl.end(); i++) {
|
||||
if(strwild((*AL.item)->echoid(), i->c_str())) {
|
||||
const char *current = i->c_str();
|
||||
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
|
||||
(*AL.item)->set_scanincl(true);
|
||||
break;
|
||||
}
|
||||
@ -176,19 +190,22 @@ void WriteGoldGed() {
|
||||
|
||||
// Check pmscan in/excludes
|
||||
for(i = CFG->areapmscan.begin(); i != CFG->areapmscan.end(); i++) {
|
||||
if(strwild((*AL.item)->echoid(), i->c_str())) {
|
||||
const char *current = i->c_str();
|
||||
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
|
||||
(*AL.item)->set_pmscan(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(i = CFG->areapmscanexcl.begin(); i != CFG->areapmscanexcl.end(); i++) {
|
||||
if(strwild((*AL.item)->echoid(), i->c_str())) {
|
||||
const char *current = i->c_str();
|
||||
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
|
||||
(*AL.item)->set_pmscanexcl(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(i = CFG->areapmscanincl.begin(); i != CFG->areapmscanincl.end(); i++) {
|
||||
if(strwild((*AL.item)->echoid(), i->c_str())) {
|
||||
const char *current = i->c_str();
|
||||
if(((current[0] == '>') and ((*AL.item)->groupid() == getgroup(current+1))) or strwild((*AL.item)->echoid(), current)) {
|
||||
(*AL.item)->set_pmscanincl(true);
|
||||
break;
|
||||
}
|
||||
|
@ -58,16 +58,33 @@ int AreaTypeOrder[17] = {
|
||||
|
||||
int compare_groups(int _ga, int _gb)
|
||||
{
|
||||
char *gap, *gbp;
|
||||
|
||||
register int ga = _ga ? _ga : INT_MAX;
|
||||
register int gb = _gb ? _gb : INT_MAX;
|
||||
|
||||
if((ga > 0xff) || (gb > 0xff))
|
||||
return compare_two(ga, gb);
|
||||
const char *gap = NULL;
|
||||
const char *gbp = NULL;
|
||||
|
||||
gap = strchr(CFG->arealistgrouporder, (char)ga);
|
||||
gbp = strchr(CFG->arealistgrouporder, (char)gb);
|
||||
const char *g;
|
||||
|
||||
for(g = CFG->arealistgrouporder; *g != NUL;) {
|
||||
|
||||
int gr = getgroup(g);
|
||||
|
||||
if(gr == ga)
|
||||
gap = g;
|
||||
|
||||
if(gr == gb)
|
||||
gbp = g;
|
||||
|
||||
if(*g == '#') {
|
||||
do {
|
||||
g++;
|
||||
} while(isdigit(*g));
|
||||
}
|
||||
else
|
||||
g++;
|
||||
}
|
||||
|
||||
if(gap == NULL) {
|
||||
if(gbp != NULL)
|
||||
return 1;
|
||||
|
@ -493,7 +493,9 @@ const char* Unpack(const char* archive) {
|
||||
mkdir(newdir, S_IWUSR);
|
||||
char cmdline[1024];
|
||||
strxcpy(cmdline, i->second.c_str(), sizeof(cmdline));
|
||||
strxcpy(newname, archive, sizeof(Path));
|
||||
std::string archive_truename = archive;
|
||||
maketruepath(archive_truename);
|
||||
strxcpy(newname, archive_truename.c_str(), sizeof(Path));
|
||||
strchg(newname, GOLD_WRONG_SLASH_CHR, GOLD_SLASH_CHR);
|
||||
strischg(cmdline, "@file", newname);
|
||||
// Store current drive/dir and change it to the temporary
|
||||
|
@ -2140,12 +2140,16 @@ int IEclass::handlekey(gkey __key) {
|
||||
|
||||
case KK_EditDelChar:
|
||||
case KK_EditDelLeft:
|
||||
if(selecting) {
|
||||
__key = KK_EditUndefine;
|
||||
}
|
||||
// fall through
|
||||
|
||||
case KK_EditPaste:
|
||||
case KK_EditNewline:
|
||||
if(selecting) {
|
||||
BlockCut(true);
|
||||
batch_mode = BATCH_MODE;
|
||||
if(__key != KK_EditPaste)
|
||||
__key = KK_EditUndefine;
|
||||
}
|
||||
goto noselecting;
|
||||
break;
|
||||
|
@ -55,6 +55,8 @@ void WriteGoldGed();
|
||||
void InstallDetect(char* path);
|
||||
int InstallFinish();
|
||||
|
||||
int getgroup(const char *key);
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// GCKEYS prototypes
|
||||
|
@ -83,7 +83,7 @@ bool edit_pathname(char* buf, int buf_size, char* title, int helpcat) {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
int PopupLocked(long tries, int isopen, const char* file) {
|
||||
bool PopupLocked(long tries, int isopen, const char* file) {
|
||||
|
||||
// Close popup window if requested
|
||||
if(tries == 0) {
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
void ErrorExit(int type) {
|
||||
|
||||
static int in_error_exit = false;
|
||||
static int in_error_exit = 0;
|
||||
|
||||
if(not in_error_exit++) {
|
||||
error_exit = type;
|
||||
|
@ -287,7 +287,7 @@ extern int WidePersonalmail;
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
int PopupLocked(long __tries, int __isopen, const char* __file);
|
||||
bool PopupLocked(long __tries, int __isopen, const char* __file);
|
||||
const char* Unpack(const char* archive);
|
||||
void CleanUnpacked(const char* unpacked);
|
||||
|
||||
|
@ -130,7 +130,7 @@ int EzycomArea::test_open(const char* __file, int __mode, int __share) {
|
||||
if(_fh == -1) {
|
||||
|
||||
// Tell the world
|
||||
if(PopupLocked(++_tries, false, _path) == false) {
|
||||
if((errno != EACCES) or (PopupLocked(++_tries, false, _path) == false)) {
|
||||
WideLog->ErrOpen();
|
||||
raw_close();
|
||||
WideLog->printf("! A Ezycom msgbase file could not be opened.");
|
||||
|
@ -163,7 +163,8 @@ void JamArea::close() {
|
||||
|
||||
if(isopen) {
|
||||
if(isopen == 1) {
|
||||
save_lastread();
|
||||
if(data->fhjhr != -1)
|
||||
save_lastread();
|
||||
if(data->islocked)
|
||||
unlock();
|
||||
raw_close();
|
||||
|
@ -70,7 +70,7 @@ int PcbWideTestOpen(char* __file) {
|
||||
if(_fh == -1) {
|
||||
|
||||
// Tell the world
|
||||
if(PopupLocked(++_tries, false, __file) == false) {
|
||||
if((errno != EACCES) or (PopupLocked(++_tries, false, __file) == false)) {
|
||||
WideLog->ErrOpen();
|
||||
PcbWideClose();
|
||||
WideLog->printf("! A PCBoard msgbase file could not be opened.");
|
||||
@ -173,7 +173,7 @@ int PcbArea::test_open(const char* __file) {
|
||||
if(_fh == -1) {
|
||||
|
||||
// Tell the world
|
||||
if(PopupLocked(++_tries, false, __file) == false) {
|
||||
if((errno != EACCES) or (PopupLocked(++_tries, false, __file) == false)) {
|
||||
WideLog->ErrOpen();
|
||||
raw_close();
|
||||
PcbWideClose();
|
||||
|
@ -133,7 +133,7 @@ int SquishArea::test_open(const char* __file) {
|
||||
if(_fh == -1) {
|
||||
|
||||
// Tell the world
|
||||
if(PopupLocked(++_tries, false, __file) == false) {
|
||||
if((errno != EACCES) or (PopupLocked(++_tries, false, __file) == false)) {
|
||||
|
||||
// User requested to exit
|
||||
WideLog->ErrOpen();
|
||||
|
@ -82,7 +82,7 @@ int WCatArea::test_open(const char* __file) {
|
||||
if(_fh == -1) {
|
||||
|
||||
// Tell the world
|
||||
if(PopupLocked(++_tries, false, __file) == false) {
|
||||
if((errno != EACCES) or (PopupLocked(++_tries, false, __file) == false)) {
|
||||
|
||||
// User requested to exit
|
||||
WideLog->ErrOpen();
|
||||
|
@ -95,7 +95,7 @@ int XbbsArea::test_open(const char* __file, int sharemode) {
|
||||
if(_fh == -1) {
|
||||
|
||||
// Tell the world
|
||||
if(PopupLocked(++_tries, false, __file) == false) {
|
||||
if((errno != EACCES) or (PopupLocked(++_tries, false, __file) == false)) {
|
||||
|
||||
// User requested to exit
|
||||
WideLog->ErrOpen();
|
||||
|
Reference in New Issue
Block a user