aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/form/fty_alnum.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/form/fty_alnum.c')
-rw-r--r--contrib/ncurses/form/fty_alnum.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/contrib/ncurses/form/fty_alnum.c b/contrib/ncurses/form/fty_alnum.c
index c2d056b70acb..59dd2736e8ab 100644
--- a/contrib/ncurses/form/fty_alnum.c
+++ b/contrib/ncurses/form/fty_alnum.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -34,7 +34,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fty_alnum.c,v 1.19 2006/04/22 21:33:05 tom Exp $")
+MODULE_ID("$Id: fty_alnum.c,v 1.21 2007/10/13 19:31:52 tom Exp $")
#define thisARG alnumARG
@@ -55,10 +55,13 @@ thisARG;
static void *
Make_This_Type(va_list *ap)
{
- thisARG *argp = (thisARG *) malloc(sizeof(thisARG));
+ thisARG *argp = typeMalloc(thisARG, 1);
if (argp)
- argp->width = va_arg(*ap, int);
+ {
+ T((T_CREATE("thisARG %p"), argp));
+ argp->width = va_arg(*ap, int);
+ }
return ((void *)argp);
}
@@ -75,10 +78,13 @@ static void *
Copy_This_Type(const void *argp)
{
const thisARG *ap = (const thisARG *)argp;
- thisARG *result = (thisARG *) malloc(sizeof(thisARG));
+ thisARG *result = typeMalloc(thisARG, 1);
if (result)
- *result = *ap;
+ {
+ T((T_CREATE("thisARG %p"), result));
+ *result = *ap;
+ }
return ((void *)result);
}