software/drivers/sd8887/src/wlan/mapp/mlanconfig/mlanconfig.c
/**
 *  @brief parse hex data
 *  @param fp       File handler
 *  @param dst      A pointer to receive hex data
 *  @return         length of hex data
 */
@brief parse hex data
@param fp       File handler
@param dst      A pointer to receive hex data
@return         length of hex data
@brief parse hex data @param fp File handler @param dst A pointer to receive hex data @return length of hex data
int
fparse_for_hex(FILE * fp, t_u8 *dst)
{
	t_s8 *ptr;
	t_u8 *dptr;
	t_s8 buf[256];
	dptr = dst;
	while (fgets(buf, sizeof(buf), fp)) {
		ptr = buf;
		while (*ptr) {
			while (*ptr && (isspace(*ptr) || *ptr == '\t'))
				ptr++;
			if (*ptr == '\0' || *ptr == '#')
				break;
			if (isxdigit(*ptr)) {
				ptr = convert2hex(ptr, dptr++);
			} else {
				ptr++;
			}
		}
	}
	return (dptr - dst);
}
int fparse_for_hex ( FILE * fp , t_u8 * dst ) { t_s8 * ptr ; t_u8 * dptr ; t_s8 buf [ 256 ] ; dptr = dst ; while ( fgets ( buf , sizeof ( buf ) , fp ) ) { ptr = buf ; while ( * ptr ) { while ( * ptr && ( isspace ( * ptr ) || * ptr == ' \t ' ) ) ptr ++ ; if ( * ptr == ' \0 ' || * ptr == ' ' ) break ; if ( isxdigit ( * ptr ) ) { ptr = convert2hex ( ptr , dptr ++ ) ; } else { ptr ++ ; } } } return ( dptr - dst ) ; }
@brief parse hex data
  @param fp       File handler
  @param dst      A pointer to receive hex data
  @return         length of hex data
@brief parse hex data @param fp File handler @param dst A pointer to receive hex data @return length of hex data
/* skip leading spaces */ /* skip blank lines and lines beginning with '#' */ /* Invalid character on data line */