/usr/include/falcon/sys.h is in falconpl-dev 0.9.6.9-git20120606-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | /*
FALCON - The Falcon Programming Language.
FILE: flc_sys.h
System related services.
-------------------------------------------------------------------
Author: Giancarlo Niccolai
Begin: mar nov 9 2004
-------------------------------------------------------------------
(C) Copyright 2004: the FALCON developers (see list in AUTHORS file)
See LICENSE file for licensing details.
*/
/** \file
System related services.
*/
#ifndef flc_flc_sys_H
#define flc_flc_sys_H
#include <falcon/types.h>
#include <falcon/dir_sys.h>
#include <falcon/time_sys.h>
namespace Falcon {
class String;
namespace Sys {
/** Gives current second count from Epoch.
The number of seconds is generally returned in GMT, if this
feature is available in the system.
\return a float nubmer, where decimals are up to milliseconds.
*/
FALCON_DYN_SYM numeric _seconds();
/** Gives current second count from Epoch in localtime.
The number of seconds is generally returned in localtime, if this
feature is available in the system.
\return a float nubmer, where decimals are up to milliseconds.
*/
FALCON_DYN_SYM numeric _localSeconds();
/** Returns a counter representing a time entity.
This is a direct interface to the fastest possible
function the hosts systems has to provide a millisecond
counter. The "0" moment is undefined (it may be the start
of the program, the last reboot time or epoch), and the
resolution of the calls are limited to what the system
provides, but it is granted that calling _milliseconds()
at T1 > T0 will result in the return value of the second
call being greater or equal than the first. The difference
between the two numbers express the number of milliseconds
roughly elapsed between the two calls.
\return millisecond counter value.
*/
FALCON_DYN_SYM uint32 _milliseconds();
/** Returns a valid and possibly unique temporary file name.
Just a haky test for now, final version must OPEN the stream and return it.
\param res on return will contain a to C stringed filename.
*/
FALCON_DYN_SYM void _tempName( ::Falcon::String &res );
FALCON_DYN_SYM bool _describeError( int64 eid, String &target );
FALCON_DYN_SYM int64 _lastError();
FALCON_DYN_SYM bool _getEnv( const String &var, String &result );
FALCON_DYN_SYM bool _setEnv( const String &var, const String &value );
FALCON_DYN_SYM bool _unsetEnv( const String &var );
/** Returns seconds since epoch.
Used in many systems.
*/
FALCON_DYN_SYM int64 _epoch();
/** Callback for environment variable enumeration.
\see _enumerateEnvironment
*/
typedef void(*EnvStringCallback)( const String& key, const String& value, void* cbData );
/** Gets all the environemnt string of the calling process.
Each pair of key/value pair is sent to the cb function for
processing. If possible, the strings are already rendered from
local encoding.
The cbData parameter is an arbitrary data that is passed to the CB function
for processing.
*/
FALCON_DYN_SYM void _enumerateEnvironment( EnvStringCallback cb, void* cbData );
/** Returns process ID of the current process. */
FALCON_DYN_SYM int64 _getpid();
FALCON_DYN_SYM void _dummy_ctrl_c_handler();
#ifdef FALCON_SYSTEM_WIN
}
}
#include <windows.h>
#include <falcon/string.h>
namespace Falcon {
namespace Sys {
FALCON_DYN_SYM numeric SYSTEMTIME_TO_SECONDS( const SYSTEMTIME &st );
#endif
}
}
#endif
/* end of flc_sys.h */
|