00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef SYSDEP_H
00012 #define SYSDEP_H
00013
00014 #include "copyright.h"
00015
00016
00017
00018 extern bool PollFile(int fd);
00019
00020
00021
00022 extern int OpenForWrite(char *name);
00023 extern int OpenForReadWrite(char *name, bool crashOnError);
00024 extern void Read(int fd, char *buffer, int nBytes);
00025 extern int ReadPartial(int fd, char *buffer, int nBytes);
00026 extern void WriteFile(int fd, char *buffer, int nBytes);
00027 extern void Lseek(int fd, int offset, int whence);
00028 extern int Tell(int fd);
00029 extern void Close(int fd);
00030 extern bool Unlink(char *name);
00031
00032
00033 extern int OpenSocket();
00034 extern void CloseSocket(int sockID);
00035 extern void AssignNameToSocket(char *socketName, int sockID);
00036 extern void DeAssignNameToSocket(char *socketName);
00037 extern bool PollSocket(int sockID);
00038 extern void ReadFromSocket(int sockID, char *buffer, int packetSize);
00039 extern void SendToSocket(int sockID, char *buffer, int packetSize,char *toName);
00040
00041
00042 extern void Abort();
00043 extern void Exit(int exitCode);
00044 extern void Delay(int seconds);
00045
00046
00047 extern void CallOnUserAbort(VoidNoArgFunctionPtr cleanUp);
00048
00049
00050 extern void RandomInit(unsigned seed);
00051 extern int Random();
00052
00053
00054
00055 extern char *AllocBoundedArray(int size);
00056 extern void DeallocBoundedArray(char *p, int size);
00057
00058
00059
00060 extern "C" {
00061 int atoi(const char *str);
00062 double atof(const char *str);
00063 int abs(int i);
00064
00065 #include <stdio.h>
00066 #include <string.h>
00067 }
00068
00069 #endif // SYSDEP_H
The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees