marked usage of signed ints for lengths, counts, and other questionable acts in nsdb.h