Files
scan/inc/arguments.h
T

35 lines
768 B
C

/* --------------------------------------------------------
* -- project: SCAN
* -- description: handle commandline arguments
* --------------------------------------------------------
*/
#ifndef __ARGUMENTS_H
#define __ARGUMENTS_H
#include <stdbool.h>
#include <argp.h>
typedef enum {
no_permissions = 0,
char_permissions = 1,
octal_permissions = 2
} permission_mode_t;
typedef struct {
bool show_all;
bool show_almost_all;
bool no_colour;
bool group_directories;
bool human_readable;
bool long_view;
bool tree_view;
permission_mode_t permission_mode;
char* path;
} arguments_t;
void initialise_args( arguments_t* arguments );
error_t parse_args( int argc, char** argv, arguments_t* arguments );
#endif