Mostly, several functions that take pointers as arguments, almost
always char * pointers, had those pointers qualified with "const".
Those that returned pointers to previously const-qualified arguments
had their return values qualified as const. Some structure members
were qualified as const to retain that attribute from the variables
from which they were assigned.
Cleanup of redundant/useless header file inclusion.
ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
/*
* This is a comment.
*/
Added:
isc_buffer_base(b) (pointer)
isc_buffer_current(b) (pointer)
isc_buffer_active(b) (pointer)
isc_buffer_used(b) (pointer)
isc_buffer_length(b) (int)
isc_buffer_usedlength(b) (int)
isc_buffer_consumedlength(b) (int)
isc_buffer_remaininglength(b) (int)
isc_buffer_activelength(b) (int)
isc_buffer_availablelength(b) (int)
Removed:
ISC_BUFFER_USEDCOUNT(b)
ISC_BUFFER_AVAILABLECOUNT(b)
isc_buffer_type(b)
Changed names:
isc_buffer_used(b, r) ->
isc_buffer_usedregion(b, r)
isc_buffer_available(b, r) ->
isc_buffer_available_region(b, r)
isc_buffer_consumed(b, r) ->
isc_buffer_consumedregion(b, r)
isc_buffer_active(b, r) ->
isc_buffer_activeregion(b, r)
isc_buffer_remaining(b, r) ->
isc_buffer_remainingregion(b, r)
Buffer types were removed, so the ISC_BUFFERTYPE_*
macros are no more, and the type argument to
isc_buffer_init and isc_buffer_allocate were removed.
isc_buffer_putstr is now void (instead of isc_result_t)
and requires that the caller ensure that there
is enough available buffer space for the string.
Allow only one socket event to be outstanding at a time.
Signal the listener when a connection it accepted has disconnected.
Set some destroyed/freed pointers to NULL after destruction/freeing.
Use isc_net_probeipv6 directly instead of omapi_ipv6 variable.
* no spaces around " -> " in indirect postfix expression.
* no space between function name and open parenthesis.
* no space between array name and open bracket.
* use NULL not 0 for pointers.
* explicitly compare pointers to NULL.
* explicitly compare integers to 0.
* Do not cast NULL.
* return type of function declaration on line by itself.
* open brace of function definition follows close parenthesis if parameters
all fit on one line.
* comment-only lines start with /* on line by itself, and end with */
on line by itself.
* variable names in structures separated from their types in a column.
* name the parameters in function prototypes.
* ifndef multiple header file inclusion.
and other BIND9 conventions not in coding.html:
* private structures defined in relevant source module, not private header.
* RCS /* $Id: $ */ comments.
* Principal Author (Ted Lemon) comments.
* Updated ISC copyrights.
* Parenthesize value of return().
* Parenthesize argument of sizeof().
* "unsigned int foo" not "unsigned foo".
* ISC_LANG_(BEGIN|END)DECLS in header files.
* header files included directly by source/header file that needs them.
* ... and others I am probably forgetting.
and conversion to some libisc.a modules:
* use isc/int.h for isc_uintXX_t types, not u_intXX_t.
* use isc/assertions.h for REQUIRE() and INSIST().
* use isc/error.h for UNEXPECTED_ERROR.
* use isc/boolean.h for isc_boolean_t flags instead of int flags.
* use isc/net.h for networking types.
* use isc/netdb.h for gethostby*.
STILL TO COME ...
* more isc_boolean_t.
* isc/time.h to replace struct timeval.
* isc/socket.h to replace socket/listen/select/etc.
* isc/mem.h to replace malloc/free.
* namespace overhaul & omapi/compatibility.h.
Please collect all your belongings but stand clear of the doors until this
train has come to a complete stop.