unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 0b53f7c46c5cf14661d0d706cd3dacd7cd7af168 1493 bytes (raw)
name: lib/xutil.h 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 
/* xutil.h - Various wrapper functions to abort on error.
 *
 * Copyright © 2009 Carl Worth
 *
 * 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, either version 3 of the License, or
 * (at your option) any later version.
 *
 * 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, see http://www.gnu.org/licenses/ .
 *
 * Author: Carl Worth <cworth@cworth.org>
 */

#ifndef NOTMUCH_XUTIL_H
#define NOTMUCH_XUTIL_H

#include <stdlib.h>
#include <sys/types.h>
#include <regex.h>

#ifdef __APPLE__
/* Mac OS X don't have strndup and getline even if _GNU_SOURCE is defined */
char *strndup (const char *s, size_t n);
ssize_t getline(char **lineptr, size_t *n, FILE *stream);
#endif

/* xutil.c */
void *
xcalloc (size_t nmemb, size_t size);

void *
xmalloc (size_t size);

void *
xrealloc (void *ptrr, size_t size);

char *
xstrdup (const char *s);

char *
xstrndup (const char *s, size_t n);

void
xregcomp (regex_t *preg, const char *regex, int cflags);

int
xregexec (const regex_t *preg, const char *string,
	  size_t nmatch, regmatch_t pmatch[], int eflags);

#endif

debug log:

solving 0b53f7c ...
found 0b53f7c in https://yhetil.org/notmuch/1258859256-33197-1-git-send-email-gzjjgod@gmail.com/
found b973f7d in https://yhetil.org/notmuch.git/
preparing index
index prepared:
100644 b973f7dcbf752f4cca74d69ef86bcf027cde3aaa	lib/xutil.h

applying [1/1] https://yhetil.org/notmuch/1258859256-33197-1-git-send-email-gzjjgod@gmail.com/
diff --git a/lib/xutil.h b/lib/xutil.h
index b973f7d..0b53f7c 100644

Checking patch lib/xutil.h...
Applied patch lib/xutil.h cleanly.

index at:
100644 0b53f7c46c5cf14661d0d706cd3dacd7cd7af168	lib/xutil.h

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).