notmuch.git  about / heads / tags
Unnamed repository; edit this file 'description' to name the repository.
   commit cc30764703bcb3d9474569428a2d486af486f2b8 (patch)
   parent 03a0958d lib: Import getdate source from gnulib.
     tree 4358e8b1de1db339d7716ffba82a709cb3493b39
   author Carl Worth <cworth@cworth.org>  2010-03-10 16:18:59 -0800
committer Carl Worth <cworth@cworth.org>  2010-03-10 16:18:59 -0800

lib/getdate: Tweak xalloc-die to avoid more gnulib dependencies.

This tiny function originally wanted additional gnulib headers, but
that seems crazy. So instead, we'll maintain this function locally and
not import it from gnulib in the future.
---
 lib/getdate/import       |  1 -
 lib/getdate/xalloc-die.c | 15 +++------------
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/lib/getdate/import b/lib/getdate/import
index e3a789c3..f15d1017 100755
--- a/lib/getdate/import
+++ b/lib/getdate/import
@@ -25,7 +25,6 @@ files="c-ctype.c
 	timespec.h
 	verify.h
 	xalloc.h
-	xalloc-die.c
 	xmalloc.c"
 
 for file in $files; do
diff --git a/lib/getdate/xalloc-die.c b/lib/getdate/xalloc-die.c
index 4b220403..a7a9cbc0 100644
--- a/lib/getdate/xalloc-die.c
+++ b/lib/getdate/xalloc-die.c
@@ -20,22 +20,13 @@
 
 #include "xalloc.h"
 
+#include <stdio.h>
 #include <stdlib.h>
 
-#include "error.h"
-#include "exitfail.h"
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
 
 void
 xalloc_die (void)
 {
-  error (exit_failure, 0, "%s", _("memory exhausted"));
-
-  /* The `noreturn' cannot be given to error, since it may return if
-     its first argument is 0.  To help compilers understand the
-     xalloc_die does not return, call abort.  Also, the abort is a
-     safety feature if exit_failure is 0 (which shouldn't happen).  */
-  abort ();
+  fprintf (stderr, "memory exhausted\n");
+  exit (1);
 }


glossary
--------
Commit objects reference one tree, and zero or more parents.

Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.

Multiple parents means the commit is a merge.

Root commits have no ancestor.  Note that it is
possible to have multiple root commits when merging independent histories.

Every commit references one top-level tree object.

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