1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

Fix whitespace in pacsort.c and pactree.c

Replace spaces with tabs.
Remove extra spaces.

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Jason St. John 2013-07-22 03:09:57 +02:00 committed by Allan McRae
parent 0f22bef8c3
commit 4ad6939980
2 changed files with 20 additions and 20 deletions

View File

@ -26,7 +26,7 @@
#include <alpm.h>
#define DELIM ' '
#define DELIM ' '
struct buffer_t {
char *mem;
@ -52,21 +52,21 @@ static struct options_t {
/* A quick and dirty implementation derived from glibc */
static size_t strnlen(const char *s, size_t max)
{
register const char *p;
for(p = s; *p && max--; ++p);
return (p - s);
register const char *p;
for(p = s; *p && max--; ++p);
return (p - s);
}
char *strndup(const char *s, size_t n)
{
size_t len = strnlen(s, n);
char *new = (char *) malloc(len + 1);
size_t len = strnlen(s, n);
char *new = (char *) malloc(len + 1);
if(new == NULL)
return NULL;
if(new == NULL)
return NULL;
new[len] = '\0';
return (char *)memcpy(new, s, len);
new[len] = '\0';
return (char *)memcpy(new, s, len);
}
#endif

View File

@ -125,21 +125,21 @@ const char *configfile = CONFFILE;
/* A quick and dirty implementation derived from glibc */
static size_t strnlen(const char *s, size_t max)
{
register const char *p;
for(p = s; *p && max--; ++p);
return (p - s);
register const char *p;
for(p = s; *p && max--; ++p);
return (p - s);
}
char *strndup(const char *s, size_t n)
{
size_t len = strnlen(s, n);
char *new = (char *) malloc(len + 1);
size_t len = strnlen(s, n);
char *new = (char *) malloc(len + 1);
if(new == NULL)
return NULL;
if(new == NULL)
return NULL;
new[len] = '\0';
return (char *)memcpy(new, s, len);
new[len] = '\0';
return (char *)memcpy(new, s, len);
}
#endif
@ -362,7 +362,7 @@ static void print_text(const char *pkg, const char *provision,
/* print tip */
if(!pkg && provision) {
printf("%s%s%s%s [unresolvable]%s\n", tip, color->leaf1,
printf("%s%s%s%s [unresolvable]%s\n", tip, color->leaf1,
provision, color->branch1, color->off);
} else if(provision && strcmp(pkg, provision) != 0) {
printf("%s%s%s%s%s %s%s%s\n", tip, color->leaf1, pkg,