Adjustements according to Kostya Altuhov

This commit is contained in:
Alexander S. Aganichev 2000-11-15 22:15:19 +00:00
parent 2e97e897a3
commit ad269abfa6
2 changed files with 7 additions and 3 deletions

View File

@ -24,6 +24,7 @@
// Template handling. // Template handling.
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#include <algorithm>
#include <golded.h> #include <golded.h>
@ -69,7 +70,7 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
char* tptr; char* tptr;
char* ptr; char* ptr;
char* ptr2; char* ptr2;
char* quote; const char* quote;
uint size; uint size;
uint pos; uint pos;
uint ctrlinfo; uint ctrlinfo;
@ -624,7 +625,7 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
n = 0; n = 0;
*buf = NUL; *buf = NUL;
while(oldmsg->line[n]) { while(oldmsg->line[n]) {
quote = strtrim(oldmsg->line[n]->txt).c_str(); strtrim(oldmsg->line[n]->txt);
if(oldmsg->line[n]->type & GLINE_TEAR) { if(oldmsg->line[n]->type & GLINE_TEAR) {
// Invalidate tearline // Invalidate tearline
oldmsg->line[n]->type &= ~GLINE_TEAR; oldmsg->line[n]->type &= ~GLINE_TEAR;
@ -643,7 +644,9 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
} }
// Invalidate kludge chars // Invalidate kludge chars
strchg(quote, CTRL_A, '@'); string& tempref = strtrim(oldmsg->line[n]->txt);
replace(tempref.begin(), tempref.end(), CTRL_A, '@');
quote = tempref.c_str();
if(is_quote(oldmsg->line[n]->txt.c_str())) { if(is_quote(oldmsg->line[n]->txt.c_str())) {
quote += GetQuotestr(quote, qbuf, &len); quote += GetQuotestr(quote, qbuf, &len);

View File

@ -25,6 +25,7 @@
// Debugging and logging. // Debugging and logging.
// ------------------------------------------------------------------ // ------------------------------------------------------------------
#include <cstdlib>
#include <gdbgerr.h> #include <gdbgerr.h>