Merge remote-tracking branch 'origin/next' into install-raid
[ipfire-2.x.git] / src / libsmooth / libsmooth.h
CommitLineData
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
38struct keyvalue {
39 char key[STRING_SIZE];
40 char value[STRING_SIZE];
41 struct keyvalue *next;
42};
43
44/* libsmooth.c */
45void stripnl(char *s);
46b56e20 46int mysystem(const char* output, const char *command);
765b17bc
MT
47void errorbox(char *message);
48int statuswindowscroll(int width, int height, const char *title, const char *text, ...);
49int disclaimerbox(char *message);
50void statuswindow(int width, int height, const char *title, const char *text, ...);
51int runcommandwithprogress(int width, int height, const char *title, const char *command,
52 int lines, char *text, ...);
46b56e20
MT
53int runcommandwithstatus(const char *command, const char* title, const char *message, const char* output);
54int runhiddencommandwithstatus(const char *command, const char* title, const char *message, const char* output);
765b17bc
MT
55int checkformodule(const char *module);
56int replace(char filename1[], char *from, char *to);
57char* get_version(void);
58
59/* varval.c */
60struct keyvalue *initkeyvalues(void);
61void freekeyvalues(struct keyvalue *head);
62int readkeyvalues(struct keyvalue *head, char *filename);
63int writekeyvalues(struct keyvalue *head, char *filename);
64int findkey(struct keyvalue *head, char *key, char *value);
65void appendkeyvalue(struct keyvalue *head, char *key, char *value);
66void replacekeyvalue(struct keyvalue *head, char *key, char *value);
67
68#endif