]> git.sur5r.net Git - ngadmin/blob - cli/common.h
Cli: refactor, change coding style
[ngadmin] / cli / common.h
1
2 #ifndef DEF_COMMON
3 #define DEF_COMMON
4
5
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <string.h>
9 #include <termios.h>
10 #include <unistd.h>
11
12 #include <ngadmin.h>
13
14
15 #define UNUSED                  __attribute__((unused))
16 #define NORET                   __attribute__((noreturn))
17
18
19 extern int cont;
20 extern struct termios current_term;
21
22
23 extern const char * const bitrates[], * const prio[];
24
25
26 void displaySwitchTab (const struct swi_attr *sa, int nb);
27 void printErrCode (int err);
28 int parseBitrate (const char *s);
29 char parsePrio (const char *s);
30
31
32 int trim (char *txt, int start);
33
34 int explode (const char *commande, char** tab, int maximum);
35
36
37 #endif
38