shishi-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS shishi/lib


From: shishi-commit
Subject: CVS shishi/lib
Date: Fri, 17 Sep 2004 13:46:36 +0200

Update of /home/cvs/shishi/lib
In directory dopio:/tmp/cvs-serv21234/lib

Modified Files:
        shishi.h.in utils.c 
Log Message:
Update.


--- /home/cvs/shishi/lib/shishi.h.in    2004/09/10 09:58:30     1.239
+++ /home/cvs/shishi/lib/shishi.h.in    2004/09/17 11:46:35     1.240
@@ -582,6 +582,9 @@
 #define SHISHI_GENERALIZEDTIME_LENGTH 15
 #define SHISHI_GENERALIZEDTIMEZ_LENGTH (SHISHI_GENERALIZEDTIME_LENGTH + 1)
 
+/* If non-NULL, call this function when memory is exhausted. */
+extern void (*shishi_alloc_fail_function) (void);
+
 /* init.c */
 extern Shishi *shishi (void);
 extern Shishi *shishi_server (void);
--- /home/cvs/shishi/lib/utils.c        2004/09/10 10:00:00     1.8
+++ /home/cvs/shishi/lib/utils.c        2004/09/17 11:46:35     1.9
@@ -153,3 +153,16 @@
 
   return thenspec.tv_sec;
 }
+
+/* If non-NULL, call this function when memory is exhausted. */
+void (*shishi_alloc_fail_function) (void) = 0;
+
+void
+xalloc_die (void)
+{
+  if (shishi_alloc_fail_function)
+    (*shishi_alloc_fail_function) ();
+  fflush (stdout);
+  fprintf (stderr, _("%s: Memory allocation failed\n"), PACKAGE);
+  abort ();
+}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]