* include/grub/misc.h (grub_strcat): Removed. All users changed to
more appropriate functions.
This commit is contained in:
parent
fa9b3dcae2
commit
e54b8f536b
6 changed files with 17 additions and 37 deletions
|
@ -137,23 +137,19 @@ static struct grub_video_bitmap *
|
|||
try_loading_icon (grub_gfxmenu_icon_manager_t mgr,
|
||||
const char *dir, const char *class_name)
|
||||
{
|
||||
char *path;
|
||||
int l;
|
||||
char *path, *ptr;
|
||||
|
||||
path = grub_malloc (grub_strlen (dir) + grub_strlen (class_name)
|
||||
+ grub_strlen (icon_extension) + 3);
|
||||
if (! path)
|
||||
return 0;
|
||||
|
||||
grub_strcpy (path, dir);
|
||||
l = grub_strlen (path);
|
||||
if (path[l-1] != '/')
|
||||
{
|
||||
path[l] = '/';
|
||||
path[l+1] = 0;
|
||||
}
|
||||
grub_strcat (path, class_name);
|
||||
grub_strcat (path, icon_extension);
|
||||
ptr = grub_stpcpy (path, dir);
|
||||
if (path == ptr || ptr[-1] != '/')
|
||||
*ptr++ = '/';
|
||||
ptr = grub_stpcpy (ptr, class_name);
|
||||
ptr = grub_stpcpy (ptr, icon_extension);
|
||||
*ptr = '\0';
|
||||
|
||||
struct grub_video_bitmap *raw_bitmap;
|
||||
grub_video_bitmap_load (&raw_bitmap, path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue