add extra snapshot and protection period flags and fix snapshot dec/inc
in dat.c