Remove dummylib.
Only cvt required it, and only used XNF{,c}alloc
via xnf{,c}alloc macros.
  Based on patch by Eric Anholt.
			
			
This commit is contained in:
		
							parent
							
								
									f841d4e3cc
								
							
						
					
					
						commit
						5dbe70dd52
					
				|  | @ -1896,7 +1896,6 @@ hw/xfree86/doc/man/Makefile | |||
| hw/xfree86/doc/sgml/Makefile | ||||
| hw/xfree86/dri/Makefile | ||||
| hw/xfree86/dri2/Makefile | ||||
| hw/xfree86/dummylib/Makefile | ||||
| hw/xfree86/exa/Makefile | ||||
| hw/xfree86/fbdevhw/Makefile | ||||
| hw/xfree86/i2c/Makefile | ||||
|  |  | |||
|  | @ -14,12 +14,12 @@ endif | |||
| 
 | ||||
| DOC_SUBDIR = doc | ||||
| 
 | ||||
| SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser \
 | ||||
| SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support parser \
 | ||||
| 	  ramdac shadowfb vbe vgahw xaa \
 | ||||
| 	  xf8_16bpp loader dixmods exa modes \
 | ||||
| 	  $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) | ||||
| 
 | ||||
| DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \
 | ||||
| DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
 | ||||
|                parser ramdac shadowfb vbe vgahw xaa \
 | ||||
|                xf8_16bpp loader dixmods dri dri2 exa modes \
 | ||||
| 	       utils doc | ||||
|  |  | |||
|  | @ -1,38 +0,0 @@ | |||
| # libdummy.a contains just those bits used in the server itself
 | ||||
| # libdummy-nonserver.a contains additional routines normally found in the
 | ||||
| # server for use in building the utilities like config tools
 | ||||
| 
 | ||||
| noinst_LIBRARIES = libdummy-nonserver.a | ||||
| 
 | ||||
| INCLUDES = $(XORG_INCS) | ||||
| 
 | ||||
| AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) | ||||
| 
 | ||||
| if NEED_STRLCAT | ||||
| STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c | ||||
| endif | ||||
| 
 | ||||
| libdummy_nonserver_a_SOURCES = \
 | ||||
| 	dixprivates.c \
 | ||||
| 	fatalerror.c \
 | ||||
| 	logvwrite.c \
 | ||||
| 	$(STRL_SRCS) \
 | ||||
| 	verrorf.c \
 | ||||
| 	xalloc.c \
 | ||||
| 	xf86allocscripi.c \
 | ||||
| 	xf86addrestolist.c \
 | ||||
| 	xf86drvmsg.c \
 | ||||
| 	xf86drvmsgverb.c \
 | ||||
| 	xf86errorf.c \
 | ||||
| 	xf86errorfverb.c \
 | ||||
| 	xf86getverb.c \
 | ||||
| 	xf86info.c \
 | ||||
| 	xf86msg.c \
 | ||||
| 	xf86msgverb.c \
 | ||||
| 	xf86opt.c \
 | ||||
| 	xf86screens.c \
 | ||||
| 	xf86servisinit.c \
 | ||||
| 	xf86verbose.c \
 | ||||
| 	$(srcdir)/../os-support/shared/sigiostubs.c | ||||
| 
 | ||||
| EXTRA_DIST = README dummylib.h | ||||
|  | @ -1,7 +0,0 @@ | |||
| 
 | ||||
| libdummy (dummylib) contains basic utility functions required by libxf86_os.a. | ||||
| There is one symbol per source/object so that each can be overriden | ||||
| individually by whatever uses this library. | ||||
| 
 | ||||
| 
 | ||||
| $XFree86$ | ||||
|  | @ -1,19 +0,0 @@ | |||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| pointer * | ||||
| dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key) | ||||
| { | ||||
|     return NULL;	/* not used */ | ||||
| } | ||||
| 
 | ||||
|  | @ -1,9 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #ifndef _DUMMY_LIB_H | ||||
| #define _DUMMY_LIB_H | ||||
| 
 | ||||
| #endif /* _DUMMY_LIB_H */ | ||||
|  | @ -1,25 +0,0 @@ | |||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| void | ||||
| FatalError(const char *f, ...) | ||||
| { | ||||
|     va_list args; | ||||
| 
 | ||||
|     va_start(args, f); | ||||
|     fprintf(stderr, "Fatal Error:\n"); | ||||
|     vfprintf(stderr, f, args); | ||||
|     va_end(args); | ||||
|     exit(1); | ||||
| } | ||||
| 
 | ||||
|  | @ -1,19 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| memType | ||||
| getEmptyPciRange(PCITAG tag, int base_reg) | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
|  | @ -1,19 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| memType | ||||
| getValidBIOSBase(PCITAG tag, int num) | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
|  | @ -1,21 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| void | ||||
| LogVWrite(int verb, const char *format, va_list ap) | ||||
| { | ||||
|     if (xf86Verbose >= verb) | ||||
| 	vfprintf(stderr, format, ap); | ||||
| } | ||||
| 
 | ||||
|  | @ -1,19 +0,0 @@ | |||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| int | ||||
| pciTestMultiDeviceCard(int bus, int dev, int func, PCITAG** pTag) | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| 
 | ||||
|  | @ -1,19 +0,0 @@ | |||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| void | ||||
| VErrorF(const char *f, va_list args) | ||||
| { | ||||
|     vfprintf(stderr, f, args); | ||||
| } | ||||
| 
 | ||||
|  | @ -1,111 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| pointer | ||||
| Xalloc(unsigned long n) | ||||
| { | ||||
|     if (!n) | ||||
| 	n = 1; | ||||
|     return malloc(n); | ||||
| } | ||||
| 
 | ||||
| pointer | ||||
| Xrealloc(pointer p, unsigned long n) | ||||
| { | ||||
|     if (!n) | ||||
| 	n = 1; | ||||
|     return realloc(p, n); | ||||
| } | ||||
| 
 | ||||
| pointer | ||||
| Xcalloc(unsigned long n) | ||||
| { | ||||
|     pointer r; | ||||
| 
 | ||||
|     r = Xalloc(n); | ||||
|     memset(r, 0, n); | ||||
|     return r; | ||||
| } | ||||
| 
 | ||||
| pointer | ||||
| XNFalloc(unsigned long n) | ||||
| { | ||||
|     pointer r; | ||||
| 
 | ||||
|     r = Xalloc(n); | ||||
|     if (!r) | ||||
| 	FatalError("XNFalloc failed\n"); | ||||
|     return r; | ||||
|     | ||||
| } | ||||
| 
 | ||||
| pointer | ||||
| XNFrealloc(pointer p, unsigned long n) | ||||
| { | ||||
|     pointer r; | ||||
| 
 | ||||
|     r = Xrealloc(p, n); | ||||
|     if (!r) | ||||
| 	FatalError("XNFrealloc failed\n"); | ||||
|     return r; | ||||
|     | ||||
| } | ||||
| 
 | ||||
| pointer | ||||
| XNFcalloc(unsigned long n) | ||||
| { | ||||
|     pointer r; | ||||
| 
 | ||||
|     r = Xcalloc(n); | ||||
|     if (!r) | ||||
| 	FatalError("XNFcalloc failed\n"); | ||||
|     return r; | ||||
|     | ||||
| } | ||||
| 
 | ||||
| void | ||||
| Xfree(pointer p) | ||||
| { | ||||
|     free(p); | ||||
| } | ||||
| 
 | ||||
| char * | ||||
| Xstrdup(const char *s) | ||||
| { | ||||
|     char *sd; | ||||
| 
 | ||||
|     if (s == NULL) | ||||
| 	return NULL; | ||||
| 
 | ||||
|     sd = (char *)Xalloc(strlen(s) + 1); | ||||
|     if (sd != NULL) | ||||
| 	strcpy(sd, s); | ||||
|     return sd; | ||||
| } | ||||
| 
 | ||||
| char * | ||||
| XNFstrdup(const char *s) | ||||
| { | ||||
|     char *sd; | ||||
|     size_t len; | ||||
| 
 | ||||
|     if (s == NULL) | ||||
| 	return NULL; | ||||
|      | ||||
|     len = strlen(s) + 1; | ||||
|     sd = (char *)XNFalloc(len); | ||||
|     strlcpy(sd, s, len); | ||||
|     return sd; | ||||
| } | ||||
| 
 | ||||
|  | @ -1,24 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include "xf86.h" | ||||
| 
 | ||||
| resPtr | ||||
| xf86AddResToList(resPtr rlist, resRange *Range, int entityIndex) | ||||
| { | ||||
|     return rlist; | ||||
| } | ||||
| 
 | ||||
| void | ||||
| xf86FreeResList(resPtr rlist) | ||||
| { | ||||
|     return; | ||||
| } | ||||
| 
 | ||||
| resPtr | ||||
| xf86DupResList(const resPtr rlist) | ||||
| { | ||||
|     return rlist; | ||||
| } | ||||
|  | @ -1,19 +0,0 @@ | |||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| int | ||||
| xf86AllocateScrnInfoPrivateIndex() | ||||
| { | ||||
|     return -1; | ||||
| } | ||||
| 
 | ||||
|  | @ -1,24 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| void | ||||
| xf86DrvMsg(int i, MessageType type, const char *format, ...) | ||||
| { | ||||
|     va_list ap; | ||||
| 
 | ||||
|     va_start(ap, format); | ||||
|     LogVWrite(1, format, ap); | ||||
|     va_end(ap); | ||||
| } | ||||
| 
 | ||||
|  | @ -1,24 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| void | ||||
| xf86DrvMsgVerb(int i, MessageType type, int verb, const char *format, ...) | ||||
| { | ||||
|     va_list ap; | ||||
| 
 | ||||
|     va_start(ap, format); | ||||
|     LogVWrite(verb, format, ap); | ||||
|     va_end(ap); | ||||
| } | ||||
| 
 | ||||
|  | @ -1,33 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| void | ||||
| xf86ErrorF(const char *format, ...) | ||||
| { | ||||
|     va_list ap; | ||||
| 
 | ||||
|     va_start(ap, format); | ||||
|     LogVWrite(1, format, ap); | ||||
|     va_end(ap); | ||||
| } | ||||
| 
 | ||||
| void | ||||
| ErrorF(const char *format, ...) | ||||
| { | ||||
|     va_list ap; | ||||
| 
 | ||||
|     va_start(ap, format); | ||||
|     LogVWrite(1, format, ap); | ||||
|     va_end(ap); | ||||
| } | ||||
|  | @ -1,24 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| void | ||||
| xf86ErrorFVerb(int verb, const char *format, ...) | ||||
| { | ||||
|     va_list ap; | ||||
| 
 | ||||
|     va_start(ap, format); | ||||
|     LogVWrite(verb, format, ap); | ||||
|     va_end(ap); | ||||
| } | ||||
| 
 | ||||
|  | @ -1,19 +0,0 @@ | |||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| int | ||||
| xf86GetVerbosity() | ||||
| { | ||||
|     return xf86Verbose; | ||||
| } | ||||
| 
 | ||||
|  | @ -1,12 +0,0 @@ | |||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /* Dummy variables */ | ||||
| xf86InfoRec xf86Info; | ||||
| 
 | ||||
|  | @ -1,24 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| void | ||||
| xf86Msg(MessageType type, const char *format, ...) | ||||
| { | ||||
|     va_list ap; | ||||
| 
 | ||||
|     va_start(ap, format); | ||||
|     LogVWrite(1, format, ap); | ||||
|     va_end(ap); | ||||
| } | ||||
| 
 | ||||
|  | @ -1,24 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| void | ||||
| xf86MsgVerb(MessageType type, int verb, const char *format, ...) | ||||
| { | ||||
|     va_list ap; | ||||
| 
 | ||||
|     va_start(ap, format); | ||||
|     LogVWrite(verb, format, ap); | ||||
|     va_end(ap); | ||||
| } | ||||
| 
 | ||||
|  | @ -1,25 +0,0 @@ | |||
| 
 | ||||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| void | ||||
| xf86ProcessOptions(int i, pointer p, OptionInfoPtr o) | ||||
| { | ||||
| } | ||||
| 
 | ||||
| Bool | ||||
| xf86GetOptValBool(const OptionInfoRec *o, int i, Bool *b) | ||||
| { | ||||
|     return FALSE; | ||||
| } | ||||
| 
 | ||||
|  | @ -1,12 +0,0 @@ | |||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /* Dummy variables */ | ||||
| ScrnInfoPtr *xf86Screens = NULL; | ||||
| 
 | ||||
|  | @ -1,19 +0,0 @@ | |||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Utility functions required by libxf86_os.  | ||||
|  */ | ||||
| 
 | ||||
| Bool | ||||
| xf86ServerIsInitialising() | ||||
| { | ||||
|     return FALSE; | ||||
| } | ||||
| 
 | ||||
|  | @ -1,12 +0,0 @@ | |||
| #ifdef HAVE_XORG_CONFIG_H | ||||
| #include <xorg-config.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include "os.h" | ||||
| #include "xf86.h" | ||||
| #include "xf86Priv.h" | ||||
| 
 | ||||
| /* Dummy variables */ | ||||
| int xf86Verbose = 0; | ||||
| 
 | ||||
|  | @ -31,12 +31,10 @@ bin_PROGRAMS = cvt | |||
| INCLUDES = $(XORG_INCS) \
 | ||||
| 	   -I$(top_srcdir)/hw/xfree86/ddc \
 | ||||
| 	   -I$(top_srcdir)/hw/xfree86/parser | ||||
| DUMMYLIB_SRCDIR = $(XFREE86_SRCDIR)/dummylib | ||||
| 
 | ||||
| # gah
 | ||||
| cvt_SOURCES = cvt.c $(top_srcdir)/hw/xfree86/modes/xf86cvt.c | ||||
| cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) | ||||
| cvt_LDADD = $(top_builddir)/hw/xfree86/dummylib/libdummy-nonserver.a | ||||
| 
 | ||||
| man1_MANS = cvt.man | ||||
| 
 | ||||
|  |  | |||
|  | @ -25,6 +25,34 @@ | |||
| 
 | ||||
| #include "xf86.h" | ||||
| 
 | ||||
| /* xnfalloc implementation used by the server code we built in */ | ||||
| pointer | ||||
| XNFalloc(unsigned long n) | ||||
| { | ||||
|     pointer r; | ||||
| 
 | ||||
|     r = malloc(n); | ||||
|     if (!r) { | ||||
|         perror("malloc failed"); | ||||
|         exit(1); | ||||
|     } | ||||
|     return r; | ||||
| } | ||||
| 
 | ||||
| /* xnfcalloc implementation used by the server code we built in */ | ||||
| pointer | ||||
| XNFcalloc(unsigned long n) | ||||
| { | ||||
|     pointer r; | ||||
| 
 | ||||
|     r = calloc(1, n); | ||||
|     if (!r) { | ||||
|         perror("calloc failed"); | ||||
|         exit(1); | ||||
|     } | ||||
|     return r; | ||||
| } | ||||
| 
 | ||||
| /*
 | ||||
|  * Quickly check wether this is a CVT standard mode. | ||||
|  */ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue