remove all trailing whitespace

This commit is contained in:
fzielcke 2009-06-10 21:04:23 +00:00
parent d2d4966571
commit b39f9d20a9
222 changed files with 3286 additions and 3286 deletions

View file

@ -69,7 +69,7 @@ add_completion (const char *completion, const char *extra,
case 2:
if (print_func)
print_func (match, type, 0);
/* Fall through. */
default:
@ -79,7 +79,7 @@ add_completion (const char *completion, const char *extra,
if (print_func)
print_func (completion, type, num_found - 1);
/* Detect the matched portion. */
while (*s && *t && *s == *t)
{
@ -92,7 +92,7 @@ add_completion (const char *completion, const char *extra,
break;
}
}
return 0;
}
@ -103,7 +103,7 @@ iterate_partition (grub_disk_t disk, const grub_partition_t p)
char *partition_name = grub_partition_get_name (p);
char *name;
int ret;
if (! partition_name)
return 1;
@ -117,7 +117,7 @@ iterate_partition (grub_disk_t disk, const grub_partition_t p)
grub_sprintf (name, "%s,%s", disk_name, partition_name);
grub_free (partition_name);
ret = add_completion (name, ")", GRUB_COMPLETION_TYPE_PARTITION);
grub_free (name);
return ret;
@ -147,7 +147,7 @@ iterate_dir (const char *filename, const struct grub_dirhook_info *info)
if (add_completion (fname, "", GRUB_COMPLETION_TYPE_FILE))
return 1;
}
return 0;
}
@ -155,10 +155,10 @@ static int
iterate_dev (const char *devname)
{
grub_device_t dev;
/* Complete the partition part. */
dev = grub_device_open (devname);
if (dev)
{
if (dev->disk && dev->disk->has_partitions)
@ -172,7 +172,7 @@ iterate_dev (const char *devname)
return 1;
}
}
grub_errno = GRUB_ERR_NONE;
return 0;
}
@ -188,7 +188,7 @@ iterate_command (grub_command_t cmd)
return 1;
}
}
return 0;
}
@ -199,7 +199,7 @@ complete_device (void)
/* Check if this is a device or a partition. */
char *p = grub_strchr (++current_word, ',');
grub_device_t dev;
if (! p)
{
/* Complete the disk part. */
@ -213,7 +213,7 @@ complete_device (void)
dev = grub_device_open (current_word);
*p = ',';
grub_errno = GRUB_ERR_NONE;
if (dev)
{
if (dev->disk && dev->disk->has_partitions)
@ -224,7 +224,7 @@ complete_device (void)
return 1;
}
}
grub_device_close (dev);
}
else
@ -244,18 +244,18 @@ complete_file (void)
grub_fs_t fs;
grub_device_t dev;
int ret = 0;
device = grub_file_get_device_name (current_word);
if (grub_errno != GRUB_ERR_NONE)
return 1;
dev = grub_device_open (device);
if (! dev)
{
ret = 1;
goto fail;
}
fs = grub_fs_probe (dev);
if (! fs)
{
@ -268,25 +268,25 @@ complete_file (void)
if (dir)
{
char *dirfile;
current_word = last_dir + 1;
dir = grub_strdup (dir);
if (! dir)
{
ret = 1;
goto fail;
}
/* Cut away the filename part. */
dirfile = grub_strrchr (dir, '/');
dirfile[1] = '\0';
/* Iterate the directory. */
(fs->dir) (dev, dir, iterate_dir);
grub_free (dir);
if (grub_errno)
{
ret = 1;
@ -302,7 +302,7 @@ complete_file (void)
ret = 1;
goto fail;
}
suffix = "";
num_found = 1;
}
@ -323,7 +323,7 @@ complete_arguments (char *command)
const struct grub_arg_option *option;
char shortarg[] = "- ";
cmd = grub_command_find (command);
cmd = grub_command_find (command);
if (!cmd || !(cmd->flags & GRUB_COMMAND_FLAG_EXTCMD))
return 0;
@ -478,13 +478,13 @@ grub_normal_do_completion (char *buf, int *restore,
if (num_found == 1)
grub_strcat (ret, suffix);
if (*ret == '\0')
{
grub_free (ret);
goto fail;
}
grub_free (argv[0]);
grub_free (match);
return ret;