project_files/hwc/rtl/SysUtils.h
author unc0rr
Sat, 27 Dec 2014 22:09:31 +0300
branch0.9.21
changeset 10721 9b789de8e5df
parent 10564 0cb20aa8877a
child 14913 68e1783762bc
permissions -rw-r--r--
Workaround bug (each time losing room master status, even when joining mutliple rooms, new instance of NetAmmoSchemeModel created, receiving schemeConfig and modifying its 43rd member, thus the last model which accepts this signal has the string cut down several times, workaround creates copy of qstringlist to avoid modifying shared message instance. Proper fix would delete unneeded instances of NetAmmoSchemeModel, but who cares)

#ifndef _FPCRTL_SYSUTILS_H_
#define _FPCRTL_SYSUTILS_H_

#include "Types.h"

// EFFECTS: return the current date time in pascal notation
//          http://www.merlyn.demon.co.uk/del-prgg.htm#TDT
TDateTime   fpcrtl_now();
#define     now                     fpcrtl_now
#define     Now                     fpcrtl_now

// EFFECTS: return the current time
//          http://www.merlyn.demon.co.uk/del-prgg.htm#TDT
TDateTime   fpcrtl_time();


// EFFECTS: return the current date
//          http://www.merlyn.demon.co.uk/del-prgg.htm#TDT
TDateTime   fpcrtl_date();
#define     date                    fpcrtl_date
#define     Date                    fpcrtl_date

// EFFECTS: Trim strips blank characters (spaces) at the beginning and end of S
// and returns the resulting string. Only #32 characters are stripped.
// If the string contains only spaces, an empty string is returned.
string255   fpcrtl_trim(string255 s);
#define     trim                    fpcrtl_trim
#define     Trim                    fpcrtl_trim

Integer     fpcrtl_strToInt(string255 s);
#define     StrToInt                fpcrtl_strToInt
#define     strToInt                fpcrtl_strToInt

string255   fpcrtl_extractFileDir(string255 f);
#define     fpcrtl_ExtractFileDir  fpcrtl_extractFileDir

string255   fpcrtl_extractFileName(string255 f);
#define     fpcrtl_ExtractFileName  fpcrtl_extractFileName

string255   fpcrtl_strPas(PChar);
#define     fpcrtl_StrPas           fpcrtl_strPas


#endif