IN101 project on Conway's Game of Life
Classes | Typedefs | Functions
list_optionsparser.h File Reference

Header file for an option parser for a linked list implementation of Conway's game of life. More...

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for list_optionsparser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  list_options
 Structure used to store the command-line options entered by the user. More...
 

Typedefs

typedef struct list_options list_options
 

Functions

list_options list_default_options ()
 
void print_usage (char *exec_name)
 Print usage help message and crash program. More...
 
void do_print_formatting_help ()
 Print source textfile formatting help and crash program.
 
list_options parse_options (int argc, char **argv)
 Parse options from command line arguments. More...
 

Detailed Description

Header file for an option parser for a linked list implementation of Conway's game of life.

Author
Victor Colomb (vic.c.nosp@m.ol@h.nosp@m.otmai.nosp@m.l.fr)
Date
2021-03-16

Function Documentation

◆ parse_options()

list_options parse_options ( int  argc,
char **  argv 
)

Parse options from command line arguments.

Function will modify print_formatting_help, print_to_console and generate_images booleans accordingly and return the first positional argument, which should be the filename.

◆ print_usage()

void print_usage ( char *  exec_name)

Print usage help message and crash program.

Parameters
exec_nameexecutable name (usually from argv[0])