summaryrefslogtreecommitdiff
path: root/hw/xfree86/utils/cvt/cvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/utils/cvt/cvt.c')
-rw-r--r--hw/xfree86/utils/cvt/cvt.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/hw/xfree86/utils/cvt/cvt.c b/hw/xfree86/utils/cvt/cvt.c
index fee4f7c3e..25a8e3220 100644
--- a/hw/xfree86/utils/cvt/cvt.c
+++ b/hw/xfree86/utils/cvt/cvt.c
@@ -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.
*/