mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
* grub-core/kern/misc.c (grub_stpcpy): Move from here ...
* include/grub/misc.h (grub_stpcpy): ... to here. Inlined.
This commit is contained in:
1 parent
8e307a625d
commit
10133b5ff3
3 files changed
+17
-14
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
2012-02-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/misc.c (grub_stpcpy): Move from here ...
|
||||||
|
* include/grub/misc.h (grub_stpcpy): ... to here. Inlined.
|
||||||
|
|
||||||
2012-02-26 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-02-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* include/grub/env.h (grub_env_find): Remove prototype.
|
* include/grub/env.h (grub_env_find): Remove prototype.
|
||||||
|
|||||||
@@ -103,19 +103,6 @@ grub_strncpy (char *dest, const char *src, int c)
|
|||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
|
||||||
grub_stpcpy (char *dest, const char *src)
|
|
||||||
{
|
|
||||||
char *d = dest;
|
|
||||||
const char *s = src;
|
|
||||||
|
|
||||||
do
|
|
||||||
*d++ = *s;
|
|
||||||
while (*s++ != '\0');
|
|
||||||
|
|
||||||
return d - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
grub_printf (const char *fmt, ...)
|
grub_printf (const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
|||||||
+12
-1
@@ -54,7 +54,18 @@
|
|||||||
void *EXPORT_FUNC(grub_memmove) (void *dest, const void *src, grub_size_t n);
|
void *EXPORT_FUNC(grub_memmove) (void *dest, const void *src, grub_size_t n);
|
||||||
char *EXPORT_FUNC(grub_strcpy) (char *dest, const char *src);
|
char *EXPORT_FUNC(grub_strcpy) (char *dest, const char *src);
|
||||||
char *EXPORT_FUNC(grub_strncpy) (char *dest, const char *src, int c);
|
char *EXPORT_FUNC(grub_strncpy) (char *dest, const char *src, int c);
|
||||||
char *EXPORT_FUNC(grub_stpcpy) (char *dest, const char *src);
|
static inline char *
|
||||||
|
grub_stpcpy (char *dest, const char *src)
|
||||||
|
{
|
||||||
|
char *d = dest;
|
||||||
|
const char *s = src;
|
||||||
|
|
||||||
|
do
|
||||||
|
*d++ = *s;
|
||||||
|
while (*s++ != '\0');
|
||||||
|
|
||||||
|
return d - 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* XXX: If grub_memmove is too slow, we must implement grub_memcpy. */
|
/* XXX: If grub_memmove is too slow, we must implement grub_memcpy. */
|
||||||
static inline void *
|
static inline void *
|
||||||
|
|||||||
Reference in new issue
Block a user