![]() |
nSnake
A ncurses implementation of the classic Snake game
|
Defines the procedures related to handling the command-line arguments. More...
#include <stdio.h>#include <stdlib.h>#include <getopt.h>#include "arguments.h"#include "hscores.h"
Functions | |
| void | args_handle (int argc, char *argv[]) |
| Handles all the commandline arguments. | |
| void | print_help () |
| Prints Help instructions on standard output. | |
| void | print_license () |
| Prints the preamble of the GNU GPL license v3 on standard output. | |
| void | print_usage () |
| Prints the program usage on standard output. | |
| void | print_version () |
| Prints the program version on standard output. | |
Defines the procedures related to handling the command-line arguments.
Version 1.0 (31/12/11)
| void args_handle | ( | int | argc, |
| char * | argv[] | ||
| ) |
Handles all the commandline arguments.
This is the main function of this module. It processes an argv[] array of argc elements based on the options specified at the struct option.
If you want to add another argument, follow these steps: # Add an option on the struct option. # Add the short equivalent (if it exists) on the getopt_long() call. # Add a case on the switch specifying the action of that option.
1.7.6.1