bugfixing
This commit is contained in:
parent
61f978c8cd
commit
2e70dec322
@ -1,7 +1,5 @@
|
|||||||
# Uncomment to disable AdeptXBBS support
|
# Uncomment to disable AdeptXBBS support
|
||||||
ifneq ($(findstring EMX, $(PATH)), EMX)
|
#CPPFLAGS+=-DGCFG_NOXBBS
|
||||||
CPPFLAGS+=-DGCFG_NOXBBS
|
|
||||||
endif
|
|
||||||
# Uncomment to disable CrashMail support
|
# Uncomment to disable CrashMail support
|
||||||
#CPPFLAGS+=-DGCFG_NOCMAIL
|
#CPPFLAGS+=-DGCFG_NOCMAIL
|
||||||
# Uncomment to disable CrashEcho support
|
# Uncomment to disable CrashEcho support
|
||||||
|
@ -47,7 +47,7 @@ LIBEXT=.a
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
CFLAGS+=-g -funsigned-char $(INCS) -Wall -Wno-sign-compare -pedantic -O2# -fomit-frame-pointer
|
CFLAGS+=-g -funsigned-char $(INCS) -Wall -Wno-sign-compare -pedantic #-O2# -fomit-frame-pointer
|
||||||
LNKFLAGS+=-g
|
LNKFLAGS+=-g
|
||||||
CPPFLAGS+=$(CFLAGS) -fno-exceptions -fno-rtti
|
CPPFLAGS+=$(CFLAGS) -fno-exceptions -fno-rtti
|
||||||
|
|
||||||
|
@ -15,6 +15,4 @@
|
|||||||
# Uncomment to disable WildCat! messagebase format
|
# Uncomment to disable WildCat! messagebase format
|
||||||
#CPPFLAGS+=-DGMB_NOWCAT
|
#CPPFLAGS+=-DGMB_NOWCAT
|
||||||
# Uncomment to disable AdeptXBBS messagebase format
|
# Uncomment to disable AdeptXBBS messagebase format
|
||||||
ifneq ($(findstring EMX, $(PATH)), EMX)
|
#CPPFLAGS+=-DGMB_NOXBBS
|
||||||
CPPFLAGS+=-DGMB_NOXBBS
|
|
||||||
endif
|
|
||||||
|
@ -9,9 +9,13 @@ ______________________________________________________________________
|
|||||||
|
|
||||||
______________________________________________________________________
|
______________________________________________________________________
|
||||||
|
|
||||||
Notes for GoldED+ 1.1.5, April xx 2001
|
Notes for GoldED+ 1.1.5, /snapshot/
|
||||||
______________________________________________________________________
|
______________________________________________________________________
|
||||||
|
|
||||||
|
- Fixed few bugs in Undo feature.
|
||||||
|
|
||||||
|
+ Added support for AdeptXBBS for non-OS/2 systems.
|
||||||
|
|
||||||
+ Thanks to Alexey Froloff added support for CrashEcho tosser.
|
+ Thanks to Alexey Froloff added support for CrashEcho tosser.
|
||||||
|
|
||||||
- Fixed Y2K bug in WildCat! and PCBoard bases.
|
- Fixed Y2K bug in WildCat! and PCBoard bases.
|
||||||
@ -223,8 +227,6 @@ ______________________________________________________________________
|
|||||||
- Fixed EditMacro command to be able to execute commands which
|
- Fixed EditMacro command to be able to execute commands which
|
||||||
operates on selected block.
|
operates on selected block.
|
||||||
|
|
||||||
- One more quirk in Undo fixed.
|
|
||||||
|
|
||||||
- Fixed expansion of environment variables in GoldNode and for
|
- Fixed expansion of environment variables in GoldNode and for
|
||||||
includes and areafile definition.
|
includes and areafile definition.
|
||||||
|
|
||||||
|
@ -207,16 +207,12 @@ void AreaList::AddNewArea(AreaCfg* aa) {
|
|||||||
#endif
|
#endif
|
||||||
#ifndef GMB_NOXBBS
|
#ifndef GMB_NOXBBS
|
||||||
case MT_ADEPTXBBS:
|
case MT_ADEPTXBBS:
|
||||||
#if !defined(__OS2__)
|
|
||||||
return;
|
|
||||||
#else
|
|
||||||
if(*aa->path == NUL)
|
if(*aa->path == NUL)
|
||||||
return;
|
return;
|
||||||
MapPath(aa->path);
|
MapPath(aa->path);
|
||||||
StripBackslash(aa->path);
|
StripBackslash(aa->path);
|
||||||
strschg_environ(aa->path);
|
strschg_environ(aa->path);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#ifndef GMB_NOSQSH
|
#ifndef GMB_NOSQSH
|
||||||
case MT_SQUISH:
|
case MT_SQUISH:
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
const uint MAX_COMM = 25; // Editor comments
|
const uint MAX_COMM = 25; // Editor comments
|
||||||
const uint MAX_FIND = 10; // Max number of search strings
|
const uint MAX_FIND = 10; // Max number of search strings
|
||||||
|
const uint MAXQUOTELEN = 40; // Max length of quote
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
@ -611,7 +611,8 @@ Line* IEclass::wrapit(Line** __currline, uint* __curr_col, uint* __curr_row, boo
|
|||||||
_test_halt(*__currline == NULL);
|
_test_halt(*__currline == NULL);
|
||||||
|
|
||||||
uint _quotelen;
|
uint _quotelen;
|
||||||
char _quotebuf[100];
|
char _quotebuf[MAXQUOTELEN];
|
||||||
|
*_quotebuf = NUL;
|
||||||
|
|
||||||
uint _curscol = *__curr_col;
|
uint _curscol = *__curr_col;
|
||||||
uint _cursrow = *__curr_row;
|
uint _cursrow = *__curr_row;
|
||||||
@ -692,7 +693,7 @@ Line* IEclass::wrapit(Line** __currline, uint* __curr_col, uint* __curr_row, boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Did we search all the way back to the beginning of the line?
|
// Did we search all the way back to the beginning of the line?
|
||||||
if(_wrappos == 0 or _wrappos == _quotelen or _thisline->txt[_spacepos] == ' ') {
|
if((_wrappos == 0) or (_wrappos == _quotelen) or (_thisline->txt[_spacepos] == ' ')) {
|
||||||
|
|
||||||
// Case 3: There are no spaces within the margin or we hit leading spaces
|
// Case 3: There are no spaces within the margin or we hit leading spaces
|
||||||
|
|
||||||
@ -703,31 +704,24 @@ Line* IEclass::wrapit(Line** __currline, uint* __curr_col, uint* __curr_row, boo
|
|||||||
|
|
||||||
// The wrapptr now points to the location to be wrapped or NUL
|
// The wrapptr now points to the location to be wrapped or NUL
|
||||||
|
|
||||||
// Get length of the wrapped part
|
|
||||||
uint _wraplen = _thisline->txt.length() - _wrappos;
|
|
||||||
|
|
||||||
// Is the line hard-terminated?
|
// Is the line hard-terminated?
|
||||||
if(_thisline->txt.find('\n', _wrappos) != _thisline->txt.npos) {
|
if(_thisline->txt.find('\n', _wrappos) != _thisline->txt.npos) {
|
||||||
|
|
||||||
// The line is hard-terminated.
|
// The line is hard-terminated.
|
||||||
//
|
|
||||||
// The wrapped part must be placed on a new line below.
|
|
||||||
|
|
||||||
Line* _wrapline = _lastadded = insertlinebelow(_thisline, NULL, BATCH_MODE);
|
|
||||||
|
|
||||||
// Copy the quote string, if any, to the new line first
|
// Copy the quote string, if any, to the new line first
|
||||||
if(_quotelen)
|
string _wrapbuf = _quotebuf;
|
||||||
_wrapline->txt = _quotebuf;
|
|
||||||
else
|
|
||||||
_wrapline->txt = "";
|
|
||||||
|
|
||||||
// Copy/append the wrapped part to the new line
|
// Copy/append the wrapped part to the new line
|
||||||
_wrapline->txt += _thisline->txt.substr(_wrappos);
|
_wrapbuf += _thisline->txt.substr(_wrappos);
|
||||||
|
|
||||||
|
// The wrapped part must be placed on a new line below.
|
||||||
|
Line* _wrapline = _lastadded = insertlinebelow(_thisline, _wrapbuf.c_str(), BATCH_MODE);
|
||||||
|
|
||||||
// Saves pointer to a line where from the wrapped part was copied, its begining
|
// Saves pointer to a line where from the wrapped part was copied, its begining
|
||||||
// and length. While in Undo, appends the copied part to previous line and deletes
|
// and length. While in Undo, appends the copied part to previous line and deletes
|
||||||
// it on current, moving the rest over deleted.
|
// it on current, moving the rest over deleted.
|
||||||
Undo->PushItem(EDIT_UNDO_WRAP_TEXT|BATCH_MODE, _thisline, _quotelen, _wraplen);
|
Undo->PushItem(EDIT_UNDO_WRAP_TEXT|BATCH_MODE, _thisline, _quotelen, _wrapbuf.length() - _quotelen);
|
||||||
|
|
||||||
_wrapline->type = _thisline->type;
|
_wrapline->type = _thisline->type;
|
||||||
// Make sure the type of the line is correct
|
// Make sure the type of the line is correct
|
||||||
@ -759,6 +753,12 @@ Line* IEclass::wrapit(Line** __currline, uint* __curr_col, uint* __curr_row, boo
|
|||||||
// Pointer to the next line
|
// Pointer to the next line
|
||||||
Line* _nextline = _thisline->next;
|
Line* _nextline = _thisline->next;
|
||||||
|
|
||||||
|
// Copy the quote string, if any, to the new line first
|
||||||
|
string _wrapbuf = _quotebuf;
|
||||||
|
|
||||||
|
// Copy/append the wrapped part to the new line
|
||||||
|
_wrapbuf += _thisline->txt.substr(_wrappos);
|
||||||
|
|
||||||
// Flag to indicate if a new line was added below
|
// Flag to indicate if a new line was added below
|
||||||
bool _line_added_below = false;
|
bool _line_added_below = false;
|
||||||
|
|
||||||
@ -766,21 +766,19 @@ Line* IEclass::wrapit(Line** __currline, uint* __curr_col, uint* __curr_row, boo
|
|||||||
if((_nextline == NULL) or (_nextline->type & GLINE_QUOT)) {
|
if((_nextline == NULL) or (_nextline->type & GLINE_QUOT)) {
|
||||||
|
|
||||||
// The wrapped part must be placed on a new line below
|
// The wrapped part must be placed on a new line below
|
||||||
_lastadded = _nextline = insertlinebelow(_thisline, "", BATCH_MODE);
|
_lastadded = _nextline = insertlinebelow(_thisline, _wrapbuf.c_str(), BATCH_MODE);
|
||||||
_line_added_below = true;
|
_line_added_below = true;
|
||||||
|
|
||||||
|
Undo->PushItem(EDIT_UNDO_WRAP_TEXT|BATCH_MODE, _thisline, _quotelen, _wrapbuf.length() - _quotelen);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
// Was this line quoted?
|
_nextline->txt.insert(0, _wrapbuf);
|
||||||
if(_quotelen) {
|
if(_quotelen)
|
||||||
|
Undo->PushItem(EDIT_UNDO_INS_TEXT|BATCH_MODE, _nextline, 0, _quotelen);
|
||||||
// Copy the quote string
|
Undo->PushItem(EDIT_UNDO_WRAP_TEXT|BATCH_MODE, _thisline, _quotelen, _wrapbuf.length() - _quotelen);
|
||||||
_nextline->txt.insert(0, _quotebuf, _quotelen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_nextline->txt.insert(_quotelen, _thisline->txt.substr(_wrappos));
|
|
||||||
|
|
||||||
Undo->PushItem(EDIT_UNDO_WRAP_TEXT|BATCH_MODE, _thisline, 0, _quotelen+_wraplen);
|
|
||||||
|
|
||||||
// Make sure the type of the line is correct
|
// Make sure the type of the line is correct
|
||||||
setlinetype(_nextline);
|
setlinetype(_nextline);
|
||||||
|
|
||||||
@ -859,6 +857,10 @@ Line* IEclass::wrapit(Line** __currline, uint* __curr_col, uint* __curr_row, boo
|
|||||||
if(_thisline->next->txt.length() <= _wrapmargin)
|
if(_thisline->next->txt.length() <= _wrapmargin)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if(_thisline->type & GLINE_QUOT) {
|
||||||
|
Undo->PushItem(EDIT_UNDO_INS_TEXT|BATCH_MODE, _thisline, _thisline->txt.length(), 1);
|
||||||
|
_thisline->txt += '\n';
|
||||||
|
}
|
||||||
|
|
||||||
// Go to the next line
|
// Go to the next line
|
||||||
_thisline = _thisline->next;
|
_thisline = _thisline->next;
|
||||||
@ -1023,8 +1025,8 @@ void IEclass::DelChar() {
|
|||||||
if((_nextline->type & GLINE_QUOT) and col) {
|
if((_nextline->type & GLINE_QUOT) and col) {
|
||||||
|
|
||||||
// Get quote string length
|
// Get quote string length
|
||||||
char _dummybuf[100];
|
char _quotebuf[MAXQUOTELEN];
|
||||||
GetQuotestr(_nextline->txt.c_str(), _dummybuf, &_quotelen);
|
GetQuotestr(_nextline->txt.c_str(), _quotebuf, &_quotelen);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy the next line's text to this line without quote string
|
// Copy the next line's text to this line without quote string
|
||||||
@ -1180,27 +1182,28 @@ void IEclass::Newline() {
|
|||||||
// Pointer to the split position
|
// Pointer to the split position
|
||||||
int _splitpos = col;
|
int _splitpos = col;
|
||||||
|
|
||||||
|
char _quotebuf[MAXQUOTELEN];
|
||||||
|
*_quotebuf = NUL;
|
||||||
|
|
||||||
// Buffer for the second part of the split line
|
// Buffer for the second part of the split line
|
||||||
char* _splitbuf = (char*)throw_malloc(EDIT_BUFLEN);
|
string _splitbuf;
|
||||||
*_splitbuf = NUL;
|
|
||||||
|
|
||||||
// If the split line was quoted, get the quotestring
|
// If the split line was quoted, get the quotestring
|
||||||
// But do not get it if the cursor points to a linefeed or is
|
// But do not get it if the cursor points to a linefeed or is
|
||||||
uint _quotelen = 0;
|
uint _quotelen;
|
||||||
if(is_quote(currline->txt.c_str())) {
|
GetQuotestr(currline->txt.c_str(), _quotebuf, &_quotelen);
|
||||||
GetQuotestr(currline->txt.c_str(), _splitbuf, &_quotelen);
|
|
||||||
THROW_CHECKPTR(_splitbuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Eliminate the quotestring if
|
// Eliminate the quotestring if
|
||||||
// - the cursor points to a linefeed or
|
// - the cursor points to a linefeed or
|
||||||
// - the cursor is located inside the quotestring
|
// - the cursor is located inside the quotestring
|
||||||
if(_quotelen and ((currline->txt.length() == col) or (currline->txt[_splitpos] == '\n') or (col < _quotelen)))
|
if(_quotelen and ((currline->txt.length() == col) or (currline->txt[_splitpos] == '\n') or (col < _quotelen))) {
|
||||||
*_splitbuf = _quotelen = 0;
|
*_quotebuf = NUL;
|
||||||
|
_quotelen = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Append the second part to the split buffer
|
// Append the second part to the split buffer
|
||||||
strcat(_splitbuf, currline->txt.substr(_splitpos).c_str());
|
_splitbuf = _quotebuf;
|
||||||
THROW_CHECKPTR(_splitbuf);
|
_splitbuf += currline->txt.substr(_splitpos);
|
||||||
|
|
||||||
Undo->PushItem(EDIT_UNDO_INS_TEXT|batch_mode, currline, col, 1);
|
Undo->PushItem(EDIT_UNDO_INS_TEXT|batch_mode, currline, col, 1);
|
||||||
batch_mode = BATCH_MODE;
|
batch_mode = BATCH_MODE;
|
||||||
@ -1214,17 +1217,16 @@ void IEclass::Newline() {
|
|||||||
displine(currline, row);
|
displine(currline, row);
|
||||||
|
|
||||||
// Insert a new line below, set the line text to the split-off part
|
// Insert a new line below, set the line text to the split-off part
|
||||||
currline = insertlinebelow(currline, _splitbuf);
|
currline = insertlinebelow(currline, _splitbuf.c_str());
|
||||||
|
|
||||||
// --v--
|
// --v--
|
||||||
// This line would be wrapped
|
// This line would be wrapped
|
||||||
// This line would be
|
// This line would be
|
||||||
// wrapped
|
// wrapped
|
||||||
|
|
||||||
Undo->PushItem(EDIT_UNDO_WRAP_TEXT|BATCH_MODE, currline->prev, _quotelen, strlen(_splitbuf) - _quotelen);
|
Undo->PushItem(EDIT_UNDO_WRAP_TEXT|BATCH_MODE, currline->prev, _quotelen, _splitbuf.length() - _quotelen);
|
||||||
|
|
||||||
setlinetype(currline);
|
setlinetype(currline);
|
||||||
throw_free(_splitbuf);
|
|
||||||
|
|
||||||
// Move down the cursor
|
// Move down the cursor
|
||||||
col = 0;
|
col = 0;
|
||||||
@ -1768,9 +1770,9 @@ int IEclass::reflowok(char* __qstr) {
|
|||||||
|
|
||||||
// Stop reflow if the quotestring on the next line is not the same
|
// Stop reflow if the quotestring on the next line is not the same
|
||||||
uint _qlen2;
|
uint _qlen2;
|
||||||
char _qstr2[100];
|
char _qstr2[MAXQUOTELEN];
|
||||||
GetQuotestr(currline->next->txt.c_str(), _qstr2, &_qlen2);
|
GetQuotestr(currline->next->txt.c_str(), _qstr2, &_qlen2);
|
||||||
if(not strieql(__qstr, _qstr2))
|
if(not cmp_quotes(__qstr, _qstr2))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1795,7 +1797,7 @@ void IEclass::Reflow() {
|
|||||||
|
|
||||||
// Get the first quotestring
|
// Get the first quotestring
|
||||||
uint _qlen1;
|
uint _qlen1;
|
||||||
char _qstr1[100];
|
char _qstr1[MAXQUOTELEN];
|
||||||
GetQuotestr(currline->txt.c_str(), _qstr1, &_qlen1);
|
GetQuotestr(currline->txt.c_str(), _qstr1, &_qlen1);
|
||||||
const char* _qlenptr = currline->txt.c_str() + _qlen1;
|
const char* _qlenptr = currline->txt.c_str() + _qlen1;
|
||||||
|
|
||||||
@ -2431,7 +2433,7 @@ void UndoStack::PushItem(uint action, Line* __line, uint __col, uint __len) {
|
|||||||
case EDIT_UNDO_WRAP_TEXT:
|
case EDIT_UNDO_WRAP_TEXT:
|
||||||
last_item->line = __line;
|
last_item->line = __line;
|
||||||
if(__len == NO_VALUE)
|
if(__len == NO_VALUE)
|
||||||
__len = __line->txt.length() - __col + 1;
|
__len = __line->txt.length() - __col;
|
||||||
throw_new(last_item->data.text_ptr = new text_item(__col, __len));
|
throw_new(last_item->data.text_ptr = new text_item(__col, __len));
|
||||||
break;
|
break;
|
||||||
case EDIT_UNDO_NEW_LINE:
|
case EDIT_UNDO_NEW_LINE:
|
||||||
@ -2571,7 +2573,7 @@ void UndoStack::PlayItem() {
|
|||||||
throw_delete(text_data);
|
throw_delete(text_data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
editor->setlinetype(currline);
|
editor->setlinetype((undo_action == EDIT_UNDO_WRAP_TEXT) ? currline->next : currline);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1576,37 +1576,39 @@ void ScanKludges(GMsg* msg, int getvalue) {
|
|||||||
|
|
||||||
} while((line = line->prev) != NULL);
|
} while((line = line->prev) != NULL);
|
||||||
|
|
||||||
for(line = msg->lin; line; line = line->next)
|
if(getvalue) {
|
||||||
if(line->type & GLINE_KLUDGE)
|
for(line = msg->lin; line; line = line->next)
|
||||||
continue;
|
if(line->type & GLINE_KLUDGE)
|
||||||
else {
|
continue;
|
||||||
if(strnieql(line->txt.c_str(), "From:", 5)) {
|
else {
|
||||||
const char* ptr = line->txt.c_str() + 5;
|
if(strnieql(line->txt.c_str(), "From:", 5)) {
|
||||||
ptr = strskip_wht(ptr);
|
const char* ptr = line->txt.c_str() + 5;
|
||||||
char* tmp = UnwrapLine(line, ptr);
|
ptr = strskip_wht(ptr);
|
||||||
KludgeFROM(msg, tmp ? tmp : ptr);
|
char* tmp = UnwrapLine(line, ptr);
|
||||||
if(tmp)
|
KludgeFROM(msg, tmp ? tmp : ptr);
|
||||||
throw_free(tmp);
|
if(tmp)
|
||||||
|
throw_free(tmp);
|
||||||
|
}
|
||||||
|
else if(strnieql(line->txt.c_str(), "To:", 3)) {
|
||||||
|
const char* ptr = line->txt.c_str() + 3;
|
||||||
|
ptr = strskip_wht(ptr);
|
||||||
|
char* tmp = UnwrapLine(line, ptr);
|
||||||
|
KludgeTO(msg, tmp ? tmp : ptr);
|
||||||
|
if(tmp)
|
||||||
|
throw_free(tmp);
|
||||||
|
}
|
||||||
|
else if(strnieql(line->txt.c_str(), "Reply-To:", 9)) {
|
||||||
|
const char* ptr = line->txt.c_str() + 9;
|
||||||
|
ptr = strskip_wht(ptr);
|
||||||
|
char* tmp = UnwrapLine(line, ptr);
|
||||||
|
KludgeREPLY_TO(msg, tmp ? tmp : ptr);
|
||||||
|
if(tmp)
|
||||||
|
throw_free(tmp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if(strnieql(line->txt.c_str(), "To:", 3)) {
|
}
|
||||||
const char* ptr = line->txt.c_str() + 3;
|
|
||||||
ptr = strskip_wht(ptr);
|
|
||||||
char* tmp = UnwrapLine(line, ptr);
|
|
||||||
KludgeTO(msg, tmp ? tmp : ptr);
|
|
||||||
if(tmp)
|
|
||||||
throw_free(tmp);
|
|
||||||
}
|
|
||||||
else if(strnieql(line->txt.c_str(), "Reply-To:", 9)) {
|
|
||||||
const char* ptr = line->txt.c_str() + 9;
|
|
||||||
ptr = strskip_wht(ptr);
|
|
||||||
char* tmp = UnwrapLine(line, ptr);
|
|
||||||
KludgeREPLY_TO(msg, tmp ? tmp : ptr);
|
|
||||||
if(tmp)
|
|
||||||
throw_free(tmp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(not gottag)
|
if(not gottag)
|
||||||
*msg->tagline = NUL;
|
*msg->tagline = NUL;
|
||||||
@ -1784,7 +1786,7 @@ char* XlatStr(char* dest, const char* src, int level, Chs* chrtbl, int qpencoded
|
|||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
static int cmp_quotes(char* q1, char* q2) {
|
int cmp_quotes(char* q1, char* q2) {
|
||||||
|
|
||||||
q1--;
|
q1--;
|
||||||
q2--;
|
q2--;
|
||||||
@ -1866,7 +1868,7 @@ void MakeLineIndex(GMsg* msg, int margin, bool header_recode) {
|
|||||||
char* tptr;
|
char* tptr;
|
||||||
char* escp;
|
char* escp;
|
||||||
char* bptr;
|
char* bptr;
|
||||||
char buf[256], qbuf[500], qbuf2[500], chsbuf[100];
|
char buf[256], qbuf[MAXQUOTELEN], qbuf2[MAXQUOTELEN], chsbuf[100];
|
||||||
char* ptr;
|
char* ptr;
|
||||||
char* qptr;
|
char* qptr;
|
||||||
char* tmp=NULL;
|
char* tmp=NULL;
|
||||||
@ -1954,7 +1956,7 @@ void MakeLineIndex(GMsg* msg, int margin, bool header_recode) {
|
|||||||
if(line->prev) {
|
if(line->prev) {
|
||||||
line->prev->next = line;
|
line->prev->next = line;
|
||||||
if((line->prev->type & (GLINE_HARD|GLINE_WRAP|GLINE_QUOT)) == (GLINE_HARD|GLINE_WRAP)) {
|
if((line->prev->type & (GLINE_HARD|GLINE_WRAP|GLINE_QUOT)) == (GLINE_HARD|GLINE_WRAP)) {
|
||||||
line->prev->type ^= GLINE_HARD;
|
line->prev->type &= ~GLINE_HARD;
|
||||||
line->type |= GLINE_HARD;
|
line->type |= GLINE_HARD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2620,8 +2622,8 @@ void MsgLineReIndex(GMsg* msg, int viewhidden, int viewkludge, int viewquote) {
|
|||||||
msg->lines = 0;
|
msg->lines = 0;
|
||||||
line = msg->lin;
|
line = msg->lin;
|
||||||
|
|
||||||
char qbuf[50];
|
char qbuf[MAXQUOTELEN];
|
||||||
char qbuf0[50];
|
char qbuf0[MAXQUOTELEN];
|
||||||
uint qlen = 0;
|
uint qlen = 0;
|
||||||
int qmatches = 0;
|
int qmatches = 0;
|
||||||
|
|
||||||
@ -2646,8 +2648,7 @@ void MsgLineReIndex(GMsg* msg, int viewhidden, int viewkludge, int viewquote) {
|
|||||||
else if(line->type & GLINE_QUOT) {
|
else if(line->type & GLINE_QUOT) {
|
||||||
if(not viewquote) {
|
if(not viewquote) {
|
||||||
GetQuotestr(line->txt.c_str(), qbuf, &qlen);
|
GetQuotestr(line->txt.c_str(), qbuf, &qlen);
|
||||||
strtrim(qbuf);
|
if(not cmp_quotes(qbuf0, qbuf)) {
|
||||||
if(not strieql(qbuf0, qbuf)) {
|
|
||||||
strcpy(qbuf0, qbuf);
|
strcpy(qbuf0, qbuf);
|
||||||
qmatches = 0;
|
qmatches = 0;
|
||||||
}
|
}
|
||||||
|
@ -686,8 +686,20 @@ void GThreadlist::do_delayed() {
|
|||||||
wactiv_(mlstwh);
|
wactiv_(mlstwh);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CFG->switches.get(msglistviewsubj))
|
if(CFG->switches.get(msglistviewsubj)) {
|
||||||
|
// Reload message if not sure that just reread
|
||||||
|
if(not AA->Msglistheader()) {
|
||||||
|
t = list[index];
|
||||||
|
|
||||||
|
if(AA->Msglistfast()) {
|
||||||
|
AA->LoadHdr(&msg, t.msgno);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
AA->LoadMsg(&msg, t.msgno, CFG->dispmargin-(int)CFG->switches.get(disppagebar));
|
||||||
|
}
|
||||||
|
}
|
||||||
wtitle(msg.re, TCENTER|TBOTTOM, tattr);
|
wtitle(msg.re, TCENTER|TBOTTOM, tattr);
|
||||||
|
}
|
||||||
|
|
||||||
if(CFG->switches.get(msglistpagebar))
|
if(CFG->switches.get(msglistpagebar))
|
||||||
wscrollbar(W_VERT, maximum_index+1, maximum_index, index);
|
wscrollbar(W_VERT, maximum_index+1, maximum_index, index);
|
||||||
@ -772,7 +784,12 @@ void GThreadlist::print_line(uint idx, uint pos, bool isbar) {
|
|||||||
|
|
||||||
tdlen = xlen - ((AA->Msglistdate() == MSGLISTDATE_NONE) ? 8 : 18);
|
tdlen = xlen - ((AA->Msglistdate() == MSGLISTDATE_NONE) ? 8 : 18);
|
||||||
|
|
||||||
AA->LoadHdr(&msg, t.msgno);
|
if(AA->Msglistfast()) {
|
||||||
|
AA->LoadHdr(&msg, t.msgno);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
AA->LoadMsg(&msg, t.msgno, CFG->dispmargin-(int)CFG->switches.get(disppagebar));
|
||||||
|
}
|
||||||
|
|
||||||
if(msg.attr.uns() and not msg.attr.rcv() and not msg.attr.del()) {
|
if(msg.attr.uns() and not msg.attr.rcv() and not msg.attr.del()) {
|
||||||
attrw = C_MENUW_UNSENT;
|
attrw = C_MENUW_UNSENT;
|
||||||
|
@ -380,6 +380,7 @@ int edit_string(char* buf, int buf_size, char* title, int helpcat);
|
|||||||
bool edit_pathname(char* buf, int buf_size, char* title, int helpcat);
|
bool edit_pathname(char* buf, int buf_size, char* title, int helpcat);
|
||||||
int GetAkaNo(const ftn_addr& __aka);
|
int GetAkaNo(const ftn_addr& __aka);
|
||||||
int GetQuotestr(const char* ptr, char* qbuf, uint* qlen);
|
int GetQuotestr(const char* ptr, char* qbuf, uint* qlen);
|
||||||
|
int cmp_quotes(char* q1, char* q2);
|
||||||
int is_quote(const char* ptr);
|
int is_quote(const char* ptr);
|
||||||
int IsQuoteChar(const char* s);
|
int IsQuoteChar(const char* s);
|
||||||
void maketitle();
|
void maketitle();
|
||||||
|
@ -365,7 +365,7 @@ int is_quote(const char* ptr) {
|
|||||||
|
|
||||||
int quotecolor(const char* line) {
|
int quotecolor(const char* line) {
|
||||||
|
|
||||||
char buf[100];
|
char buf[MAXQUOTELEN];
|
||||||
uint len;
|
uint len;
|
||||||
|
|
||||||
GetQuotestr(line, buf, &len);
|
GetQuotestr(line, buf, &len);
|
||||||
@ -385,52 +385,51 @@ int GetQuotestr(const char* ptr, char* qbuf, uint* qlen) {
|
|||||||
|
|
||||||
if(is_quote(ptr)) {
|
if(is_quote(ptr)) {
|
||||||
|
|
||||||
char* qptr;
|
|
||||||
const char* tmp;
|
|
||||||
const char* lp = ptr;
|
const char* lp = ptr;
|
||||||
int n, x;
|
int n, x;
|
||||||
|
|
||||||
MoreQuotes: // Naughty goto-point for quotestring skipping
|
for(;;) {
|
||||||
|
|
||||||
// Skip leading spaces
|
// Skip leading spaces
|
||||||
while(isspace(*lp) or issoftcr(*lp))
|
|
||||||
lp++;
|
|
||||||
if(IsQuoteChar(lp)) { // Type 1 : ">xxxx>" and ">xxxx:"
|
|
||||||
lp++;
|
|
||||||
while(isspace(*lp) or issoftcr(*lp))
|
while(isspace(*lp) or issoftcr(*lp))
|
||||||
lp++;
|
lp++;
|
||||||
if(is_quote(lp))
|
if(IsQuoteChar(lp)) { // Type 1 : ">xxxx>" and ">xxxx:"
|
||||||
goto MoreQuotes;
|
|
||||||
if(not (IsQuoteChar(lp-1) or (*(lp-1) == ':'))) {
|
|
||||||
while(not IsQuoteChar(lp))
|
|
||||||
lp--;
|
|
||||||
lp++;
|
lp++;
|
||||||
|
while(isspace(*lp) or issoftcr(*lp))
|
||||||
|
lp++;
|
||||||
|
if(is_quote(lp))
|
||||||
|
continue;
|
||||||
|
if(not (IsQuoteChar(lp-1) or (*(lp-1) == ':'))) {
|
||||||
|
while(not IsQuoteChar(lp))
|
||||||
|
lp--;
|
||||||
|
lp++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else { // Type 2: "xxxx>"
|
||||||
else { // Type 2: "xxxx>"
|
while(not (IsQuoteChar(lp) and not IsQuoteChar(lp+1)) and (*lp != CR) and (*lp != NUL))
|
||||||
while(not (IsQuoteChar(lp) and not IsQuoteChar(lp+1)) and *lp != CR and *lp)
|
++lp;
|
||||||
++lp;
|
if(is_quote(lp))
|
||||||
if(is_quote(lp))
|
continue;
|
||||||
goto MoreQuotes;
|
if(*lp)
|
||||||
if(*lp)
|
lp++;
|
||||||
lp++;
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// lp now points to the character after the quotestring
|
// lp now points to the character after the quotestring
|
||||||
|
|
||||||
*qlen = (int)((dword)lp - (dword)ptr);
|
x = lp - ptr;
|
||||||
if(isspace(*lp) or issoftcr(*lp))
|
if((*lp != NUL) and (isspace(*lp) or issoftcr(*lp)))
|
||||||
(*qlen)++;
|
x++;
|
||||||
|
|
||||||
for(x=*qlen,n=0,tmp=ptr,qptr=qbuf; n<x and n<40; n++,tmp++) {
|
for(*qlen = n = 0; (n < x) and ((*qlen) < MAXQUOTELEN); n++, ptr++) {
|
||||||
if(*tmp != LF and not issoftcr(*tmp))
|
if((*ptr != LF) and not issoftcr(*ptr)) {
|
||||||
*qptr++ = *tmp;
|
*qbuf++ = *ptr;
|
||||||
else
|
(*qlen)++;
|
||||||
(*qlen)--;
|
}
|
||||||
}
|
}
|
||||||
*qptr = NUL;
|
*qbuf = NUL;
|
||||||
if(*qlen > 40)
|
|
||||||
*qlen = 40;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*qbuf = NUL;
|
*qbuf = NUL;
|
||||||
|
@ -26,6 +26,22 @@
|
|||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __OS2__
|
||||||
|
#define INCL_BASE
|
||||||
|
#include <os2.h>
|
||||||
|
#else
|
||||||
|
typedef char CHAR;
|
||||||
|
typedef unsigned char UCHAR;
|
||||||
|
typedef short SHORT;
|
||||||
|
typedef unsigned short USHORT;
|
||||||
|
typedef long LONG;
|
||||||
|
typedef unsigned long ULONG;
|
||||||
|
typedef unsigned char *PSZ;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
#define SMALLEST_MSG_SIZE_FOR_PACKING 384
|
#define SMALLEST_MSG_SIZE_FOR_PACKING 384
|
||||||
@ -332,7 +348,6 @@ typedef struct _msgarea MSGAREA, *PMSGAREA; //JM931019
|
|||||||
#define M_FIDO 0x00100000 /* Star . msg Format */
|
#define M_FIDO 0x00100000 /* Star . msg Format */
|
||||||
#define M_JAM 0x00200000 /* JAM msg Format */
|
#define M_JAM 0x00200000 /* JAM msg Format */
|
||||||
|
|
||||||
|
|
||||||
struct _filearea
|
struct _filearea
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -187,7 +187,7 @@ void gareafile::ReadWtrGte(char* tag) {
|
|||||||
if(fp) {
|
if(fp) {
|
||||||
char header[26];
|
char header[26];
|
||||||
if(not quiet)
|
if(not quiet)
|
||||||
printf(NL "* Reading %s", file);
|
cout << "* Reading " << file << endl;
|
||||||
fread(header, 26, 1, fp); strp2c(header);
|
fread(header, 26, 1, fp); strp2c(header);
|
||||||
|
|
||||||
if(streql(header, ConfigHeader))
|
if(streql(header, ConfigHeader))
|
||||||
|
@ -29,12 +29,6 @@
|
|||||||
#include <gstrall.h>
|
#include <gstrall.h>
|
||||||
#undef GCFG_NOXBBS
|
#undef GCFG_NOXBBS
|
||||||
#include <gedacfg.h>
|
#include <gedacfg.h>
|
||||||
|
|
||||||
#ifdef __OS2__
|
|
||||||
|
|
||||||
#define INCL_BASE
|
|
||||||
#include <os2.h>
|
|
||||||
|
|
||||||
#include <gs_xbbs.h>
|
#include <gs_xbbs.h>
|
||||||
|
|
||||||
|
|
||||||
@ -153,16 +147,12 @@ void gareafile::ReadAdeptXbbsFile(char* path, char* file, char* options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// Read areas from AdeptXBBS
|
// Read areas from AdeptXBBS
|
||||||
|
|
||||||
void gareafile::ReadAdeptXBBS(char* tag) {
|
void gareafile::ReadAdeptXBBS(char* tag) {
|
||||||
|
|
||||||
#ifdef __OS2__
|
|
||||||
|
|
||||||
char options[80];
|
char options[80];
|
||||||
Path file, path, cfg;
|
Path file, path, cfg;
|
||||||
|
|
||||||
@ -183,12 +173,6 @@ void gareafile::ReadAdeptXBBS(char* tag) {
|
|||||||
CfgAdeptxbbspath(path);
|
CfgAdeptxbbspath(path);
|
||||||
|
|
||||||
ReadAdeptXbbsFile(path, file, options);
|
ReadAdeptXbbsFile(path, file, options);
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
NW(tag);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,11 +57,11 @@ gmowcat2 cpp all nov bco bcx wcn wco wcx lnx emx djg rsx cyg
|
|||||||
gmowcat3 cpp all nov bco bcx wcn wco wcx lnx emx djg rsx cyg
|
gmowcat3 cpp all nov bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||||
gmowcat4 cpp all nov bco bcx wcn wco wcx lnx emx djg rsx cyg
|
gmowcat4 cpp all nov bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||||
gmowcat5 cpp all nov bco bcx wcn wco wcx lnx emx djg rsx cyg
|
gmowcat5 cpp all nov bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||||
gmoxbbs1 cpp all nov bco wco emx
|
gmoxbbs1 cpp all nov bco wco lnx emx djg cyg
|
||||||
gmoxbbs2 cpp all nov bco wco emx
|
gmoxbbs2 cpp all nov bco wco lnx emx djg cyg
|
||||||
gmoxbbs3 cpp all nov bco wco emx
|
gmoxbbs3 cpp all nov bco wco lnx emx djg cyg
|
||||||
gmoxbbs4 cpp all nov bco wco emx
|
gmoxbbs4 cpp all nov bco wco lnx emx djg cyg
|
||||||
gmoxbbs5 cpp all nov bco wco emx
|
gmoxbbs5 cpp all nov bco wco lnx emx djg cyg
|
||||||
|
|
||||||
## ------------------------------------------------------------------
|
## ------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -119,21 +119,5 @@ void XbbsWideOpen();
|
|||||||
void XbbsWideClose();
|
void XbbsWideClose();
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
|
||||||
// When not in OS/2, use DUMMY AdeptXBBS functions
|
|
||||||
|
|
||||||
#if !defined(__OS2__)
|
|
||||||
|
|
||||||
#ifndef GMB_NOXBBS
|
|
||||||
inline void XbbsInit(const char*, int) { }
|
|
||||||
inline void XbbsExit() { }
|
|
||||||
|
|
||||||
inline void XbbsWideOpen() { }
|
|
||||||
inline void XbbsWideClose() { }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -251,34 +251,6 @@ extern XbbsData* xbbsdata;
|
|||||||
extern int xbbsdatano;
|
extern int xbbsdatano;
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
|
||||||
|
|
||||||
#if !defined(__OS2__)
|
|
||||||
inline void XbbsArea::open() { }
|
|
||||||
inline void XbbsArea::save_lastread() { }
|
|
||||||
inline void XbbsArea::close() { }
|
|
||||||
inline void XbbsArea::suspend() { }
|
|
||||||
inline void XbbsArea::resume() { }
|
|
||||||
inline void XbbsArea::scan() { }
|
|
||||||
inline void XbbsArea::scan_area() { }
|
|
||||||
inline void XbbsArea::scan_area_pm() { }
|
|
||||||
inline int XbbsArea::load_message(int, gmsg*, XbbsHdr&) { return false; }
|
|
||||||
inline int XbbsArea::load_hdr(gmsg*) { return false; }
|
|
||||||
inline int XbbsArea::load_msg(gmsg*) { return false; }
|
|
||||||
inline void XbbsArea::lock() { }
|
|
||||||
inline void XbbsArea::unlock() { }
|
|
||||||
inline void XbbsArea::save_message(int, gmsg*, XbbsHdr&) { }
|
|
||||||
inline void XbbsArea::save_hdr(int, gmsg*) { }
|
|
||||||
inline void XbbsArea::save_msg(int, gmsg*) { }
|
|
||||||
inline void XbbsArea::del_msg(gmsg*) { }
|
|
||||||
inline void XbbsArea::new_msgno(gmsg*) { }
|
|
||||||
inline char* XbbsArea::user_lookup(char*) { return NULL; }
|
|
||||||
inline int XbbsArea::renumber() { return false; }
|
|
||||||
inline void XbbsArea::update_timesread(gmsg*) { }
|
|
||||||
inline Line* XbbsArea::make_dump_msg(Line*&, gmsg*, char* lng_head) { return NULL; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user