<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <atom:link href="https://smaugmuds.afkmods.com/index.php?a=rssfeed&amp;t=4800" rel="self" type="application/rss+xml" />
  <title>SmaugMuds - Topic: Pager Output Problems</title>
  <link>https://smaugmuds.afkmods.com/index.php?a=rssfeed&amp;t=4800</link>
  <description>The largest Smaug community resource site. - </description>
  <language>en</language>
  <generator>SmaugMuds</generator>
  <ttl>60</ttl>
  <item>
   <title>Pager Output Problems</title>
   <link>https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23562#p23562</link>
   <description>One less problem :P [code]      case &#039;b&#039;: start = this-&amp;gt;pageindex - ( pclines * 2 ); end = this-&amp;gt;pageindex - ( pclines + 2 ); break;[/code] Strangely that seems to have fixed the B command. Not off to find my color bleeder.... ... and I found that too. The difference between if( ch-&amp;gt;desc ) and if( !ch-&amp;gt;desc ) is rather important :P</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23562#p23562</guid>
   <pubDate>Fri, 5 Dec 2014 01:01:23 CST</pubDate>
   <category>AFKMud Support &amp; Development</category>
   <author>nobody@example.com (Samson)</author>
  </item>
  <item>
   <title>Pager Output Problems</title>
   <link>https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23561#p23561</link>
   <description>I tried yours, but it never paused at the page breaks, although it seemed to be doing them in the right places. That said, I had also been working on this in the meantime and have this now: [codebox]bool descriptor_data::pager_output(  ) { char_data *ch; int pclines; size_t start, end; bool ret; if( !this || this-&amp;gt;pagebuf.empty(  ) || this-&amp;gt;pagecmd == -1 ) return true; ch = this-&amp;gt;original ? this-&amp;gt;original : this-&amp;gt;character; pclines = umax( ch-&amp;gt;pcdata-&amp;gt;</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23561#p23561</guid>
   <pubDate>Thu, 4 Dec 2014 19:43:41 CST</pubDate>
   <category>AFKMud Support &amp; Development</category>
   <author>nobody@example.com (Samson)</author>
  </item>
  <item>
   <title>Pager Output Problems</title>
   <link>https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23560#p23560</link>
   <description>Heh, yeah you&#039;re right on the UMAX thing... reading it backwards.  Sorry. :) I&#039;m just thinking in terms of what you want the pager to accomplish. Paged output gets queued up as lines of text, to be output to the user a &amp;quot;page&amp;quot; at a time, giving them the option to move up or down, abort the display early, or dump it all out at once. Therefore, all you really need to know is: What line is the current top-of-page for the user? What pager command did they issue last? How many lines fit</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23560#p23560</guid>
   <pubDate>Thu, 4 Dec 2014 18:48:28 CST</pubDate>
   <category>AFKMud Support &amp; Development</category>
   <author>nobody@example.com (Quixadhal)</author>
  </item>
  <item>
   <title>Pager Output Problems</title>
   <link>https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23559#p23559</link>
   <description>So are you saying dump all this stuff where it figures out where start is and just have the switch statement do it itself? Also, changing to UMIN broke it. It was only spitting out 5 lines at a time.</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23559#p23559</guid>
   <pubDate>Thu, 4 Dec 2014 16:35:46 CST</pubDate>
   <category>AFKMud Support &amp; Development</category>
   <author>nobody@example.com (Samson)</author>
  </item>
  <item>
   <title>Pager Output Problems</title>
   <link>https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23558#p23558</link>
   <description>[code] pclines = UMAX( ch-&amp;gt;pcdata-&amp;gt;pagerlen, 5 ) - 1; [/code] Why?  wouldn&#039;t you normally want to show pagerlen lines at a time?  Maybe -1 for the prompt?  I bet that really should be UMIN(), not UMAX(). [code] switch mess... [/code] I would probably make the default case just set start to be pageindex, and end to be pageindex + pclines, and then after displaying the set of lines in question, move pageindex to pageindex + pclines.  That way the default paging action will display N l</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23558#p23558</guid>
   <pubDate>Thu, 4 Dec 2014 12:00:20 CST</pubDate>
   <category>AFKMud Support &amp; Development</category>
   <author>nobody@example.com (Quixadhal)</author>
  </item>
  <item>
   <title>Pager Output Problems</title>
   <link>https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23557#p23557</link>
   <description>May help to post the function: [code]bool descriptor_data::pager_output(  ) { char_data *ch; int pclines, start, end; register int lines; bool ret; if( !this || this-&amp;gt;pagebuf.empty(  ) || this-&amp;gt;pagecmd == -1 ) return true; ch = this-&amp;gt;original ? this-&amp;gt;original : this-&amp;gt;character; pclines = UMAX( ch-&amp;gt;pcdata-&amp;gt;pagerlen, 5 ) - 1; switch ( LOWER( this-&amp;gt;pagecmd ) ) { default: lines = 0; break; case &#039;b&#039;: lines = </description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23557#p23557</guid>
   <pubDate>Thu, 4 Dec 2014 04:16:13 CST</pubDate>
   <category>AFKMud Support &amp; Development</category>
   <author>nobody@example.com (Samson)</author>
  </item>
  <item>
   <title>Pager Output Problems</title>
   <link>https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23556#p23556</link>
   <description>Not sure about the way SmaugFUSS does pagers, but I can offer the way I changed WileyMUD&#039;s pager to be more sensible.... Instead of futzing around with string pointers from hell, in WileyMUD, i just changed the system so it keeps an array of lines.  Whenever there&#039;s a line break in the pager output (usually via pager_printf), I NULL terminate the current line string and start a new one. Then, on paged output to the socket, I simply emit lines N to M, with CRLF appended to each, followed by</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23556#p23556</guid>
   <pubDate>Thu, 4 Dec 2014 01:28:38 CST</pubDate>
   <category>AFKMud Support &amp; Development</category>
   <author>nobody@example.com (Quixadhal)</author>
  </item>
  <item>
   <title>Pager Output Problems</title>
   <link>https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23555#p23555</link>
   <description>Working up to another update release, but I&#039;ve got at least one set of problems I&#039;d like to get worked out before that happens: https://github.com/Arthmoor/AFKMud/issues/11 The pager_output() code in descriptor.cpp has several issues: It bleeds color after the prompt. It repeats the last line it just showed you before resuming. The &amp;quot;N&amp;quot; prompt does not work. Using the &amp;quot;R&amp;quot; prompt refreshes but loses one line each time this is done. Using the &amp;quot;B&amp;quot; prompt goes back 1 les</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/pager-output-problems-4800/&amp;p=23555#p23555</guid>
   <pubDate>Wed, 3 Dec 2014 23:26:44 CST</pubDate>
   <category>AFKMud Support &amp; Development</category>
   <author>nobody@example.com (Samson)</author>
  </item>
 </channel>
</rss>
