remove all trailing whitespace
This commit is contained in:
parent
d2d4966571
commit
b39f9d20a9
222 changed files with 3286 additions and 3286 deletions
|
@ -75,7 +75,7 @@ static struct dep_list *
|
|||
read_dep_list (FILE *fp)
|
||||
{
|
||||
struct dep_list *dep_list = 0;
|
||||
|
||||
|
||||
while (fgets (buf, sizeof (buf), fp))
|
||||
{
|
||||
char *p;
|
||||
|
@ -91,7 +91,7 @@ read_dep_list (FILE *fp)
|
|||
dep = xmalloc (sizeof (*dep));
|
||||
dep->name = xstrdup (buf);
|
||||
dep->list = 0;
|
||||
|
||||
|
||||
dep->next = dep_list;
|
||||
dep_list = dep;
|
||||
|
||||
|
@ -115,7 +115,7 @@ read_dep_list (FILE *fp)
|
|||
p++;
|
||||
|
||||
*p++ = '\0';
|
||||
|
||||
|
||||
mod = (struct mod_list *) xmalloc (sizeof (*mod));
|
||||
mod->name = xstrdup (name);
|
||||
mod->next = dep->list;
|
||||
|
@ -131,7 +131,7 @@ get_module_name (const char *str)
|
|||
{
|
||||
char *base;
|
||||
char *ext;
|
||||
|
||||
|
||||
base = strrchr (str, '/');
|
||||
if (! base)
|
||||
base = (char *) str;
|
||||
|
@ -142,13 +142,13 @@ get_module_name (const char *str)
|
|||
if (ext && strcmp (ext, ".mod") == 0)
|
||||
{
|
||||
char *name;
|
||||
|
||||
|
||||
name = xmalloc (ext - base + 1);
|
||||
memcpy (name, base, ext - base);
|
||||
name[ext - base] = '\0';
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
return xstrdup (base);
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ get_module_path (const char *prefix, const char *str)
|
|||
char *base;
|
||||
char *ext;
|
||||
char *ret;
|
||||
|
||||
|
||||
ext = strrchr (str, '.');
|
||||
if (ext && strcmp (ext, ".mod") == 0)
|
||||
base = xstrdup (str);
|
||||
|
@ -168,7 +168,7 @@ get_module_path (const char *prefix, const char *str)
|
|||
base = xmalloc (strlen (str) + 4 + 1);
|
||||
sprintf (base, "%s.mod", str);
|
||||
}
|
||||
|
||||
|
||||
dir = strchr (str, '/');
|
||||
if (dir)
|
||||
return base;
|
||||
|
@ -189,7 +189,7 @@ add_module (const char *dir,
|
|||
struct grub_util_path_list *path;
|
||||
struct mod_list *mod;
|
||||
struct dep_list *dep;
|
||||
|
||||
|
||||
mod_name = get_module_name (name);
|
||||
|
||||
/* Check if the module has already been added. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue