tools/header_generation/create_hdr_common.c
/***************************************************************************
 * Function	:	parse_input_file
 * Arguments	:	list - Pointer to array of field names
 *			num_list - Number of elements in list
 * Return	:	SUCCESS or FAILURE
 * Description	:	Parses all the fields in the list and fills the info
 *			in Global Structure
 ***************************************************************************/
Function     :       parse_input_file
Arguments    :       list - Pointer to array of field names
num_list - Number of elements in list
Return       :       SUCCESS or FAILURE
Description  :       Parses all the fields in the list and fills the info
in Global Structure
Function : parse_input_file Arguments : list - Pointer to array of field names num_list - Number of elements in list Return : SUCCESS or FAILURE Description : Parses all the fields in the list and fills the info in Global Structure
int parse_input_file(char **list, uint32_t num_list)
{
	int i, ret = 0;
	FILE *fp;
	fp = fopen(gd.input_file, "r");
	if (fp == NULL) {
		printf("Error in opening the file: %s\n", gd.input_file);
		return FAILURE;
	}
	for (i = 0; i < num_list; i++) {
		ret = fill_gd_input_file(list[i], fp);
		if (ret != SUCCESS)
			break;
	}
	fclose(fp);
	return ret;
}
int parse_input_file ( char * * list , uint32_t num_list ) { int i , ret = 0 ; FILE * fp ; fp = fopen ( gd . input_file , " " ) ; if ( fp == NULL ) { printf ( " \n " , gd . input_file ) ; return FAILURE ; } for ( i = 0 ; i < num_list ; i ++ ) { ret = fill_gd_input_file ( list [ i ] , fp ) ; if ( ret != SUCCESS ) break ; } fclose ( fp ) ; return ret ; }
Function     :       parse_input_file
 Arguments    :       list - Pointer to array of field names
                      num_list - Number of elements in list
 Return       :       SUCCESS or FAILURE
 Description  :       Parses all the fields in the list and fills the info
                      in Global Structure
Function : parse_input_file Arguments : list - Pointer to array of field names num_list - Number of elements in list Return : SUCCESS or FAILURE Description : Parses all the fields in the list and fills the info in Global Structure