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
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  1) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  2) #ifdef HAVE_CONFIG_H
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  3) #include <config.h>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  4) #endif
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  5) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  6) #include <stdlib.h>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  7) #include <stdio.h>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  8) #include <unistd.h>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  9) #include <string.h>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 10) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 11) #include <defs.h>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 12) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 13) #include <error.h>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 14) #include <msglog.h>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 15) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 16) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 17) void *xmalloc( size_t n )
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 18) {
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 19)   void *p = NULL;
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 20) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 21)   p = malloc( n );
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 22)   if( !p ) no_space();
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 23)   bzero( p, n );
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 24) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 25)   return( p );
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 26) }
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 27) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 28) void *xrealloc( void *b, size_t n )
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 29) {
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 30)   void *p = NULL;
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 31) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 32)   p = realloc( b , n );
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 33)   if( !p ) no_space();
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 34) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 35)   return( p );
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 36) }