/*Steven Spivack
 * CpSc 1011 Section 5
 * Oct 27, 2022
 * Lab 9A
 * This file initializes all of the structures and functions for later use in mainDriver.
 * This file also includes all library information that I will be later using
 * string library for instance for use with assigning P3 in the header via "strcpy"
*/

#ifndef DEFS_H
#define DEFS_H
#include<stdio.h>
#include<string.h>

// Set up Structs for Header and Pixel

// Header Struct:
typedef struct header {
	char file[2];
	int height, width, maxColor;
} header;

// Pixel Struct:
typedef struct pixel {
	unsigned int r, g, b;
} pixel;

// Set up Function:
int getWidth();
void writeHeader(header size);
void fillFlagArray(pixel flag[], int width, int height);
void writePixels(pixel flag[], int width, int height, int flagSize);

#endif
