TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Missing \e[0m on OSX Terminal and iTerm

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
prozach



Joined: 16 Aug 2016
Posts: 5

PostPosted: Tue Sep 13, 2016 7:03 pm    Post subject: Missing \e[0m on OSX Terminal and iTerm Reply with quote

Ok, so I run TinTin++ on both OSX using iTerm (although I've tried using Terminal as well and see the same issue).

When playing it's as if the line ending \e[0m is being stripped causing colors to bleed over across lines and such.

When I play in Cygwin on a windows machine I don't get this same behavior. I'm using the exact same config in both instances (dropbox has my config and script files and the same folder is used in both instances.

As an example when I do #config convert on here is what I see.

Windows/Cygwin:

Code:
\e[0;36;40man intense stench!\e[0m
\e[0;36;40m\e[40m\e[0m\e[0m\e[0m\e[36m\e[40mYour blisters do 20 damage.\e[0m
\e[0mS:14 D:857\e[0m0m\e[0m
\e[0m\e[0m\e[31m\e[40m\e[1m-=->Warrior swings, but you dodge.\e[0m\e[0m
\e[0m\e[40m\e[0m\e[0m\e[31m\e[40m\e[1m-=->Warrior swings, but you dodge.\e[0m\e[0m
\e[0m\e[40m\e[0m\e[0m\e[31m\e[40m\e[1m-=->Warrior swings, but you dodge.\e[0m\e[0m
\e[0m\e[40m\e[0m\e[0m\e[31m\e[40m\e[1m-=->Warrior swings, but you dodge.\e[0m\e[0m
\e[0m\e[0m\e[35m\e[40m\e[1mYour bracers allow you to perform an extra attack!\e[0m\e[0m
\e[0;1;35;40m\e[40m\e[0m\e[0m\e[33m\e[41m\e[1m\e[0m
\e[0;1;33;41mFlames fly everywhere as Flamesword strikes!\e[0m
\e[0;1;33;41m\e[40m\e[0m\e[0m\e[33m\e[41m\e[1m\e[0m
\e[0;1;33;41mYou're burned by Flamesword's flaming aura!\e[0m
\e[0;1;33;41m\e[40m\e[0m\e[0m\e[31m\e[43m\e[1m\e[0m
\e[0;1;31;43mWarrior is engulfed in flames!\e[0m


OSX iTerm/Terminal:

Code:
\e[0m#CONFIG {CONVERT META} HAS BEEN SET TO {ON}.\e[0m
\e[0m\e[0;37mk\e[0m\e[0m
\e[0m\e[0m\e[32m\e[40m\e[1mYou ATTACK Bandit.
\e[0;1;32;40m\e[40m\e[0m\e[0m\e[33m\e[41m\e[1m
\e[0;1;33;41mFlames fly everywhere as Flamewhip strikes!
\e[0;1;33;41m\e[40m\e[0m\e[0m\e[33m\e[41m\e[1m
\e[0;1;33;41mFlamewhip's flaming aura doesn't hurt you!
\e[0;1;33;41m\e[40m\e[0m\e[0m\e[31m\e[43m\e[1m
\e[0;1;31;43mBandit is engulfed in flames!
\e[0;1;31;43m\e[40m\e[0m\e[0m\e[0m\e[33m\e[40m>>->You hit bandit. [432]\e[0m
\e[0mS:1 D:432\e[0m
\e[0m\e[40m\e[0m\e[0mYou killed Bandit.


I have color patch turned on in both cases as well as a packet patch setting of 0.5.

I was thinking about adding something like this action to add the esc sequence back in but would rather just not have it stripped by default.

Code:
#action {^%*$}
{
   #line gag;
   #regex {%0} {^%*\e[0m$} {#showme {%0}} {#showme {%0\e[0m}};
}


Any ideas?
Back to top
View user's profile Send private message Yahoo Messenger
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Wed Sep 14, 2016 10:21 am    Post subject: Reply with quote

Maybe it's a historical oddity but wasn't Apple the people who decided to end their lines of text with just a '\r' - ah ha they used to but don't nowadays...! Cool

Is there something that puts a '\n' at the end of a line without one (as might be the case on a {mis-configured?} MacOS setup) and is that clobbering the SGR reset code that is "\e[0m" that would also be "at the end of each line" for the combination of circumstances that apply in you system - this is pure conjecture and is probably well off track but I'm tossing it out there in the absence of anyone running a debugger on the TinTin++ code on a Mac? Confused

Interesting to note that some lines on the Cygwin have TWO reset codes on the end of some lines and that (I guess) for THOSE lines ONE of them does seem to be getting through in the MacOS case - humm, that sounds like an off-by-one error in something that is parsing the elements in the incoming line that takes out the ANSI Escape codes. Wink
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Tue Sep 20, 2016 9:51 pm    Post subject: Reply with quote

Output should be exactly the same, so you might be running different tt++ versions.
Back to top
View user's profile Send private message Send e-mail
prozach



Joined: 16 Aug 2016
Posts: 5

PostPosted: Sat Oct 01, 2016 7:01 pm    Post subject: Reply with quote

Oh interesting! I'll check.

What's the command to check the version of the binary?

BTW, I am getting this from the tintin download page:

An error has been encountered in accessing this page.

1. Server: tintin.sourceforge.net
2. URL path: /download/
3. Error notes: NONE
4. Error type: 403
5. Request method: GET
6. Request query string: NONE
7. Time: 2016-10-01 23:59:42 UTC (1475366382)
Back to top
View user's profile Send private message Yahoo Messenger
prozach



Joined: 16 Aug 2016
Posts: 5

PostPosted: Sat Oct 01, 2016 8:40 pm    Post subject: Reply with quote

Ok, it appears I was running 2.01.0 on my mac, but windows/cygwin had 2.01.1. I'm attempting to compile the latest version and I'm getting this error when I run make after configruing:

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [tt++] Error 1
Back to top
View user's profile Send private message Yahoo Messenger
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Oct 02, 2016 11:08 am    Post subject: Reply with quote

I think the compilation problem was fixed in the beta.

http://tintin.sf.net/download/tintin-beta.tar.gz
Back to top
View user's profile Send private message Send e-mail
prozach



Joined: 16 Aug 2016
Posts: 5

PostPosted: Sun Oct 02, 2016 5:45 pm    Post subject: Reply with quote

The beta gave me the same error when I attempted to compile it.

However, a friend with a mac sent me a compiled version of tt++ (latest beta) and it not only worked but resolved the color overflow issues!

Thanks for the tip.
Back to top
View user's profile Send private message Yahoo Messenger
prozach



Joined: 16 Aug 2016
Posts: 5

PostPosted: Tue Oct 04, 2016 9:09 am    Post subject: Reply with quote

Just an FYI, the beta compiles fine now. I found some older bad installs of things that I replaced and now life is good.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group