various fixes
This commit is contained in:
parent
f5ebff9c19
commit
d288f34470
@ -9,10 +9,20 @@ ______________________________________________________________________
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
Notes for GoldED+ 1.1.5, December xx 2000
|
||||
Notes for GoldED+ 1.1.5, February xx 2001
|
||||
______________________________________________________________________
|
||||
|
||||
- PGP encoded/signed messages now detected by substring
|
||||
! If @pseudo token created from address it now stops not only on space
|
||||
but at @ as well, so no more "Hello bigfoot@shoes.com!" :-)
|
||||
|
||||
! Maximum number of commands that could be assigned to single macro
|
||||
extended upto 127 commands.
|
||||
|
||||
- ViewQuote operation fixed for locales different from ASCII.
|
||||
|
||||
- @cdate and @ctime now should be correct for changed messages.
|
||||
|
||||
! PGP encoded/signed messages now detected by substring
|
||||
|
||||
"-----BEGIN PGP "
|
||||
|
||||
@ -77,7 +87,7 @@ ______________________________________________________________________
|
||||
+ Added READDirQuoteMsg and READMoveDirQuoteMsg entries for
|
||||
goldkeys.cfg: quote message ignoring Reply-To kludge (in current and
|
||||
another area correspondingly). Both added to READMainmenu menu.
|
||||
There's no default keyboard assignment. (Not tested)
|
||||
There's no default keyboard assignment.
|
||||
|
||||
- Fixed READMainmenu operation.
|
||||
|
||||
|
@ -22,7 +22,9 @@ assistance!
|
||||
11. А почему GoldED+ так криво поддерживает hpt-шные конфиги (не под UNIXами)?
|
||||
12. Почему не вводится русская "Э" под Win95?
|
||||
13. Backspace в Linux'e
|
||||
14. Типа эта... А писать куда автору? ;-)
|
||||
14. А зачем мне этот <censored> редактор нужен? У Одинна было лучше!
|
||||
15. А вот я хочу аналог MCITY встроенный.
|
||||
16. Типа эта... А писать куда автору? ;-)
|
||||
|
||||
>==============================================================================
|
||||
|
||||
@ -62,10 +64,9 @@ assistance!
|
||||
|
||||
*Q:* А где обещанное CUA?
|
||||
*A:* Чтобы использовать CUA при выключенном KEYBDEFAULTS надо его определить.
|
||||
Хотя всякие #Left не описаны в документации, они физически есть всюду,
|
||||
кроме версии для Linux (с 1.1.4.5 они есть и на линуксовой консоли).
|
||||
Скорее всего CUA под Linux'ом (и в планах BSD) будет работать только на
|
||||
иксовой консоли, поскольку вывод на экран будет повраплен в ncurses.
|
||||
Хотя всякие #Left не описаны в документации, они есть :) В Линуксе
|
||||
работает только на консоли, да и то не всегда (точно не работает, если
|
||||
запускать из-под midnight commander'а).
|
||||
|
||||
*Q:* А что за проблемы с INVALIDATE <token> "" ""? Почему все-равно квотится?
|
||||
*A:* Это опять недочитанная до конца документация. Используйте ключевое слово
|
||||
@ -95,7 +96,8 @@ assistance!
|
||||
|
||||
*Q:* Что за левизна в адресах кросспостов, начиная с 1.1.3?
|
||||
*A:* В goldlang.cfg поменялся формат для слов MS_LISTCC ("%s %s") и
|
||||
ST_STATUSCC ("CC: %s of %s"). Проверьте свой конфиг!
|
||||
ST_STATUSCC ("CC: %s of %s"). Проверьте свой конфиг и поменяйте по
|
||||
аналогии!
|
||||
|
||||
*Q:* Поставил себе hpt. И что это за лажа при чтении конфигов?
|
||||
*A:* А вы уверены, что вы читали доку на свой hpt? В доке явно написано, что
|
||||
@ -113,6 +115,13 @@ assistance!
|
||||
*A:* Alexey Froloff: ``keycode 14 = delete delete delete delete'' в keymap'е
|
||||
прописать надо.
|
||||
|
||||
*Q:* А зачем мне этот <censored> редактор нужен? У Одинна было лучше!
|
||||
*A:* А кто-то заставляет пользоваться? :-) Не нравится - сноси и пользуйся тем,
|
||||
что нравится.
|
||||
|
||||
*Q:* А вот я хочу аналог MCITY встроенный.
|
||||
*A:* Сгинь нечисть! Всех разумных людей мировой нодлист устраивает больше.
|
||||
|
||||
*Q:* Типа эта... А писать куда автору? ;-)
|
||||
*A:* Писать лучше всего в Ru.GoldED. Даже лучше сначала его почитать, потом
|
||||
писать. Если уж сильно приспичит, то можно писать на 2:5020/201.58,
|
||||
|
@ -951,7 +951,7 @@ int ReadKeysCfg(int force) {
|
||||
while(*ptr) {
|
||||
if(*ptr == '\"') { // Start of literal string
|
||||
ptr++;
|
||||
while(*ptr != '\"' and n < 79) {
|
||||
while((*ptr != '\"') and (n < (sizeof(tmp2.buf)/sizeof(gkey)))) {
|
||||
ch = *ptr++;
|
||||
tmp2.buf[n++] = (gkey)(ch | (scancode(ch) << 8));
|
||||
}
|
||||
@ -964,7 +964,7 @@ int ReadKeysCfg(int force) {
|
||||
int tmpkt;
|
||||
keycmd = SwitchKeyDefs(strCrc16(strupr(ptr2)), &tmpkt);
|
||||
if(keycmd) {
|
||||
if(n < 79)
|
||||
if(n < (sizeof(tmp2.buf)/sizeof(gkey)))
|
||||
tmp2.buf[n++] = (gkey)keycmd;
|
||||
}
|
||||
else {
|
||||
|
@ -113,7 +113,7 @@ void IEclass::setlinetype(Line* __line) {
|
||||
|
||||
int IEclass::dispchar(vchar __ch, int attr) {
|
||||
|
||||
if(__ch == '\0') // possible if line empty
|
||||
if(__ch == NUL) // possible if line empty
|
||||
__ch = ' ';
|
||||
if(__ch != '\n') {
|
||||
if(__ch == ' ')
|
||||
|
@ -256,7 +256,7 @@ void CfgInit2() {
|
||||
|
||||
bool inline samekey(gkey key1, gkey key2) {
|
||||
|
||||
if(key1 > 0xff) // special key
|
||||
if(key1 >= KK_Commands) // special key
|
||||
return false;
|
||||
return (tolower(key1) == key2) or (toupper(key1) == key2);
|
||||
}
|
||||
|
@ -1609,7 +1609,7 @@ void ScanKludges(GMsg* msg, int getvalue) {
|
||||
const char* ptr = line->txt.c_str() + 9;
|
||||
ptr = strskip_wht(ptr);
|
||||
char* tmp = UnwrapLine(line, ptr);
|
||||
KludgeREPLYADDR(msg, tmp ? tmp : ptr);
|
||||
KludgeREPLY_TO(msg, tmp ? tmp : ptr);
|
||||
if(tmp)
|
||||
throw_free(tmp);
|
||||
}
|
||||
@ -2639,16 +2639,17 @@ void MsgLineReIndex(GMsg* msg, int viewhidden, int viewkludge, int viewquote) {
|
||||
if(not viewquote) {
|
||||
GetQuotestr(line->txt.c_str(), qbuf, &qlen);
|
||||
strtrim(qbuf);
|
||||
if(strieql(qbuf0, qbuf)) {
|
||||
if(strpbrk(line->txt.c_str()+qlen, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"))
|
||||
qmatches++;
|
||||
}
|
||||
else {
|
||||
if(not strieql(qbuf0, qbuf)) {
|
||||
strcpy(qbuf0, qbuf);
|
||||
if(strpbrk(line->txt.c_str()+qlen, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"))
|
||||
qmatches = 1;
|
||||
else
|
||||
qmatches = 0;
|
||||
qmatches = 0;
|
||||
}
|
||||
const char *p = line->txt.c_str()+qlen;
|
||||
while(*p != NUL) {
|
||||
if(isxalnum(*p)) {
|
||||
qmatches++;
|
||||
break;
|
||||
}
|
||||
++p;
|
||||
}
|
||||
if(qmatches != 1) {
|
||||
line = line->next;
|
||||
@ -2977,6 +2978,8 @@ char* ParseInternetAddr(char* __string, char* __name, char* __addr) {
|
||||
|
||||
StripQuotes(__name);
|
||||
|
||||
strxmimecpy(__name, __name, 0, strlen(__name), true);
|
||||
|
||||
return __name;
|
||||
}
|
||||
|
||||
|
@ -868,6 +868,23 @@ void GThreadlist::close() {
|
||||
|
||||
void GThreadlist::GenTree(char* buf, int idx) {
|
||||
|
||||
#ifdef KOI8
|
||||
static char graph[4]="†„<EFBFBD>";
|
||||
#else
|
||||
static char graph_ibmpc[4]="ÃÀ³";
|
||||
static char graph[]="";
|
||||
|
||||
if(graph[0] == NUL) {
|
||||
int table = LoadCharset(NULL, NULL, 1);
|
||||
int level = LoadCharset("IBMPC", CFG->xlatlocalset);
|
||||
XlatStr(graph, graph_ibmpc, level, CharTable);
|
||||
if(table == -1)
|
||||
LoadCharset(CFG->xlatimport, CFG->xlatlocalset);
|
||||
else
|
||||
LoadCharset(CFG->xlatcharset[table].imp, CFG->xlatcharset[table].exp);
|
||||
}
|
||||
#endif
|
||||
|
||||
t = list[idx];
|
||||
|
||||
uint level = 0;
|
||||
@ -875,7 +892,7 @@ void GThreadlist::GenTree(char* buf, int idx) {
|
||||
|
||||
*q-- = NUL;
|
||||
*q-- = ' ';
|
||||
*q-- = (t.replynext) ? 'Ã' : 'À';
|
||||
*q-- = (t.replynext) ? graph[0] : graph[1];
|
||||
|
||||
while(t.replyto) {
|
||||
for(uint i=0; i<list.size(); i++) {
|
||||
@ -886,7 +903,7 @@ void GThreadlist::GenTree(char* buf, int idx) {
|
||||
}
|
||||
}
|
||||
*q-- = ' ';
|
||||
*q-- = (t.replynext) ? '³' : ' ';
|
||||
*q-- = (t.replynext) ? graph[2] : ' ';
|
||||
}
|
||||
|
||||
t = list[idx];
|
||||
|
@ -102,16 +102,17 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
char xmailer[356];
|
||||
get_informative_string(xmailer);
|
||||
|
||||
struct tm* written_tm = gmtime(&msg->written);
|
||||
char cdate[32];
|
||||
strftimei(cdate, 32, LNG->DateFmt, written_tm);
|
||||
char ctime[32];
|
||||
strftimei(ctime, 32, LNG->TimeFmt, written_tm);
|
||||
time_t t = time(NULL);
|
||||
struct tm* written_tm = localtime(&t);
|
||||
char cdate[80];
|
||||
strftimei(cdate, 80, LNG->DateFmt, written_tm);
|
||||
char ctime[80];
|
||||
strftimei(ctime, 80, LNG->TimeFmt, written_tm);
|
||||
written_tm = gmtime(&oldmsg->written);
|
||||
char odate[32];
|
||||
strftimei(odate, 32, LNG->DateFmt, written_tm);
|
||||
char otime[32];
|
||||
strftimei(otime, 32, LNG->TimeFmt, written_tm);
|
||||
char odate[80];
|
||||
strftimei(odate, 80, LNG->DateFmt, written_tm);
|
||||
char otime[80];
|
||||
strftimei(otime, 80, LNG->TimeFmt, written_tm);
|
||||
|
||||
const char* osslashbuf = __gver_platform__;
|
||||
|
||||
@ -120,7 +121,7 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
bool currareaisinet = AA->isinternet();
|
||||
char* modereptr = oldmsg->re;
|
||||
|
||||
if(mode == MODE_QUOTE or mode == MODE_REPLYCOMMENT or mode == MODE_REPLY) {
|
||||
if((mode == MODE_QUOTE) or (mode == MODE_REPLYCOMMENT) or (mode == MODE_REPLY)) {
|
||||
if(AL.AreaIdToPtr(__origarea)->Areareplydirect() and oldmsg->areakludgeid)
|
||||
origareaid = oldmsg->areakludgeid;
|
||||
}
|
||||
@ -309,7 +310,7 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
tokenxchg(dst, "@fpseudo", msg->pseudofrom);
|
||||
continue;
|
||||
}
|
||||
if(tokenxchg(dst, "@cpseudo", *AA->Nickname() ? AA->Nickname() : strlword(strcpy(buf, AA->Username().name))))
|
||||
if(tokenxchg(dst, "@cpseudo", *AA->Nickname() ? AA->Nickname() : strlword(strcpy(buf, AA->Username().name), " @")))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@version", longverbuf))
|
||||
continue;
|
||||
|
@ -687,7 +687,7 @@ static void GetLastLink(GMsg* msg, ulong& msgno) {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void MakeMsg(int mode, GMsg* omsg) {
|
||||
void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
||||
|
||||
GFTRK("MakeMsg");
|
||||
|
||||
@ -833,6 +833,8 @@ void MakeMsg(int mode, GMsg* omsg) {
|
||||
case MODE_REPLYCOMMENT:
|
||||
omsg->attr.tou0();
|
||||
omsg->TextToLines(-CFG->quotemargin, false);
|
||||
if(ignore_replyto)
|
||||
omsg->ireplyto[0] = NUL;
|
||||
if(omsg->attr.rot())
|
||||
Rot13(omsg);
|
||||
// Drop through
|
||||
|
@ -255,7 +255,7 @@ bool set_to_address(GMsg* msg, gsetaddr* toname, gsetaddr* toaddr, gsetaddr* fro
|
||||
// ------------------------------------------------------------------
|
||||
// GEPOST prototypes
|
||||
|
||||
void MakeMsg(int mode, GMsg* oldmsg);
|
||||
void MakeMsg(int mode, GMsg* oldmsg, bool ignore_replyto=false);
|
||||
int EditHeaderinfo(int mode, GMsgHeaderView &view);
|
||||
void CheckSubject(GMsg* msg, char* subj);
|
||||
|
||||
@ -315,13 +315,11 @@ void MarkingOptions();
|
||||
void MessageBrowse();
|
||||
void NewArea(bool jumpnext = false);
|
||||
void NewMsg();
|
||||
void OtherAreaQuoteMsg();
|
||||
void OtherAreaDirQuoteMsg();
|
||||
void OtherAreaQuoteMsg(bool ignore_replyto=false);
|
||||
void OtherAreaCommentMsg();
|
||||
void QuitNow();
|
||||
void QuoteBuf(GMsg* msg);
|
||||
void DirQuoteMsg();
|
||||
void QuoteMsg();
|
||||
void QuoteMsg(bool ignore_replyto=false);
|
||||
void RenumberArea();
|
||||
void ReplyMsg();
|
||||
void ToggleBookMark();
|
||||
|
@ -602,11 +602,11 @@ void Reader() {
|
||||
break;
|
||||
|
||||
case KK_ReadMoveQuoteMsg:
|
||||
OtherAreaQuoteMsg();
|
||||
OtherAreaQuoteMsg(false);
|
||||
break;
|
||||
|
||||
case KK_ReadMoveDirQuoteMsg:
|
||||
OtherAreaDirQuoteMsg();
|
||||
OtherAreaQuoteMsg(true);
|
||||
break;
|
||||
|
||||
case KK_ReadMoveCommentMsg:
|
||||
@ -618,11 +618,11 @@ void Reader() {
|
||||
break;
|
||||
|
||||
case KK_ReadQuoteMsg:
|
||||
QuoteMsg();
|
||||
QuoteMsg(false);
|
||||
break;
|
||||
|
||||
case KK_ReadDirQuoteMsg:
|
||||
DirQuoteMsg();
|
||||
QuoteMsg(true);
|
||||
break;
|
||||
|
||||
case KK_ReadCommentMsg:
|
||||
|
@ -252,13 +252,13 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
|
||||
|
||||
// build @tpseudo
|
||||
if(is_user(msg->to))
|
||||
strcpy(msg->pseudoto, *AA->Nickname() ? AA->Nickname() : strlword(msg->to));
|
||||
strcpy(msg->pseudoto, *AA->Nickname() ? AA->Nickname() : strlword(msg->to, " @"));
|
||||
else
|
||||
*(msg->pseudoto) = NUL;
|
||||
|
||||
// build @fpseudo
|
||||
if(is_user(msg->By()))
|
||||
strcpy(msg->pseudofrom, *AA->Nickname() ? AA->Nickname() : strlword(msg->By()));
|
||||
strcpy(msg->pseudofrom, *AA->Nickname() ? AA->Nickname() : strlword(msg->By(), " @"));
|
||||
else
|
||||
*(msg->pseudofrom) = NUL;
|
||||
|
||||
@ -944,16 +944,7 @@ void ReplyMsg() {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void DirQuoteMsg() {
|
||||
|
||||
if(reader_msg->ireplyto) *reader_msg->ireplyto = NUL;
|
||||
QuoteMsg();
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void QuoteMsg() {
|
||||
void QuoteMsg(bool ignore_replyto) {
|
||||
|
||||
if(CurrArea == OrigArea) {
|
||||
if(AA->Areareplydirect() and reader_msg->areakludgeid) {
|
||||
@ -978,7 +969,7 @@ void QuoteMsg() {
|
||||
reader_keyok = not MenuReadonly.Run();
|
||||
}
|
||||
if(not reader_keyok)
|
||||
MakeMsg(MODE_QUOTE, reader_msg);
|
||||
MakeMsg(MODE_QUOTE, reader_msg, ignore_replyto);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1017,16 +1008,7 @@ void CommentMsg() {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void OtherAreaDirQuoteMsg() {
|
||||
|
||||
if(reader_msg->ireplyto) *reader_msg->ireplyto = NUL;
|
||||
OtherAreaQuoteMsg();
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void OtherAreaQuoteMsg() {
|
||||
void OtherAreaQuoteMsg(bool ignore_replyto) {
|
||||
|
||||
if(AA->Msgn.Count()) {
|
||||
int destarea = CurrArea;
|
||||
@ -1063,7 +1045,7 @@ void OtherAreaQuoteMsg() {
|
||||
AA->adat->viewquote = adat_viewquote;
|
||||
}
|
||||
}
|
||||
QuoteMsg();
|
||||
QuoteMsg(ignore_replyto);
|
||||
if(CurrArea != OrigArea) {
|
||||
AA->Close();
|
||||
AL.SetActiveAreaId(OrigArea);
|
||||
|
@ -848,7 +848,7 @@ bool guserbase::lookup_addressbook(GMsg* msg, char* name, char* aka, bool browse
|
||||
|
||||
void guserbase::build_pseudo(GMsg* msg, char* name, char* aka, bool direction) {
|
||||
|
||||
strcpy(direction ? msg->pseudoto : msg->pseudofrom, strlword(name));
|
||||
strcpy(direction ? msg->pseudoto : msg->pseudofrom, strlword(name, " @"));
|
||||
|
||||
if(find_entry(name, true) and not entry.is_deleted) {
|
||||
|
||||
|
@ -1171,8 +1171,6 @@ gkey kbxget_raw(int mode) {
|
||||
WORD &VKC = inp.Event.KeyEvent.wVirtualKeyCode;
|
||||
char &ascii = inp.Event.KeyEvent.uChar.AsciiChar;
|
||||
|
||||
// Get next key
|
||||
inp.Event.KeyEvent.bKeyDown = false;
|
||||
while(1) {
|
||||
|
||||
PeekConsoleInput(gkbd_hin, &inp, 1, &nread);
|
||||
|
@ -87,8 +87,8 @@ char* strnp2c(char* str, int n);
|
||||
char* strnp2cc(char* dest, const char* str, int n);
|
||||
char* strp2c(char* str);
|
||||
|
||||
const char* strlword(const char* str);
|
||||
const char* strrword(const char* str);
|
||||
const char* strlword(const char* str, const char *separator=NULL);
|
||||
const char* strrword(const char* str, const char *separator=NULL);
|
||||
|
||||
char* strrevname(char* reversedname, const char* name);
|
||||
char* strunrevname(char* unreversedname, const char* name);
|
||||
|
@ -487,7 +487,7 @@ char* strltrim(char* str) {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
const char* strlword(const char* str) {
|
||||
const char* strlword(const char* str, const char *separator) {
|
||||
|
||||
char buf[256];
|
||||
static char left[40];
|
||||
@ -495,7 +495,7 @@ const char* strlword(const char* str) {
|
||||
*left = NUL;
|
||||
if(*str) {
|
||||
strxcpy(buf, str, sizeof(buf));
|
||||
if(strtok(buf, " ") != NULL) {
|
||||
if(strtok(buf, (separator == NULL) ? " \t\n\r" : separator) != NULL) {
|
||||
strxcpy(left, buf, sizeof(left));
|
||||
}
|
||||
}
|
||||
@ -505,7 +505,7 @@ const char* strlword(const char* str) {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
const char* strrword(const char* str) {
|
||||
const char* strrword(const char* str, const char *separator) {
|
||||
|
||||
char* ptr;
|
||||
char* ptr2;
|
||||
@ -515,11 +515,14 @@ const char* strrword(const char* str) {
|
||||
*right = NUL;
|
||||
if(*str) {
|
||||
strxcpy(buf, str, sizeof(buf));
|
||||
ptr = strtok(buf, " ");
|
||||
if(separator == NULL) {
|
||||
separator = " \t\n\r";
|
||||
}
|
||||
ptr = strtok(buf, separator);
|
||||
ptr2 = ptr;
|
||||
while(ptr != NULL) {
|
||||
ptr2 = ptr;
|
||||
ptr = strtok(NULL, " ");
|
||||
ptr = strtok(NULL, separator);
|
||||
}
|
||||
if(ptr2) {
|
||||
strxcpy(right, ptr2, sizeof(right));
|
||||
|
@ -204,7 +204,7 @@ int JamArea::load_message(int __mode, gmsg* __msg, JamHdr& __hdr) {
|
||||
break;
|
||||
|
||||
case JAMSUB_TRACE:
|
||||
sprintf(_kludges+strlen(_kludges), "\001VIA: %s\r", _buf);
|
||||
sprintf(_kludges+strlen(_kludges2), "\001Via %s\r", _buf);
|
||||
// Not processed
|
||||
break;
|
||||
|
||||
@ -289,7 +289,7 @@ int JamArea::load_message(int __mode, gmsg* __msg, JamHdr& __hdr) {
|
||||
break;
|
||||
|
||||
case JAMSUB_TZUTCINFO:
|
||||
sprintf(_kludges+strlen(_kludges), "\001TZUTCINFO: %s\r", _buf);
|
||||
sprintf(_kludges+strlen(_kludges), "\001TZUTC: %s\r", _buf);
|
||||
// Not processed
|
||||
break;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
// ------------------------------------------------------------------
|
||||
// Route Diagram Drawing Tool.
|
||||
// Copyright (C) 1999 Odinn Sorensen
|
||||
// Copyright (C) 1999-2000 Alexander S. Aganichev
|
||||
// Copyright (C) 1999-2001 Alexander S. Aganichev
|
||||
// ------------------------------------------------------------------
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
@ -248,18 +248,30 @@ void nodetree::print() {
|
||||
}
|
||||
}
|
||||
|
||||
if(above and below)
|
||||
if(above and below) {
|
||||
#ifdef KOI8
|
||||
strcpy(buf, "<EFBFBD>");
|
||||
#else
|
||||
strcpy(buf, "³");
|
||||
else
|
||||
#endif
|
||||
} else
|
||||
*buf = NUL;
|
||||
strsetsz(buf, indent);
|
||||
n->display += buf;
|
||||
}
|
||||
|
||||
if(n->depth) {
|
||||
#ifdef KOI8
|
||||
strcpy(buf, "„");
|
||||
#else
|
||||
strcpy(buf, "À");
|
||||
#endif
|
||||
strsetsz(buf, indent);
|
||||
#ifdef KOI8
|
||||
strchg(buf, ' ', '€');
|
||||
#else
|
||||
strchg(buf, ' ', 'Ä');
|
||||
#endif
|
||||
n->display += buf;
|
||||
}
|
||||
|
||||
@ -271,11 +283,20 @@ void nodetree::print() {
|
||||
for(n=nodes.begin(); n != nodes.end(); n++) {
|
||||
list_node::iterator x=n;
|
||||
if(++x != nodes.end()) {
|
||||
#ifdef KOI8
|
||||
const char* p = strchr(n->display.c_str(), '„');
|
||||
#else
|
||||
const char* p = strchr(n->display.c_str(), 'À');
|
||||
#endif
|
||||
if(p) {
|
||||
int len = p - n->display.c_str();
|
||||
#ifdef KOI8
|
||||
if((x->display[len] == '<EFBFBD>') or (x->display[len] == '„'))
|
||||
n->display[len] = '†';
|
||||
#else
|
||||
if((x->display[len] == '³') or (x->display[len] == 'À'))
|
||||
n->display[len] = 'Ã';
|
||||
#endif
|
||||
}
|
||||
}
|
||||
n->display.resize(maxdisp, ' ');
|
||||
@ -298,9 +319,13 @@ int main(int argc, char** argv) {
|
||||
// set locale
|
||||
setlocale(LC_CTYPE, "");
|
||||
|
||||
cout << "Route Diagram Drawing Tool 1.1" << endl
|
||||
#ifdef KOI8
|
||||
cout << "Route Diagram Drawing Tool 1.1.1 (koi8)" << endl
|
||||
#else
|
||||
cout << "Route Diagram Drawing Tool 1.1.1" << endl
|
||||
#endif
|
||||
<< "Copyright (C) 1999 Odinn Sorensen" << endl
|
||||
<< "Copyright (C) 1999-2000 Alexander S. Aganichev" << endl
|
||||
<< "Copyright (C) 1999-2001 Alexander S. Aganichev" << endl
|
||||
<< "----------------------------------------------------------------------" << endl
|
||||
<< endl;
|
||||
|
||||
|
Reference in New Issue
Block a user