Re-indent to a standard tw of 8.

This commit is contained in:
Roy Marples 2008-01-11 15:51:40 +00:00
parent fec312d448
commit abde759d5b
19 changed files with 392 additions and 389 deletions

View File

@ -45,7 +45,7 @@ const char libeinfo_copyright[] = "Copyright (c) 2007-2008 Roy Marples";
#include <strings.h>
#include <syslog.h>
#ifdef HAVE_TERMCAP
#include <termcap.h>
# include <termcap.h>
#endif
#include <unistd.h>
@ -78,7 +78,7 @@ hidden_proto(ewarnx)
hidden_proto(ewend)
hidden_proto(ewendv)
/* Incase we cannot work out how many columns from ioctl, supply a default */
/* Incase we cannot work out how many columns from ioctl, supply a default */
#define DEFAULT_COLS 80
#define OK "ok"
@ -106,6 +106,12 @@ hidden_proto(ewendv)
#define ME "\033[m"
#define UP "\033[A"
#define _GET_CAP(_d, _c) strlcpy (_d, tgoto (_c, 0, 0), sizeof (_d));
#define _ASSIGN_CAP(_v) { \
_v = p; \
p += strlcpy (p, tmp, sizeof (ebuffer) - (p - ebuffer)) + 1; \
}
/* A pointer to a string to prefix to einfo/ewarn/eerror messages */
static const char *_eprefix = NULL;
@ -388,12 +394,6 @@ static bool colour_terminal (FILE * __EINFO_RESTRICT f)
}
#endif
#define _GET_CAP(_d, _c) strlcpy (_d, tgoto (_c, 0, 0), sizeof (_d));
#define _ASSIGN_CAP(_v) { \
_v = p; \
p += strlcpy (p, tmp, sizeof (ebuffer) - (p - ebuffer)) + 1; \
}
/* Now setup our colours */
p = ebuffer;
for (i = 0; i < sizeof (ecolors) / sizeof (ecolors[0]); i++) {
@ -557,9 +557,10 @@ const char *ecolor (einfo_color_t color)
return (_ecolor (f, color));
}
#define LASTCMD(_cmd) \
#define LASTCMD(_cmd) { \
unsetenv ("EINFO_LASTCMD"); \
setenv ("EINFO_LASTCMD", _cmd, 1);
setenv ("EINFO_LASTCMD", _cmd, 1); \
}
#define EINFOVN(_file, _color) \
{ \
@ -571,12 +572,12 @@ const char *ecolor (einfo_color_t color)
fprintf (_file, "%s%s%s|", _ecolor (_file, _color), _eprefix, _ecolor (_file, ECOLOR_NORMAL)); \
fprintf (_file, " %s*%s ", _ecolor (_file, _color), _ecolor (_file, ECOLOR_NORMAL)); \
retval += _eindent (_file); \
{ \
{ \
va_list _ap; \
va_copy (_ap, ap); \
retval += vfprintf (_file, fmt, _ap) + 3; \
va_end (_ap); \
} \
} \
if (colour_terminal (_file)) \
fprintf (_file, "%s", flush); \
}

View File

@ -535,7 +535,7 @@ char **rc_deptree_depends (const rc_depinfo_t *deptree,
}
librc_hidden_def(rc_deptree_depends)
static const char * const order_types[] = { "ineed", "iuse", "iafter", NULL };
static const char * const order_types[] = { "ineed", "iuse", "iafter", NULL };
char **rc_deptree_order (const rc_depinfo_t *deptree, const char *runlevel,
int options)
{
@ -701,7 +701,7 @@ bool rc_deptree_update_needed (void)
}
librc_hidden_def(rc_deptree_update_needed)
/* This is a 5 phase operation
/* This is a 5 phase operation
Phase 1 is a shell script which loads each init script and config in turn
and echos their dependency info to stdout
Phase 2 takes that and populates a depinfo object with that data

View File

@ -227,7 +227,7 @@ bool rc_runlevel_exists (const char *runlevel)
}
librc_hidden_def(rc_runlevel_exists)
/* Resolve a service name to it's full path */
/* Resolve a service name to it's full path */
char *rc_service_resolve (const char *service)
{
char buffer[PATH_MAX];

View File

@ -202,11 +202,13 @@ int checkpath (int argc, char **argv)
break;
case 'm':
if (parse_mode (&mode, optarg) != 0)
eerrorx ("%s: invalid mode `%s'", applet, optarg);
eerrorx ("%s: invalid mode `%s'",
applet, optarg);
break;
case 'o':
if (parse_owner (&pw, &gr, optarg) != 0)
eerrorx ("%s: owner `%s' not found", applet, optarg);
eerrorx ("%s: owner `%s' not found",
applet, optarg);
break;
case_RC_COMMON_GETOPT

View File

@ -233,7 +233,7 @@ char **env_filter (void)
return (env);
}
/* Other systems may need this at some point, but for now it's Linux only */
/* Other systems may need this at some point, but for now it's Linux only */
#ifdef __linux__
static bool file_regex (const char *file, const char *regex)
{