Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GLib
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1,026
Issues
1,026
List
Boards
Labels
Milestones
Merge Requests
77
Merge Requests
77
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
GLib
Commits
26b4f6b4
Commit
26b4f6b4
authored
Feb 01, 2014
by
Matthias Clasen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gstrfuncs: Fix up gtk-doc warnings
parent
71d84267
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
23 deletions
+22
-23
glib/gstrfuncs.c
glib/gstrfuncs.c
+21
-21
glib/gstrfuncs.h
glib/gstrfuncs.h
+1
-2
No files found.
glib/gstrfuncs.c
View file @
26b4f6b4
...
...
@@ -72,19 +72,19 @@
* <literal><glib/gprintf.h></literal> in order to use the GLib
* printf() functions.
*
* <para id="string-precision">
While you may use the printf() functions
*
to format UTF-8 strings, notice that the precision of a
*
<literal>%Ns</literal> parameter is interpreted as the
*
number of bytes, not characters to print. On top of that, the GNU
*
libc implementation of the printf() functions has the "feature" that
*
it checks that the string given for the <literal>%Ns</literal>
* <para id="string-precision">
*
While you may use the printf() functions to format UTF-8 strings,
*
notice that the precision of a %Ns parameter is interpreted
*
as the number of bytes, not characters to print. On top of that,
*
the GNU libc implementation of the printf() functions has the
*
"feature" that it checks that the string given for the %Ns
* parameter consists of a whole number of characters in the current
* encoding. So, unless you are sure you are always going to be in an
* UTF-8 locale or your know your text is restricted to ASCII, avoid
* using
<literal>%Ns</literal>. If your intention is to format
*
strings for a certain number of columns, the
n
*
<literal>%Ns</literal> is not a correct solution anyway, since it
*
fails to take wide characters (see g_unichar_iswide())
into account.
* using
%Ns. If your intention is to format strings for a
*
certain number of columns, then %Ns is not a correct solutio
n
*
anyway, since it fails to take wide characters (see g_unichar_iswide())
* into account.
* </para>
*/
...
...
@@ -668,12 +668,12 @@ g_strtod (const gchar *nptr,
* To convert from a #gdouble to a string in a locale-insensitive
* way, use g_ascii_dtostr().
*
* If the correct value would cause overflow, plus or minus
<literal>HUGE_VAL</literal>
* is returned (according to the sign of the value), and
<literal>ERANGE</literal>
is
* stored in
<literal>errno</literal>
. If the correct value would cause underflow,
* zero is returned and
<literal>ERANGE</literal> is stored in <literal>errno</literal>
.
* If the correct value would cause overflow, plus or minus
%HUGE_VAL
* is returned (according to the sign of the value), and
%ERANGE
is
* stored in
%errno
. If the correct value would cause underflow,
* zero is returned and
%ERANGE is stored in %errno
.
*
* This function resets
<literal>errno</literal>
before calling strtod() so that
* This function resets
%errno
before calling strtod() so that
* you can reliably detect overflow and underflow.
*
* Return value: the #gdouble value.
...
...
@@ -1506,22 +1506,22 @@ g_ascii_strup (const gchar *str,
/**
* g_str_is_ascii:
* @str
ing
: a string
* @str: a string
*
* Determines if a string is pure ASCII.
A string is pure ASCII if it
* Determines if a string is pure ASCII. A string is pure ASCII if it
* contains no bytes with the high bit set.
*
* Returns: %TRUE if @str
ing is ascii
* Returns: %TRUE if @str
is ASCII
*
* Since: 2.40
*/
gboolean
g_str_is_ascii
(
const
gchar
*
str
ing
)
g_str_is_ascii
(
const
gchar
*
str
)
{
gint
i
;
for
(
i
=
0
;
str
ing
[
i
];
i
++
)
if
(
str
ing
[
i
]
&
0x80
)
for
(
i
=
0
;
str
[
i
];
i
++
)
if
(
str
[
i
]
&
0x80
)
return
FALSE
;
return
TRUE
;
...
...
glib/gstrfuncs.h
View file @
26b4f6b4
...
...
@@ -219,8 +219,7 @@ gchar* g_strdup_printf (const gchar *format,
...)
G_GNUC_PRINTF
(
1
,
2
)
G_GNUC_MALLOC
;
GLIB_AVAILABLE_IN_ALL
gchar
*
g_strdup_vprintf
(
const
gchar
*
format
,
va_list
args
)
G_GNUC_PRINTF
(
1
,
0
)
G_GNUC_MALLOC
;
va_list
args
)
G_GNUC_PRINTF
(
1
,
0
)
G_GNUC_MALLOC
;
GLIB_AVAILABLE_IN_ALL
gchar
*
g_strndup
(
const
gchar
*
str
,
gsize
n
)
G_GNUC_MALLOC
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment