]> git.sur5r.net Git - ngadmin/blob - cli/common.h
c0e6cb81ecac5615c1dc068d8f6804a63b116eab
[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
20 extern int cont;
21 extern struct termios current_term;
22
23
24 extern const char *bitrates[], *prio[];
25
26
27 void displaySwitchTab (const struct swi_attr *sa, int nb);
28 void printErrCode (int err);
29 int parseBitrate (const char *s);
30 char parsePrio (const char *s);
31
32
33 // 
34 int trim (char *txt, int start);
35
36 // 
37 int explode (const char *commande, char** tab, int maximum);
38
39
40
41 #endif
42