Random fixes
This commit is contained in:
parent
a39960cd13
commit
428385bc1e
@ -12,6 +12,24 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
- Fixed recently introduced bug with replying on gated messages in
|
||||
echo and following change of destination name. There's still some
|
||||
work to be done in this field.
|
||||
|
||||
- Due to the collisions in Squish hash when personal mail scan is
|
||||
requested, after the hash values are matched the name now compared
|
||||
with string in To field in messagebase. This will slow down a bit
|
||||
personal mail scan, but will produce proper detection of names (not
|
||||
tested).
|
||||
|
||||
- The names with NLS characters was improperly handled in JAM
|
||||
messagebases, should work properly now (not tested).
|
||||
|
||||
- When importing file the current filepath will be displayed at
|
||||
statusline.
|
||||
|
||||
- Fixed highlignting of url-like filenames.
|
||||
|
||||
! The changed mail will also be copied to the Areayouwroteto now.
|
||||
|
||||
- Fixed small bug in Maximus 3 config parser. Any more left?
|
||||
|
@ -155,7 +155,8 @@ void Container::StyleCodeHighlight(const char* text, int row, int col, bool dohi
|
||||
else if(CFG->highlighturls) {
|
||||
const char *begin;
|
||||
|
||||
if((begin = url_begin(ptr)) != NULL) {
|
||||
if(((begin = url_begin(ptr)) != NULL) and
|
||||
((ptr == text) or (not isxalnum(ptr[-1]) and (ptr[-1] != '@')))) {
|
||||
const char *end = begin+strcspn(begin, " \t\"\'<>()[]");
|
||||
|
||||
if(ispunct(end[-1]) and (end[-1] != '/'))
|
||||
|
@ -962,7 +962,7 @@ void IEclass::editimport(Line* __line, char* __filename, bool imptxt) {
|
||||
update_statuslinef(LNG->ImportStatus, filenamebuf.c_str());
|
||||
|
||||
// Start the file picker
|
||||
fileselected = wpickfile(win_minrow, win_mincol, win_maxrow, win_maxcol, W_BMENU, C_MENUB, C_MENUW, C_MENUS, NO, filenamebuf, maketitle);
|
||||
fileselected = wpickfile(win_minrow, win_mincol, win_maxrow, win_maxcol, W_BMENU, C_MENUB, C_MENUW, C_MENUS, NO, filenamebuf, maketitle_and_status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -225,6 +225,9 @@ bool set_to_address(GMsg* msg, gsetaddr* toname, gsetaddr* toaddr, gsetaddr* fro
|
||||
return true;
|
||||
}
|
||||
|
||||
*msg->iaddr = NUL;
|
||||
*msg->realto = NUL;
|
||||
|
||||
if(lookup) {
|
||||
strcpy(buf1, toname->buf);
|
||||
strcpy(buf2, msg->to);
|
||||
@ -236,8 +239,6 @@ bool set_to_address(GMsg* msg, gsetaddr* toname, gsetaddr* toaddr, gsetaddr* fro
|
||||
strtrim(buf);
|
||||
if(*buf == NUL)
|
||||
strcpy(buf, " ");
|
||||
*msg->iaddr = NUL;
|
||||
*msg->realto = NUL;
|
||||
|
||||
if(*buf) {
|
||||
Addr addr;
|
||||
|
@ -393,6 +393,7 @@ int cmp_quotes(char* q1, char* q2);
|
||||
int is_quote(const char* ptr);
|
||||
int IsQuoteChar(const char* s);
|
||||
void maketitle();
|
||||
int maketitle_and_status(char *);
|
||||
void ProgMeter(int mode, int xx, int yy, long len, long barlen, int attr, long pos, long size);
|
||||
int ReadCfg(const char* cfg, int ignoreunknown=false);
|
||||
void ScanMsgTxtForAddr(GMsg* msg);
|
||||
|
@ -282,6 +282,14 @@ void maketitle() {
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
int maketitle_and_status(char *dir) {
|
||||
|
||||
maketitle();
|
||||
update_statuslinef(LNG->ImportStatus, dir);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void set_title(const char* t, int p, int a) {
|
||||
|
@ -369,7 +369,7 @@ int wmove (int nsrow, int nscol);
|
||||
int wopen (int srow, int scol, int erow, int ecol, int btype, int battr, int wattr, int sbattr=-1, int loattr=-1);
|
||||
inline int wopen_ (int srow, int scol, int vlen, int hlen, int btype, int battr, int wattr, int sbattr=-1, int loattr=-1) { return wopen(srow, scol, srow+vlen-1, scol+hlen-1, btype, battr, wattr, sbattr, loattr); }
|
||||
int wperror (const char* message);
|
||||
bool wpickfile (int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, std::string &filespec, VfvCP open, bool casesens=false);
|
||||
bool wpickfile (int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, std::string &filespec, IfcpCP open, bool casesens=false);
|
||||
int wpickstr (int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, char* strarr[], int initelem, VfvCP open);
|
||||
int wprintc (int wrow, int wcol, int attr, vchar ch);
|
||||
int wprintf (const char* format, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
|
@ -42,7 +42,7 @@
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
static bool path_in_title, case_sensitive;
|
||||
static VfvCP open_function = NULL;
|
||||
static IfcpCP open_function = NULL;
|
||||
static char* cwdp;
|
||||
static char* tcwdp;
|
||||
static char* namextp;
|
||||
@ -81,18 +81,22 @@ static int compare(const char** str1, const char** str2) {
|
||||
|
||||
static void disp_title() {
|
||||
|
||||
if(path_in_title) {
|
||||
char buf[sizeof(Path)+2];
|
||||
|
||||
if(path_in_title or open_function) {
|
||||
strcpy(buf, " ");
|
||||
PathCopy(buf+1, cwdp);
|
||||
strcat(buf, namextp);
|
||||
strcat(buf, " ");
|
||||
}
|
||||
|
||||
if(path_in_title) {
|
||||
wtitle(buf, TCENTER, gwin.active->battr);
|
||||
}
|
||||
|
||||
if(open_function)
|
||||
(*open_function)();
|
||||
if(open_function) {
|
||||
(*open_function)(buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -118,7 +122,7 @@ static void pre_exit(char** p, int numelems) {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
bool wpickfile(int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, std::string &filespec, VfvCP open, bool casesens) {
|
||||
bool wpickfile(int srow, int scol, int erow, int ecol, int btype, int bordattr, int winattr, int barattr, bool title, std::string &filespec, IfcpCP open, bool casesens) {
|
||||
|
||||
Path cwd, dir, namext, tcwd, path, spec;
|
||||
|
||||
|
@ -60,6 +60,7 @@ void FidoArea::raw_scan(bool __scanpm) {
|
||||
register ulong* _msgndx = Msgn->tag;
|
||||
|
||||
gposixdir d(real_path());
|
||||
if(d.ok) {
|
||||
if(WideDebug)
|
||||
WideLog->printf("- %s/*.msg", d.fullpath());
|
||||
const gdirentry *de;
|
||||
@ -76,6 +77,11 @@ void FidoArea::raw_scan(bool __scanpm) {
|
||||
_active++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(WideDebug)
|
||||
WideLog->printf("- Invalid path: %s", real_path());
|
||||
}
|
||||
|
||||
// Sort the index
|
||||
Msgn->SetCount(_active);
|
||||
|
@ -343,6 +343,11 @@ extern JamData* jamdata;
|
||||
extern int jamdatano;
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
char *jamstrlwr(char *str);
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
@ -67,7 +67,7 @@ void JamInit(const char* jampath, int harddelete, int jamsmapihw) {
|
||||
|
||||
// Calculate CRC32 of our username for the lastreads
|
||||
INam _name;
|
||||
strlwr(strcpy(_name, WideUsername[0]));
|
||||
jamstrlwr(strcpy(_name, WideUsername[0]));
|
||||
jamwide->userid = jamwide->usercrc = strCrc32(_name, NO, CRC32_MASK_CCITT);
|
||||
|
||||
// Enable replies lookahead feature
|
||||
@ -216,3 +216,15 @@ void JamArea::resume() {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
char *jamstrlwr(char *str) {
|
||||
|
||||
char *p = str;
|
||||
while(*p) {
|
||||
if((*p >= 'A') && (*p <= 'Z'))
|
||||
*p = *p - 'A' + 'a';
|
||||
++p;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@ -287,7 +287,7 @@ void JamArea::raw_scan(int __keep_index, int __scanpm) {
|
||||
int umax = (WidePersonalmail & PM_ALLNAMES) ? WideUsernames : 1;
|
||||
dword* ucrc = (dword*)throw_calloc(umax, sizeof(dword));
|
||||
for(int uc=0; uc<umax; uc++) {
|
||||
strlwr(strcpy(uname, WideUsername[uc]));
|
||||
jamstrlwr(strcpy(uname, WideUsername[uc]));
|
||||
ucrc[uc] = strCrc32(uname, NO, CRC32_MASK_CCITT);
|
||||
}
|
||||
PMrk->ResetAll();
|
||||
|
@ -324,9 +324,9 @@ void JamArea::save_message(int __mode, gmsg* __msg, JamHdr& __hdr) {
|
||||
__hdr.timesread = __msg->timesread;
|
||||
__hdr.passwordcrc = 0xFFFFFFFFL;
|
||||
|
||||
__hdr.msgidcrc = strCrc32(strlwr(strcpy(_buf, __msg->msgids)), NO, CRC32_MASK_CCITT);
|
||||
__hdr.replycrc = strCrc32(strlwr(strcpy(_buf, __msg->replys)), NO, CRC32_MASK_CCITT);
|
||||
_idx.usercrc = strCrc32(strlwr(strcpy(_buf, __msg->to)), NO, CRC32_MASK_CCITT);
|
||||
__hdr.msgidcrc = strCrc32(jamstrlwr(strcpy(_buf, __msg->msgids)), NO, CRC32_MASK_CCITT);
|
||||
__hdr.replycrc = strCrc32(jamstrlwr(strcpy(_buf, __msg->replys)), NO, CRC32_MASK_CCITT);
|
||||
_idx.usercrc = strCrc32(jamstrlwr(strcpy(_buf, __msg->to)), NO, CRC32_MASK_CCITT);
|
||||
|
||||
__hdr.datewritten = __msg->written;
|
||||
__hdr.datereceived = __msg->received;
|
||||
|
@ -222,11 +222,27 @@ void SquishArea::raw_scan(int __keep_index, int __scanpm) {
|
||||
for(int u=0; u<umax; u++) {
|
||||
if((idx->hash & 0x80000000LU) == 0) {
|
||||
if(idx->hash == uhash[u]) {
|
||||
// Open, read and close data file
|
||||
if(not isopen)
|
||||
data->fhsqd = ::sopen(AddPath(real_path(), ".sqd"), O_RDONLY|O_BINARY, WideSharemode, S_STDRD);
|
||||
if(data->fhsqd != -1) {
|
||||
lseekset(data->fhsqd, idx->offset + sizeof(SqshFrm));
|
||||
// Load the message header
|
||||
SqshHdr __hdr;
|
||||
memset(&__hdr, 0, sizeof(SqshHdr));
|
||||
read(data->fhsqd, &__hdr, sizeof(SqshHdr));
|
||||
if(not isopen) {
|
||||
::close(data->fhsqd);
|
||||
data->fhsqd = -1;
|
||||
}
|
||||
if(streql(__hdr.to, WideUsername[u])) {
|
||||
gotpm = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(gotpm) {
|
||||
PMrk->Append(Msgn->at(n-1));
|
||||
gotpm = false;
|
||||
|
Reference in New Issue
Block a user