]>
Commit | Line | Data |
---|---|---|
765b17bc MT |
1 | /* SmoothWall libsmooth. |
2 | * | |
3 | * This program is distributed under the terms of the GNU General Public | |
4 | * Licence. See the file COPYING for details. | |
5 | * | |
6 | * (c) Lawrence Manning, 2001 | |
7 | * Contains prototypes for library functions. | |
8 | * | |
9 | */ | |
10 | ||
11 | #ifndef ___LIBSMOOTH_H | |
12 | #define ___LIBSMOOTH_H | |
13 | ||
14 | #include <stdio.h> | |
15 | #include <stdlib.h> | |
16 | #include <string.h> | |
17 | #include <ctype.h> | |
18 | #include <wchar.h> | |
19 | #include <locale.h> | |
20 | #include <unistd.h> | |
21 | #include <sys/file.h> | |
22 | #include <sys/types.h> | |
23 | #include <sys/stat.h> | |
24 | #include <fcntl.h> | |
25 | #include <newt.h> | |
26 | #include <dirent.h> | |
27 | #include <sys/mount.h> | |
28 | ||
29 | #include <sys/socket.h> | |
30 | #include <netinet/in.h> | |
31 | #include <arpa/inet.h> | |
32 | ||
33 | #include <linux/cdrom.h> | |
34 | #include <sys/ioctl.h> | |
35 | ||
36 | #define STRING_SIZE 1024 | |
37 | ||
38 | struct keyvalue { | |
39 | char key[STRING_SIZE]; | |
40 | char value[STRING_SIZE]; | |
41 | struct keyvalue *next; | |
42 | }; | |
43 | ||
44 | /* libsmooth.c */ | |
45 | void stripnl(char *s); | |
46b56e20 | 46 | int mysystem(const char* output, const char *command); |
765b17bc MT |
47 | void errorbox(char *message); |
48 | int statuswindowscroll(int width, int height, const char *title, const char *text, ...); | |
49 | int disclaimerbox(char *message); | |
50 | void statuswindow(int width, int height, const char *title, const char *text, ...); | |
51 | int runcommandwithprogress(int width, int height, const char *title, const char *command, | |
52 | int lines, char *text, ...); | |
46b56e20 MT |
53 | int runcommandwithstatus(const char *command, const char* title, const char *message, const char* output); |
54 | int runhiddencommandwithstatus(const char *command, const char* title, const char *message, const char* output); | |
a3e135c8 | 55 | int splashWindow(const char* title, const char* message, unsigned int timeout); |
765b17bc MT |
56 | int checkformodule(const char *module); |
57 | int replace(char filename1[], char *from, char *to); | |
58 | char* get_version(void); | |
59 | ||
60 | /* varval.c */ | |
61 | struct keyvalue *initkeyvalues(void); | |
62 | void freekeyvalues(struct keyvalue *head); | |
63 | int readkeyvalues(struct keyvalue *head, char *filename); | |
64 | int writekeyvalues(struct keyvalue *head, char *filename); | |
65 | int findkey(struct keyvalue *head, char *key, char *value); | |
66 | void appendkeyvalue(struct keyvalue *head, char *key, char *value); | |
67 | void replacekeyvalue(struct keyvalue *head, char *key, char *value); | |
68 | ||
69 | #endif |