util-lib: move character class definitions to string-util.h

This commit is contained in:
Lennart Poettering 2015-11-03 12:25:29 +01:00
parent 5703176d6e
commit b11d6a7bed
11 changed files with 23 additions and 19 deletions

View File

@ -24,6 +24,7 @@
#include "cpu-set-util.h"
#include "extract-word.h"
#include "parse-util.h"
#include "string-util.h"
#include "util.h"
cpu_set_t* cpu_set_malloc(unsigned *ncpus) {

View File

@ -43,12 +43,6 @@
#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
#define SIGNALS_IGNORE SIGPIPE
#define DIGITS "0123456789"
#define LOWERCASE_LETTERS "abcdefghijklmnopqrstuvwxyz"
#define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS
#define ALPHANUMERICAL LETTERS DIGITS
#define REBOOT_PARAM_FILE "/run/systemd/reboot-param"
#ifdef HAVE_SPLIT_USR

View File

@ -22,6 +22,7 @@
#include "alloc-util.h"
#include "escape.h"
#include "hexdecoct.h"
#include "string-util.h"
#include "utf8.h"
#include "util.h"

View File

@ -21,9 +21,10 @@
#include "alloc-util.h"
#include "escape.h"
#include "extract-word.h"
#include "string-util.h"
#include "utf8.h"
#include "util.h"
#include "extract-word.h"
int extract_first_word(const char **p, char **ret, const char *separators, ExtractFlags flags) {
_cleanup_free_ char *s = NULL;

View File

@ -22,6 +22,7 @@
#include <glob.h>
#include "glob-util.h"
#include "string-util.h"
#include "strv.h"
#include "util.h"

View File

@ -24,7 +24,7 @@
#include <string.h>
#include "macro.h"
#include "util.h"
#include "string-util.h"
int glob_exists(const char *path);
int glob_extend(char ***strv, const char *path);

View File

@ -23,9 +23,9 @@
#include "alloc-util.h"
#include "macro.h"
#include "util.h"
#include "replace-var.h"
#include "def.h"
#include "string-util.h"
#include "util.h"
/*
* Generic infrastructure for replacing @FOO@ style variables in

View File

@ -21,9 +21,9 @@
#include "alloc-util.h"
#include "gunicode.h"
#include "string-util.h"
#include "utf8.h"
#include "util.h"
#include "string-util.h"
int strcmp_ptr(const char *a, const char *b) {

View File

@ -26,6 +26,18 @@
#include "macro.h"
/* What is interpreted as whitespace? */
#define WHITESPACE " \t\n\r"
#define NEWLINE "\n\r"
#define QUOTES "\"\'"
#define COMMENTS "#;"
#define GLOB_CHARS "*?["
#define DIGITS "0123456789"
#define LOWERCASE_LETTERS "abcdefghijklmnopqrstuvwxyz"
#define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS
#define ALPHANUMERICAL LETTERS DIGITS
#define streq(a,b) (strcmp((a),(b)) == 0)
#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
#define strcaseeq(a,b) (strcasecmp((a),(b)) == 0)

View File

@ -44,13 +44,6 @@
#include "missing.h"
#include "time-util.h"
/* What is interpreted as whitespace? */
#define WHITESPACE " \t\n\r"
#define NEWLINE "\n\r"
#define QUOTES "\"\'"
#define COMMENTS "#;"
#define GLOB_CHARS "*?["
size_t page_size(void) _pure_;
#define PAGE_ALIGN(l) ALIGN_TO((l), page_size())

View File

@ -32,11 +32,12 @@
#include "dns-domain.h"
#include "fd-util.h"
#include "fileio.h"
#include "hexdecoct.h"
#include "hostname-util.h"
#include "in-addr-util.h"
#include "network-internal.h"
#include "hexdecoct.h"
#include "parse-util.h"
#include "string-util.h"
#include "unaligned.h"
int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr) {