-
-}
-
-void Sys_Warn (char *warning, ...)
-{
- va_list argptr;
- char string[1024];
-
- va_start (argptr,warning);
- vsprintf (string,warning,argptr);
- va_end (argptr);
- fprintf(stderr, "Warning: %s", string);
-}
-
-/*
-============
-Sys_FileTime
-
-returns -1 if not present
-============
-*/
-int Sys_FileTime (char *path)
-{
- struct stat buf;
-
- if (stat (path,&buf) == -1)
- return -1;
-
- return buf.st_mtime;
-}
-
-
-void Sys_mkdir (char *path)
-{
- mkdir (path, 0777);
-}
-
-int Sys_FileOpenRead (char *path, int *handle)
-{
- int h;
- struct stat fileinfo;
-
- h = open (path, O_RDONLY, 0666);
- *handle = h;
- if (h == -1)
- return -1;
-
- if (fstat (h,&fileinfo) == -1)
- Sys_Error ("Error fstating %s", path);
-
- return fileinfo.st_size;
-}
-
-int Sys_FileOpenWrite (char *path)
-{
- int handle;
-
- umask (0);
-
- handle = open(path,O_RDWR | O_CREAT | O_TRUNC, 0666);
-
- if (handle == -1)
- {
- Con_Printf("Sys_FileOpenWrite: Error opening %s: %s", path, strerror(errno));
- return 0;
- }
-
- return handle;
-}
-
-int Sys_FileWrite (int handle, void *src, int count)
-{
- return write (handle, src, count);
-}
-
-void Sys_FileClose (int handle)
-{
- close (handle);