[klibc] getopt(): additional heuristics; style changes

Add additional heuristics for when to reset the getopt() state;
group private state into a structure.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
1 file changed