Bug 509288 (long-prompt) - Prompts longer than the width of the terminal are not properly matched by #prompt.
Summary: Prompts longer than the width of the terminal are not properly matched by #pr...
Keywords:
Status: CLOSED ERRATA
Alias: long-prompt
Product: Fedora
Classification: Fedora
Component: powwow
Version: 11
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: Kalev Lember
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-02 03:19 UTC by Tomáš Windsor
Modified: 2009-09-06 20:42 UTC (History)
1 user (show)

Fixed In Version: 1.2.16-1.fc10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-06 20:40:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch: match prompts longer than terminal width (1.23 KB, patch)
2009-08-06 18:51 UTC, Kalev Lember
no flags Details | Diff
updated patch to fix long prompt matching (771 bytes, patch)
2009-08-07 10:07 UTC, Kalev Lember
no flags Details | Diff

Description Tomáš Windsor 2009-07-02 03:19:20 UTC
Description of problem:
Prompts longer than the width of the terminal are not properly matched by #prompt.

Version-Release number of selected component (if applicable):
1.2.15-1.fc11

How reproducible:
Always.

Steps to Reproduce:
1. define #prompt that matches all MUME prompts
2. connect to MUME and get a long enough prompt (e.g. through labelled charmies) in gameplay
  
Actual results:
Defined #prompt doesn't trigger on the long prompt.

Expected results:
Defined #prompt triggers on the long prompt.

Additional info:
In earlier versions of powwow, I've been using special patch for this, which might have some side effects though (yet I didn't see any); here it is:
--- main.c.orig 2005-10-22 01:21:48.000000000 +0200
+++ main.c      2006-01-24 15:05:44.000000000 +0100
@@ -693,7 +693,7 @@
      * match #prompts. They usually have no #print, so we print manually
      * if islast is not set and a #prompt matches.
      */
-    if ((is_iac_prompt || islast || printstrlen(linestart) < cols) &&
+    if (/*(is_iac_prompt || islast || printstrlen(linestart) < cols) && */
        ((search_prompt(linestart, 1) && surely_isprompt) || is_iac_prompt)) {
 
        char *reprint;

Comment 1 Kalev Lember 2009-07-09 13:46:56 UTC
Does the problem go away if you do "#request prompt"?

Comment 2 Tomáš Windsor 2009-07-10 01:12:14 UTC
No, it does not.

Comment 3 Tomáš Windsor 2009-08-03 19:44:10 UTC
Problem actually goes away after "#request prompt", but one must not use mmapper2. With mmapper2 it doesn't go away even then.

But anyway, this is just a workaround which doesn't happen to work when other software is used. The original bug is still there. (It should work even without #request prompt)

Comment 4 Kalev Lember 2009-08-06 18:51:29 UTC
Created attachment 356570 [details]
patch: match prompts longer than terminal width

Comment 5 Kalev Lember 2009-08-06 18:53:22 UTC
Please test the attached patch, it should properly fix the issue.

Comment 6 Kalev Lember 2009-08-07 10:07:08 UTC
Created attachment 356631 [details]
updated patch to fix long prompt matching

I had missed a case with IAC end-of-prompt marker. However, now the patch is down to oneliner.

Comment 7 Fedora Update System 2009-08-07 10:26:16 UTC
powwow-1.2.15-3.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/powwow-1.2.15-3.fc11

Comment 8 Fedora Update System 2009-08-07 10:26:21 UTC
powwow-1.2.15-3.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/powwow-1.2.15-3.fc10

Comment 9 Fedora Update System 2009-08-08 19:21:21 UTC
powwow-1.2.15-3.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update powwow'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-8368

Comment 10 Fedora Update System 2009-08-08 19:33:11 UTC
powwow-1.2.15-3.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update powwow'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8408

Comment 11 Tomáš Windsor 2009-08-09 14:44:03 UTC
Long prompts now work correctly, but occasionally some of the prompts (witnessed on 2 short prompts so far) don't get matched against the defined #prompts. It happens very rarely though, and so far I've not been able to identify a common pattern.

Comment 12 Fedora Update System 2009-09-01 21:04:54 UTC
powwow-1.2.16-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/powwow-1.2.16-1.fc10

Comment 13 Fedora Update System 2009-09-01 21:04:59 UTC
powwow-1.2.16-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/powwow-1.2.16-1.fc11

Comment 14 Fedora Update System 2009-09-03 00:30:39 UTC
powwow-1.2.16-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update powwow'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9237

Comment 15 Fedora Update System 2009-09-03 00:32:28 UTC
powwow-1.2.16-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update powwow'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-9245

Comment 16 Fedora Update System 2009-09-06 20:40:30 UTC
powwow-1.2.16-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2009-09-06 20:42:31 UTC
powwow-1.2.16-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.