/* counts arguments in format string for sprintf view  */
static int debug_count_numargs(char *string)
/* counts arguments in format string for sprintf view  */
static int debug_count_numargs(char *string)
{
	int numargs=0;
	while(*string) {
		if(*string++=='%')
			numargs++;
	}
	return(numargs);
}