Functions

unix.cpp File Reference

Implementation of Unix specific file handling. More...

#include "../../stdafx.h"
#include "../../textbuf_gui.h"
#include "../../openttd.h"
#include "../../crashlog.h"
#include "../../core/random_func.hpp"
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
#include <time.h>
#include <signal.h>

Go to the source code of this file.

Functions

bool FiosIsRoot (const char *path)
void FiosGetDrives ()
bool FiosGetDiskFreeSpace (const char *path, uint64 *tot)
bool FiosIsValidFile (const char *path, const struct dirent *ent, struct stat *sb)
bool FiosIsHiddenFile (const struct dirent *ent)
const char * FS2OTTD (const char *name)
const char * OTTD2FS (const char *name)
void ShowInfo (const char *str)
void ShowOSErrorBox (const char *buf, bool system)
int CDECL main (int argc, char *argv[])
bool GetClipboardContents (char *buffer, size_t buff_len)
 Try to retrive the current clipboard contents.
void CSleep (int milliseconds)
uint GetCPUCoreCount ()
 Get number of processor cores in the system, including HyperThreading or similar.

Detailed Description

Implementation of Unix specific file handling.

Definition in file unix.cpp.


Function Documentation

bool GetClipboardContents ( char *  buffer,
size_t  buff_len 
)

Try to retrive the current clipboard contents.

Note:
OS-specific funtion.
Returns:
True if some text could be retrived.

Definition at line 284 of file unix.cpp.

uint GetCPUCoreCount (  ) 

Get number of processor cores in the system, including HyperThreading or similar.

Returns:
Total number of processor cores.

Definition at line 332 of file unix.cpp.