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 11:48:08 +01:00
|
|
|
#ifndef _HEADER_SYSTEM_PROCESS_H
|
|
|
|
#define _HEADER_SYSTEM_PROCESS_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
2014-09-15 11:42:01 +02: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;}
|
2021-01-02 19:12:08 +01:00
|
|
|
inline void randomize() {srand(time(0));}
|
2014-09-15 11:42:01 +02:00
|
|
|
#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 11:48:08 +01: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 11:42:01 +02: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 11:48:08 +01: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
|