/****************************************************************************
- * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2012 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 *
#include "form.priv.h"
-MODULE_ID("$Id: fld_def.c,v 1.38 2010/01/23 21:14:35 tom Exp $")
+MODULE_ID("$Id: fld_def.c,v 1.40 2012/03/11 00:37:16 tom Exp $")
/* this can't be readonly */
static FIELD default_field =
NCURSES_FIELD_EXTENSION
};
-NCURSES_EXPORT_VAR(FIELD *)
-_nc_Default_Field = &default_field;
+NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
/*---------------------------------------------------------------------------
| Facility : libnform
{
if ((typ->status & _LINKED_TYPE) != 0)
{
- assert(argp != 0);
- _nc_Free_Argument(typ->left, argp->left);
- _nc_Free_Argument(typ->right, argp->right);
- free(argp);
+ if (argp != 0)
+ {
+ _nc_Free_Argument(typ->left, argp->left);
+ _nc_Free_Argument(typ->right, argp->right);
+ free(argp);
+ }
}
else
{
{
T((T_CREATE("field %p"), (void *)New_Field));
*New_Field = default_field;
- New_Field->rows = rows;
- New_Field->cols = cols;
+ New_Field->rows = (short) rows;
+ New_Field->cols = (short) cols;
New_Field->drows = rows + nrow;
New_Field->dcols = cols;
- New_Field->frow = frow;
- New_Field->fcol = fcol;
+ New_Field->frow = (short) frow;
+ New_Field->fcol = (short) fcol;
New_Field->nrow = nrow;
- New_Field->nbuf = nbuf;
+ New_Field->nbuf = (short) nbuf;
New_Field->link = New_Field;
#if USE_WIDEC_SUPPORT