cScm Configuration Daemon

cScm – is a tool to convert SCM configuration files into binary format and store its in shared memory for reading by cSvn-ui and cGit-ui CGI scripts

2 Commits   0 Branches   1 Tag
author: kx <kx@radix.pro> 2023-03-24 02:53:04 +0300 committer: kx <kx@radix.pro> 2023-03-24 02:53:04 +0300 commit: 12c7b1c5658602269da2f5b75835ec0f5fab8890 parent: 4e72ffe940d9aff7c019d37a6459e765902c1fae
Commit Summary:
Version 0.1.4
Diffstat:
1 file changed, 25 insertions, 0 deletions
diff --git a/cscmd/xalloc.c b/cscmd/xalloc.c
new file mode 100644
index 0000000..80f2581
--- /dev/null
+++ b/cscmd/xalloc.c
@@ -0,0 +1,36 @@
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <defs.h>
+
+#include <error.h>
+#include <msglog.h>
+
+
+void *xmalloc( size_t n )
+{
+  void *p = NULL;
+
+  p = malloc( n );
+  if( !p ) no_space();
+  bzero( p, n );
+
+  return( p );
+}
+
+void *xrealloc( void *b, size_t n )
+{
+  void *p = NULL;
+
+  p = realloc( b , n );
+  if( !p ) no_space();
+
+  return( p );
+}