OpenTTD Source  1.11.0-beta2
unix.cpp File Reference
#include "../../stdafx.h"
#include "../../textbuf_gui.h"
#include "../../openttd.h"
#include "../../crashlog.h"
#include "../../core/random_func.hpp"
#include "../../debug.h"
#include "../../string_func.h"
#include "../../fios.h"
#include "../../thread.h"
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
#include <time.h>
#include <signal.h>
#include <pthread.h>
#include "../../safeguards.h"

Go to the source code of this file.

Functions

bool FiosIsRoot (const char *path)
 
void FiosGetDrives (FileList &file_list)
 
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, const char *last)
 Try to retrieve the current clipboard contents. More...
 
void OSOpenBrowser (const char *url)
 
void SetCurrentThreadName (const char *threadName)
 Name the thread this function is called on for the debugger. More...
 

Detailed Description

Implementation of Unix specific file handling.

Definition in file unix.cpp.

Function Documentation

◆ GetClipboardContents()

bool GetClipboardContents ( char *  buffer,
const char *  last 
)

Try to retrieve the current clipboard contents.

Note
OS-specific function.
Parameters
bufferClipboard content.
lastThe pointer to the last element of the destination buffer
Returns
True if some text could be retrieved.

Definition at line 275 of file unix.cpp.

References strecpy().

◆ SetCurrentThreadName()

void SetCurrentThreadName ( const char *  name)

Name the thread this function is called on for the debugger.

Parameters
nameName to set for the thread..

Definition at line 317 of file unix.cpp.