li-utils

li-utils — General-purpose helper functions for Limba

Functions

Includes

#include <limba.h>

Description

Functions

li_set_verbose_mode ()

void
li_set_verbose_mode (gboolean verbose);

Write verbose output on the command line.

Parameters

verbose

TRUE to increase verbosity

 

li_get_current_arch_h ()

gchar *
li_get_current_arch_h (void);

Get the current architecture in a human-friendly form (e.g. "amd64" instead of "x86_64").

Returns

The current OS architecture as string.

[transfer full]


li_get_arch_triplet ()

gchar *
li_get_arch_triplet (void);

Get the full architecture triplet, e.g. "x86_64-linux-gnu".

Returns

The current arch triplet.

[transfer full]


li_compare_versions ()

gint
li_compare_versions (const gchar *a,
                     const gchar *b);

Compare alpha and numeric segments of two versions. This algorithm is also used in RPM and licensed under a GPLv2+ license.

Returns

1: a is newer than b 0: a and b are the same version -1: b is newer than a


li_parse_dependency_string ()

LiPkgInfo *
li_parse_dependency_string (const gchar *depstr);

Parse a dependency string (e.g. "foo (>= 4.0)") and return a LiPkgInfo object reflecting the required package name and dependency relation.

Returns

A new LiPkgInfo reflecting the relation and package.

[transfer full]


li_parse_dependencies_string ()

GPtrArray *
li_parse_dependencies_string (const gchar *depstr);

Parse a dependencies string (in the form of "foo (>= 2.0), bar (== 1.0)") and return an array of LiPkgInfo objects reflecting the relations and packages specified in the dependency string.

Returns

A list of LiPkgInfo objects reflecting the relation and package.

[transfer full][element-type LiPkgInfo]


li_reset_umask ()

void
li_reset_umask (void);

Reset umask potentially set by the user to a default value, so we can create files with the correct permissions.

Types and Values