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 "common.h"
#include "glib-missing.h"
#include "iovec.h"
#include "misc.h"
#include "utf8.h"
#include "override.h"
Data Structures | |
| struct | gm_hash_table_foreach_keys_helper |
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 | buf_vprintf (gchar *dst, size_t size, const gchar *fmt, va_list args) |
| Perform the vsnprintf() operation for the gm_vsnprintf() and gm_snprintf() routines. | |
| size_t | gm_vsnprintf (gchar *dst, size_t size, const gchar *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 *dst, size_t size, const gchar *fmt,...) |
| This is the smallest common denominator between the g_snprintf() from GLib 1.2 and the one from GLib 2.x. | |
| void | gm_savemain (gint argc, gchar **argv, gchar **env) |
| Save the original main() arguments. | |
| size_t | str_vec_count (gchar *strv[]) |
| iovec | gm_setproctitle_init (gint argc, gchar *argv[], gchar *env_ptr[]) |
| Compute the length of the exec() arguments that were given to us. | |
| void | gm_setproctitle (const gchar *title) |
| Change the process title as seen by "ps". | |
| const gchar * | gm_getproctitle (void) |
| Return 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. | |
| gchar * | gm_string_finalize (GString *gs) |
| Frees the GString context but keeps the string data itself and returns it. | |
| gboolean | gm_slist_is_looping (const GSList *slist) |
| Detects a loop in a singly-linked list. | |
| void | gm_hash_table_all_keys_helper (gpointer key, gpointer unused_value, gpointer udata) |
| GSList * | gm_hash_table_all_keys (GHashTable *ht) |
| void | gm_hash_table_foreach_keys_helper (gpointer key, gpointer unused_value, gpointer udata) |
| void | gm_hash_table_foreach_key (GHashTable *ht, GFunc func, gpointer user_data) |
| Apply function to all the keys of the hash table. | |
Variables | |
| gint | orig_argc |
| gchar ** | orig_argv |
| gchar ** | orig_env |
|
||||||||||||||||||||
|
Perform the vsnprintf() operation for the gm_vsnprintf() and gm_snprintf() routines. The resulting string will not be larger than (size - 1) and the returned value is always the length of this string. Thus it will not be equal or greater than size either.
|
|
|
Return the process title as seen by "ps".
|
|
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
Apply function to all the keys of the hash table.
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
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.
|
|
||||||||||||||||
|
Save the original main() arguments.
|
|
|
Change the process title as seen by "ps".
|
|
||||||||||||||||
|
Compute the length of the exec() arguments that were given to us.
|
|
||||||||||||||||
|
Insert `item' after `lnk' in list `list'. If `lnk' is NULL, insertion happens at the head.
|
|
|
Detects a loop in a singly-linked list.
|
|
||||||||||||||||||||
|
This is the smallest common denominator between the g_snprintf() 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 snprintf() from ISO C99.
|
|
|
Frees the GString context but keeps the string data itself and returns it. With Gtk+ 2.x g_string_free(gs, FALSE) would do the job but the variant in Gtk+ 1.2 returns nothing.
|
|
||||||||||||||||||||
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.9.1