/*=========================================================
Owen Dover
C20224779
11/10/2022
CPSC 1011 Section 005
Lab 10B

Function to get header info from file input
and return it to driver
=========================================================*/

#include "defs.h"

info_t getHeader(){

	info_t header;
	fscanf(stdin, "%s", &header.type);
	int *z;
 	z = (int *) malloc(3 * sizeof(int));
       for(int i = 0; i < 3; i++){
              fscanf(stdin, "%i", &z[i]);
       }
	header.width = z[0];
	header.height = z[1];
	header.maxColor = z[2];

	free(z);

return header;
}