Macroses update, addressbook fixes, other changes
This commit is contained in:
parent
61b129311f
commit
feb27a793a
@ -8,7 +8,7 @@ SHELL=bash
|
||||
EXEEXT=.exe
|
||||
OBJEXT=.o
|
||||
LIBEXT=.a
|
||||
#CC=gcc -Zomf -Zcrtdll
|
||||
#CC=gcc -Zomf
|
||||
#AR=emxomfar
|
||||
#PLATFORM=emx
|
||||
#SHELL=bash
|
||||
@ -59,8 +59,8 @@ endif
|
||||
|
||||
# force not to use coprocessor features in DOS, if you have one you may remove this
|
||||
ifeq ($(PLATFORM),djg)
|
||||
CFLAGS+=-m386 -mno-80387 -mno-fp-ret-in-387 -mno-fancy-math-387
|
||||
LNKFLAGS+=-lemu
|
||||
CFLAGS+=-m386
|
||||
LNKFLAGS+=-lwmemu
|
||||
endif
|
||||
|
||||
BIN=bin
|
||||
|
@ -10,7 +10,7 @@ else
|
||||
LIBS=$(addprefix -l,$(GLIBS))
|
||||
endif
|
||||
LIBS+=$(STDLIBS)
|
||||
FGLIBS=$(addprefix $(FLIBPATH)/lib, $(addsuffix .a, $(GLIBS)))
|
||||
FGLIBS=$(addprefix $(FLIBPATH)/lib, $(addsuffix $(LIBEXT), $(GLIBS)))
|
||||
|
||||
$(TOP)/$(BIN)/$(SHORTTARGET)$(PLATFORM)$(EXEEXT): $(OBJS) $(FGLIBS) $(ADDS)
|
||||
@echo -n Linking $(TARGET)...
|
||||
|
@ -9,9 +9,70 @@ ______________________________________________________________________
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
Notes for GoldED+ 1.1.5, February xx 2001
|
||||
Notes for GoldED+ 1.1.5, March xx 2001
|
||||
______________________________________________________________________
|
||||
|
||||
- Fixed small bug in parser.
|
||||
|
||||
+ Added new keyword INTERNETGATEEXP to configure expansion of UUCP
|
||||
gated e-mail into To: line:
|
||||
|
||||
INTERNETGATEEXP Address // To: bob@fisher.com
|
||||
INTERNETGATEEXP Address,Name // To: bob@fisher.com (Bob Fisher)
|
||||
INTERNETGATEEXP Name,Address // To: "Bob Fisher" <bob@fisher.com>
|
||||
|
||||
Other combinations treated as "Address, Name". Default assignment
|
||||
"Name, Address".
|
||||
|
||||
- Addressbook now more accurate with e-mail addresses in FTN areas,
|
||||
it no longer update FTN address with Internetgate (define it in
|
||||
the group if it is different from default) and put Internet address
|
||||
in corresponding field.
|
||||
|
||||
- Template keyword now properly extracts filename within random system
|
||||
groups.
|
||||
|
||||
+ @cfrom and @cto macroses added. Same as @ofrom and @oto but for
|
||||
current message.
|
||||
|
||||
! If @ofrom or @oto is about to expanding to nothing they expanded to
|
||||
real name of person (if available).
|
||||
|
||||
! @*addr macroses now expanded by default without domain, if you ever
|
||||
need 5d addresses use @*addr{domain} scheme.
|
||||
|
||||
- Fixed @ofrom, @oto recoding.
|
||||
|
||||
! Header of message saved from Golded now defined in template, default
|
||||
assignment (for built-in template, not for yours):
|
||||
|
||||
@header= @oecho (@caddr) @align{79}{=}
|
||||
@header Msg : @msgno of @msgs@align{44}@attr
|
||||
@header From : @_oname @_oaddr @odate @otime
|
||||
@header To : @dname
|
||||
@header Subj : @subject
|
||||
@header@align{79}{=}
|
||||
|
||||
String beyond @header used when you asked for a header. You may also
|
||||
use @write as prefix to store something special if you asked for a
|
||||
message body (with or without header), though have no idea when
|
||||
@write may be useful except of changing first line of template to:
|
||||
|
||||
@write= @oecho (@caddr) @align{79}{=}
|
||||
|
||||
+ Added new macroses:
|
||||
|
||||
@msgno current message number in messagebase
|
||||
@msgs number of messages in current messagebase
|
||||
@attr attribute string
|
||||
@align{pos}{char} align to `pos' with `char'
|
||||
|
||||
- Fixed bug in expanding fixed lenght macroses.
|
||||
|
||||
- Removed useless macroses: @serialno, @os2slash.
|
||||
|
||||
+ Search speed significantly improved in Win32 version.
|
||||
|
||||
! Window size in Win32 version now calculated from different
|
||||
parameters, you may need to adjust screen properties before running
|
||||
GoldED+ (especially in Win2k with it's defaults 300 rows :)). Though
|
||||
|
226
docs/rusfaq.txt
226
docs/rusfaq.txt
@ -1,131 +1,153 @@
|
||||
This file mostly duplicates tips.txt but also answers on some russian specific
|
||||
questions. The codepage used is koi8-r. Please read this before asking for
|
||||
questions. The codepage used is cp866. Please read this before asking for
|
||||
assistance!
|
||||
>==============================================================================
|
||||
|
||||
F.A.Q. по использованию GoldED+ в картинках (tm)
|
||||
F.A.Q. ¯® ¨á¯®«ì§®¢ ¨î GoldED+ ¢ ª à⨪ å (tm)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
>Содержание
|
||||
>‘®¤¥à¦ ¨¥
|
||||
>~~~~~~~~~~
|
||||
|
||||
1. Установка GoldED+.
|
||||
2. Локальные установки.
|
||||
3. Замена SoftCR (русской буквы "H"), как это делается в GoldED+ правильно.
|
||||
4. Макросы или как HЕ надо менять русскую букву "H".
|
||||
5. Стилевые коды.
|
||||
1. “áâ ®¢ª GoldED+.
|
||||
2. ‹®ª «ìë¥ ãáâ ®¢ª¨.
|
||||
3. ‡ ¬¥ SoftCR (àãá᪮© ¡ãª¢ë "H"), ª ª íâ® ¤¥« ¥âáï ¢ GoldED+ ¯à ¢¨«ì®.
|
||||
4. Œ ªà®áë ¨«¨ ª ª H… ¤® ¬¥ïâì àãááªãî ¡ãª¢ã "H".
|
||||
5. ‘⨫¥¢ë¥ ª®¤ë.
|
||||
6. CUA.
|
||||
7. Kак не квотить тирлайн и ориджин в GoldED+.
|
||||
8. Где взять GoldED+.
|
||||
9. Поиск слов: что-то не так...
|
||||
10. Что за левизна в адресах кросспостов, начиная с 1.1.3?
|
||||
11. А почему GoldED+ так криво поддерживает hpt-шные конфиги (не под UNIXами)?
|
||||
12. Почему не вводится русская "Э" под Win95?
|
||||
13. Backspace в Linux'e
|
||||
14. А зачем мне этот <censored> редактор нужен? У Одинна было лучше!
|
||||
15. А вот я хочу аналог MCITY встроенный.
|
||||
16. Типа эта... А писать куда автору? ;-)
|
||||
7. K ª ¥ ª¢®â¨âì â¨à« © ¨ ®à¨¤¦¨ ¢ GoldED+.
|
||||
8. ƒ¤¥ ¢§ïâì GoldED+.
|
||||
9. <20>®¨áª á«®¢: çâ®-â® ¥ â ª...
|
||||
10. —â® § «¥¢¨§ ¢ ¤à¥á å ªà®áᯮá⮢, ç¨ ï á 1.1.3?
|
||||
11. € ¯®ç¥¬ã GoldED+ â ª ªà¨¢® ¯®¤¤¥à¦¨¢ ¥â hpt-èë¥ ª®ä¨£¨ (¥ ¯®¤ UNIX ¬¨)?
|
||||
12. <20>®ç¥¬ã ¥ ¢¢®¤¨âáï àãá᪠ï "<22>" ¯®¤ Win95?
|
||||
13. Backspace ¢ Linux'e
|
||||
14. € § 祬 ¬¥ íâ®â <censored> । ªâ®à 㦥? “ Ž¤¨ ¡ë«® «ãçè¥!
|
||||
15. € ¢®â ï å®çã «®£ MCITY ¢áâ஥ë©.
|
||||
16. $^%$^*! —â® âë ᤥ« « á á®åà ¥¨¥¬ á®®¡é¥¨© ¢ 1.1.5?
|
||||
17. ’¨¯ íâ ... € ¯¨á âì ªã¤ ¢â®àã? ;-)
|
||||
|
||||
>==============================================================================
|
||||
|
||||
*Q:* А вот я достал GoldED+, как его ставить-то?
|
||||
*A:* Прочитайте Notework.txt, там много интересного написано. Особенно полезно
|
||||
его читать, если что-то работает не так. Если не знаете английского, но
|
||||
знаете, какое ключевое слово глючит - поищите его, 3 предложения перевести
|
||||
со словарем всегда можно. И вообще: читайте доки - они рулез.
|
||||
*Q:* € ¢®â ï ¤®áâ « GoldED+, ª ª ¥£® áâ ¢¨âì-â®?
|
||||
*A:* <EFBFBD>à®ç¨â ©â¥ Notework.txt, â ¬ ¬®£® ¨â¥à¥á®£® ¯¨á ®. Žá®¡¥® ¯®«¥§®
|
||||
¥£® ç¨â âì, ¥á«¨ çâ®-â® à ¡®â ¥â ¥ â ª. …᫨ ¥ § ¥â¥ £«¨©áª®£®, ®
|
||||
§ ¥â¥, ª ª®¥ ª«î祢®¥ á«®¢® £«îç¨â - ¯®¨é¨â¥ ¥£®, 3 ¯à¥¤«®¦¥¨ï ¯¥à¥¢¥áâ¨
|
||||
á® á«®¢ ६ ¢á¥£¤ ¬®¦®. ˆ ¢®®¡é¥: ç¨â ©â¥ ¤®ª¨ - ®¨ àã«¥§.
|
||||
|
||||
*Q:* А у меня регистронезависимый поиск глючит и время в e-mail'ах и TZUTC
|
||||
неправильное.
|
||||
*A:* Чтобы GoldED+ глючил поменьше, надо настроить региональные установки:
|
||||
для DPMI32: country.sys, переменная TZ
|
||||
для Win32: control panel
|
||||
для OS/2: [не знаю где настраивается, но региональные настройки - свои],
|
||||
переменная TZ
|
||||
для UNIX: переменные LANG и TZ.
|
||||
*Q:* € ã ¬¥ï ॣ¨áâ஥§ ¢¨á¨¬ë© ¯®¨áª £«îç¨â ¨ ¢à¥¬ï ¢ e-mail' å ¨ TZUTC
|
||||
¥¯à ¢¨«ì®¥.
|
||||
*A:* —⮡ë GoldED+ £«î稫 ¯®¬¥ìè¥, ¤® áâநâì ॣ¨® «ìë¥ ãáâ ®¢ª¨:
|
||||
¤«ï DPMI32: country.sys, ¯¥à¥¬¥ ï TZ
|
||||
¤«ï Win32: control panel
|
||||
¤«ï OS/2: [¥ § î £¤¥ áâà ¨¢ ¥âáï, ® ॣ¨® «ìë¥ áâனª¨ - ᢮¨],
|
||||
¯¥à¥¬¥ ï TZ
|
||||
¤«ï UNIX: ¯¥à¥¬¥ë¥ LANG ¨ TZ.
|
||||
|
||||
*Q:* А как же все-таки правильно менять SoftCR при наборе и иметь с этим
|
||||
меньше всего проблем?
|
||||
*A:* Чтобы заменять SoftCR (для чайников - это большая русская буква "H")
|
||||
чем-нибудь надо пользоваться ключевым словом EDITSOFTCRXLAT. При этом
|
||||
НЕОБХОДИМО (с версии 1.1.3) иметь DISPSOFTCR определенное в yes. Все
|
||||
остальные варианты замены GoldED+ не нужны, а ЗАМЕНА ЧЕРЕЗ MACRO и
|
||||
вовсе ПРОТИВОПОКАЗАНА! (см. следующий вопрос).
|
||||
*Q:* € ª ª ¦¥ ¢á¥-â ª¨ ¯à ¢¨«ì® ¬¥ïâì SoftCR ¯à¨ ¡®à¥ ¨ ¨¬¥âì á í⨬
|
||||
¬¥ìè¥ ¢á¥£® ¯à®¡«¥¬?
|
||||
*A:* —â®¡ë § ¬¥ïâì SoftCR (¤«ï ç ©¨ª®¢ - íâ® ¡®«ìè ï àãááª ï ¡ãª¢ "H")
|
||||
祬-¨¡ã¤ì ¤® ¯®«ì§®¢ âìáï ª«îç¥¢ë¬ á«®¢®¬ EDITSOFTCRXLAT. <20>ਠí⮬
|
||||
<EFBFBD>…Ž<EFBFBD>•Ž„ˆŒŽ (á ¢¥àᨨ 1.1.3) ¨¬¥âì DISPSOFTCR ®¯à¥¤¥«¥®¥ ¢ yes. ‚á¥
|
||||
®áâ «ìë¥ ¢ ਠâë § ¬¥ë GoldED+ ¥ ã¦ë, ‡€Œ…<C592>€ —…<E28094>…‡ MACRO ¨
|
||||
¢®¢á¥ <20><>Ž’ˆ‚Ž<E2809A>ŽŠ€‡€<E280A1>€! (á¬. á«¥¤ãî騩 ¢®¯à®á).
|
||||
|
||||
*Q:* А почему так странно работает замена через MACRO, EDITMACRO, и пр.?
|
||||
*A:* Символы из верхней части ASCII-таблицы (для чайников - русские буквы) в
|
||||
макроподстановках нынче расцениваются как регистронезависимые, как это
|
||||
всегда было для символов нижней половины ASCII-таблицы (латинских букв).
|
||||
Проблема маленькой русской "н" растет отсюда.
|
||||
*Q:* € ¯®ç¥¬ã â ª áâà ® à ¡®â ¥â § ¬¥ ç¥à¥§ MACRO, EDITMACRO, ¨ ¯à.?
|
||||
*A:* ‘¨¬¢®«ë ¨§ ¢¥à奩 ç á⨠ASCII-â ¡«¨æë (¤«ï ç ©¨ª®¢ - àãá᪨¥ ¡ãª¢ë) ¢
|
||||
¬ ªà®¯®¤áâ ®¢ª å ëç¥ à á楨¢ îâáï ª ª ॣ¨áâ஥§ ¢¨á¨¬ë¥, ª ª íâ®
|
||||
¢á¥£¤ ¡ë«® ¤«ï ᨬ¢®«®¢ ¨¦¥© ¯®«®¢¨ë ASCII-â ¡«¨æë (« â¨áª¨å ¡ãª¢).
|
||||
<EFBFBD>஡«¥¬ ¬ «¥ìª®© àãá᪮© "" à áâ¥â ®âáî¤ .
|
||||
|
||||
*Q:* А как изменить поведение стилевых кодов?
|
||||
*A:* GoldED+ по-умолчанию показывает символы выделения стилей так же, как это
|
||||
было в GoldED 2.50. Если это не устраивает, то почитайте про ключевое
|
||||
слово STYLECODES.
|
||||
*Q:* € ª ª ¨§¬¥¨âì ¯®¢¥¤¥¨¥ á⨫¥¢ëå ª®¤®¢?
|
||||
*A:* GoldED+ ¯®-㬮«ç ¨î ¯®ª §ë¢ ¥â ᨬ¢®«ë ¢ë¤¥«¥¨ï á⨫¥© â ª ¦¥, ª ª íâ®
|
||||
¡ë«® ¢ GoldED 2.50. …᫨ íâ® ¥ ãáâà ¨¢ ¥â, â® ¯®ç¨â ©â¥ ¯à® ª«î祢®¥
|
||||
á«®¢® STYLECODES.
|
||||
|
||||
*Q:* А где обещанное CUA?
|
||||
*A:* Чтобы использовать CUA при выключенном KEYBDEFAULTS надо его определить.
|
||||
Хотя всякие #Left не описаны в документации, они есть :) В Линуксе
|
||||
работает только на консоли, да и то не всегда (точно не работает, если
|
||||
запускать из-под midnight commander'а).
|
||||
*Q:* € £¤¥ ®¡¥é ®¥ CUA?
|
||||
*A:* —â®¡ë ¨á¯®«ì§®¢ âì CUA ¯à¨ ¢ëª«î祮¬ KEYBDEFAULTS ¤® ¥£® ®¯à¥¤¥«¨âì.
|
||||
•®âï ¢á直¥ #Left ¥ ®¯¨á ë ¢ ¤®ªã¬¥â 樨, ®¨ ¥áâì :) ‚ ‹¨ãªá¥
|
||||
à ¡®â ¥â ⮫쪮 ª®á®«¨, ¤ ¨ â® ¥ ¢á¥£¤ (â®ç® ¥ à ¡®â ¥â, ¥á«¨
|
||||
§ ¯ã᪠âì ¨§-¯®¤ midnight commander' ).
|
||||
|
||||
*Q:* А что за проблемы с INVALIDATE <token> "" ""? Почему все-равно квотится?
|
||||
*A:* Это опять недочитанная до конца документация. Используйте ключевое слово
|
||||
QUOTECTRL, которое, кстати, может использоваться и в Random System Group.
|
||||
Тирлайны правильно инвалидируются по трем минусам, GoldED+ сам знает, что
|
||||
после них должен быть пробел или перевод строки.
|
||||
*Q:* € çâ® § ¯à®¡«¥¬ë á INVALIDATE <token> "" ""? <20>®ç¥¬ã ¢á¥-à ¢® ª¢®â¨âáï?
|
||||
*A:* <EFBFBD>â® ®¯ïâì ¥¤®ç¨â ï ¤® ª®æ ¤®ªã¬¥â æ¨ï. ˆá¯®«ì§ã©â¥ ª«î祢®¥ á«®¢®
|
||||
QUOTECTRL, ª®â®à®¥, ªáâ â¨, ¬®¦¥â ¨á¯®«ì§®¢ âìáï ¨ ¢ Random System Group.
|
||||
’¨à« ©ë ¯à ¢¨«ì® ¨¢ «¨¤¨àãîâáï ¯® â६ ¬¨ãá ¬, GoldED+ á ¬ § ¥â, çâ®
|
||||
¯®á«¥ ¨å ¤®«¦¥ ¡ëâì ¯à®¡¥« ¨«¨ ¯¥à¥¢®¤ áâப¨.
|
||||
|
||||
*Q:* А где можно взять GoldED+? А можно поиметь исходники? А чем потом
|
||||
собирать?
|
||||
*A:* Родина GoldED+ находится на http://asa.i-connect.com. Там же вы можете
|
||||
найти список мирроров и взять исходники. Собирать надо GNU C/C++ (не надо
|
||||
брать нечто древнее 2.8.x, лучше всего какую-нибудь свежую версию) и его
|
||||
производными (djgpp, emx, mingw32). Другие компиляторы более не
|
||||
поддерживаются. Чтобы все компилировалось без каких-либо проблем - берите
|
||||
что-то новее gcc 2.95 (или те egcs, в которых #pragma implementaion,
|
||||
#pragma interface уже были obsolete). Вовсе не надо компилировать все
|
||||
командой "make 2>&1 | mail -s VERSION asa@eed.miee.ru", все равно я это
|
||||
читать не буду - мне лень разбирать этот спам.
|
||||
*Q:* € £¤¥ ¬®¦® ¢§ïâì GoldED+? € ¬®¦® ¯®¨¬¥âì ¨á室¨ª¨? € 祬 ¯®â®¬
|
||||
ᮡ¨à âì?
|
||||
*A:* <EFBFBD>®¤¨ GoldED+ 室¨âáï http://asa.i-connect.com. ’ ¬ ¦¥ ¢ë ¬®¦¥â¥
|
||||
©â¨ ᯨ᮪ ¬¨àà®à®¢ ¨ ¢§ïâì ¨á室¨ª¨. ‘®¡¨à âì ¤® GNU C/C++ (¥ ¤®
|
||||
¡à âì ¥çâ® ¤à¥¢¥¥ 2.8.x, «ãçè¥ ¢á¥£® ª ªãî-¨¡ã¤ì ᢥ¦ãî ¢¥àá¨î) ¨ ¥£®
|
||||
¯à®¨§¢®¤ë¬¨ (djgpp, emx, mingw32). „à㣨¥ ª®¬¯¨«ïâ®àë ¡®«¥¥ ¥
|
||||
¯®¤¤¥à¦¨¢ îâáï. —â®¡ë ¢á¥ ª®¬¯¨«¨à®¢ «®áì ¡¥§ ª ª¨å-«¨¡® ¯à®¡«¥¬ - ¡¥à¨â¥
|
||||
çâ®-â® ®¢¥¥ gcc 2.95 (¨«¨ ⥠egcs, ¢ ª®â®àëå #pragma implementaion,
|
||||
#pragma interface 㦥 ¡ë«¨ obsolete). ‚®¢á¥ ¥ ¤® ª®¬¯¨«¨à®¢ âì ¢á¥
|
||||
ª®¬ ¤®© "make 2>&1 | mail -s VERSION asa@eed.miee.ru", ¢á¥ à ¢® ï íâ®
|
||||
ç¨â âì ¥ ¡ã¤ã - ¬¥ «¥ì à §¡¨à âì íâ®â ᯠ¬.
|
||||
|
||||
*Q:* А как-то поиск нетривиально работает...
|
||||
*A:* А вы уверены, что прочитали Notework.txt до предыдущей версии, в которой
|
||||
все работало? Hачиная с 3.00b4 все сильно поменялось. K тому, что там
|
||||
описано, можно добавить, что GoldED+ правильно понимает поиск комбинаций
|
||||
типа "A & B | C & D & E" с приоритетом & над | и что русские слова можно
|
||||
искать такими комбинациями: "?r [пn][рp][иu][вB][еE][тT]", где первая
|
||||
буква русская, вторая латинская (кавычки вводить не следует).
|
||||
*Q:* € ª ª-â® ¯®¨áª ¥âਢ¨ «ì® à ¡®â ¥â...
|
||||
*A:* € ¢ë 㢥à¥ë, çâ® ¯à®ç¨â «¨ Notework.txt ¤® ¯à¥¤ë¤ã饩 ¢¥àᨨ, ¢ ª®â®à®©
|
||||
¢á¥ à ¡®â «®? H ç¨ ï á 3.00b4 ¢á¥ á¨«ì® ¯®¬¥ï«®áì. K ⮬ã, çâ® â ¬
|
||||
®¯¨á ®, ¬®¦® ¤®¡ ¢¨âì, çâ® GoldED+ ¯à ¢¨«ì® ¯®¨¬ ¥â ¯®¨áª ª®¬¡¨ 権
|
||||
⨯ "A & B | C & D & E" á ¯à¨®à¨â¥â®¬ & ¤ | ¨ çâ® àãá᪨¥ á«®¢ ¬®¦®
|
||||
¨áª âì â ª¨¬¨ ª®¬¡¨ æ¨ï¬¨: "?r [¯n][àp][¨u][¢B][¥E][âT]", £¤¥ ¯¥à¢ ï
|
||||
¡ãª¢ àãá᪠ï, ¢â®à ï « â¨áª ï (ª ¢ë窨 ¢¢®¤¨âì ¥ á«¥¤ã¥â).
|
||||
|
||||
*Q:* Что за левизна в адресах кросспостов, начиная с 1.1.3?
|
||||
*A:* В goldlang.cfg поменялся формат для слов MS_LISTCC ("%s %s") и
|
||||
ST_STATUSCC ("CC: %s of %s"). Проверьте свой конфиг и поменяйте по
|
||||
аналогии!
|
||||
*Q:* —â® § «¥¢¨§ ¢ ¤à¥á å ªà®áᯮá⮢, ç¨ ï á 1.1.3?
|
||||
*A:* ‚ goldlang.cfg ¯®¬¥ï«áï ä®à¬ â ¤«ï á«®¢ MS_LISTCC ("%s %s") ¨
|
||||
ST_STATUSCC ("CC: %s of %s"). <EFBFBD>஢¥àì⥠᢮© ª®ä¨£ ¨ ¯®¬¥ï©â¥ ¯®
|
||||
«®£¨¨!
|
||||
|
||||
*Q:* Поставил себе hpt. И что это за лажа при чтении конфигов?
|
||||
*A:* А вы уверены, что вы читали доку на свой hpt? В доке явно написано, что
|
||||
"\" инициирует escape-последовательность. GoldED+ честно её обрабатывает,
|
||||
в отличии от тех, кто обещал... В принципе, в 1.1.4.1 появился ключик
|
||||
-lame, отключающий парсилку обратных слэшей, попробуйте.
|
||||
*Q:* <EFBFBD>®áâ ¢¨« ᥡ¥ hpt. ˆ çâ® íâ® § « ¦ ¯à¨ ç⥨¨ ª®ä¨£®¢?
|
||||
*A:* € ¢ë 㢥à¥ë, çâ® ¢ë ç¨â «¨ ¤®ªã ᢮© hpt? ‚ ¤®ª¥  ¯¨á ®, çâ®
|
||||
"\" ¨¨æ¨¨àã¥â escape-¯®á«¥¤®¢ ⥫ì®áâì. GoldED+ ç¥áâ® ¥ñ ®¡à ¡ âë¢ ¥â,
|
||||
¢ ®â«¨ç¨¨ ®â â¥å, ªâ® ®¡¥é «... ‚ ¯à¨æ¨¯¥, ¢ 1.1.4.1 ¯®ï¢¨«áï ª«î稪
|
||||
-lame, ®âª«îç î騩 ¯ àᨫªã ®¡à âëå á«í襩, ¯®¯à®¡ã©â¥.
|
||||
|
||||
*Q:* Почему не вводится русская "Э" под Win95?
|
||||
*A:* Поставьте тип клавиатуры 101 клавишный США, скорее всего поможет. Если не
|
||||
поможет - поставьте себе нормальный руссификатор: это заодно спасет от
|
||||
кривой вставки текста из клипборда в DOS-версии при несовпадении языка
|
||||
текста и содержимого клипборда.
|
||||
*Q:* <EFBFBD>®ç¥¬ã ¥ ¢¢®¤¨âáï àãá᪠ï "<22>" ¯®¤ Win95?
|
||||
*A:* <EFBFBD>®áâ ¢ì⥠⨯ ª« ¢¨ âãàë 101 ª« ¢¨èë© ‘˜€, ᪮॥ ¢á¥£® ¯®¬®¦¥â. …᫨ ¥
|
||||
¯®¬®¦¥â - ¯®áâ ¢ì⥠ᥡ¥ ®à¬ «ìë© àãáá¨ä¨ª â®à: íâ® § ®¤® ᯠá¥â ®â
|
||||
ªà¨¢®© ¢áâ ¢ª¨ ⥪áâ ¨§ ª«¨¯¡®à¤ ¢ DOS-¢¥àᨨ ¯à¨ ¥á®¢¯ ¤¥¨¨ ï§ëª
|
||||
⥪áâ ¨ ᮤ¥à¦¨¬®£® ª«¨¯¡®à¤ .
|
||||
|
||||
*Q:* Не работает backspace, приходится пользоватся стандартным Ctrl-?
|
||||
*A:* Alexey Froloff: ``keycode 14 = delete delete delete delete'' в keymap'е
|
||||
прописать надо.
|
||||
*Q:* <EFBFBD>¥ à ¡®â ¥â backspace, ¯à¨å®¤¨âáï ¯®«ì§®¢ âáï áâ ¤ àâë¬ Ctrl-?
|
||||
*A:* Alexey Froloff: ``keycode 14 = delete delete delete delete'' ¢ keymap'¥
|
||||
¯à®¯¨á âì ¤®.
|
||||
|
||||
*Q:* А зачем мне этот <censored> редактор нужен? У Одинна было лучше!
|
||||
*A:* А кто-то заставляет пользоваться? :-) Не нравится - сноси и пользуйся тем,
|
||||
что нравится.
|
||||
*Q:* € § 祬 ¬¥ íâ®â <censored> । ªâ®à 㦥? “ Ž¤¨ ¡ë«® «ãçè¥!
|
||||
*A:* € ªâ®-â® § áâ ¢«ï¥â ¯®«ì§®¢ âìáï? :-) <20>¥ à ¢¨âáï - á®á¨ ¨ ¯®«ì§ã©áï ⥬,
|
||||
çâ® à ¢¨âáï.
|
||||
|
||||
*Q:* А вот я хочу аналог MCITY встроенный.
|
||||
*A:* Сгинь нечисть! Всех разумных людей мировой нодлист устраивает больше.
|
||||
*Q:* € ¢®â ï å®çã «®£ MCITY ¢áâ஥ë©.
|
||||
*A:* ‘£¨ì ¥ç¨áâì! ‚á¥å à §ã¬ëå «î¤¥© ¬¨à®¢®© ®¤«¨áâ ãáâà ¨¢ ¥â ¡®«ìè¥.
|
||||
|
||||
*Q:* Типа эта... А писать куда автору? ;-)
|
||||
*A:* Писать лучше всего в Ru.GoldED. Даже лучше сначала его почитать, потом
|
||||
писать. Если уж сильно приспичит, то можно писать на 2:5020/201.58,
|
||||
2:5020/604.19 или aaganichev@netscape.net, но я совсем не гарантирую, что
|
||||
я отвечу.
|
||||
*Q:* $^%$^*! —â® âë ᤥ« « á á®åà ¥¨¥¬ á®®¡é¥¨© ¢ 1.1.5?
|
||||
*A:* ’¥¯¥àì á®®¡é¥¨ï á®åà ïîâáï ¯® ⥬¯«¥©âã. „®¯®«¥¨ï ¢® ¢áâ஥ë©
|
||||
⥬¯«¥©â ¢ë£«ï¤ïâ â ª:
|
||||
|
||||
@header= @oecho (@caddr) @align{79}{=}
|
||||
@header Msg : @msgno of @msgs@align{44}@attr
|
||||
@header From : @_oname @_oaddr @odate @otime
|
||||
@header To : @dname
|
||||
@header Subj : @subject
|
||||
@header@align{79}{=}
|
||||
|
||||
Šà®¬¥ @header ¥áâì ¥éñ ¨ @write, ª®â®àë© à áè¨àï¥âáï ¯à¨ «¨ç¨¨ § ¯à®á
|
||||
ª á®åà ¥¨î ⥫ á®®¡é¥¨ï, ® § 祬 ®® ¬®¦¥â ¯® ¤®¡¨âìáï ï ¥
|
||||
¯à¨¤ã¬ «. <20> §¢¥ çâ® ®¯¨á âì ¯¥à¢ãî áâà®çªã ª ª @write ;)
|
||||
|
||||
*Q:* ’¨¯ íâ ... € ¯¨á âì ªã¤ ¢â®àã? ;-)
|
||||
*A:* <20>¨á âì «ãçè¥ ¢á¥£® ¢ Ru.GoldED. „ ¦¥ «ãçè¥ á ç « ¥£® ¯®ç¨â âì, ¤®¦¤ âìáï
|
||||
¬¥á⮣® FAQ, ¡ £«¨áâ ¨ ⮫쪮 ¯®â®¬ ¯¨á âì. …᫨ ã¦ á¨«ì® ¯à¨á¯¨ç¨â, â®
|
||||
¬®¦® ¯¨á âì 2:5020/201.58, 2:5020/604.19 ¨«¨ aaganichev@netscape.net,
|
||||
® ï ᮢᥬ ¥ £ à â¨àãî, çâ® ï ®â¢¥çã. ‘â ¢ì⥠RRq, Cfm, ¥á«¨ å®â¨â¥
|
||||
§ âì, çâ® ¢ è¥ ¯¨á쬮 ¤®è«® ¨ ï ¯à®áâ® ¥ áâ « ¥£® ®â¢¥ç âì. Ÿ ¥
|
||||
®â¢¥ç î ¢®¯à®áë, ®¯¨á ë¥ ¢ í⮬ FAQ ¨«¨ ¥á«¨ ï ¥ § î ª ª çâ®-â®
|
||||
à ¡®â ¥â ¢ GoldED'¥ (ï ¥ ¨á¯®«ì§ãî ᫨誮¬ ¬®£® ¥£® ¢®§¬®¦®á⥩ - Œ<>…
|
||||
®¨ ¥ ã¦ë) - ç¨â ©â¥ ¤®ªã¬¥â æ¨î, á¯à 訢 ©â¥ ¢ Ru.GoldED... “ ¬¥ï
|
||||
᫨誮¬ ¬ «® ᢮¡®¤®£® ¢à¥¬¥¨, ç⮡ë à ᪠¯ë¢ âì ¤«ï ¢ á ª ª çâ®-â®
|
||||
à ¡®â ¥â.
|
||||
|
||||
>==============================================================================
|
||||
|
@ -826,6 +826,7 @@ CfgGed::CfgGed() {
|
||||
else
|
||||
memcpy(color, gold_color1, sizeof(color));
|
||||
*internetgate.name = 0;
|
||||
internetgateexp = (RFCName << 2) | RFCAddress;
|
||||
// internetgate.addr.reset();
|
||||
*internetserver.nntp.server = 0;
|
||||
*internetserver.smtp.server = 0;
|
||||
|
@ -217,6 +217,7 @@ const word CRC_INTENSECOLORS = 0x5F70;
|
||||
const word CRC_INTERNETADDRESS = 0xA4D3;
|
||||
const word CRC_INTERNETDOMAIN = 0x50d7;
|
||||
const word CRC_INTERNETGATE = 0xF6C0;
|
||||
const word CRC_INTERNETGATEEXP = 0x0797;
|
||||
const word CRC_INTERNETLOOKUP = 0x0E22;
|
||||
const word CRC_INTERNETMSGID = 0xC31F;
|
||||
const word CRC_INTERNETREPLY = 0x6253;
|
||||
|
@ -374,6 +374,7 @@ SwitchI:
|
||||
case CRC_INTERNETADDRESS : CfgInternetaddress (); break;
|
||||
case CRC_INTERNETDOMAIN : CfgInternetdomain (); break;
|
||||
case CRC_INTERNETGATE : CfgInternetgate (); break;
|
||||
case CRC_INTERNETGATEEXP : CfgInternetgateexp (); break;
|
||||
case CRC_INTERNETMSGID : CfgInternetmsgid (); break;
|
||||
case CRC_INTERNETRFCBODY : CfgInternetrfcbody (); break;
|
||||
case CRC_INTERNETSERVER : CfgInternetserver (); break;
|
||||
|
@ -170,6 +170,23 @@ void CfgInternetgate() {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CfgInternetgateexp() {
|
||||
|
||||
uint exp = 0;
|
||||
char *key;
|
||||
do {
|
||||
getkeyval(&key, &val);
|
||||
if(strieql(key, "Name"))
|
||||
exp = (exp << 2) | RFCName;
|
||||
if(strieql(key, "Address"))
|
||||
exp = (exp << 2) | RFCAddress;
|
||||
}
|
||||
while(*val != NUL);
|
||||
CFG->internetgateexp = exp;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void CfgInternetmsgid() {
|
||||
|
||||
bool flag = GetYesno(val);
|
||||
|
@ -144,17 +144,17 @@ void CfgTearline() {
|
||||
|
||||
void CfgTemplate() {
|
||||
|
||||
char* key;
|
||||
getkeyval(&key, &val);
|
||||
if(cfgingroup) {
|
||||
Path buf;
|
||||
strxcpy(buf, val, sizeof(buf));
|
||||
strxcpy(buf, key, sizeof(buf));
|
||||
CFG->grp.AddItm(GRP_TEMPLATE, buf, strlen(buf)+1);
|
||||
}
|
||||
else {
|
||||
char* key;
|
||||
Tpl tp;
|
||||
*tp.name = NUL;
|
||||
tp.match.reset();
|
||||
getkeyval(&key, &val);
|
||||
strcpy(tp.file, key);
|
||||
if((*val == '\'') or (*val == '\"')) {
|
||||
getkeyval(&key, &val);
|
||||
|
@ -209,6 +209,7 @@ void CfgIntensecolors ();
|
||||
void CfgInternetaddress ();
|
||||
void CfgInternetdomain ();
|
||||
void CfgInternetgate ();
|
||||
void CfgInternetgateexp ();
|
||||
void CfgInternetlookup ();
|
||||
void CfgInternetmsgid ();
|
||||
void CfgInternetreply ();
|
||||
|
@ -73,6 +73,8 @@ const int MODE_VIEW = 116;
|
||||
const int MODE_WRITE = 117;
|
||||
const int MODE_PRINT = 118;
|
||||
const int MODE_APPEND = 119;
|
||||
const int MODE_WRITEHEADER = 120;
|
||||
const int MODE_HEADER = 121;
|
||||
|
||||
const int MODE_NEW = 0x0100;
|
||||
const int MODE_CHANGE = 0x0200;
|
||||
@ -1006,6 +1008,11 @@ struct FileSpec {
|
||||
};
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
const int RFCAddress = 1;
|
||||
const int RFCName = 2;
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Message written by/to me/you ?
|
||||
|
||||
|
@ -241,6 +241,7 @@ public:
|
||||
IAdr internetaddress;
|
||||
char internetdomain[96];
|
||||
Node internetgate;
|
||||
int internetgateexp;
|
||||
bool internetmsgid;
|
||||
bool internetrfcbody;
|
||||
InetServers internetserver;
|
||||
|
@ -207,13 +207,16 @@ char* mime_header_encode(char* dest, const char* source, GMsg* msg) {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
char* get_informative_string(char* buf) {
|
||||
const char* get_informative_string(void) {
|
||||
|
||||
sprintf(buf, "%s%s%s %s%i.%i.%i%s (%s)",
|
||||
static char informative_string[356] = "";
|
||||
|
||||
if(informative_string[0] == NUL)
|
||||
sprintf(informative_string, "%s%s%s %s%i.%i.%i%s (%s)",
|
||||
__gver_prename__, __gver_name__, __gver_postname__,
|
||||
__gver_preversion__, __gver_major__, __gver_minor__,
|
||||
__gver_release__, __gver_postversion__, ggetosstring());
|
||||
return buf;
|
||||
return informative_string;
|
||||
}
|
||||
|
||||
|
||||
@ -335,7 +338,7 @@ void DoKludges(int mode, GMsg* msg, bool attronly) {
|
||||
}
|
||||
|
||||
// The PID: (Product ID code) kludge
|
||||
strcpy(msg->pid, __gver_shortpid__);
|
||||
strxmerge(msg->pid, sizeof(msg->pid), __gver_shortpid__, " ", __gver_ver__, NULL);
|
||||
|
||||
if(CFG->usepid and (CFG->switches.get(emptytearline) or not (striinc(__gver_longpid__, msg->tearline)))) {
|
||||
|
||||
@ -522,7 +525,7 @@ void DoKludges(int mode, GMsg* msg, bool attronly) {
|
||||
}
|
||||
|
||||
if(AA->isnewsgroup() or AA->isemail()) {
|
||||
sprintf(buf, "%sX-%s: %s", rfc, AA->isnewsgroup() ? "Newsreader" : "Mailer", get_informative_string(buf2));
|
||||
sprintf(buf, "%sX-%s: %s", rfc, AA->isnewsgroup() ? "Newsreader" : "Mailer", get_informative_string());
|
||||
line = AddKludge(line, buf);
|
||||
line->kludge = GKLUD_RFC;
|
||||
}
|
||||
@ -535,10 +538,13 @@ void DoKludges(int mode, GMsg* msg, bool attronly) {
|
||||
|
||||
if(AA->isnet()) {
|
||||
if(*msg->iaddr and not AA->isinternet()) {
|
||||
if(*msg->To() and (strpbrk(msg->iaddr, "<>()\"") == NULL) and not strieql(msg->To(), *AA->Internetgate().name ? AA->Internetgate().name : "UUCP")) {
|
||||
if(not (CFG->internetgateexp == RFCAddress) and *msg->To() and (strpbrk(msg->iaddr, "<>()\"") == NULL) and not strieql(msg->To(), *AA->Internetgate().name ? AA->Internetgate().name : "UUCP")) {
|
||||
Name name;
|
||||
strcpy(name, msg->To());
|
||||
if(CFG->internetgateexp == ((RFCName << 2) | RFCAddress))
|
||||
sprintf(buf, "To: \"%s\" <%s>\r", StripQuotes(name), msg->iaddr);
|
||||
else
|
||||
sprintf(buf, "To: %s (%s)\r", msg->iaddr, StripQuotes(name));
|
||||
}
|
||||
else
|
||||
sprintf(buf, "To: %s\r", msg->iaddr);
|
||||
@ -607,14 +613,6 @@ void DoTearorig(int mode, GMsg* msg) {
|
||||
line = LastLine(msg->lin);
|
||||
if(line == NULL)
|
||||
msg->lin = line = AddLine(NULL, "");
|
||||
#if 0
|
||||
else {
|
||||
ptr = line->txt.c_str();
|
||||
if(not strblank(ptr))
|
||||
if(not ((ptr[0] == ptr[1]) and (ptr[1] == ptr[2])))
|
||||
line = AddLine(line, "");
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check and fix originline
|
||||
if(*msg->origin) {
|
||||
|
@ -61,12 +61,17 @@ void SaveLines(int mode, const char* savefile, GMsg* msg, bool clip) {
|
||||
}
|
||||
int lines=0;
|
||||
if(prnfp) {
|
||||
#ifdef OLD_STYLE_HEADER
|
||||
if(mode == MODE_WRITE) {
|
||||
if(prnheader)
|
||||
DispHeader(msg, prn, prnfp, prnmargin);
|
||||
if(prn)
|
||||
lines = 6;
|
||||
}
|
||||
#else
|
||||
TemplateToText(((mode == MODE_WRITE) && prnheader) ? MODE_WRITEHEADER : ((prnheader & WRITE_ONLY_HEADER) ? MODE_HEADER : MODE_WRITE), msg, msg, AA->Tpl(), CurrArea);
|
||||
msg->TextToLines(-prnmargin);
|
||||
#endif
|
||||
int n = 0;
|
||||
Line** lin = msg->line;
|
||||
if(lin and not (prnheader & WRITE_ONLY_HEADER)) {
|
||||
|
@ -50,8 +50,6 @@ char m_title[80]; // Menu title string
|
||||
int m_titlepos; // Menu title position
|
||||
int m_titleattr; // Menu title color
|
||||
|
||||
char* tconv;
|
||||
|
||||
int AreaKeys = 0;
|
||||
int ReadKeys = 0;
|
||||
int ListKeys = 0;
|
||||
|
@ -100,8 +100,6 @@ extern char m_title[];
|
||||
extern int m_titlepos;
|
||||
extern int m_titleattr;
|
||||
|
||||
extern char* tconv;
|
||||
|
||||
extern int AreaKeys, ReadKeys, ListKeys, NodeKeys, EditKeys, FileKeys;
|
||||
extern list<CmdKey>::iterator AreaKey, ReadKey, ListKey, NodeKey, EditKey, FileKey;
|
||||
|
||||
@ -187,6 +185,8 @@ extern const char* __gver_date__;
|
||||
extern const char* __gver_time__;
|
||||
extern const char* __gver_longpid__;
|
||||
extern const char* __gver_shortpid__;
|
||||
extern const char* __gver_ver__;
|
||||
extern const char* __gver_shortver__;
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@ -305,6 +305,10 @@ bool GMsgHeaderEdit::validate() {
|
||||
fromaddr.buf = ffromaddr->buf; fromaddr.update = false;
|
||||
subj.buf = fsubj->buf; subj.update = false;
|
||||
|
||||
INam iaddr, realto;
|
||||
strcpy(iaddr, msg->iaddr);
|
||||
strcpy(realto, msg->realto);
|
||||
|
||||
bool res = set_to_address(msg, &toname, &toaddr, &fromaddr, &subj, 0, LNG->SelectDestNode, lookup);
|
||||
|
||||
vcurshow();
|
||||
@ -313,9 +317,13 @@ bool GMsgHeaderEdit::validate() {
|
||||
strsetsz(bot2, EDIT->HdrNodeLen());
|
||||
window.prints(1, EDIT->HdrNodePos(), C_HEADW, bot2);
|
||||
|
||||
// once we changed name invalidate realto
|
||||
if(not strieql(orig_toname.c_str(), toname.buf))
|
||||
// once we changed name invalidate realto and internet address
|
||||
if(not strieql(orig_toname.c_str(), toname.buf)) {
|
||||
if(strieql(realto, msg->realto))
|
||||
*msg->realto = NUL;
|
||||
if(not AA->isinternet() and strieql(iaddr, msg->iaddr))
|
||||
*msg->iaddr = NUL;
|
||||
}
|
||||
|
||||
if(toname.update) current->update();
|
||||
if(toaddr.update) ftoaddr->update();
|
||||
@ -442,8 +450,14 @@ int EditHeaderinfo(int mode, GMsgHeaderView &view) {
|
||||
strcpy(msg->realto, msg->to);
|
||||
strcpy(msg->iorig, from_addr.c_str());
|
||||
strcpy(msg->idest, to_addr.c_str());
|
||||
strcpy(msg->ifrom, msg->iorig);
|
||||
strcpy(msg->ito, msg->idest);
|
||||
if(*msg->by)
|
||||
sprintf(msg->ifrom, "%s (%s)", msg->iorig, msg->by);
|
||||
else
|
||||
sprintf(msg->ifrom, "%s", msg->iorig);
|
||||
if(*msg->to)
|
||||
sprintf(msg->ito, "%s (%s)", msg->idest, msg->to);
|
||||
else
|
||||
sprintf(msg->ito, "%s", msg->idest);
|
||||
if(msg->orig.net == 0)
|
||||
msg->orig = msg->oorig = AA->Aka().addr;
|
||||
if(msg->dest.net == 0)
|
||||
@ -451,8 +465,9 @@ int EditHeaderinfo(int mode, GMsgHeaderView &view) {
|
||||
}
|
||||
else {
|
||||
if(strchr(to_name.c_str(), '@')) {
|
||||
if(*AA->Internetgate().name)
|
||||
if(*AA->Internetgate().name) {
|
||||
strcpy(msg->iaddr, to_name.c_str());
|
||||
}
|
||||
else {
|
||||
if(to_name.length() > 34) {
|
||||
strcpy(msg->to, "UUCP");
|
||||
@ -465,6 +480,16 @@ int EditHeaderinfo(int mode, GMsgHeaderView &view) {
|
||||
else
|
||||
strcpy(msg->to, to_name.c_str());
|
||||
|
||||
if(*msg->iaddr) {
|
||||
if(*msg->To() and (strpbrk(msg->iaddr, "<>()\"") == NULL) and not strieql(msg->To(), *AA->Internetgate().name ? AA->Internetgate().name : "UUCP")) {
|
||||
Name name;
|
||||
strcpy(name, msg->To());
|
||||
sprintf(msg->ito, "%s (%s)", msg->iaddr, StripQuotes(name));
|
||||
}
|
||||
else
|
||||
strcpy(msg->ito, msg->iaddr);
|
||||
}
|
||||
|
||||
Addr address;
|
||||
address = AA->Aka().addr;
|
||||
|
||||
|
@ -24,18 +24,18 @@
|
||||
// Header display.
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#ifdef OLD_STYLE_HEADER
|
||||
|
||||
#include <golded.h>
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
char* strconv(char* str, char* conv) {
|
||||
static char* strconv(char* str) {
|
||||
|
||||
char* s=str;
|
||||
char* p = str;
|
||||
|
||||
NW(conv); // Dummy
|
||||
|
||||
while(*str) {
|
||||
if(iscntrl(*str) and (*str != '\n') and (*str != '\r')) // Control codes
|
||||
*p++ = '.';
|
||||
@ -79,39 +79,44 @@ void DispHeader(GMsg* msg, bool prn, FILE* fp, int width) {
|
||||
|
||||
// Generate top line fields
|
||||
char buf[256];
|
||||
char top1[200];
|
||||
char buf1[200];
|
||||
char buf2[200];
|
||||
strtrim(strcpy(buf, AA->desc()));
|
||||
if((CFG->dispareano == ALWAYS) or (CFG->dispareano and AA->board()))
|
||||
sprintf(top1, " [%u] %s ", AA->board(), buf);
|
||||
sprintf(buf1, " [%u] %s ", AA->board(), buf);
|
||||
else
|
||||
sprintf(top1, " %s ", buf);
|
||||
strtrim(top1);
|
||||
strcat(top1, " (" /*)*/);
|
||||
sprintf(buf1, " %s ", buf);
|
||||
strtrim(buf1);
|
||||
strcat(buf1, " (" /*)*/);
|
||||
if(AA->isinternet())
|
||||
strcpy(buf, AA->Internetaddress());
|
||||
else
|
||||
AA->Aka().addr.make_string(buf);
|
||||
strcat(top1, buf);
|
||||
strcat(top1, /*(*/ ") ");
|
||||
strcat(buf1, buf);
|
||||
strcat(buf1, /*(*/ ") ");
|
||||
|
||||
char top2[200];
|
||||
if(msg->areakludgeid)
|
||||
sprintf(top2, " %s (%s) ", AA->echoid(), msg->areakludgeid);
|
||||
sprintf(buf2, " %s (%s) ", AA->echoid(), msg->areakludgeid);
|
||||
else
|
||||
sprintf(top2, " %s ", AA->echoid());
|
||||
sprintf(buf2, " %s ", AA->echoid());
|
||||
|
||||
// Write the total header to a file
|
||||
strcpy(stpcpy(buf, headerline), prn ? NL : "\n");
|
||||
strncpy(buf+1, buf1, strlen(buf1));
|
||||
strncpy(buf+width-strlen(buf2)-1, buf2, strlen(buf2));
|
||||
strconv(buf);
|
||||
fwrite(buf, strlen(buf), 1, fp);
|
||||
|
||||
// Generate message attributes string
|
||||
char bot2[200];
|
||||
MakeAttrStr(bot2, &msg->attr);
|
||||
int len2 = strlen(bot2);
|
||||
MakeAttrStr(buf2, &msg->attr);
|
||||
int len2 = strlen(buf2);
|
||||
if(len2 > width-CFG->disphdrnodeset.pos) {
|
||||
len2 = width-CFG->disphdrnodeset.pos;
|
||||
strsetsz(bot2, len2);
|
||||
strsetsz(buf2, len2);
|
||||
}
|
||||
|
||||
// Generate message number and reply links string
|
||||
char bot1[200];
|
||||
char* ptr = bot1;
|
||||
char* ptr = buf1;
|
||||
int list_max = msg->link.list_max();
|
||||
ulong* replies = (ulong*)throw_calloc(list_max+1, sizeof(ulong));
|
||||
ulong replyto, replynext;
|
||||
@ -139,106 +144,100 @@ void DispHeader(GMsg* msg, bool prn, FILE* fp, int width) {
|
||||
ptr += sprintf(ptr, " %s%lu", (plus++?"":"+"), replies[replyn]);
|
||||
if(replynext)
|
||||
sprintf(ptr, " *%lu", replynext);
|
||||
int len1 = strlen(bot1)-8;
|
||||
int len1 = strlen(buf1)-8;
|
||||
if((CFG->disphdrnameset.pos + len1) > CFG->disphdrnodeset.pos) {
|
||||
if(8 + len1 + len2 > width) {
|
||||
strsetsz(bot1, width-len2-1);
|
||||
strtrim(bot1);
|
||||
strsetsz(buf1, width-len2-1);
|
||||
strtrim(buf1);
|
||||
}
|
||||
strcat(bot1, " ");
|
||||
strcat(bot1, bot2);
|
||||
*bot2 = NUL;
|
||||
strcat(buf1, " ");
|
||||
strcat(buf1, buf2);
|
||||
*buf2 = NUL;
|
||||
}
|
||||
else {
|
||||
strsetsz(bot1, namewidth+8);
|
||||
strcat(bot1, bot2);
|
||||
*bot2 = NUL;
|
||||
strsetsz(buf1, namewidth+8);
|
||||
strcat(buf1, buf2);
|
||||
*buf2 = NUL;
|
||||
}
|
||||
strsetsz(bot1, width);
|
||||
strsetsz(buf1, width);
|
||||
throw_free(replies);
|
||||
|
||||
// Generate orig node data
|
||||
char node1[200];
|
||||
if(msg->orig.net)
|
||||
msg->orig.make_string(node1);
|
||||
else
|
||||
*node1 = NUL;
|
||||
strsetsz(node1, nodewidth);
|
||||
// Write message info
|
||||
strcpy(stpcpy(buf, buf1), buf2);
|
||||
strtrim(buf);
|
||||
strcat(buf, prn ? NL : "\n");
|
||||
strconv(buf);
|
||||
fwrite(buf, strlen(buf), 1, fp);
|
||||
|
||||
// Generate orig node data
|
||||
if(msg->orig.net)
|
||||
msg->orig.make_string(buf1);
|
||||
else
|
||||
*buf1 = NUL;
|
||||
strsetsz(buf1, nodewidth);
|
||||
|
||||
char date1[25] = "";
|
||||
if(msg->written)
|
||||
strftimei(date1, CFG->disphdrdateset.len, LNG->DateTimeFmt, gmtime(&msg->written));
|
||||
strsetsz(date1, datewidth);
|
||||
strftimei(buf2, CFG->disphdrdateset.len, LNG->DateTimeFmt, gmtime(&msg->written));
|
||||
strsetsz(buf2, datewidth);
|
||||
|
||||
// write from line
|
||||
sprintf(buf, "%s%s%s%s",
|
||||
LNG->From, whofrom,
|
||||
((not (*msg->ifrom and (*msg->realby or *msg->iorig))) and not AA->isinternet()) ? buf1 : "",
|
||||
buf2
|
||||
);
|
||||
strtrim(buf);
|
||||
strcat(buf, prn ? NL : "\n");
|
||||
strconv(buf);
|
||||
fwrite(buf, strlen(buf), 1, fp);
|
||||
|
||||
// Generate dest node data
|
||||
char node2[200];
|
||||
if(msg->dest.net and AA->isnet()) {
|
||||
msg->dest.make_string(node2);
|
||||
msg->dest.make_string(buf2);
|
||||
if(msg->odest.net) {
|
||||
if(msg->odest.net != msg->dest.net or msg->odest.node != msg->dest.node) {
|
||||
sprintf(buf, " %s %u/%u", LNG->Via, msg->odest.net, msg->odest.node);
|
||||
strcat(node2, buf);
|
||||
strcat(buf2, buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
*node2 = NUL;
|
||||
strsetsz(node2, nodewidth);
|
||||
*buf2 = NUL;
|
||||
strsetsz(buf2, nodewidth);
|
||||
|
||||
char date2[25] = "";
|
||||
if(msg->arrived)
|
||||
strftimei(date2, CFG->disphdrdateset.len, LNG->DateTimeFmt, gmtime(&msg->arrived));
|
||||
strsetsz(date2, datewidth);
|
||||
strftimei(buf2, CFG->disphdrdateset.len, LNG->DateTimeFmt, gmtime(&msg->arrived));
|
||||
strsetsz(buf2, datewidth);
|
||||
|
||||
// write to line
|
||||
sprintf(buf, "%s%s%s%s", LNG->To, whoto,
|
||||
((not (*msg->ito and (*msg->realto or *msg->idest))) and not AA->isinternet()) ? buf2 : "",
|
||||
buf2
|
||||
);
|
||||
strtrim(buf);
|
||||
strcat(buf, prn ? NL : "\n");
|
||||
strconv(buf);
|
||||
fwrite(buf, strlen(buf), 1, fp);
|
||||
|
||||
// Generate subjectline
|
||||
char subj[200], lngsubj[10];
|
||||
strcpy(lngsubj, (msg->attr.att() or msg->attr.frq() or msg->attr.urq()) ? LNG->File : LNG->Subj);
|
||||
strxcpy(subj, msg->re, sizeof(subj));
|
||||
strsetsz(subj, width-strlen(lngsubj));
|
||||
strcpy(buf2, (msg->attr.att() or msg->attr.frq() or msg->attr.urq()) ? LNG->File : LNG->Subj);
|
||||
strxcpy(buf1, msg->re, sizeof(buf1));
|
||||
strsetsz(buf1, width-strlen(buf2));
|
||||
|
||||
// Write the total header to a file
|
||||
// write subject line
|
||||
strcpy(stpcpy(buf, buf2), buf1);
|
||||
strtrim(buf);
|
||||
strcat(buf, prn ? NL : "\n");
|
||||
strconv(buf);
|
||||
fwrite(buf, strlen(buf), 1, fp);
|
||||
|
||||
// write bottom line
|
||||
strcpy(stpcpy(buf, headerline), prn ? NL : "\n");
|
||||
strncpy(buf+1, top1, strlen(top1));
|
||||
strncpy(buf+width-strlen(top2)-1, top2, strlen(top2));
|
||||
strconv(buf, tconv);
|
||||
fwrite(buf, strlen(buf), 1, fp);
|
||||
|
||||
strcpy(stpcpy(buf, bot1), bot2);
|
||||
strtrim(buf);
|
||||
strcat(buf, prn ? NL : "\n");
|
||||
strconv(buf, tconv);
|
||||
fwrite(buf, strlen(buf), 1, fp);
|
||||
|
||||
sprintf(buf, "%s%s%s%s",
|
||||
LNG->From, whofrom,
|
||||
((not (*msg->ifrom and (*msg->realby or *msg->iorig))) and not AA->isinternet()) ? node1 : "",
|
||||
date1
|
||||
);
|
||||
strtrim(buf);
|
||||
strcat(buf, prn ? NL : "\n");
|
||||
strconv(buf, tconv);
|
||||
fwrite(buf, strlen(buf), 1, fp);
|
||||
|
||||
sprintf(buf, "%s%s%s%s", LNG->To, whoto,
|
||||
((not (*msg->ito and (*msg->realto or *msg->idest))) and not AA->isinternet()) ? node2 : "",
|
||||
date2
|
||||
);
|
||||
strtrim(buf);
|
||||
strcat(buf, prn ? NL : "\n");
|
||||
strconv(buf, tconv);
|
||||
fwrite(buf, strlen(buf), 1, fp);
|
||||
|
||||
strcpy(stpcpy(buf, lngsubj), subj);
|
||||
strtrim(buf);
|
||||
strcat(buf, prn ? NL : "\n");
|
||||
strconv(buf, tconv);
|
||||
fwrite(buf, strlen(buf), 1, fp);
|
||||
|
||||
strcpy(stpcpy(buf, headerline), prn ? NL : "\n");
|
||||
strconv(buf, tconv);
|
||||
strconv(buf);
|
||||
fwrite(buf, strlen(buf), 1, fp);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
@ -506,7 +506,7 @@ void Initialize(int argc, char* argv[]) {
|
||||
srand((unsigned)time(NULL));
|
||||
|
||||
// Display startup banner
|
||||
cout << __gver_longpid__ << endl;
|
||||
cout << __gver_longpid__ << " " << __gver_ver__ << endl;
|
||||
|
||||
// Check environment commandline
|
||||
ptr = getenv("GEDCMD");
|
||||
@ -685,7 +685,7 @@ void Initialize(int argc, char* argv[]) {
|
||||
|
||||
// Start the log
|
||||
static char buf[200];
|
||||
sprintf(buf, "%s (%s %s)", __gver_longpid__, __gver_date__, __gver_time__);
|
||||
sprintf(buf, "%s %s (%s %s)", __gver_longpid__, __gver_ver__, __gver_date__, __gver_time__);
|
||||
LOG.open(CFG->logfile, buf, __gver_shortlogname__, CFG->logformat);
|
||||
|
||||
// Read/compile various configs
|
||||
|
@ -1592,8 +1592,6 @@ void ScanKludges(GMsg* msg, int getvalue) {
|
||||
KludgeFROM(msg, tmp ? tmp : ptr);
|
||||
if(tmp)
|
||||
throw_free(tmp);
|
||||
if(not AA->isinternet())
|
||||
*msg->ifrom = NUL;
|
||||
}
|
||||
else if(strnieql(line->txt.c_str(), "To:", 3)) {
|
||||
const char* ptr = line->txt.c_str() + 3;
|
||||
@ -1602,8 +1600,6 @@ void ScanKludges(GMsg* msg, int getvalue) {
|
||||
KludgeTO(msg, tmp ? tmp : ptr);
|
||||
if(tmp)
|
||||
throw_free(tmp);
|
||||
if(not AA->isinternet())
|
||||
*msg->ito = NUL;
|
||||
}
|
||||
else if(strnieql(line->txt.c_str(), "Reply-To:", 9)) {
|
||||
const char* ptr = line->txt.c_str() + 9;
|
||||
@ -2549,6 +2545,8 @@ void MakeLineIndex(GMsg* msg, int margin, bool header_recode) {
|
||||
strxmimecpy(msg->realto, msg->realto, 0, sizeof(INam), true);
|
||||
strxmimecpy(msg->by, msg->by, level, sizeof(INam), true);
|
||||
strxmimecpy(msg->to, msg->to, level, sizeof(INam), true);
|
||||
strxmimecpy(msg->ifrom, msg->ifrom, 0, sizeof(INam), true);
|
||||
strxmimecpy(msg->ito, msg->ito, 0, sizeof(msg->ito), true);
|
||||
|
||||
if(not (msg->attr.frq() or msg->attr.att() or msg->attr.urq()))
|
||||
strxmimecpy(msg->re, msg->re, level, sizeof(ISub), true);
|
||||
|
@ -59,9 +59,9 @@ static bool tokenxchg(char*& dst, char* tok, const char* src, int len = 0, int c
|
||||
if(dst[toklen] == '{') {
|
||||
char *p = strchr(dst+toklen, '}');
|
||||
if(p) {
|
||||
uint len = p-dst-toklen-1;
|
||||
if(use && len) {
|
||||
strxcpy (buf, dst+toklen+1, len+1);
|
||||
uint dstlen = p-dst-toklen-1;
|
||||
if(use && dstlen) {
|
||||
strxcpy (buf, dst+toklen+1, dstlen+1);
|
||||
src = buf;
|
||||
}
|
||||
toklen = p-dst+1;
|
||||
@ -74,33 +74,31 @@ static bool tokenxchg(char*& dst, char* tok, const char* src, int len = 0, int c
|
||||
uint srclen = (len == 0) ? sl : len;
|
||||
memmove(dst+srclen, dst+toklen, strlen(dst+toklen)+1);
|
||||
memset(dst, ' ', srclen);
|
||||
memcpy(dst, src, sl);
|
||||
memcpy(dst, src, ((len != 0) and (len < sl)) ? len : sl);
|
||||
dst += srclen;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
static bool domain_requested(const char *str) {
|
||||
|
||||
return strnieql(str, "{domain}", 8);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea) {
|
||||
|
||||
char longpid[100];
|
||||
sprintf(longpid, "%s%s%s%s", __gver_prename__, __gver_name__, __gver_postname__, __gver_platform__);
|
||||
|
||||
char shortpid[100];
|
||||
sprintf(shortpid, "%s%s", __gver_shortname__, __gver_shortplatform__);
|
||||
|
||||
char longverbuf[100];
|
||||
sprintf(longverbuf, "%s%i.%i.%i%s", __gver_preversion__, __gver_major__, __gver_minor__, __gver_release__, __gver_postversion__);
|
||||
|
||||
char verbuf[100];
|
||||
sprintf(verbuf, "%i.%i.%i", __gver_major__, __gver_minor__, __gver_release__);
|
||||
|
||||
char revbuf[100];
|
||||
static char revbuf[5] = "";
|
||||
if(revbuf[0] == NUL)
|
||||
sprintf(revbuf, "%02d%02d", str2mon(__gver_date__), atoi(&__gver_date__[4]));
|
||||
|
||||
char xmailer[356];
|
||||
get_informative_string(xmailer);
|
||||
char attr[80];
|
||||
MakeAttrStr(attr, &msg->attr);
|
||||
|
||||
const char *xmailer = get_informative_string();
|
||||
|
||||
time_t t = time(NULL);
|
||||
struct tm* written_tm = localtime(&t);
|
||||
@ -114,13 +112,17 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
char otime[80];
|
||||
strftimei(otime, 80, LNG->TimeFmt, written_tm);
|
||||
|
||||
const char* osslashbuf = __gver_platform__;
|
||||
|
||||
const char* origareaid = AL.AreaIdToPtr(__origarea)->echoid();
|
||||
bool origareaisinet = AL.AreaIdToPtr(__origarea)->isinternet();
|
||||
bool currareaisinet = AA->isinternet();
|
||||
char* modereptr = oldmsg->re;
|
||||
|
||||
char msgno[16];
|
||||
sprintf(msgno, "%u", msg->attr.nwm() ? AA->Msgn.Count() + 1 : AA->Msgn.ToReln(msg->msgno));
|
||||
|
||||
char msgs[16];
|
||||
sprintf(msgs, "%u", AA->Msgn.Count() + (msg->attr.nwm() ? 1 : 0));
|
||||
|
||||
if((mode == MODE_QUOTE) or (mode == MODE_REPLYCOMMENT) or (mode == MODE_REPLY)) {
|
||||
if(AL.AreaIdToPtr(__origarea)->Areareplydirect() and oldmsg->areakludgeid)
|
||||
origareaid = oldmsg->areakludgeid;
|
||||
@ -151,16 +153,16 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
if(tokenxchg(dst, "@odesc", AL.AreaEchoToPtr(origareaid)->desc()))
|
||||
continue;
|
||||
if(origareaisinet) {
|
||||
if(tokenxchg(dst, "@oaddr", oldmsg->iorig, 19))
|
||||
if(tokenxchg(dst, "@oaddr", oldmsg->iorig, 19, 1, 0))
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
if(tokenxchg(dst, "@oaddr", oldmsg->orig.make_string(buf, oldmsg->odom), 19))
|
||||
if(tokenxchg(dst, "@oaddr", oldmsg->orig.make_string(buf, domain_requested(dst+6) ? oldmsg->odom : NULL), 19, 1, 0))
|
||||
continue;
|
||||
if(strnieql(dst, "@o3daddr", 8)) {
|
||||
ftn_addr boss = oldmsg->orig;
|
||||
boss.point = 0;
|
||||
tokenxchg(dst, "@o3daddr", boss.make_string(buf, oldmsg->odom), 19);
|
||||
tokenxchg(dst, "@o3daddr", boss.make_string(buf, domain_requested(dst+8) ? oldmsg->odom : NULL), 19, 1, 0);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -179,25 +181,25 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
continue;
|
||||
if(tokenxchg(dst, "@otzoffset", (oldmsg->tzutc == -32767) ? "" : (sprintf(buf, " %+05d", oldmsg->tzutc), buf)))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@ofrom", oldmsg->ifrom))
|
||||
if(tokenxchg(dst, "@ofrom", *oldmsg->ifrom ? oldmsg->ifrom : oldmsg->By()))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@oto", oldmsg->ito))
|
||||
if(tokenxchg(dst, "@oto", *oldmsg->ito ? oldmsg->ito : oldmsg->To()))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@omessageid", oldmsg->messageid ? oldmsg->messageid : ""))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@omsgid", *msg->replys ? msg->replys : ""))
|
||||
continue;
|
||||
if(origareaisinet) {
|
||||
if(tokenxchg(dst, "@daddr", oldmsg->iaddr, 19))
|
||||
if(tokenxchg(dst, "@daddr", oldmsg->iaddr, 19, 1, 0))
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
if(tokenxchg(dst, "@daddr", oldmsg->dest.make_string(buf, oldmsg->ddom), 19))
|
||||
if(tokenxchg(dst, "@daddr", oldmsg->dest.make_string(buf, domain_requested(dst+6) ? oldmsg->ddom : NULL), 19, 1, 0))
|
||||
continue;
|
||||
if(strnieql(dst, "@d3daddr", 8)) {
|
||||
ftn_addr boss = oldmsg->dest;
|
||||
boss.point = 0;
|
||||
tokenxchg(dst, "@d3daddr", boss.make_string(buf, oldmsg->ddom), 19);
|
||||
tokenxchg(dst, "@d3daddr", boss.make_string(buf, domain_requested(dst+8) ? oldmsg->ddom : NULL), 19, 1, 0);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -211,16 +213,16 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
msg->to_me(), msg->to_you(), oldmsg->to_all()))
|
||||
continue;
|
||||
if(currareaisinet) {
|
||||
if(tokenxchg(dst, "@taddr", msg->iaddr, 19))
|
||||
if(tokenxchg(dst, "@taddr", msg->iaddr, 19, 1, 0))
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
if(tokenxchg(dst, "@taddr", msg->dest.make_string(buf, msg->ddom), 19))
|
||||
if(tokenxchg(dst, "@taddr", msg->dest.make_string(buf, domain_requested(dst+6) ? msg->ddom : NULL), 19, 1, 0))
|
||||
continue;
|
||||
if(strnieql(dst, "@t3daddr", 8)) {
|
||||
ftn_addr boss = msg->dest;
|
||||
boss.point = 0;
|
||||
tokenxchg(dst, "@t3daddr", boss.make_string(buf, msg->ddom), 19);
|
||||
tokenxchg(dst, "@t3daddr", boss.make_string(buf, domain_requested(dst+8) ? msg->ddom : NULL), 19, 1, 0);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -234,16 +236,17 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
false, false, msg->to_all()))
|
||||
continue;
|
||||
if(currareaisinet) {
|
||||
if(tokenxchg(dst, "@caddr", AA->Internetaddress(), 19))
|
||||
if(tokenxchg(dst, "@caddr", AA->Internetaddress(), 19, 1, 0))
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
if(tokenxchg(dst, "@caddr", AA->Aka().addr.make_string(buf), 19))
|
||||
const gaka &caka=AA->Aka();
|
||||
if(tokenxchg(dst, "@caddr", caka.addr.make_string(buf, domain_requested(dst+6) ? caka.domain : NULL), 19, 1, 0))
|
||||
continue;
|
||||
if(strnieql(dst, "@c3daddr", 8)) {
|
||||
ftn_addr boss = AA->Aka().addr;
|
||||
ftn_addr boss = caka.addr;
|
||||
boss.point = 0;
|
||||
tokenxchg(dst, "@c3daddr", boss.make_string(buf), 19);
|
||||
tokenxchg(dst, "@c3daddr", boss.make_string(buf, domain_requested(dst+8) ? caka.domain : NULL), 19, 1, 0);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -253,6 +256,10 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
continue;
|
||||
if(tokenxchg(dst, "@clname", strrword(strcpy(buf, AA->Username().name))))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@cfrom", *msg->ifrom ? msg->ifrom : msg->By()))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@cto", *msg->ito ? msg->ito : msg->To()))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@cdate", cdate))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@ctime", ctime))
|
||||
@ -260,16 +267,16 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
if(tokenxchg(dst, "@ctzoffset", AA->Usetzutc() ? (sprintf(buf, " %+05d", tzoffset()), buf) : ""))
|
||||
continue;
|
||||
if(currareaisinet) {
|
||||
if(tokenxchg(dst, "@faddr", msg->iorig, 19))
|
||||
if(tokenxchg(dst, "@faddr", msg->iorig, 19, 1, 0))
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
if(tokenxchg(dst, "@faddr", msg->orig.make_string(buf, msg->odom), 19))
|
||||
if(tokenxchg(dst, "@faddr", msg->orig.make_string(buf, domain_requested(dst+6) ? msg->odom : NULL), 19, 1, 0))
|
||||
continue;
|
||||
if(strnieql(dst, "@f3daddr", 8)) {
|
||||
ftn_addr boss = msg->orig;
|
||||
boss.point = 0;
|
||||
tokenxchg(dst, "@f3daddr", boss.make_string(buf, msg->odom), 19);
|
||||
tokenxchg(dst, "@f3daddr", boss.make_string(buf, domain_requested(dst+8) ? msg->odom : NULL), 19, 1, 0);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -310,28 +317,47 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
tokenxchg(dst, "@fpseudo", msg->pseudofrom);
|
||||
continue;
|
||||
}
|
||||
if(tokenxchg(dst, "@msgno", msgno))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@msgs", msgs))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@cpseudo", *AA->Nickname() ? AA->Nickname() : strlword(strcpy(buf, AA->Username().name), " @")))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@version", longverbuf))
|
||||
if(tokenxchg(dst, "@version", __gver_ver__))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@ver", verbuf))
|
||||
if(tokenxchg(dst, "@ver", __gver_shortver__))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@rev", revbuf))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@pid", shortpid))
|
||||
if(strnieql(dst, "@align{", 6)) {
|
||||
char *ptr = strchr(dst, '}');
|
||||
if(ptr) {
|
||||
int size = atoi(dst+7) - (dst-input);
|
||||
if(size > 0) {
|
||||
char filler = ' ';
|
||||
if((ptr[1] == '{') and (ptr[3] == '}')) {
|
||||
filler = ptr[2];
|
||||
ptr += 3;
|
||||
}
|
||||
memmove(dst+size, ptr+1, strlen(ptr+1)+1);
|
||||
memset(dst, filler, size);
|
||||
dst += size;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
if(tokenxchg(dst, "@longpid", longpid))
|
||||
}
|
||||
if(tokenxchg(dst, "@pid", __gver_shortpid__))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@longpid", __gver_longpid__))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@widepid", xmailer))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@serialno", ""))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@os2slash", osslashbuf))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@osslash", osslashbuf))
|
||||
if(tokenxchg(dst, "@osslash", __gver_platform__))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@subject", modereptr))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@attr", attr))
|
||||
continue;
|
||||
if(tokenxchg(dst, "@tagline",
|
||||
HandleRandomLine(strxcpy(buf, AA->Tagline(), sizeof(buf)), sizeof(buf))))
|
||||
continue;
|
||||
|
@ -689,7 +689,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
||||
|
||||
GFTRK("MakeMsg");
|
||||
|
||||
// Tell DispHeader not to show msg size
|
||||
// Tell GMsgHeaderView not to show msg size
|
||||
_in_editor = YES;
|
||||
|
||||
// Allocate some msgs
|
||||
@ -762,7 +762,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
||||
msg->inreplyto = NULL;
|
||||
msg->references = NULL;
|
||||
msg->attr.tou0();
|
||||
msg->TextToLines(CFG->dispmargin-1, false);
|
||||
msg->TextToLines(CFG->dispmargin-1);
|
||||
*msg->iorig = NUL;
|
||||
*msg->idest = NUL;
|
||||
*msg->ireplyto = NUL;
|
||||
@ -788,7 +788,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
||||
msg->inreplyto = NULL;
|
||||
msg->references = NULL;
|
||||
msg->attr.tou0();
|
||||
msg->TextToLines(CFG->dispmargin-1, false);
|
||||
msg->TextToLines(CFG->dispmargin-1);
|
||||
break;
|
||||
case MODE_NEW:
|
||||
wfill(MINROW, 0, MAXROW-2, MAXCOL-1, ' ', C_READW);
|
||||
@ -830,7 +830,7 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
||||
case MODE_QUOTE:
|
||||
case MODE_REPLYCOMMENT:
|
||||
omsg->attr.tou0();
|
||||
omsg->TextToLines(-CFG->quotemargin, false);
|
||||
omsg->TextToLines(-CFG->quotemargin);
|
||||
if(ignore_replyto)
|
||||
omsg->ireplyto[0] = NUL;
|
||||
if(omsg->attr.rot())
|
||||
|
@ -100,7 +100,7 @@ void DoTearorig(int mode, GMsg* msg);
|
||||
void GetRandom(int mode, GMsg* msg);
|
||||
char* GetRandomLine(char* __buf, size_t __bufsize, const char* __file);
|
||||
char* HandleRandomLine(char* buf, size_t bufsize);
|
||||
char* get_informative_string(char* buf);
|
||||
const char* get_informative_string(void);
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
@ -275,7 +275,9 @@ int MsgIsTwit(GMsg* msg, bool& istwitto, bool& istwitsubj);
|
||||
ulong MsgHasReplies(GMsg* msg);
|
||||
gkey ViewMessage(int istwit=NOT_TWIT);
|
||||
int LoadMessage(GMsg* msg, int margin);
|
||||
#ifdef OLD_STYLE_HEADER
|
||||
void DispHeader(GMsg* msg, bool prn, FILE* fp=NULL, int width=-1);
|
||||
#endif
|
||||
void LoadRawMsg(GMsg* msg, int margin);
|
||||
|
||||
void make_pathreport(char* reportfile);
|
||||
@ -387,7 +389,6 @@ void ScanMsgTxtForAddr(GMsg* msg);
|
||||
gkey SearchKey(gkey key, list<CmdKey>::iterator keys, int totkeys);
|
||||
int SearchTaglist(Echo* taglist, char* tag);
|
||||
void set_title(const char* t, int p, int a);
|
||||
char* strconv(char* str, char* conv);
|
||||
void title_shadow();
|
||||
void update_statusline(const char* info);
|
||||
void update_statuslinef(const char* format, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
|
@ -114,7 +114,9 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
|
||||
TPLTOKEN_QUOTE,
|
||||
TPLTOKEN_INCLUDE,
|
||||
TPLTOKEN_MESSAGE,
|
||||
TPLTOKEN_MODERATOR
|
||||
TPLTOKEN_MODERATOR,
|
||||
TPLTOKEN_WRITE,
|
||||
TPLTOKEN_HEADER
|
||||
};
|
||||
|
||||
#define CSTR_COMMA_SIZEOF_CSTR(s) s, (sizeof(s)-1)
|
||||
@ -150,7 +152,9 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
|
||||
{ CSTR_COMMA_SIZEOF_CSTR("quote") },
|
||||
{ CSTR_COMMA_SIZEOF_CSTR("include") },
|
||||
{ CSTR_COMMA_SIZEOF_CSTR("message") },
|
||||
{ CSTR_COMMA_SIZEOF_CSTR("moderator") }
|
||||
{ CSTR_COMMA_SIZEOF_CSTR("moderator") },
|
||||
{ CSTR_COMMA_SIZEOF_CSTR("write") },
|
||||
{ CSTR_COMMA_SIZEOF_CSTR("header") }
|
||||
};
|
||||
|
||||
int end_token = sizeof(token_list) / sizeof(tpl_token);
|
||||
@ -197,6 +201,12 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
|
||||
mktemp(strcpy(tplfile, AddPath(CFG->templatepath, "GDXXXXXX")));
|
||||
fp = fsopen(tplfile, "wt", CFG->sharemode);
|
||||
if(fp) {
|
||||
fputs("@header= @oecho (@caddr) @align{79}{=}\n", fp);
|
||||
fputs("@header Msg : @msgno of @msgs@align{44}@attr\n", fp);
|
||||
fputs("@header From : @_oname @_oaddr @odate @otime\n", fp);
|
||||
fputs("@header To : @dname\n", fp);
|
||||
fputs("@header Subj : @subject\n", fp);
|
||||
fputs("@header@align{79}{=}\n", fp);
|
||||
fputs("@moved* Replying to a msg in @oecho (@odesc)\n@moved\n", fp);
|
||||
fputs("@changed* Changed by @cname (@caddr), @cdate @ctime.\n@changed\n", fp);
|
||||
fputs("@forward* Forwarded from @oecho by @fname (@faddr).\n", fp);
|
||||
@ -334,6 +344,20 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
|
||||
token = end_token;
|
||||
break;
|
||||
|
||||
case TPLTOKEN_HEADER:
|
||||
if((mode != MODE_HEADER) and (mode != MODE_WRITEHEADER))
|
||||
goto loop_next;
|
||||
chg = YES;
|
||||
token = end_token;
|
||||
break;
|
||||
|
||||
case TPLTOKEN_WRITE:
|
||||
if((mode != MODE_WRITE) and (mode != MODE_WRITEHEADER))
|
||||
goto loop_next;
|
||||
chg = YES;
|
||||
token = end_token;
|
||||
break;
|
||||
|
||||
case TPLTOKEN_NET:
|
||||
if(not AA->isnet())
|
||||
goto loop_next;
|
||||
@ -682,7 +706,8 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
|
||||
continue;
|
||||
|
||||
case TPLTOKEN_MESSAGE:
|
||||
if(mode == MODE_FORWARD or mode == MODE_CHANGE) {
|
||||
if((mode == MODE_FORWARD) or (mode == MODE_CHANGE) or
|
||||
(mode == MODE_WRITEHEADER) or (mode == MODE_WRITE)) {
|
||||
n = 0;
|
||||
while(oldmsg->line[n]) {
|
||||
if(oldmsg->line[n]->txt.c_str()) {
|
||||
@ -734,7 +759,7 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
|
||||
}
|
||||
}
|
||||
|
||||
if(mode == MODE_CHANGE)
|
||||
if((mode == MODE_CHANGE) or (mode == MODE_WRITEHEADER) or (mode == MODE_WRITE))
|
||||
if(chg == NO)
|
||||
continue;
|
||||
if((mode == MODE_QUOTEBUF) and not quotebufline)
|
||||
@ -751,7 +776,9 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
if((mode != MODE_CHANGE) and (mode != MODE_QUOTEBUF)) {
|
||||
if((mode != MODE_CHANGE) and (mode != MODE_QUOTEBUF) and
|
||||
(mode != MODE_HEADER) and (mode != MODE_WRITEHEADER) and
|
||||
(mode != MODE_WRITE) and (mode != MODE_WRITEHEADER)) {
|
||||
ctrlinfo = AA->Ctrlinfo();
|
||||
ctrlinfo |= CI_TAGL;
|
||||
if(ctrlinfo & (CI_TAGL|CI_TEAR|CI_ORIG)) {
|
||||
|
@ -779,9 +779,9 @@ void guserbase::update_addressbook(GMsg* msg, bool reverse, bool force) {
|
||||
return;
|
||||
|
||||
// Update address
|
||||
if(AA->isinternet())
|
||||
if(AA->isinternet() or (not *entry.iaddr and *iaddr))
|
||||
strxcpy(entry.iaddr, iaddr, sizeof(entry.iaddr));
|
||||
else
|
||||
if(not AA->isinternet() and not (AA->Internetgate().addr.valid() and (fidoaddr == AA->Internetgate().addr)))
|
||||
entry.fidoaddr = fidoaddr;
|
||||
|
||||
lock();
|
||||
@ -824,8 +824,12 @@ bool guserbase::lookup_addressbook(GMsg* msg, char* name, char* aka, bool browse
|
||||
if(strblank(aka) and not strblank(entry.iaddr)) {
|
||||
// do UUCP addressing
|
||||
strcpy(msg->realto, entry.name);
|
||||
strcpy(name, entry.iaddr);
|
||||
strcpy(msg->idest, entry.iaddr);
|
||||
strcpy(msg->iaddr, entry.iaddr);
|
||||
if(AA->Internetgate().addr.valid())
|
||||
AA->Internetgate().addr.make_string(aka);
|
||||
if(*AA->Internetgate().name)
|
||||
strcpy(name, AA->Internetgate().name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -852,10 +856,12 @@ void guserbase::build_pseudo(GMsg* msg, char* name, char* aka, bool direction) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if(entry.fidoaddr.valid()) {
|
||||
Addr AKA = aka;
|
||||
if(entry.fidoaddr != AKA)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
strcpy(direction ? msg->pseudoto : msg->pseudofrom, entry.pseudo);
|
||||
|
||||
|
@ -257,7 +257,7 @@ void ScreenBlankIdle() {
|
||||
char blankmsg1[80];
|
||||
char blankmsg2[80];
|
||||
time_t t = time(NULL);
|
||||
sprintf(blankmsg1, " %s %s ", __gver_longpid__, strftimei(blankmsg2, 40, LNG->StatusLineTimeFmt, localtime(&t)));
|
||||
sprintf(blankmsg1, " %s %s %s ", __gver_longpid__, __gver_ver__, strftimei(blankmsg2, 40, LNG->StatusLineTimeFmt, localtime(&t)));
|
||||
sprintf(blankmsg2, " %s ", LNG->BlankMsg);
|
||||
if(strblank(blankmsg2)) {
|
||||
*blankmsg2 = NUL;
|
||||
|
@ -101,18 +101,18 @@ void GMsgHeaderView::Paint() {
|
||||
headerline[width] = NUL;
|
||||
|
||||
INam whofrom;
|
||||
if(*msg->ifrom and *msg->realby)
|
||||
if(not area->isecho() and *msg->ifrom and *msg->realby)
|
||||
sprintf(whofrom, "%s <%s>", msg->realby, msg->iorig);
|
||||
else if(*msg->ifrom and *msg->iorig)
|
||||
else if(not area->isecho() and *msg->ifrom and *msg->iorig)
|
||||
strcpy(whofrom, msg->iorig);
|
||||
else
|
||||
strcpy(whofrom, msg->By());
|
||||
strsetsz(whofrom, (area->isinternet() or *msg->ifrom) ? (namewidth+nodewidth) : namewidth);
|
||||
|
||||
INam whoto;
|
||||
if(*msg->ito and *msg->realto)
|
||||
if(not area->isecho() and *msg->ito and *msg->realto)
|
||||
sprintf(whoto, "%s <%s>", msg->realto, msg->idest);
|
||||
else if(*msg->ito and *msg->idest)
|
||||
else if(not area->isecho() and *msg->ito and *msg->idest)
|
||||
strcpy(whoto, msg->idest);
|
||||
else
|
||||
strcpy(whoto, msg->To());
|
||||
@ -266,9 +266,9 @@ void GMsgHeaderView::Paint() {
|
||||
window.prints(3, 0, window_color, LNG->To);
|
||||
window.prints(3, CFG->disphdrnameset.pos, ((msg->foundwhere&GFIND_TO) or msg->attr.tou()) ? highlight_color : to_color, whoto);
|
||||
if(not area->isinternet()) {
|
||||
if(not (*msg->ifrom and (*msg->realby or *msg->iorig)))
|
||||
if(area->isecho() or not (*msg->ifrom and (*msg->realby or *msg->iorig)))
|
||||
window.prints(2, CFG->disphdrnodeset.pos, from_color, node1);
|
||||
if(not (*msg->ito and (*msg->realto or *msg->idest)))
|
||||
if(area->isecho() or not (*msg->ito and (*msg->realto or *msg->idest)))
|
||||
window.prints(3, CFG->disphdrnodeset.pos, to_color, node2);
|
||||
}
|
||||
window.prints(2, CFG->disphdrdateset.pos, from_color, date1);
|
||||
|
@ -29,15 +29,18 @@
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#define __GVER_PID__(A,B,C,SIZE) __GVER_PRE##SIZE##NAME__ __GVER_##SIZE##NAME__ __GVER_POST##SIZE##NAME__ __GVER_##SIZE##PLATFORM__ " " \
|
||||
__GVER_PREVERSION__ #A "." #B "." #C __GVER_POSTVERSION__
|
||||
#define __GVER_PID__(A,SIZE) __GVER_PRE##SIZE##NAME__ __GVER_##SIZE##NAME__ __GVER_POST##SIZE##NAME__ __GVER_##SIZE##PLATFORM__
|
||||
#define __GVER_VER__(A,B,C) __GVER_PREVERSION__ #A "." #B "." #C __GVER_POSTVERSION__
|
||||
#define __GVER_SVER__(A,B,C) #A "." #B "." #C
|
||||
|
||||
#define __GVER__(__GVER_MAJOR__,__GVER_MINOR__,__GVER_RELEASE__) \
|
||||
int __gver_major__ = __GVER_MAJOR__; \
|
||||
int __gver_minor__ = __GVER_MINOR__; \
|
||||
int __gver_release__ = __GVER_RELEASE__; \
|
||||
const char* __gver_longpid__ = __GVER_PID__(__GVER_MAJOR__,__GVER_MINOR__,__GVER_RELEASE__,); \
|
||||
const char* __gver_shortpid__ = __GVER_PID__(__GVER_MAJOR__,__GVER_MINOR__,__GVER_RELEASE__,SHORT);
|
||||
const char* __gver_longpid__ = __GVER_PID__(,); \
|
||||
const char* __gver_shortpid__ = __GVER_PID__(,SHORT); \
|
||||
const char* __gver_ver__ = __GVER_VER__(__GVER_MAJOR__,__GVER_MINOR__,__GVER_RELEASE__);
|
||||
const char* __gver_shortver__ = __GVER_SVER__(__GVER_MAJOR__,__GVER_MINOR__,__GVER_RELEASE__);
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@ -74,7 +74,7 @@ void getkeyvaleql(char** key, char** val, bool eql) {
|
||||
// Get straight keyword
|
||||
default:
|
||||
*key = p;
|
||||
while(*p and not isspace(*p)) {
|
||||
while(*p and not isspace(*p) and (*p != ',')) {
|
||||
if(eql and (*p == '='))
|
||||
break;
|
||||
p++;
|
||||
|
Reference in New Issue
Block a user