Changeset c594489 in mainline for tetris/tetris.c


Ignore:
Timestamp:
2006-05-31T18:54:25Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ad123964
Parents:
1c20e22
Message:

More things to make tetris helenos compatibile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tetris/tetris.c

    r1c20e22 rc594489  
    4646 */
    4747
    48 #include <sys/param.h>
     48//#include <sys/param.h>
    4949#include <sys/time.h>
    5050#include <sys/types.h>
     
    152152        return (tmp);
    153153}
    154        
     154
     155static void srandomdev(void)
     156{
     157        struct timeval tv;
     158
     159        gettimeofday(&tv, NULL);
     160        srandom(tv.tv_sec + tv.tv_usec / 100000);
     161}
    155162
    156163int
     
    217224                }
    218225                if (keys[i] == ' ')
    219                         strlcpy(key_write[i], "<space>", sizeof key_write[i]);
     226                        strncpy(key_write[i], "<space>", sizeof key_write[i]);
    220227                else {
    221228                        key_write[i][0] = keys[i];
     
    292299                                scr_msg(key_msg, 0);
    293300                                scr_msg(msg, 1);
    294                                 (void) fflush(stdout);
     301//                              (void) fflush(stdout);
    295302                        } while (rwait((struct timeval *)NULL) == -1);
    296303                        scr_msg(msg, 0);
Note: See TracChangeset for help on using the changeset viewer.