<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Curses and C standard functions in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/curses-and-c-standard-functions/m-p/2946805#M114906</link>
    <description>Hi Ajay,&lt;BR /&gt;&lt;BR /&gt;"curses" minimizes the amount of characters/bytes sent to the terminal, it does not minimize the amount of CPU time.&lt;BR /&gt;But as it was designed and coded back in the days when a user was supposed to use only dozens or hundreds of KB (kilo!) of virtual address space, and to run on the slow CPUs of those times, it won't be any burden for today's systems.&lt;BR /&gt;"fprintf" can confuse "curses", but only if it is sent the same terminal (window). And in that case I would prefer the "curses" routines, anyway - since you ARE already using those!&lt;BR /&gt;I do not see any point in using "curses" to some degree, and do something else to some other degree, and then have the need to "touchwin()" every now and then to keep both in sync.&lt;BR /&gt;If you need to learn programming "curses", there is a very small/thin O'Reilly book about it, or you might find Marc Rochkind's programming book in your company's library, already.&lt;BR /&gt;&lt;BR /&gt;FWIW,&lt;BR /&gt;Wodisch</description>
    <pubDate>Wed, 09 Apr 2003 16:40:53 GMT</pubDate>
    <dc:creator>Wodisch</dc:creator>
    <dc:date>2003-04-09T16:40:53Z</dc:date>
    <item>
      <title>Curses and C standard functions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/curses-and-c-standard-functions/m-p/2946801#M114902</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We have a series of curses functions used  in our application. We have noticed that, in between these curses functions, some of the standard C functions like 'fprint' are also used.&lt;BR /&gt;&lt;BR /&gt;Can this affect the performance of the application? If so, what are the possible consequences?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;Ajay</description>
      <pubDate>Wed, 09 Apr 2003 05:20:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/curses-and-c-standard-functions/m-p/2946801#M114902</guid>
      <dc:creator>CD Ajaykumar</dc:creator>
      <dc:date>2003-04-09T05:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Curses and C standard functions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/curses-and-c-standard-functions/m-p/2946802#M114903</link>
      <description>&lt;BR /&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;If the use fo fprint does not cause your screen to be messed up  I would not worry.&lt;BR /&gt;I do not think the  curses  routines were&lt;BR /&gt;written for performance, but rather to hide from the programmer&lt;BR /&gt;the various  screen-spesific  command-sequences that must be used to postition cursor, write  in reverse vidoe etc.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Olav</description>
      <pubDate>Wed, 09 Apr 2003 05:55:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/curses-and-c-standard-functions/m-p/2946802#M114903</guid>
      <dc:creator>Olav Baadsvik</dc:creator>
      <dc:date>2003-04-09T05:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Curses and C standard functions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/curses-and-c-standard-functions/m-p/2946803#M114904</link>
      <description>I concur with Olav.  C print statements are extremely fast, much faster than curses routines.  Unless it messes up the display(usually caused by curses functions that are not closed) it will actually give better performance than the curses routines.&lt;BR /&gt;&lt;BR /&gt;Also, some of these print statements may be required to get user input to the application.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Shannon</description>
      <pubDate>Wed, 09 Apr 2003 11:59:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/curses-and-c-standard-functions/m-p/2946803#M114904</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2003-04-09T11:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Curses and C standard functions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/curses-and-c-standard-functions/m-p/2946804#M114905</link>
      <description>It is normally a bad idea to mix printf()'s,putchar()'s, etc. with curses output - at least to the same device. The problem is that curses keeps an idea of what the current screen is and what its window (buffer) is. If the process also write with a printf then curses has no idea that this has happened and the screen contents are very likely to be garbaged. If you must do this then the correct sequence is to do a touchwin() before any additional curses output. Touchwin() causes curses to "forget" everything about a window so that the next refresh will re-display the entire screen.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Note that output to other devices and files that are not under curses is perfectly okay.&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Apr 2003 12:58:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/curses-and-c-standard-functions/m-p/2946804#M114905</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-04-09T12:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Curses and C standard functions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/curses-and-c-standard-functions/m-p/2946805#M114906</link>
      <description>Hi Ajay,&lt;BR /&gt;&lt;BR /&gt;"curses" minimizes the amount of characters/bytes sent to the terminal, it does not minimize the amount of CPU time.&lt;BR /&gt;But as it was designed and coded back in the days when a user was supposed to use only dozens or hundreds of KB (kilo!) of virtual address space, and to run on the slow CPUs of those times, it won't be any burden for today's systems.&lt;BR /&gt;"fprintf" can confuse "curses", but only if it is sent the same terminal (window). And in that case I would prefer the "curses" routines, anyway - since you ARE already using those!&lt;BR /&gt;I do not see any point in using "curses" to some degree, and do something else to some other degree, and then have the need to "touchwin()" every now and then to keep both in sync.&lt;BR /&gt;If you need to learn programming "curses", there is a very small/thin O'Reilly book about it, or you might find Marc Rochkind's programming book in your company's library, already.&lt;BR /&gt;&lt;BR /&gt;FWIW,&lt;BR /&gt;Wodisch</description>
      <pubDate>Wed, 09 Apr 2003 16:40:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/curses-and-c-standard-functions/m-p/2946805#M114906</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2003-04-09T16:40:53Z</dc:date>
    </item>
  </channel>
</rss>

