aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-11-29 04:51:11 -0500
committerMike Frysinger <vapier@gentoo.org>2008-11-29 04:51:45 -0500
commit2fe10002a1a2df0aef56147e2024bc5f70863c1b (patch)
tree6d9994e73cfc29d8c92fcbbd7f527917ddad8769 /libsbutil
parentsandbox: include full libc path in version output (diff)
downloadsandbox-2fe10002a1a2df0aef56147e2024bc5f70863c1b.tar.gz
sandbox-2fe10002a1a2df0aef56147e2024bc5f70863c1b.tar.bz2
sandbox-2fe10002a1a2df0aef56147e2024bc5f70863c1b.zip
libsbutil: scrub more unused rcscripts code
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsbutil')
-rw-r--r--libsbutil/Makefile.am1
-rw-r--r--libsbutil/include/Makefile.am1
-rw-r--r--libsbutil/include/rcscripts/Makefile.am26
-rw-r--r--libsbutil/include/rcscripts/core/Makefile.am3
-rw-r--r--libsbutil/include/rcscripts/core/services.h25
-rw-r--r--libsbutil/include/rcscripts/rccore.h25
-rw-r--r--libsbutil/include/rcscripts/rcdefines.h.in23
-rw-r--r--libsbutil/include/rcscripts/rcutil.h1
-rw-r--r--libsbutil/include/rcscripts/util/Makefile.am10
-rw-r--r--libsbutil/include/rcscripts/util/simple-regex.h73
-rw-r--r--libsbutil/include/rcscripts/util/string.h27
11 files changed, 0 insertions, 215 deletions
diff --git a/libsbutil/Makefile.am b/libsbutil/Makefile.am
index 64066cc..ea86462 100644
--- a/libsbutil/Makefile.am
+++ b/libsbutil/Makefile.am
@@ -28,7 +28,6 @@ libsbutil_la_SOURCES = \
include/rcscripts/rcutil.h \
include/rcscripts/util/list.h \
include/rcscripts/util/str_list.h \
- include/rcscripts/util/simple-regex.h \
include/rcscripts/util/debug.h \
src/debug.c \
include/rcscripts/util/string.h \
diff --git a/libsbutil/include/Makefile.am b/libsbutil/include/Makefile.am
deleted file mode 100644
index 6757e13..0000000
--- a/libsbutil/include/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = rcscripts
diff --git a/libsbutil/include/rcscripts/Makefile.am b/libsbutil/include/rcscripts/Makefile.am
deleted file mode 100644
index 651b389..0000000
--- a/libsbutil/include/rcscripts/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-SUBDIRS = \
- util \
- core
-
-rcdir = $(pkgincludedir)
-rc_HEADERS = \
- rctypes.h \
- rcutil.h \
- rccore.h
-nodist_rc_HEADERS = rcdefines.h
-
-rcdefines.h: $(srcdir)/rcdefines.h.in
- @rm -f rcdefines.h
- @echo "Generating rcdefines.h..."
- @sed -e 's:@ETCDIR@:$(sysconfdir):g' \
- -e 's:@BINDIR@:$(bindir):g' \
- -e 's:@LIBDIR@:$(libdir):g' \
- -e 's:@SBINDIR@:$(sbindir):g' \
- -e 's:@VARDIR@:$(localstatedir):g' \
- -e 's:@SHELL_PARSER@:$(RC_SHELL):g' \
- $(srcdir)/rcdefines.h.in > rcdefines.h
-
-EXTRA_DIST = rcdefines.h.in
-
-CLEANFILES = rcdefines.h
-DISTCLEANFILES = $(CLEANFILES)
diff --git a/libsbutil/include/rcscripts/core/Makefile.am b/libsbutil/include/rcscripts/core/Makefile.am
deleted file mode 100644
index b388d65..0000000
--- a/libsbutil/include/rcscripts/core/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-rcdir = $(pkgincludedir)/core
-rc_HEADERS = \
- services.h
diff --git a/libsbutil/include/rcscripts/core/services.h b/libsbutil/include/rcscripts/core/services.h
deleted file mode 100644
index 38b67bc..0000000
--- a/libsbutil/include/rcscripts/core/services.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * services.h
- *
- * Functions dealing with services.
- *
- * Copyright 1999-2008 Gentoo Foundation
- * Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- * Licensed under the GPL-2
- */
-
-#ifndef __RC_SERVICES_H__
-#define __RC_SERVICES_H__
-
-typedef enum {
- rc_service_coldplugged,
- rc_service_starting,
- rc_service_started,
- rc_service_inactive,
- rc_service_wasinactive,
- rc_service_stopping
-} rc_service_state_t;
-
-bool rc_service_test_state (const char *service, rc_service_state_t state);
-
-#endif /* __RC_SERVICES_H__ */
diff --git a/libsbutil/include/rcscripts/rccore.h b/libsbutil/include/rcscripts/rccore.h
deleted file mode 100644
index aa7a54e..0000000
--- a/libsbutil/include/rcscripts/rccore.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * rccore.h
- *
- * Core includes.
- *
- * Copyright 1999-2008 Gentoo Foundation
- * Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- * Licensed under the GPL-2
- */
-
-#ifndef __RCCORE_H__
-#define __RCCORE_H__
-
-#include "rcscripts/rcdefines.h"
-#include "rcscripts/rcutil.h"
-
-#include "rcscripts/core/services.h"
-
-/* Initialize needed variables, etc. Should be called before anything else
- * from the rccore library is used. Return 0 on success, else -1 and sets
- * errno.
- */
-int rc_init (void);
-
-#endif /* __RCCORE_H__ */
diff --git a/libsbutil/include/rcscripts/rcdefines.h.in b/libsbutil/include/rcscripts/rcdefines.h.in
deleted file mode 100644
index 7c604db..0000000
--- a/libsbutil/include/rcscripts/rcdefines.h.in
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * rcdefines.h
- *
- * Core defines.
- *
- * Copyright 1999-2008 Gentoo Foundation
- * Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- * Licensed under the GPL-2
- */
-
-#ifndef __RCDEFINES_H__
-#define __RCDEFINES_H__
-
-#define RCSCRIPTS_ETCDIR "@ETCDIR@"
-#define RCSCRIPTS_CONFDDIR RCSCRIPTS_ETCDIR "/conf.d"
-#define RCSCRIPTS_INITDDIR RCSCRIPTS_ETCDIR "/init.d"
-#define RCSCRIPTS_LIBDIR "@LIBDIR@/rcscripts"
-#define RCSCRIPTS_SBINDIR "@SBINDIR@"
-#define RCSCRIPTS_VARDIR "@VARDIR@"
-
-#define SHELL_PARSER "@SHELL_PARSER@"
-
-#endif /* __RCDEFINES_H__ */
diff --git a/libsbutil/include/rcscripts/rcutil.h b/libsbutil/include/rcscripts/rcutil.h
index c33f60e..5d2369c 100644
--- a/libsbutil/include/rcscripts/rcutil.h
+++ b/libsbutil/include/rcscripts/rcutil.h
@@ -18,6 +18,5 @@
#include "rcscripts/util/list.h"
#include "rcscripts/util/str_list.h"
#include "rcscripts/util/dynbuf.h"
-#include "rcscripts/util/simple-regex.h"
#endif /* __RCUTIL_H__ */
diff --git a/libsbutil/include/rcscripts/util/Makefile.am b/libsbutil/include/rcscripts/util/Makefile.am
deleted file mode 100644
index 01a3358..0000000
--- a/libsbutil/include/rcscripts/util/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-rcdir = $(pkgincludedir)/util
-rc_HEADERS = \
- debug.h \
- dynbuf.h \
- list.h \
- string.h \
- file.h \
- config.h \
- simple-regex.h \
- str_list.h
diff --git a/libsbutil/include/rcscripts/util/simple-regex.h b/libsbutil/include/rcscripts/util/simple-regex.h
deleted file mode 100644
index f0a6ad7..0000000
--- a/libsbutil/include/rcscripts/util/simple-regex.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * simple_regex.h
- *
- * Simle regex library.
- *
- * Copyright 1999-2008 Gentoo Foundation
- * Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- * Licensed under the GPL-2
- */
-
-#ifndef __RC_SIMPLE_REGEX_H__
-#define __RC_SIMPLE_REGEX_H__
-
-#define REGEX_NO_MATCH 0 /* We have no match */
-#define REGEX_PARTIAL_MATCH 1 /* Some of the string matches the regex */
-#define REGEX_FULL_MATCH 2 /* The whole string matches the regex */
-
-/* Macro to fill in .data and .regex */
-#define FILL_REGEX_DATA(_regex_data, _string, _regex) \
- do { \
- _regex_data.data = _string; \
- _regex_data.regex = _regex; \
- } while (0)
-
-/* Fill in _regex_data with _data and _regex, on failure goto _error */
-#define DO_REGEX(_regex_data, _data, _regex, _error) \
- do { \
- FILL_REGEX_DATA(_regex_data, _data, _regex); \
- if (-1 == match(&_regex_data)) \
- { \
- DBG_MSG("Could not do regex match!\n"); \
- goto _error; \
- } \
- } while (0)
-
-/* Evaluate to true if we have some kind of match */
-#define REGEX_MATCH(_regex_data) \
- ((REGEX_FULL_MATCH == _regex_data.match) \
- || (REGEX_PARTIAL_MATCH == _regex_data.match))
-
-/* Same as above, but for use when _regex_data is a pointer */
-#define REGEX_MATCH_P(_regex_data) \
- ((REGEX_FULL_MATCH == _regex_data->match) \
- || (REGEX_PARTIAL_MATCH == _regex_data->match))
-
-typedef struct
-{
- char *data; /* String to perform regex operation on */
- char *regex; /* String containing regex to use */
- int match; /* Will be set if there was a match. Check
- * REGEX_*_MATCH above for possible values */
- char *where; /* Pointer to where match starts in data */
- size_t count; /* Count characters from data matched by regex */
- size_t r_count; /* Count characters of regex used for match. This
- * should normally be the lenght of regex, but might
- * not be for some internal functions ... */
-} regex_data_t;
-
-/*
- * Return:
- *
- * 0 - There was no error. If there was a match, regex_data->match
- * - will be > 0 (this is the definitive check - if not true, the
- * - other values of the struct may be bogus), regex_data->count
- * - will be the amount of data that was matched (might be 0 for
- * - some wildcards), and regex_data->r_count will be > 0.
- *
- * -1 - An error occured. Check errno for more info.
- *
- */
-int match (regex_data_t * regex_data);
-
-#endif /* __RC_SIMPLE_REGEX_H__ */
diff --git a/libsbutil/include/rcscripts/util/string.h b/libsbutil/include/rcscripts/util/string.h
index 25546e7..a5484b4 100644
--- a/libsbutil/include/rcscripts/util/string.h
+++ b/libsbutil/include/rcscripts/util/string.h
@@ -11,33 +11,6 @@
#ifndef __RC_STRING_H__
#define __RC_STRING_H__
-#include <stdio.h>
-
-/* Gentoo style e* printing macro's */
-#define EINFO(_args...) \
- do { \
- save_errno (); \
- printf (" \033[32;01m*\033[0m " _args); \
- restore_errno (); \
- } while (0)
-
-#define EWARN(_args...) \
- do { \
- save_errno (); \
- printf (" \033[33;01m*\033[0m " _args); \
- restore_errno (); \
- } while (0)
-
-#define EERROR(_args...) \
- do { \
- save_errno (); \
- fprintf (stderr, " \033[31;01m*\033[0m " _args); \
- restore_errno (); \
- } while (0)
-
-/* String functions. Return a string on success, or NULL on error
- * or no action taken. On error errno will be set.*/
-char *rc_memrepchr (char **str, char old, char _new, size_t size);
/* Concat two paths adding '/' if needed. Memory will be allocated
* with the malloc() call. */
char *rc_strcatpaths (const char *pathname1, const char *pathname2);