Applied latest patches from Alexander

This commit is contained in:
Jacobo Tarrío
2000-06-16 23:30:48 +00:00
parent 745564944a
commit de3a66b4e9
11 changed files with 38 additions and 26 deletions

View File

@@ -31,7 +31,7 @@
class Container {
virtual void prints(int, int, int, char*) = 0;
virtual void prints(int, int, int, const char*) = 0;
public:

View File

@@ -168,7 +168,7 @@ void IEclass::scrolldown(int __scol, int __srow, int __ecol, int __erow, int __l
// ------------------------------------------------------------------
// Zero-based
void IEclass::prints(int wrow, int wcol, int atr, char* str) {
void IEclass::prints(int wrow, int wcol, int atr, const char* str) {
editwin.prints(wrow, wcol, atr, str);
}
@@ -272,7 +272,8 @@ void IEclass::dispstring(const char* __string, uint __row, int attr, Line* line)
}
}
else {
memcpy(_buf, __string, _length);
if(_length)
memcpy(_buf, __string, _length);
}
// mark selected block
@@ -2394,12 +2395,10 @@ void UndoStack::PushItem(uint action, Line* __line, uint __col, uint __len) {
last_item->line = __line;
break;
case EDIT_UNDO_INS_TEXT:
last_item->line = __line;
goto save_item;
case EDIT_UNDO_WRAP_TEXT:
last_item->line = __line->prev;
save_item:
throw_new(last_item->data.text_ptr = new text_item(__col, __len));
last_item->line = __line;
throw_new(last_item->data.text_ptr = new(__len) text_item(__col, __len));
memcpy(last_item->data.text_ptr->text, __line->txt.c_str() + __col, __len);
break;
case EDIT_UNDO_NEW_LINE:
last_item->line = last_item->data.line_ptr = __line;

View File

@@ -307,7 +307,7 @@ protected:
int isempty (Line* __line=NULL);
void killkillbuf ();
void killpastebuf ();
void prints (int wrow, int wcol, int atr, char* str);
void prints (int wrow, int wcol, int atr, const char* str);
int reflowok (char* __qstr);
void refresh (Line* __currline, uint __row);
void savefile (int __status);

View File

@@ -1109,6 +1109,9 @@ void Initialize(int argc, char* argv[]) {
remove(AddPath(CFG->areapath, "DBRIDGE.EMW"));
}
if(CFG->loadlanguage[0])
LoadLanguage(CFG->loadlanguage);
// Unlink windows
wunlink(W_READ);

View File

@@ -546,12 +546,12 @@ static void KludgePID(GMsg* msg, const char* ptr) {
static void KludgeREPLYADDR(GMsg* msg, const char* ptr) {
Name name;
INam name;
name[0] = NUL;
char *buf=throw_strdup(ptr);
ParseInternetAddr(buf, *msg->realby ? name : msg->realby, msg->iaddr);
if(*name)
strxcpy(msg->realby, name, sizeof(Name));
strxcpy(msg->realby, name, sizeof(INam));
throw_free(buf);
}

View File

@@ -647,7 +647,7 @@ void GMsgBodyView::UpdateScrollbar() {
// ------------------------------------------------------------------
void GMsgBodyView::prints(int wrow, int wcol, int atr, char* str) {
void GMsgBodyView::prints(int wrow, int wcol, int atr, const char* str) {
vputs(wrow, wcol, atr, str);
}

View File

@@ -86,7 +86,7 @@ protected:
void PaintLine(int row, Line *line);
void UpdateScrollbar();
void prints(int wrow, int wcol, int atr, char* str);
void prints(int wrow, int wcol, int atr, const char* str);
public: