summaryrefslogtreecommitdiff
path: root/list.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-03-16 16:25:42 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-28 04:31:52 -0200
commite06eddafd5f72f6f0782e37e9617c2e874021038 (patch)
tree972a90ccba9466c6ac0d60b7d9d4576c6e5bcc23 /list.c
parentf1a527497c9621428cdb78dd9d37cb846ec10544 (diff)
Compile warning fixes.
Include header with prototypes for signals.c, and change prototypes and definitions to match. This should not have any side effects as function arguments are ignored. Ansify some functions with K&R definitions. printhex.c:fprintfhex() could be changed to a "sane" implementation, but only change was "ansification".
Diffstat (limited to 'list.c')
-rw-r--r--list.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/list.c b/list.c
index 25d2647..fa09edc 100644
--- a/list.c
+++ b/list.c
@@ -27,7 +27,7 @@ in this Software without prior written authorization from The Open Group.
#include "xsm.h"
List *
-ListInit()
+ListInit(void)
{
List *l;
@@ -40,24 +40,21 @@ ListInit()
}
List *
-ListFirst(l)
-List *l;
+ListFirst(List *l)
{
if(l->next->thing) return l->next;
else return NULL;
}
List *
-ListNext(l)
-List *l;
+ListNext(List *l)
{
if(l->next->thing) return l->next;
else return NULL;
}
void
-ListFreeAll(l)
-List *l;
+ListFreeAll(List *l)
{
char *thing;
List *next;
@@ -72,8 +69,7 @@ List *l;
}
void
-ListFreeAllButHead(l)
-List *l;
+ListFreeAllButHead(List *l)
{
List *p, *next;
@@ -91,9 +87,7 @@ List *l;
}
List *
-ListAddFirst(l, v)
-List *l;
-char *v;
+ListAddFirst(List *l, char *v)
{
List *e;
@@ -110,9 +104,7 @@ char *v;
}
List *
-ListAddLast(l, v)
-List *l;
-char *v;
+ListAddLast(List *l, char *v)
{
List *e;
@@ -129,8 +121,7 @@ char *v;
}
void
-ListFreeOne(e)
-List *e;
+ListFreeOne(List *e)
{
e->next->prev = e->prev;
e->prev->next = e->next;
@@ -139,9 +130,7 @@ List *e;
Status
-ListSearchAndFreeOne(l,thing)
-List *l;
-char *thing;
+ListSearchAndFreeOne(List *l, char *thing)
{
List *p;
@@ -157,8 +146,7 @@ char *thing;
int
-ListCount(l)
-List *l;
+ListCount(List *l)
{
int i;
List *e;