fixed compilation on BSD - Mac OS X
proper size for arrays not to exceed the limits by writing last position with NULL
fix compile warning for implicit declaration of function 'save_raw_set_group'