Functions that should be in glib-1.2 but are not. They are all prefixed with "gm_" as in "Glib Missing".
We also include FIXED versions of glib-1.2 routines that are broken and make sure those glib versions are never called directly.
#include <sys/types.h>
#include <glib.h>
Go to the source code of this file.
Defines | |
#define | G_LIST_FOREACH(list, func, user_data) |
#define | G_LIST_FOREACH_SWAPPED(list, func, user_data) |
#define | G_SLIST_FOREACH(slist, func, user_data) |
#define | G_SLIST_FOREACH_SWAPPED(slist, func, user_data) |
Functions | |
GSList * | gm_slist_insert_after (GSList *list, GSList *lnk, gpointer data) |
Insert `item' after `lnk' in list `list'. | |
GList * | gm_list_insert_after (GList *list, GList *lnk, gpointer data) |
Insert `item' after `lnk' in list `list'. | |
size_t | gm_vsnprintf (gchar *str, size_t n, gchar const *fmt, va_list args) |
This is the smallest common denominator between the g_vsnprintf() from GLib 1.2 and the one from GLib 2.x. | |
size_t | gm_snprintf (gchar *str, size_t n, gchar const *fmt,...) G_GNUC_PRINTF(3 |
void | gm_savemain (gint argc, gchar **argv, gchar **env) |
Save the original main() arguments. | |
void | gm_setproctitle (gchar *title) |
Change the process title as seen by "ps". | |
gchar * | gm_sanitize_filename (const gchar *filename, gboolean no_spaces, gboolean no_evil) |
Creates a valid and sanitized filename from the supplied string. |
|
Value: do { \ GList *l_ = (list); \ gpointer user_data_ = (user_data); \ while (NULL != l_) { \ func(l_->data, user_data_); \ l_ = g_list_next(l_); \ } \ } while(0) |
|
Value: do { \ GList *l_ = (list); \ gpointer user_data_ = (user_data); \ while (NULL != l_) { \ func(user_data_, l_->data); \ l_ = g_list_next(l_); \ } \ } while(0) |
|
Value: do { \ GSList *sl_ = (slist); \ gpointer user_data_ = (user_data); \ while (NULL != sl_) { \ func(sl_->data, user_data_); \ sl_ = g_slist_next(sl_); \ } \ } while(0) |
|
Value: do { \ GSList *sl_ = (slist); \ gpointer user_data_ = (user_data); \ while (NULL != sl_) { \ func(user_data_, sl_->data); \ sl_ = g_slist_next(sl_); \ } \ } while(0) |
|
Insert `item' after `lnk' in list `list'. If `lnk' is NULL, insertion happens at the head.
|
|
Creates a valid and sanitized filename from the supplied string. For most Unix-like platforms anything goes but for security reasons, shell meta characters are replaced by harmless characters.
Maximum bytes in filename i.e., including NUL |
|
Save the original main() arguments.
|
|
Change the process title as seen by "ps".
|
|
Insert `item' after `lnk' in list `list'. If `lnk' is NULL, insertion happens at the head.
|
|
|
|
This is the smallest common denominator between the g_vsnprintf() from GLib 1.2 and the one from GLib 2.x. The older version has no defined return value, it could be the resulting string length or the size of the buffer minus one required to hold the resulting string. This version always returns the length of the resulting string unlike the vsnprintf() from ISO C99.
|