Due to an MSVC 2012 x64 compiler issue, the compiler generates bad code
for bdz.c, so the for loop in assign() continues running until the point
i falls below zero, causing an access violation when we try to do
curr_edge=queue[i]; (line 427 in bdz.c). Address this issue by breaking
out of the loop at the end of it when i reaches 0 after doing the
necessary processing.
https://bugzilla.gnome.org/show_bug.cgi?id=733595
...So that it will compile on non-C99 compilers. The changes are mainly
moving the variable declarations to the start of the resecptive blocks.
Also, replace the use of buflen in chd.c as it might not be defined for all
platforms, instead using packed_cr_size as it seems to represent the value
that is to be printed/displayed by the debugging output.
https://bugzilla.gnome.org/show_bug.cgi?id=681820
* Functions taking no parameters need to explicitly say (void).
* Mark some functions as static that are
* Comment out an unused function in bdz.c
* Change loop indicies "i" to be unsigned if our limit is unsigned