Added sources of the following games: bnc, checkers, fara, FindNumbers, gomoku, reversi, rforces, sq_game, sudoku, whowtbam, xonix.
git-svn-id: svn://kolibrios.org@1805 a494cfbc-eb01-0410-851d-a64ba20cac60
2011-01-30 13:48:08 +03:00
|
|
|
#ifndef _HEADER_SYSTEM_PROCESS_H
|
|
|
|
#define _HEADER_SYSTEM_PROCESS_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
2014-09-15 13:42:01 +04:00
|
|
|
#if defined _KOLIBRI
|
|
|
|
# define DIR_SEPARATOR ('/')
|
|
|
|
inline long GetProcessId() {return 0;}
|
|
|
|
inline long DuplicateProcess() {return -1;}
|
|
|
|
inline int random(int m) {return ((unsigned long)rand()) % m;}
|
|
|
|
inline void randomize() {srand(__menuet__getsystemclock());}
|
|
|
|
#elif defined __GNUC__
|
Added sources of the following games: bnc, checkers, fara, FindNumbers, gomoku, reversi, rforces, sq_game, sudoku, whowtbam, xonix.
git-svn-id: svn://kolibrios.org@1805 a494cfbc-eb01-0410-851d-a64ba20cac60
2011-01-30 13:48:08 +03:00
|
|
|
# include <unistd.h>
|
|
|
|
# define DIR_SEPARATOR ('/')
|
|
|
|
inline long GetProcessId() {return (long)getpid();}
|
|
|
|
inline long DuplicateProcess() {return (long)fork();}
|
|
|
|
inline int random(int m) {return ((unsigned long)rand()) % m;}
|
|
|
|
inline void randomize() {srand(time(0));}
|
2014-09-15 13:42:01 +04:00
|
|
|
#elif defined __TURBOC__
|
Added sources of the following games: bnc, checkers, fara, FindNumbers, gomoku, reversi, rforces, sq_game, sudoku, whowtbam, xonix.
git-svn-id: svn://kolibrios.org@1805 a494cfbc-eb01-0410-851d-a64ba20cac60
2011-01-30 13:48:08 +03:00
|
|
|
# include <process.h>
|
|
|
|
# define DIR_SEPARATOR ('\\')
|
|
|
|
inline long GetProcessId() {return (long)getpid();}
|
|
|
|
inline long DuplicateProcess() {return -1;}
|
|
|
|
#else
|
|
|
|
# define DIR_SEPARATOR ('\\')
|
|
|
|
inline long GetProcessId() {return 0;}
|
|
|
|
inline long DuplicateProcess() {return -1;}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif //_HEADER_SYSTEM_PROCESS_H
|