tools/rpm*cmp.c: Reindent

This commit is contained in:
Дмитрий Левин 2009-04-14 16:43:52 +00:00
parent 258aa58b05
commit 71ba99f754
2 changed files with 23 additions and 23 deletions

View File

@ -25,33 +25,33 @@
#include <rpmlib.h>
int
main (int ac, const char *av[])
main(int ac, const char *av[])
{
const char *e1 = 0, *v1 = 0, *r1 = 0;
const char *e2 = 0, *v2 = 0, *r2 = 0;
char *arg1, *arg2;
char *arg1, *arg2;
if (ac != 3)
{
fprintf (stderr,
"%s - compare EVRs.\n"
"Usage: %s <EVR1> <EVR2>\n"
"\nReport bugs to http://bugs.altlinux.ru/\n\n",
program_invocation_short_name,
program_invocation_short_name);
fprintf(stderr,
"%s - compare EVRs.\n"
"Usage: %s <EVR1> <EVR2>\n"
"\nReport bugs to http://bugs.altlinux.ru/\n\n",
program_invocation_short_name,
program_invocation_short_name);
return EXIT_FAILURE;
}
arg1 = strdup (av[1]);
parseEVR (arg1, &e1, &v1, &r1);
arg1 = strdup(av[1]);
parseEVR(arg1, &e1, &v1, &r1);
arg2 = strdup (av[2]);
parseEVR (arg2, &e2, &v2, &r2);
arg2 = strdup(av[2]);
parseEVR(arg2, &e2, &v2, &r2);
printf ("%d\n", rpmEVRcmp (e1, v1, r1, 0, e2, v2, r2, 0));
printf("%d\n", rpmEVRcmp(e1, v1, r1, 0, e2, v2, r2, 0));
free (arg2);
free (arg1);
free(arg2);
free(arg1);
return EXIT_SUCCESS;
}

View File

@ -23,20 +23,20 @@
#include <rpmlib.h>
int
main (int ac, const char *av[])
main(int ac, const char *av[])
{
if (ac != 3)
{
fprintf (stderr,
"%s - compare versions.\n"
"Usage: %s <version1> <version2>\n"
"\nReport bugs to http://bugs.altlinux.ru/\n\n",
program_invocation_short_name,
program_invocation_short_name);
fprintf(stderr,
"%s - compare versions.\n"
"Usage: %s <version1> <version2>\n"
"\nReport bugs to http://bugs.altlinux.ru/\n\n",
program_invocation_short_name,
program_invocation_short_name);
return 1;
}
printf ("%d\n", rpmvercmp (av[1], av[2]));
printf("%d\n", rpmvercmp(av[1], av[2]));
return 0;
}