all functions of this API More...
#include "../include/scol_gbase.h"
#include "main.h"
#include <glib/gstdio.h>
Defines | |
#define | SCSP_MAX_SIZE 1024*32 |
Functions | |
int | SCOL_gbaseUserName (mmachine m) |
_gbaseUserName : Returns the user (or real) name | |
int | SCOL_gBaseHostName (mmachine m) |
_gBaseHostName : Returns the host name | |
int | SCOL_gBaseDirCur (mmachine m) |
_gBaseDirCur : Returns the current directory (by default on MS Windows "C:\Program Files\Scol Voyager") | |
int | SCOL_gBasePathAbsolute (mmachine m) |
_gBasePathAbsolute : Returns 1 if the given file_name is an absolute file name. | |
int | SCOL_gBasePathBase (mmachine m) |
_gBasePathBase : Returns the last component of the filename | |
int | SCOL_gBasePathDir (mmachine m) |
_gBasePathDir : Returns the directory components of a file name. | |
int | SCOL_gBasePathBuild (mmachine m) |
_gBasePathBuild : Creates a filename from a list of elements using the correct separator for filenames. | |
int | SCOL_gBaseStringUTF8 (mmachine m) |
_gBaseStringUTF8 : Converts a string in the current locale into a UTF-8 string or reverse. | |
int | SCOL_gbaseChecksumS (mmachine m) |
_gbaseChecksumS : Computes the checksum of a string. | |
int | SCOL_gbaseChecksumP (mmachine m) |
_gbaseChecksumP : Computes the checksum of a file. | |
int | SCOL_gbaseSleep (mmachine m) |
_gbaseSleep : Pauses the current thread for the given number of milliseconds. | |
int | SCOL_gbaseFileStat (mmachine m) |
_gbaseFileStat : it should not be used, at this time | |
int | SCOL_gbaseIsIp (mmachine m) |
_gbaseIsIp : Tests if a string is a form of an IPv4 or IPv6 address (like "123.210.012.231"). fun [S] I | |
int | SCOLinitGbaseClass (mmachine m) |
int | GBaseRelease () |
Variables | |
mmachine | mm |
char * | gbase_name [GBASE_PKG_NB] |
int(* | gbase_fun [GBASE_PKG_NB])(mmachine m) |
int | gbase_narg [GBASE_PKG_NB] |
char * | gbase_type [GBASE_PKG_NB] |
all functions of this API
int SCOL_gbaseUserName | ( | mmachine | m | ) |
_gbaseUserName : Returns the user (or real) name
fun [] S
: | nothing |
int SCOL_gBaseHostName | ( | mmachine | m | ) |
_gBaseHostName : Returns the host name
fun [] S
: | nothing |
int SCOL_gBaseDirCur | ( | mmachine | m | ) |
_gBaseDirCur : Returns the current directory (by default on MS Windows "C:\Program Files\Scol Voyager")
fun [] S
: | nothing |
int SCOL_gBasePathAbsolute | ( | mmachine | m | ) |
_gBasePathAbsolute : Returns 1 if the given file_name is an absolute file name.
fun [S] I
S | : any path |
int SCOL_gBasePathBase | ( | mmachine | m | ) |
_gBasePathBase : Returns the last component of the filename
fun [S] S
S | : any path |
int SCOL_gBasePathDir | ( | mmachine | m | ) |
_gBasePathDir : Returns the directory components of a file name.
fun [S] S
S | : any path |
int SCOL_gBasePathBuild | ( | mmachine | m | ) |
_gBasePathBuild : Creates a filename from a list of elements using the correct separator for filenames.
fun [[S r1] I] S
[S | r1] : a list of elements (typically, a list of directory : a :: b :: c :: file.ext) | |
I | : 1 : OS separator (e.g. "\" on MS Windows, "/" on Linux), otherwise Scol separator ("/") |
int SCOL_gBaseStringUTF8 | ( | mmachine | m | ) |
_gBaseStringUTF8 : Converts a string in the current locale into a UTF-8 string or reverse.
fun [S I] S
S | : any string | |
I | : 1 from locale to UTF8, 0 from UTF-8 to current locale |
int SCOL_gbaseChecksumS | ( | mmachine | m | ) |
_gbaseChecksumS : Computes the checksum of a string.
fun [S I] S
S | : any string | |
I | : the hashing algorithm to use : 0 -> MD5 (default), 1 -> SHA-1, 2 -> SHA-256 |
int SCOL_gbaseChecksumP | ( | mmachine | m | ) |
_gbaseChecksumP : Computes the checksum of a file.
fun [P I] S
S | : any file (read referenced only) | |
I | : the hashing algorithm to use : 0 -> MD5 (default), 1 -> SHA-1, 2 -> SHA-256 |
int SCOL_gbaseSleep | ( | mmachine | m | ) |
_gbaseSleep : Pauses the current thread for the given number of milliseconds.
fun [I] I
I | : the number of milliseconds |
int SCOL_gbaseFileStat | ( | mmachine | m | ) |
_gbaseFileStat : it should not be used, at this time
fun [P] [I I I I]
P | : a filename (read reference only) |
int SCOL_gbaseIsIp | ( | mmachine | m | ) |
_gbaseIsIp : Tests if a string is a form of an IPv4 or IPv6 address (like "123.210.012.231"). fun [S] I
S | : any string |
char* gbase_name[GBASE_PKG_NB] |
{ "_gbaseUserName", "_gBaseHostName", "_gBaseDirCur", "_gBasePathAbsolute", "_gBasePathBase", "_gBasePathDir", "_gBasePathBuild", "_gBaseStringUTF8", "_gbaseChecksumS", "_gbaseChecksumP", "_gbaseSleep", "_gbaseFileStat", "_gbaseIsIp" }
int(* gbase_fun[GBASE_PKG_NB])(mmachine m) |
int gbase_narg[GBASE_PKG_NB] |
{ 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1 }
char* gbase_type[GBASE_PKG_NB] |
{ "fun [] S", "fun [] S", "fun [] S", "fun [S] I", "fun [S] S", "fun [S] S", "fun [[S r1] I] S", "fun [S I] S", "fun [S I] S", "fun [P I] S", "fun [I] I", "fun [P] [I I I I]", "fun [S] I" }