<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=2756&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Ncurses]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=2756</link>
		<description><![CDATA[The most recent posts in Ncurses.]]></description>
		<lastBuildDate>Mon, 01 Apr 2019 06:24:46 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Ncurses]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15194#p15194</link>
			<description><![CDATA[<p>Ah...<br />Thank you, I will check that.</p>]]></description>
			<author><![CDATA[dummy@example.com (fabien)]]></author>
			<pubDate>Mon, 01 Apr 2019 06:24:46 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15194#p15194</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ncurses]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15153#p15153</link>
			<description><![CDATA[<div class="codebox"><pre><code>~/tmp4c$ cat /etc/devuan_version 
ascii
~/tmp4c$ ls -l
total 4
-rw-r--r-- 1 yeti yeti 1293 Mar 30 23:05 main.c
~/tmp4c$ gcc main.c -lncurses -o main
~/tmp4c$ ls -l
total 16
-rwxr-xr-x 1 yeti yeti 9216 Mar 30 23:14 main
-rw-r--r-- 1 yeti yeti 1293 Mar 30 23:05 main.c</code></pre></div><p>It compiles without errors.<br />Started with </p><div class="codebox"><pre><code>~/tmp4c$ ./main </code></pre></div><p> it runs and I can move the <span class="bbc">P</span> with the arrow keys.</p>]]></description>
			<author><![CDATA[dummy@example.com (yeti)]]></author>
			<pubDate>Sat, 30 Mar 2019 23:21:27 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15153#p15153</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ncurses]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15152#p15152</link>
			<description><![CDATA[<p>Thank you for helping.</p><div class="codebox"><pre class="vscroll"><code>#include &lt;time.h&gt;
#include &lt;ncurses.h&gt;
WINDOW *create_newwin(int h, int l, int y, int x)
{	WINDOW *local_win;

	local_win = newwin(h, l, y, x);
	box(local_win, 0 , 0);		
	wrefresh(local_win);		

	return local_win;
}
int main(int argc, char **argv)
{
	WINDOW *win;
	int x, y, h, l;                          // window
	int px, py;								 // chicken
	int v1x;								 // car 1
	int ch, top = 0;								 
	initscr();	
	cbreak();					
	keypad(stdscr, TRUE);		
	nodelay(stdscr, TRUE);
	curs_set(0);							  
	
	h = 30;
	l = 60 ;
	y = (LINES - h) / 2;		
	x = (COLS - l) / 2;	
	py = 1;
	px = 30;
	v1x = 1;		
	
	while ((ch = getch()) != &#039;q&#039; &amp;&amp; (py != 10 || px != v1x)){                                
		
		if (clock() &gt; top + 10){   
			top = clock();
			win = create_newwin(h, l, y, x);  // car crossing the window
			mvwhline(win, 10, 1, &#039;.&#039;, 58);
			mvwaddch(win, 10, v1x, &#039;V&#039;);
			v1x++;
			if (v1x &gt; 58)
				v1x = 1;
		}

		switch(ch){                            // chicken moves
			case KEY_LEFT:
				px--;
				break;
			case KEY_RIGHT:
				px++;
				
				break;
			case KEY_UP:
				py--;
				break;
			case KEY_DOWN:
				py++;
				break;	
		}

		mvwaddch(win, py, px,&#039;P&#039;);                  
		wrefresh(win);
		mvwaddch(win, py, px,&#039; &#039;);
	}

	endwin();
	return 0;
}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (fabien)]]></author>
			<pubDate>Sat, 30 Mar 2019 23:03:51 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15152#p15152</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ncurses]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15151#p15151</link>
			<description><![CDATA[<p>Where is the code?</p>]]></description>
			<author><![CDATA[dummy@example.com (yeti)]]></author>
			<pubDate>Sat, 30 Mar 2019 22:42:50 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15151#p15151</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ncurses]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15150#p15150</link>
			<description><![CDATA[<div class="quotebox"><cite>ralph.ronnquist wrote:</cite><blockquote><div><p>You do know how to leave an audience guessing <img src="https://dev1galaxy.org/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>Perhaps you should test the waters at the freenode IRC #devuan as well, to increase the chances of running into someone else doing C with <span class="bbc">ncurses</span> on both freebsd and devuan. It might be a more select group than this one.</p></div></blockquote></div><p>I hope I wasn&#039;t rude.</p><p>Thank you I will try that too <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (fabien)]]></author>
			<pubDate>Sat, 30 Mar 2019 22:16:24 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15150#p15150</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ncurses]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15149#p15149</link>
			<description><![CDATA[<div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><p>I have no experience with ncurses.</p><p>You say &quot;the program compile just fine&quot;, just to make sure - you did compile it on Devuan?</p><p>How are you running it, from a terminal?&#160; Are any error messages displayed in the terminal?&#160; </p><p>If you are sure its running, and there are no errors anywhere, then I would add printf&#039;s in your code to see where your program is at runtime:</p><div class="codebox"><pre><code>printf(&quot;HERE 1.\n&quot;);
...
printf(&quot;HERE 2.\n&quot;);
...</code></pre></div></div></blockquote></div><p>Hi, i did compile it on Devuan using Geany.</p><p>There is no error message.</p><p>I will try your tip, thank you! I should of do it already, i am afraid i am a bit slow&#160; <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Thank you!</p>]]></description>
			<author><![CDATA[dummy@example.com (fabien)]]></author>
			<pubDate>Sat, 30 Mar 2019 22:11:17 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15149#p15149</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ncurses]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15148#p15148</link>
			<description><![CDATA[<p>You do know how to leave an audience guessing <img src="https://dev1galaxy.org/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>Perhaps you should test the waters at the freenode IRC #devuan as well, to increase the chances of running into someone else doing C with <span class="bbc">ncurses</span> on both freebsd and devuan. It might be a more select group than this one.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Sat, 30 Mar 2019 21:58:18 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15148#p15148</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ncurses]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15147#p15147</link>
			<description><![CDATA[<p>I have no experience with ncurses.</p><p>You say &quot;the program compile just fine&quot;, just to make sure - you did compile it on Devuan?</p><p>How are you running it, from a terminal?&#160; Are any error messages displayed in the terminal?&#160; </p><p>If you are sure its running, and there are no errors anywhere, then I would add printf&#039;s in your code to see where your program is at runtime:</p><div class="codebox"><pre><code>printf(&quot;HERE 1.\n&quot;);
...
printf(&quot;HERE 2.\n&quot;);
...</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (dxrobertson)]]></author>
			<pubDate>Sat, 30 Mar 2019 21:57:32 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15147#p15147</guid>
		</item>
		<item>
			<title><![CDATA[Re: Ncurses]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15145#p15145</link>
			<description><![CDATA[<p>Hi,</p><p>Sorry to insist, nobody?</p>]]></description>
			<author><![CDATA[dummy@example.com (fabien)]]></author>
			<pubDate>Sat, 30 Mar 2019 21:22:54 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15145#p15145</guid>
		</item>
		<item>
			<title><![CDATA[Ncurses]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15064#p15064</link>
			<description><![CDATA[<p>Hello!</p><p>I am trying to learn a bit C (only for fun), and I wrote a little code with ncurses.</p><p>It works on FreeBSD, but I can&#039;t run it on DEVUAN. </p><p>libncurses5-dev and libncursesw5-dev are installed, the program compile just fine but nothing shows up in the terminal.</p><p>Is somebody knows what I am talking about?</p><p>Merci.</p><p>Fabien</p>]]></description>
			<author><![CDATA[dummy@example.com (fabien)]]></author>
			<pubDate>Mon, 25 Mar 2019 19:23:39 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15064#p15064</guid>
		</item>
	</channel>
</rss>
