prelude: libprelude Reference Manual

## prelude prelude |

## Functions

int | prelude_init ()
void | prelude_deinit ()
const char * | prelude_check_version ()
int | prelude_thread_init ()
void | prelude_fork_child ()
void | prelude_fork_parent ()
void | prelude_fork_prepare ()

## Types and Values

#define | LIBPRELUDE_VERSION

## Description

## Functions

### prelude_init ()

    int
    prelude_init (int *argc,
                  char **argv);

Call this function before using any other Prelude functions in your applications. It will initialize everything needed to operate the library and parses some standard command line options. `argc` and `argv` are adjusted accordingly so your own code will never see those standard arguments.

#### Parameters

argc | Address of the argc parameter of your `main()` function. |
argv | Address of the argv parameter of your `main()` function. |

#### Returns

0 on success, a negative value if an error occured.

### prelude_deinit ()

    void
    prelude_deinit (void);

Call this function if you're done using the library and want to free global shared ressource allocated by libprelude.

### prelude_check_version ()

    const char *
    prelude_check_version (const char *req_version);

If `req_version` is NULL this function will return the version of the library. Otherwise, `req_version` will be compared to the current library version. If the library version is higher or equal, this function will return the current library version. Otherwise, NULL is returned.

#### Parameters

req_version | The minimum acceptable version number. |

#### Returns

The current library version, or NULL if `req_version` doesn't match.

### prelude_thread_init ()

    int
    prelude_thread_init (void *nil);

### prelude_fork_child ()

    void
    prelude_fork_child (void);

### prelude_fork_parent ()

    void
    prelude_fork_parent (void);

### prelude_fork_prepare ()

    void
    prelude_fork_prepare (void);

## Types and Values

### LIBPRELUDE_VERSION

    #define LIBPRELUDE_VERSION "5.1.1"