aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libsbutil/include/rcscripts')
-rw-r--r--libsbutil/include/rcscripts/core/services.h18
-rw-r--r--libsbutil/include/rcscripts/rccore.h18
-rw-r--r--libsbutil/include/rcscripts/rcdefines.h.in18
-rw-r--r--libsbutil/include/rcscripts/rctypes.h18
-rw-r--r--libsbutil/include/rcscripts/rcutil.h17
-rw-r--r--libsbutil/include/rcscripts/util/config.h18
-rw-r--r--libsbutil/include/rcscripts/util/debug.h18
-rw-r--r--libsbutil/include/rcscripts/util/dynbuf.h19
-rw-r--r--libsbutil/include/rcscripts/util/file.h18
-rw-r--r--libsbutil/include/rcscripts/util/list.h78
-rw-r--r--libsbutil/include/rcscripts/util/simple-regex.h18
-rw-r--r--libsbutil/include/rcscripts/util/str_list.h18
-rw-r--r--libsbutil/include/rcscripts/util/string.h18
13 files changed, 61 insertions, 233 deletions
diff --git a/libsbutil/include/rcscripts/core/services.h b/libsbutil/include/rcscripts/core/services.h
index 4245bab..38b67bc 100644
--- a/libsbutil/include/rcscripts/core/services.h
+++ b/libsbutil/include/rcscripts/core/services.h
@@ -3,23 +3,9 @@
*
* Functions dealing with services.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
+ * Licensed under the GPL-2
*/
#ifndef __RC_SERVICES_H__
diff --git a/libsbutil/include/rcscripts/rccore.h b/libsbutil/include/rcscripts/rccore.h
index 9b6a3ef..aa7a54e 100644
--- a/libsbutil/include/rcscripts/rccore.h
+++ b/libsbutil/include/rcscripts/rccore.h
@@ -3,23 +3,9 @@
*
* Core includes.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
+ * Licensed under the GPL-2
*/
#ifndef __RCCORE_H__
diff --git a/libsbutil/include/rcscripts/rcdefines.h.in b/libsbutil/include/rcscripts/rcdefines.h.in
index 9815873..7c604db 100644
--- a/libsbutil/include/rcscripts/rcdefines.h.in
+++ b/libsbutil/include/rcscripts/rcdefines.h.in
@@ -3,23 +3,9 @@
*
* Core defines.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
+ * Licensed under the GPL-2
*/
#ifndef __RCDEFINES_H__
diff --git a/libsbutil/include/rcscripts/rctypes.h b/libsbutil/include/rcscripts/rctypes.h
index 4ce2118..26400b5 100644
--- a/libsbutil/include/rcscripts/rctypes.h
+++ b/libsbutil/include/rcscripts/rctypes.h
@@ -3,23 +3,9 @@
*
* Misc types and macro's.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
+ * Licensed under the GPL-2
*/
#ifndef __RCTYPES_H__
diff --git a/libsbutil/include/rcscripts/rcutil.h b/libsbutil/include/rcscripts/rcutil.h
index 58fbe97..516d41e 100644
--- a/libsbutil/include/rcscripts/rcutil.h
+++ b/libsbutil/include/rcscripts/rcutil.h
@@ -3,23 +3,8 @@
*
* Util defines.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
*/
#ifndef __RCUTIL_H__
diff --git a/libsbutil/include/rcscripts/util/config.h b/libsbutil/include/rcscripts/util/config.h
index b45ac47..ad392f4 100644
--- a/libsbutil/include/rcscripts/util/config.h
+++ b/libsbutil/include/rcscripts/util/config.h
@@ -3,23 +3,9 @@
*
* Miscellaneous config related macro's and functions.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
+ * Licensed under the GPL-2
*/
#ifndef __RC_CONFIG_H__
diff --git a/libsbutil/include/rcscripts/util/debug.h b/libsbutil/include/rcscripts/util/debug.h
index 522ee25..b177c4f 100644
--- a/libsbutil/include/rcscripts/util/debug.h
+++ b/libsbutil/include/rcscripts/util/debug.h
@@ -3,23 +3,9 @@
*
* Simle debugging/logging macro's and functions.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
+ * Licensed under the GPL-2
*/
#ifndef __RC_DEBUG_H__
diff --git a/libsbutil/include/rcscripts/util/dynbuf.h b/libsbutil/include/rcscripts/util/dynbuf.h
index 1349014..359c3b4 100644
--- a/libsbutil/include/rcscripts/util/dynbuf.h
+++ b/libsbutil/include/rcscripts/util/dynbuf.h
@@ -3,23 +3,9 @@
*
* Dynamic allocated buffers.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
+ * Licensed under the GPL-2
*/
#ifndef __RC_DYNBUF_H__
@@ -64,4 +50,3 @@ inline bool __rc_check_arg_dynbuf (rc_dynbuf_t *dynbuf, const char *file,
__rc_check_arg_dynbuf (_dynbuf, __FILE__, __func__, __LINE__)
#endif /* __RC_DYNBUF_H__ */
-
diff --git a/libsbutil/include/rcscripts/util/file.h b/libsbutil/include/rcscripts/util/file.h
index 7ace060..519ee18 100644
--- a/libsbutil/include/rcscripts/util/file.h
+++ b/libsbutil/include/rcscripts/util/file.h
@@ -3,23 +3,9 @@
*
* Miscellaneous file related macro's and functions.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
+ * Licensed under the GPL-2
*/
#ifndef __RC_FILE_H__
diff --git a/libsbutil/include/rcscripts/util/list.h b/libsbutil/include/rcscripts/util/list.h
index e4c7a74..a1d988b 100644
--- a/libsbutil/include/rcscripts/util/list.h
+++ b/libsbutil/include/rcscripts/util/list.h
@@ -1,11 +1,9 @@
-/*
+/*
* Copied from the Linux kernel source tree, version 2.6.0-test1.
*
* Licensed under the GPL v2 as per the whole kernel source tree.
*
* Ripped out the rcu stuff, as it's not needed.
- *
- * $Header$
*/
#ifndef __LINUX_LIST_H__
@@ -61,7 +59,7 @@ struct list_head {
} while (0)
/*
- * Insert a new entry between two known consecutive entries.
+ * Insert a new entry between two known consecutive entries.
*
* This is only for internal list manipulation where we know
* the prev/next entries already!
@@ -135,7 +133,7 @@ static inline void list_del(struct list_head *entry)
static inline void list_del_init(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
- INIT_LIST_HEAD(entry);
+ INIT_LIST_HEAD(entry);
}
/**
@@ -250,7 +248,7 @@ static inline void list_splice_init(struct list_head *list,
#define list_for_each_prev(pos, head) \
for (pos = (head)->prev, prefetch(pos->prev); pos != (head); \
pos = pos->prev, prefetch(pos->prev))
-
+
/**
* list_for_each_safe - iterate over a list safe against removal of list entry
* @pos: the &struct list_head to use as a loop counter.
@@ -301,44 +299,44 @@ static inline void list_splice_init(struct list_head *list,
&pos->member != (head); \
pos = n, n = list_entry(n->member.next, typeof(*n), member))
-/*
- * Double linked lists with a single pointer list head.
- * Mostly useful for hash tables where the two pointer list head is
+/*
+ * Double linked lists with a single pointer list head.
+ * Mostly useful for hash tables where the two pointer list head is
* too wasteful.
* You lose the ability to access the tail in O(1).
- */
+ */
-struct hlist_head {
- struct hlist_node *first;
-};
+struct hlist_head {
+ struct hlist_node *first;
+};
-struct hlist_node {
- struct hlist_node *next, **pprev;
-};
+struct hlist_node {
+ struct hlist_node *next, **pprev;
+};
-#define HLIST_HEAD_INIT { .first = NULL }
+#define HLIST_HEAD_INIT { .first = NULL }
#define HLIST_HEAD(name) struct hlist_head name = { .first = NULL }
-#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
+#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
#define INIT_HLIST_NODE(ptr) ((ptr)->next = NULL, (ptr)->pprev = NULL)
-static __inline__ int hlist_unhashed(struct hlist_node *h)
-{
+static __inline__ int hlist_unhashed(struct hlist_node *h)
+{
return !h->pprev;
-}
+}
-static __inline__ int hlist_empty(struct hlist_head *h)
-{
+static __inline__ int hlist_empty(struct hlist_head *h)
+{
return !h->first;
-}
+}
-static __inline__ void __hlist_del(struct hlist_node *n)
+static __inline__ void __hlist_del(struct hlist_node *n)
{
struct hlist_node *next = n->next;
struct hlist_node **pprev = n->pprev;
- *pprev = next;
- if (next)
+ *pprev = next;
+ if (next)
next->pprev = pprev;
-}
+}
static __inline__ void hlist_del(struct hlist_node *n)
{
@@ -347,30 +345,30 @@ static __inline__ void hlist_del(struct hlist_node *n)
n->pprev = LIST_POISON2;
}
-static __inline__ void hlist_del_init(struct hlist_node *n)
+static __inline__ void hlist_del_init(struct hlist_node *n)
{
if (n->pprev) {
__hlist_del(n);
INIT_HLIST_NODE(n);
}
-}
+}
-static __inline__ void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
-{
+static __inline__ void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
+{
struct hlist_node *first = h->first;
- n->next = first;
- if (first)
+ n->next = first;
+ if (first)
first->pprev = &n->next;
- h->first = n;
- n->pprev = &h->first;
-}
+ h->first = n;
+ n->pprev = &h->first;
+}
/* next must be != NULL */
static __inline__ void hlist_add_before(struct hlist_node *n, struct hlist_node *next)
{
n->pprev = next->pprev;
- n->next = next;
- next->pprev = &n->next;
+ n->next = next;
+ next->pprev = &n->next;
*(n->pprev) = n;
}
@@ -387,7 +385,7 @@ static __inline__ void hlist_add_after(struct hlist_node *n,
/* Cannot easily do prefetch unfortunately */
#define hlist_for_each(pos, head) \
for (pos = (head)->first; pos && ({ prefetch(pos->next); 1; }); \
- pos = pos->next)
+ pos = pos->next)
#define hlist_for_each_safe(pos, n, head) \
for (pos = (head)->first; n = pos ? pos->next : 0, pos; \
diff --git a/libsbutil/include/rcscripts/util/simple-regex.h b/libsbutil/include/rcscripts/util/simple-regex.h
index 56da8b0..f0a6ad7 100644
--- a/libsbutil/include/rcscripts/util/simple-regex.h
+++ b/libsbutil/include/rcscripts/util/simple-regex.h
@@ -3,23 +3,9 @@
*
* Simle regex library.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
+ * Licensed under the GPL-2
*/
#ifndef __RC_SIMPLE_REGEX_H__
diff --git a/libsbutil/include/rcscripts/util/str_list.h b/libsbutil/include/rcscripts/util/str_list.h
index f0c9355..068f902 100644
--- a/libsbutil/include/rcscripts/util/str_list.h
+++ b/libsbutil/include/rcscripts/util/str_list.h
@@ -3,23 +3,9 @@
*
* String list macros.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
+ * Licensed under the GPL-2
*/
#ifndef __RC_STR_LIST_H__
diff --git a/libsbutil/include/rcscripts/util/string.h b/libsbutil/include/rcscripts/util/string.h
index 9753d7a..25546e7 100644
--- a/libsbutil/include/rcscripts/util/string.h
+++ b/libsbutil/include/rcscripts/util/string.h
@@ -3,23 +3,9 @@
*
* Miscellaneous string related macro's and functions.
*
+ * Copyright 1999-2008 Gentoo Foundation
* Copyright 2004-2007 Martin Schlemmer <azarah@nosferatu.za.org>
- *
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Header$
+ * Licensed under the GPL-2
*/
#ifndef __RC_STRING_H__