commit b682a5e48569f409f30d1bc39039de1090019665 from: Alexander Barton date: Thu Jul 14 09:11:38 2005 UTC Reformatted some comments. commit - efbfe4ae839b6329d5433f2468ddb71345acf438 commit + b682a5e48569f409f30d1bc39039de1090019665 blob - 7a7e0d830c91d91323835575d68cb317e837ae45 blob + 82ea2f0d78bc9f528d16f924fbcdcf424a56dd49 --- src/ngircd/array.h +++ src/ngircd/array.h @@ -8,7 +8,7 @@ * libarray - dynamically allocate arrays. * Copyright (c) 2005 Florian Westphal (westphal@foo.fh-furtwangen.de) * - * $Id: array.h,v 1.1 2005/07/07 18:38:14 fw Exp $ + * $Id: array.h,v 1.2 2005/07/14 09:11:38 alex Exp $ */ #ifndef array_h_included @@ -25,12 +25,11 @@ typedef struct { /* allocated: mem != NULL, used >= 0 && used <= allocated, allocated > 0 unallocated: mem == NULL, allocated == 0, used == 0 */ - #define array_unallocated(x) (array_bytes(x)==0) #define INIT_ARRAY { NULL, 0, 0 } /* allocates space for at least nmemb+1 elements of size bytes each. - return pointer to elem at pos, or NULL if realloc() fails */ + return pointer to elem at pos, or NULL if realloc() fails */ extern void * array_alloc PARAMS((array *a, unsigned int size, unsigned int pos)); /* returns the number of initialized BYTES in a. */ @@ -40,8 +39,8 @@ extern void * array_alloc PARAMS((array *a, unsigned i extern unsigned int array_length PARAMS((const array* const a, unsigned int elemsize)); /* _copy functions: copy src to dest. -return true if OK, else false. (e.g. realloc failure, invalid src/dest array, ..) -In that case dest is left unchanged. */ + return true if OK, else false (e. g. realloc failure, invalid src/dest + array, ...). In that case dest is left unchanged. */ /* copy array src to dest */ extern bool array_copy PARAMS((array* dest, const array* const src)); @@ -53,8 +52,8 @@ extern bool array_copyb PARAMS((array* dest, const cha extern bool array_copys PARAMS((array* dest, const char* src)); /* _cat functions: append src to dest. -return true if OK, else false. (e.g. realloc failure, invalid src/dest array, ..) -In that case dest is left unchanged. */ + return true if OK, else false (e. g. realloc failure, invalid src/dest + array, ...). In that case dest is left unchanged. */ /* append len bytes from src to array dest. */ extern bool array_catb PARAMS((array* dest, const char* src, unsigned int len)); @@ -69,8 +68,8 @@ extern bool array_cat0 PARAMS((array* dest)); extern bool array_cat PARAMS((array* dest, const array* const src)); /* return pointer to element at pos. - return NULL if the array is unallocated or if pos is larger than the number - of elements stored int the array. */ + return NULL if the array is unallocated or if pos is larger than the number + of elements stored int the array. */ extern void* array_get PARAMS((array* a, unsigned int membersize, unsigned int pos)); /* free the contents of this array. */ @@ -92,4 +91,5 @@ extern void array_truncate PARAMS((array* a, unsigned extern void array_moveleft PARAMS((array* a, unsigned int membersize, unsigned int pos)); #endif + /* -eof- */ blob - 10444872d3f1d461c102eb70f4fe8cad387fc98a blob + dfc27b076fe740f8008cfe1e45c32c56fe1fa15c --- src/ngircd/io.h +++ src/ngircd/io.h @@ -7,7 +7,7 @@ * * I/O abstraction interface header * - * $Id: io.h,v 1.2 2005/07/09 20:22:29 fw Exp $ + * $Id: io.h,v 1.3 2005/07/14 09:15:58 alex Exp $ */ #ifndef io_H_inclucded @@ -19,8 +19,9 @@ #define IO_WANTREAD 1 #define IO_WANTWRITE 2 -/* init library. sets up epoll/kqueue descriptors and tries to allocate space for ioevlen file descriptors. - ioevlen is just the _initial_ size, not a limit. */ +/* init library. + sets up epoll/kqueue descriptors and tries to allocate space for ioevlen + file descriptors. ioevlen is just the _initial_ size, not a limit. */ bool io_library_init PARAMS((unsigned int ioevlen)); /* shutdown and free all internal data structures */