version 1.1.1.1, 2008/06/03 10:38:50 |
version 1.1.1.1.2.1, 2008/08/13 17:12:42 |
|
|
* SUCH DAMAGE. |
* SUCH DAMAGE. |
*/ |
*/ |
|
|
|
/* |
|
* ball.c - move many balls within screen. |
|
*/ |
|
|
#include <prex/prex.h> |
#include <prex/prex.h> |
#include <sys/ioctl.h> |
|
|
#include <termios.h> |
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
|
|
|
|
|
/* Get screen size */ |
/* Get screen size */ |
device_open("console", 0, &cons); |
device_open("console", 0, &cons); |
if (device_ioctl(cons, TIOCGWINSZ, (u_long)&ws) == 0) { |
if (device_ioctl(cons, TIOCGWINSZ, &ws) == 0) { |
rows = ws.ws_row; |
rows = ws.ws_row; |
cols = ws.ws_col; |
cols = ws.ws_col; |
} else { |
} else { |