cake
/
p7utils
Archived
1
0
Fork 0
This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
p7utils/src/p7/main.h

48 lines
1.4 KiB
C
Raw Normal View History

2016-12-21 22:56:20 +01:00
/* ************************************************************************** */
/* _____ _ */
/* p7/main.h |_ _|__ _ _| |__ ___ _ _ */
/* | Project: p7utils | |/ _ \| | | | '_ \ / _ \ | | | */
2016-12-21 22:56:20 +01:00
/* | | (_) | |_| | | | | __/ |_| | */
/* By: thomas <thomas@touhey.fr> |_|\___/ \__,_|_| |_|\___|\__, |.fr */
2017-01-17 00:46:42 +01:00
/* Last updated: 2017/01/16 23:55:54 |___/ */
2016-12-21 22:56:20 +01:00
/* */
/* ************************************************************************** */
#ifndef MAIN_H
# define MAIN_H
# define Q(x) #x
# define QUOTE(x) Q(x)
# include <stdio.h>
# include <libp7.h>
# define log(S, ...) fprintf(stderr, S, ##__VA_ARGS__)
/* Menus */
typedef enum {
mn_send, mn_get, mn_copy, mn_del, mn_ls, mn_reset, mn_optimize,
mn_info
} menu_t;
/* Arguments */
typedef struct {
/* basic things */
menu_t menu;
int nicedisp;
/* for file transferring menus */
const char *dirname, *filename;
const char *newdir, *newname;
FILE *local; const char *localpath;
int force;
/* other options */
2017-01-27 00:10:39 +01:00
unsigned int initflags;
2017-01-26 14:36:52 +01:00
int com; const char *storage;
2016-12-21 22:56:20 +01:00
} args_t;
/* Parsing function */
int parse_args(int ac, char **av, args_t *args);
/* Dumping function */
int dump(p7_handle_t *handle);
#endif /* MAIN_H */