Module Name: xsrc
Committed By: tsutsui
Date: Tue Mar 4 12:11:59 UTC 2014
Modified Files:
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k: x68kConfig.c
x68kGraph.c
Log Message:
Replace xalloc(), xrealloc() and xfree() with malloc(), realloc() and free().
Per following Xorg changes:
> Replace X-allocation functions with their C89 counterparts
http://cgit.freedesktop.org/xorg/xserver/commit/?id=3f3ff971ecff9936cebafc813af9193b97bba89c
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c
cvs rdiff -u -r1.1 -r1.2 \
xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c
diff -u xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c:1.2 xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c:1.3
--- xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c:1.2 Sun Mar 2 05:52:45 2014
+++ xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kConfig.c Tue Mar 4 12:11:59 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kConfig.c,v 1.2 2014/03/02 05:52:45 tsutsui Exp $ */
+/* $NetBSD: x68kConfig.c,v 1.3 2014/03/04 12:11:59 tsutsui Exp $ */
/*-------------------------------------------------------------------------
* Copyright (c) 1996 Yasushi Yamasaki
* All rights reserved.
@@ -181,7 +181,7 @@ getToken(void)
static int line = 1;
Token *ret;
- ret = (Token *)xalloc(sizeof(Token));
+ ret = (Token *)malloc(sizeof(Token));
if (ret == NULL)
FatalError("Out of memory");
while (TRUE) {
@@ -207,7 +207,7 @@ getToken(void)
/* is a symbol? */
if (isalpha(c)) {
int i = 0;
- ret->content.symbol = (char *)xalloc(32 * sizeof(char));
+ ret->content.symbol = (char *)malloc(32 * sizeof(char));
if (ret->content.symbol == NULL)
FatalError("Out of memory");
do {
@@ -288,7 +288,7 @@ parseCommand(void)
return FALSE;
if (token->type != TOKEN_OPEN_PARENTHESIS)
parseError(token->line, "missing parenthesis");
- xfree(token);
+ free(token);
/* get command name and arguments */
while (TRUE) {
@@ -296,11 +296,11 @@ parseCommand(void)
if (token->type == TOKEN_EOF)
parseError(token->line, "reached EOF");
if (token->type == TOKEN_CLOSE_PARENTHESIS) {
- xfree(token);
+ free(token);
break;
}
argc++;
- argv = (Token **)xrealloc(argv, sizeof(Token *) * argc);
+ argv = (Token **)realloc(argv, sizeof(Token *) * argc);
if (argv == NULL)
FatalError("Out of memory");
argv[argc-1] = token;
@@ -325,10 +325,10 @@ parseCommand(void)
/* free arguments */
for (i = 0; i < argc; i++) {
if (argv[i]->type == TOKEN_SYMBOL)
- xfree(argv[i]->content.symbol);
- xfree(argv[i]);
+ free(argv[i]->content.symbol);
+ free(argv[i]);
}
- xfree(argv);
+ free(argv);
return TRUE;
}
@@ -400,7 +400,7 @@ parseModeDef(int argc, Token **argv)
checkArguments(18, argtype, argc-1, argv);
- mode = (Mode *)xalloc(sizeof(Mode));
+ mode = (Mode *)malloc(sizeof(Mode));
if (mode == NULL)
FatalError("Out of memory");
mode->name = strdup(argv[1]->content.symbol);
@@ -550,7 +550,7 @@ parseMode(int argc, Token **argv)
x68kFbProc[0].open = x68kGraphOpen;
x68kFbProc[0].init = x68kGraphInit;
x68kFbProc[0].close = x68kGraphClose;
- x68kFormat = (PixmapFormatRec*) xalloc (sizeof(PixmapFormatRec));
+ x68kFormat = (PixmapFormatRec*) malloc (sizeof(PixmapFormatRec));
x68kFormat->scanlinePad = BITMAP_SCANLINE_PAD;
x68kFormat->bitsPerPixel = 16;
switch (mode->depth) {
Index: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c
diff -u xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c:1.1 xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c:1.2
--- xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c:1.1 Sat Mar 1 19:34:47 2014
+++ xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kGraph.c Tue Mar 4 12:11:59 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kGraph.c,v 1.1 2014/03/01 19:34:47 tsutsui Exp $ */
+/* $NetBSD: x68kGraph.c,v 1.2 2014/03/04 12:11:59 tsutsui Exp $ */
/*-------------------------------------------------------------------------
* Copyright (c) 1996 Yasushi Yamasaki
* All rights reserved.
@@ -270,13 +270,13 @@ x68kCfbFinishScreenInit(
ndepths = 1;
nvisuals = 1;
- depths = (DepthPtr)xalloc( sizeof(DepthRec) );
- visuals = (VisualPtr)xalloc( sizeof(VisualRec) );
- vid = (VisualID *)xalloc( sizeof(VisualID) );
+ depths = (DepthPtr)malloc( sizeof(DepthRec) );
+ visuals = (VisualPtr)malloc( sizeof(VisualRec) );
+ vid = (VisualID *)malloc( sizeof(VisualID) );
if( !depths || !visuals || !vid ) {
- xfree( depths );
- xfree( visuals );
- xfree( vid );
+ free( depths );
+ free( visuals );
+ free( vid );
return FALSE;
}
depths[0].depth = 15;
@@ -302,13 +302,13 @@ x68kCfbFinishScreenInit(
ndepths = 1;
nvisuals = 1;
- depths = (DepthPtr)xalloc( sizeof(DepthRec) );
- visuals = (VisualPtr)xalloc( sizeof(VisualRec) );
- vid = (VisualID *)xalloc( sizeof(VisualID) );
+ depths = (DepthPtr)malloc( sizeof(DepthRec) );
+ visuals = (VisualPtr)malloc( sizeof(VisualRec) );
+ vid = (VisualID *)malloc( sizeof(VisualID) );
if( !depths || !visuals || !vid ) {
- xfree( depths );
- xfree( visuals );
- xfree( vid );
+ free( depths );
+ free( visuals );
+ free( vid );
return FALSE;
}
depths[0].depth = 4;