blob: c92dbdf0702cf26e7c9e622bc669fe18afca8eca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright 2025 Thorsten Töpper
*
* vim:ts=4:sw=4:expandtab
*/
#ifndef OPTIONS_H
#define OPTIONS_H
#include <stdbool.h>
#include "output.h"
#include "data_management.h"
/* === DEFINITIONS === */
/* TODO: if ported to other platforms, those precompiler checks need to be extended */
#ifndef PATH_SEP
#define PATH_SEP '/'
#endif
enum esort_type { SORT_BY_NAME, SORT_BY_SIZE, SORT_BY_TIME };
/* === GLOBAL VARIABLES === */
extern bool option_sort_reverse_order;
extern enum esort_type option_sort_type;
extern bool option_print_boxed_table;
extern bool option_print_header;
extern bool option_quiet;
extern bool option_resolve_symlinks;
extern bool option_show_hidden_entries;
extern bool option_timestamp_long;
extern char option_time_field;
extern char *option_format_string;
int parse_arguments(int argc, char **argv);
void set_option(const char *option_name, char *option_argument);
/* In theory a part of output, but it's easier to place it near the struct
* containing the options in options.c */
void usage(char *executable);
#endif
|