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

50 lines
1.5 KiB
C

/* ************************************************************************** */
/* _____ _ */
/* main.h |_ _|__ _ _| |__ ___ _ _ */
/* | Project : p7 | |/ _ \| | | | '_ \ / _ \ | | | */
/* | | (_) | |_| | | | | __/ |_| | */
/* By: thomas <thomas@touhey.fr> |_|\___/ \__,_|_| |_|\___|\__, |.fr */
/* Last updated: 2016/08/21 16:50:57 |___/ */
/* */
/* ************************************************************************** */
#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 */
const char *device;
const char *storage;
int noinit;
int noexit;
} 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 */