
Introduce the bool type and do some type changes.


 include/hash.h |    4 +++-
 net.c          |   15 ++++++++-------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff -puN net.c~int_to_bools net.c
--- cur/net.c~int_to_bools	2004-01-17 21:09:20.000000000 -0300
+++ cur-root/net.c	2004-01-17 21:09:20.000000000 -0300
@@ -4,6 +4,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
+#include <stdbool.h>
 #include <sys/socket.h>
 #include <sys/time.h>
 #include <sys/select.h>
@@ -31,7 +32,7 @@
 static int lfd;
 
 /* active file descriptors */
-static char active_fd[MAXCONN];
+static bool active_fd[MAXCONN];
 
 /* orphan locks */
 static struct list *orphans;
@@ -53,13 +54,13 @@ static struct list *olocks[MAXCONN];
  */
 
 /* thread busy indicators */
-static int thread_busy[MAXTHREADS];
+static bool thread_busy[MAXTHREADS];
 
 /* fd busy indicator */
-static int fd_busy[MAXCONN];
+static bool fd_busy[MAXCONN];
 
 /* temp space used to tell threads which fd to process */
-static int fd_to_process[MAXTHREADS];
+static unsigned int fd_to_process[MAXTHREADS];
 
 /* lock array to 'wake up' idle threads */
 static pthread_mutex_t thread_lock[MAXTHREADS];
@@ -128,9 +129,9 @@ int net_init(int nthreads) {
 
 /* main select loop */
 void net_select_loop(int nthreads) {
-	int rv;
-	unsigned int i, j, busycount, workdone;
-	int connfd, maxfd;
+	int rv, connfd, maxfd;
+	unsigned int i, j, busycount;
+	bool workdone;
 	fd_set readfds;
 	struct timeval tv;
 	
diff -puN include/hash.h~int_to_bools include/hash.h
--- cur/include/hash.h~int_to_bools	2004-01-17 21:09:20.000000000 -0300
+++ cur-root/include/hash.h	2004-01-17 21:09:20.000000000 -0300
@@ -2,12 +2,14 @@
 #ifndef _HASH_H
 #define _HASH_H
 
+#include <stdbool.h>
+
 #include "wqueue.h"
 
 struct hentry {
 	char *objname;
 	unsigned int len;
-	char locked;
+	bool locked;
 	int fd;
 	struct wqentry *wq;
 	struct hentry *next;

_
