summaryrefslogtreecommitdiff
path: root/glib/gstrfuncs.c
Commit message (Collapse)AuthorAgeFilesLines
* More include cleanupsMatthias Clasen2010-09-031-564/+564
|
* docs: Inline docs from tmpl/memory.smglJon Nordby2010-09-011-0/+11
|
* Fix some glib docs warningsRyan Lortie2010-07-121-5/+5
| | | | | | | | | | Remove some symbols from glib-sections.txt that gtk-doc has no idea about. Add proper callback typedefs for GTester (gtk-doc dislikes inline function types). Fix some other minor issues.
* Add a note about l10n to the g_strconcat docsMatthias Clasen2010-07-081-2/+5
| | | | As requested in bug 576854
* glib/: fully remove galias hacksRyan Lortie2010-07-071-5/+0
|
* Add g_dc[p]gettext, and use it in gsettingsChristian Persch2010-05-201-0/+27
| | | | | | Avoid using LC_MESSAGES, and just call g_d[c]gettext directly. Bug #617004.
* g_strlcpy doc: small fixupRyan Lortie2010-01-301-3/+3
| | | | prevent the <note> from getting sucked in as part of the Returns:
* Another possible error code clash, yayMatthias Clasen2009-07-101-1/+1
|
* Fix a typoMatthias Clasen2009-01-191-1/+1
| | | | svn path=/trunk/; revision=7818
* Move docs inlineMatthias Clasen2009-01-031-14/+162
| | | | svn path=/trunk/; revision=7761
* Fix some compiler warningsMatthias Clasen2008-12-311-2/+0
| | | | svn path=/trunk/; revision=7755
* [REVERT] Bug 548612 – g_strstr_len() should use memmem when availableRyan Lortie2008-08-281-1/+1
| | | | | | | | | | | | | | | 2008-08-28 Ryan Lortie <desrt@desrt.ca> [REVERT] Bug 548612 – g_strstr_len() should use memmem when available * glib/gstrfuncs.c (g_strstr_len): fix off-by-one memory access error * glib/tests/strfuncs.c (test_bounds): add some new test cases that would catch problems like this * glib/tests/4096-random-bytes: test data for the previous * glib/tests/Makefile.am: add previous to EXTRA_DIST svn path=/trunk/; revision=7414
* [REVERT] Bug 548612 – g_strstr_len() should use memmem when availableRyan Lortie2008-08-281-7/+0
| | | | | | | | | | | | 2008-08-28 Ryan Lortie <desrt@desrt.ca> [REVERT] Bug 548612 – g_strstr_len() should use memmem when available * configure.in: * glib/gstrfuncs.c (g_strstr_len): revert use of memmem (see bug) svn path=/trunk/; revision=7413
* make "endptr" const since it's always a pointer into the const stringMichael Natterer2008-08-281-6/+6
| | | | | | | | | | | | | | | 2008-08-28 Michael Natterer <mitch@imendio.com> * glib/gstrfuncs.c (g_parse_long_long): make "endptr" const since it's always a pointer into the const string passed. Remove some casting to (gchar*) in this function. (g_ascii_strtoull) (g_ascii_strtoll): cast "endptr" to (const gchar**) here when passing it to above function. svn path=/trunk/; revision=7410
* Bug 548612 – g_strstr_len() should use memmem when availableBastien Nocera2008-08-281-1/+4
| | | | | | | | | | | | | | | | | 2008-08-28 Bastien Nocera <hadess@hadess.net> Bug 548612 – g_strstr_len() should use memmem when available * glib/tests/strfuncs.c (test_strstr): * tests/string-test.c (main): Patch by Paolo Borelli <pborelli@katamail.com> to move the tests to the right place, and add more tests * glib/gstrfuncs.c (g_strstr_len): Fix problem with memmem ignoring nul-terminators in strings, and using the haystack_len instead svn path=/trunk/; revision=7409
* Bug 548612 – g_strstr_len() should use memmem when availableBastien Nocera2008-08-271-2/+8
| | | | | | | | | | | | | | 2008-08-28 Bastien Nocera <hadess@hadess.net> Bug 548612 – g_strstr_len() should use memmem when available * configure.in: detect whether memmem is available in the C library * glib/gstrfuncs.c (g_strstr_len): use memmem for g_strstr_len() if available in it's available, as it could be optimised by the C library * tests/string-test.c (main): Add a few tests for g_strstr_len() svn path=/trunk/; revision=7407
* Bug 536996 – Missing noop i18n macro equivalent to C_Matthias Clasen2008-07-181-0/+56
| | | | | | | | | | | | | | * glib/glib.symbols: * glib/gstrfuncs.[hc]: Add g_dpgettext2() which is a variant of g_dpgettext() taking context and id as separate arguments. * glib/gi18n-lib.h: * glib/gi18n.h: Add an NC_() macro that is to C_() as N_() is to _(). svn path=/trunk/; revision=7202
* Document that this function does accept localized infinities and nans.Matthias Clasen2008-07-161-3/+5
| | | | | | | | | * glib/gstrfuncs.c (g_ascii_strtod): Document that this function does accept localized infinities and nans. Reported by Morten Welinder. svn path=/trunk/; revision=7195
* to get the default translation target on win32 use g_win32_get_locale()Hans Breuer2008-06-131-1/+4
| | | | | | | | | | | | 2008-06-13 Hans Breuer <hans@breuer.org> * glib/gstrfuncs.c : to get the default translation target on win32 use g_win32_get_locale() instead of setlocale(LS_MESSAGES,NULL) Fixes bug #538044 * glib/makefile.msc.in gio/makefile.msc : updated svn path=/trunk/; revision=7036
* Bug 503071 – Application direction changes to right to left even ifBehdad Esfahbod2008-06-111-4/+135
| | | | | | | | | | | | | | | | | | | | | 2008-06-11 Behdad Esfahbod <behdad@gnome.org> Bug 503071 – Application direction changes to right to left even if theres no translation * glib/gi18n-lib.h: * glib/glib.symbols: * glib/gstrfuncs.h: * glib/gstrfuncs.c: Add new functions g_dgettext() and g_dngettext(). * glib/gutils.c (glib_gettext): * glib/gfileutils.c (g_format_size_for_display): * glib/goption.c (dgettext_swapped): Use the new functions. svn path=/trunk/; revision=7020
* Bug 503071 - Application direction changes to right to left even if theres14:31:18 Tim Janik2008-05-201-0/+61
| | | | | | | | | | | 2008-05-20 14:31:18 Tim Janik <timj@imendio.com> * reverted recent unapproved changes by Yair Hershkovitz, regarding: Bug 503071 - Application direction changes to right to left even if theres no translation. svn path=/trunk/; revision=6919
* Bug 503071 - Application direction changes to right to left even if theresYair Hershkovitz2008-05-111-61/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-05-11 Yair Hershkovitz <yairhr@gmail.com> Bug 503071 - Application direction changes to right to left even if theres no translation. * glib/gi18n.c: g_i18n_init() for initializing the glib i18n, checking if a translation is available for the calling app. wrappers for gettext, dgettext and dpgettext to check first if the application should be translated. * glib/gi18n.h: symbol declaration for gettext wrappers. * glib/gi18n-lib.h: include gi18n.h instead of libintl.h. * glib/gstrfuncs.c: moved g_dpgettext() to glib/gi18n.c. * glib/gutils.c: use g_dgettext() instead of dgettext(). * glib/glibintl.h: include gi18n.h. * glib.symbols: added gettext wrappers. * glib/Makefile.am: added gi18n.c. svn path=/trunk/; revision=6882
* Simple fixes to help building GLib on embedded systems without NLS.Matthias Clasen2008-03-311-1/+1
| | | | | | | | | | | 2008-03-30 Matthias Clasen <mclasen@redhat.com> * glib/glibintl.h: * glib/gstrfuncs.c: * glib/gutils.c: Simple fixes to help building GLib on embedded systems without NLS. (#524350, Peter Kjellerstedt) svn path=/trunk/; revision=6779
* Change prototype to take msgctxtid + offset instead of two strings, toMatthias Clasen2007-12-101-10/+11
| | | | | | | | | | | | | | | | 2007-12-10 Matthias Clasen <mclasen@redhat.com> * glib/gstrfuncs.h: * glib/gstrfuncs.c (g_dpgettext): Change prototype to take msgctxtid + offset instead of two strings, to avoid duplication of string constants if the compiler/linker don't perform constant suffix merging. (#502590, Christian Persch) * glib/gi18n.h: * glib/gi18n-lib.h: Adapt the definitions of C_() and Q_(). svn path=/trunk/; revision=6081
* Remove leftover ENABLE_NLS #ifdefs.Matthias Clasen2007-11-241-4/+4
| | | | | | | | | | 2007-11-24 Matthias Clasen <mclasen@redhat.com> * glib/gutils.c: Remove leftover ENABLE_NLS #ifdefs. svn path=/trunk/; revision=5920
* Define a two-argument macro C_() for marking translatable strings withMatthias Clasen2007-11-231-0/+61
| | | | | | | | | | | | | | | 2007-11-23 Matthias Clasen <mclasen@redhat.com> * glib/gi18n-lib.h: * glib/gi18n.h: Define a two-argument macro C_() for marking translatable strings with context and implement C_() and Q_() using g_dpgettext(). (#142676, Morten Welinder) * glib/glib.symbols: * glib/gstrfuncs.[hc]: Implement g_dpgettext(). svn path=/trunk/; revision=5917
* Don't leave out parameters uninitialized. (#490061, Benjamin Otte)Matthias Clasen2007-11-081-1/+3
| | | | | | | | | | 2007-11-08 Matthias Clasen <mclasen@redhat.com> * glib/gstrfuncs.c (g_parse_long_long): Don't leave out parameters uninitialized. (#490061, Benjamin Otte) svn path=/trunk/; revision=5819
* small cleanupMatthias Clasen2007-04-271-9/+8
| | | | svn path=/trunk/; revision=5465
* small cleanup. (#433387)Paolo Borellki2007-04-251-5/+2
| | | | | | | | | 2007-04-25 Paolo Borellki <pborelli@katamail.com> * glib/gstrfuncs.c (g_strsplit): small cleanup. (#433387) svn path=/trunk/; revision=5460
* Return negative values. (#416062)Matthias Clasen2007-03-091-0/+2
| | | | | | | | | | | | | 2007-03-08 Matthias Clasen <mclasen@redhat.com> * glib/gstrfuncs.c (g_strtoll): Return negative values. (#416062) * tests/strtoll-test.c: Add more testcases. svn path=/trunk/; revision=5390
* Move docs inline, and improve wording. (#372598, Behdad Esfahbod)Matthias Clasen2006-12-171-0/+29
| | | | | | | 2006-12-17 Matthias Clasen <mclasen@redhat.com> * glib/gstrfuncs.c (g_strndup, g_strnfill): Move docs inline, and improve wording. (#372598, Behdad Esfahbod)
* Revert accidental commitMatthias Clasen2006-06-051-8/+1
|
* Add some tests involving leading whitespace.Matthias Clasen2006-06-051-1/+11
| | | | | | | | | | 2006-06-05 Matthias Clasen <mclasen@redhat.com> * tests/strtod-test.c: Add some tests involving leading whitespace. * glib/gstrfuncs.c (g_ascii_formatd): Skip leading whitespace. (#343899, Øystein Johansen)
* g_ascii_strtollMatthias Clasen2006-05-161-40/+106
|
* Improve docsMatthias Clasen2006-02-141-7/+4
|
* Add versioned deprecation informationMatthias Clasen2005-12-051-7/+7
|
* Add details to the docs. (#314393, Matthew F. Barnes)Matthias Clasen2005-09-261-2/+5
| | | | | | | 2005-09-26 Matthias Clasen <mclasen@redhat.com> * glib/gstrfuncs.c (g_ascii_strtoull): Add details to the docs. (#314393, Matthew F. Barnes)
* Add warning to doc comment that these functions should not be used onTor Lillqvist2005-09-151-2/+14
| | | | | | | | 2005-09-16 Tor Lillqvist <tml@novell.com> * glib/gstrfuncs.c (g_ascii_strcasecmp, g_ascii_strncasecmp): Add warning to doc comment that these functions should not be used on encodings like CP932.
* Warn and don't crash when meeting a trailing \\. (#301373, Benjamin Otte)Matthias Clasen2005-04-281-0/+4
| | | | | | | 2005-04-28 Matthias Clasen <mclasen@redhat.com> * glib/gstrfuncs.c (g_strcompress): Warn and don't crash when meeting a trailing \\. (#301373, Benjamin Otte)
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-141-1/+5
| | | | | | | | | | | | | | | | | 2005-03-13 Matthias Clasen <mclasen@redhat.com> Make PLT-reduction work with gcc4, and don't include everything in galias.h: * glib/glib.symbols: Group symbols by header and source file. * glib/makegalias.pl: Protect definitions by the same preprocessor symbols used to guard the headers. Move the alias declarations to a separate file which is produced when calling makegalias.pl -def * glib/Makefile.am (galiasdef.c): Add a rule to generate this file. * glib/*.c: Include galias.h after the other GLib headers, include galiasdef.c at the bottom.
* Add a testcase for the previous fix.Matthias Clasen2004-11-261-1/+1
| | | | | | | | | 2004-11-25 Matthias Clasen <mclasen@redhat.com> * tests/strtod-test.c (main): Add a testcase for the previous fix. * glib/gstrfuncs.c (g_ascii_strtod): Make it work again for floats starting with a decimal point, like .75 (#156421, Hans Breuer)
* Handle numbers like 1e1, nan, -infinity. Also try harder to preserveMatthias Clasen2004-11-051-35/+40
| | | | | | | | | | 2004-11-04 Matthias Clasen <mclasen@redhat.com> * glib/gstrfuncs.c (g_ascii_strtod): Handle numbers like 1e1, nan, -infinity. Also try harder to preserve errno. (#156421, Morten Welinder) * tests/strtod-test.c: Add testcases.
* Make it take a guint for number of characters, instead of a gsize.Manish Singh2004-09-171-1/+1
| | | | | | | | | Thu Sep 16 18:15:32 2004 Manish Singh <yosh@gimp.org> * glib/gstrfuncs.c (g_strncasecmp): Make it take a guint for number of characters, instead of a gsize. Technically this is incorrect, but this makes it match the prototype, and this is a deprecated function anyway.
* Implement the same PLT reduction technique used in GTK+:Matthias Clasen2004-09-161-0/+1
| | | | | | Thu Sep 16 02:03:15 2004 Matthias Clasen <maclas@gmx.de> Implement the same PLT reduction technique used in GTK+:
* Add a function to calculate the length of a NULL-terminated string array.Matthias Clasen2004-09-091-0/+25
| | | | | | | | | | | Thu Sep 9 00:10:40 2004 Matthias Clasen <maclas@gmx.de> * glib/gstrfuncs.h: * glib/gstrfuncs.c (g_strv_length): Add a function to calculate the length of a NULL-terminated string array. (#150455, Tim-Philipp Müller) * tests/strfunc-test.c (main): Add a test for g_strv_length().
* s/g_strsplit/g_strsplit_set/ as well.Matthias Clasen2004-07-271-1/+1
| | | | | | | Tue Jul 27 02:01:31 2004 Matthias Clasen <maclas@gmx.de> * glib/gstrfuncs.c (g_strsplit_set): s/g_strsplit/g_strsplit_set/ as well.
* s/g_strtokenize/g_strsplit_set/ in docs.Soeren Sandmann2004-07-241-2/+2
| | | | | | | Sat Jul 24 17:50:07 2004 Soeren Sandmann <sandmann@daimi.au.dk> * glib/gstrfuncs.c (g_strsplit_set): s/g_strtokenize/g_strsplit_set/ in docs.
* Fix problems when a locale-specific decimal separator directly follows aMatthias Clasen2004-04-221-5/+24
| | | | | | | | | | 2004-04-22 Matthias Clasen <mclasen@redhat.com> * glib/gstrfuncs.c (g_ascii_strtod): Fix problems when a locale-specific decimal separator directly follows a number. (#138424, Nickolay V. Shmyrev) * tests/strtod-test.c (main): Add some more testcases.
* glib/giowin32.c glib/gmain.c glib/gstrfuncs.c Decorating variableTor Lillqvist2004-04-101-3/+0
| | | | | | | | | | | | | | | | | 2004-04-10 Tor Lillqvist <tml@iki.fi> * glib/giowin32.c * glib/gmain.c * glib/gstrfuncs.c * glib/gthread.c: Decorating variable definitions with __declspec(dllexport) causes problems on Cygwin build, and isn't really needed for a native Win32 build with mingw or MSVC, so remove. (#138402, Roger Leigh) * glib/libcharset/localcharset.c: Use Win32-specific code also on Cygwin. * tests/uri-test.c: Don't assume that local filenames are in UTF-8 on Cygwin, either. (#138412, Roger Leigh)
* Don't modify errno. (#116617, Balazs Scheidler)Matthias Clasen2004-02-261-2/+9
| | | | | | | Fri Feb 27 00:46:29 2004 Matthias Clasen <maclas@gmx.de> * glib/gstrfuncs.c (g_strerror): Don't modify errno. (#116617, Balazs Scheidler)