/****************************************************************************
- * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 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 *
#endif
#endif
-MODULE_ID("$Id: lib_slkset.c,v 1.18 2009/02/15 00:33:48 tom Exp $")
+MODULE_ID("$Id: lib_slkset.c,v 1.21 2010/12/25 23:43:58 tom Exp $")
NCURSES_EXPORT(int)
NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
const char *str = astr;
const char *p;
- T((T_CALLED("slk_set(%d, \"%s\", %d)"), i, str, format));
+ T((T_CALLED("slk_set(%p, %d, \"%s\", %d)"), (void *) SP_PARM, i, str, format));
if (SP_PARM == 0
|| (slk = SP_PARM->_slk) == 0
|| format < 0
|| format > 2)
returnCode(ERR);
- if (str == NULL)
+ if (str == 0)
str = "";
--i; /* Adjust numbering of labels */
numcols += wcwidth(wc);
p += need;
}
- numchrs = (p - str);
+ numchrs = (int) (p - str);
#else
while (isprint(UChar(*p)))
p++; /* The first non-print stops */
- numcols = (p - str);
+ numcols = (int) (p - str);
if (numcols > limit)
numcols = limit;
numchrs = numcols;