aboutsummaryrefslogtreecommitdiff
path: root/src/librc/librc-misc.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-04-23 21:31:22 +0000
committerRoy Marples <roy@marples.name>2009-04-23 21:31:22 +0000
commitade85d4bd81d7257f5a7e2e4ed40b9cbbbe23651 (patch)
tree278e8ec69f53fac2bc51b5122e6980e625ffeeca /src/librc/librc-misc.c
parent69534746553adb52d3ede38a4cf8cd3630c97091 (diff)
Improve style for KNF
Diffstat (limited to 'src/librc/librc-misc.c')
-rw-r--r--src/librc/librc-misc.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/librc/librc-misc.c b/src/librc/librc-misc.c
index 04c097b1..fe6d21ef 100644
--- a/src/librc/librc-misc.c
+++ b/src/librc/librc-misc.c
@@ -1,7 +1,7 @@
/*
- rc-misc.c
- rc misc functions
- */
+ rc-misc.c
+ rc misc functions
+*/
/*
* Copyright 2007-2008 Roy Marples <roy@marples.name>
@@ -31,7 +31,8 @@
#include "librc.h"
-bool rc_yesno(const char *value)
+bool
+rc_yesno(const char *value)
{
if (!value) {
errno = ENOENT;
@@ -54,7 +55,8 @@ bool rc_yesno(const char *value)
}
librc_hidden_def(rc_yesno)
-ssize_t rc_getline(char **line, size_t *len, FILE *fp)
+ssize_t
+rc_getline(char **line, size_t *len, FILE *fp)
{
char *p;
size_t last = 0;
@@ -78,7 +80,8 @@ ssize_t rc_getline(char **line, size_t *len, FILE *fp)
}
librc_hidden_def(rc_getline)
-RC_STRINGLIST *rc_config_list(const char *file)
+RC_STRINGLIST *
+rc_config_list(const char *file)
{
FILE *fp;
char *buffer = NULL;
@@ -116,7 +119,8 @@ RC_STRINGLIST *rc_config_list(const char *file)
}
librc_hidden_def(rc_config_list)
-RC_STRINGLIST *rc_config_load(const char *file)
+RC_STRINGLIST *
+rc_config_load(const char *file)
{
RC_STRINGLIST *list;
RC_STRINGLIST *config;
@@ -172,7 +176,7 @@ RC_STRINGLIST *rc_config_load(const char *file)
TAILQ_FOREACH(cline, config, entries) {
p = strchr(cline->value, '=');
if (p && strncmp(entry, cline->value,
- (size_t)(p - cline->value)) == 0)
+ (size_t)(p - cline->value)) == 0)
{
/* We have a match now - to save time we directly replace it */
free(cline->value);
@@ -194,7 +198,8 @@ RC_STRINGLIST *rc_config_load(const char *file)
}
librc_hidden_def(rc_config_load)
-char *rc_config_value(RC_STRINGLIST *list, const char *entry)
+char *
+rc_config_value(RC_STRINGLIST *list, const char *entry)
{
RC_STRING *line;
char *p;