a.strings[i + 1] = strdup(StringValuePtr(v));
break;
case T_FIXNUM:
- snprintf(buf, 63, "%ld", FIX2INT(v));
+ snprintf(buf, 63, "%d", FIX2INT(v));
a.strings[i + 1] = strdup(buf);
break;
default:
{
Tcl_Channel channel;
int mode, fd2;
- ClientData fd1;
+ int fd1;
FILE *stream = NULL;
char **calcpr = NULL;
int rc, xsize, ysize;
strerror(Tcl_GetErrno()), (char *) NULL);
return TCL_ERROR;
}
- if (Tcl_GetChannelHandle(channel, TCL_WRITABLE, &fd1) != TCL_OK) {
+ if (Tcl_GetChannelHandle(channel, TCL_WRITABLE, (ClientData)&fd1) != TCL_OK) {
Tcl_AppendResult(interp,
"cannot get file descriptor associated with \"",
argv[1], "\"", (char *) NULL);
* Must dup() file descriptor so we can fclose(stream), otherwise the fclose()
* would close Tcl's file descriptor
*/
- if ((fd2 = dup((int)fd1)) == -1) {
+ if ((fd2 = dup(fd1)) == -1) {
Tcl_AppendResult(interp,
"dup() failed for file descriptor associated with \"",
argv[1], "\": ", strerror(errno), (char *) NULL);