Search for = instead of , in options, so that the case of
unix:file=/myfile works. The search for = will make this case work.
Previously a comma had to be included in the spec.
unix_state *sp = (unix_state *)h->cprivate;
char * s = f;
const char * file = NULL;
unix_state *sp = (unix_state *)h->cprivate;
char * s = f;
const char * file = NULL;
sp->uid = sp->gid = sp->umask = -1;
sp->uid = sp->gid = sp->umask = -1;
- if ((eol = strchr(s, ',')))
do
{
if ((eol = strchr(s, ',')))
do
{
if ((eol = strchr(s, ',')))
TRC(fprintf(stderr, "unix_get: bufsize=%d\n", *bufsize));
if (sp->altlen) /* switch buffers */
{
TRC(fprintf(stderr, "unix_get: bufsize=%d\n", *bufsize));
if (sp->altlen) /* switch buffers */
{
- TRC(fprintf(stderr, " %d bytes in altbuf (0x%x)\n", sp->altlen,
- (unsigned) sp->altbuf));
+ TRC(fprintf(stderr, " %d bytes in altbuf (%p )\n", sp->altlen,
+ sp->altbuf));
tmpc = *buf;
tmpi = *bufsize;
*buf = sp->altbuf;
tmpc = *buf;
tmpi = *bufsize;
*buf = sp->altbuf;
} else if (sp->altsize < req)
if (!(sp->altbuf =(char *)xrealloc(sp->altbuf, sp->altsize = req)))
return -1;
} else if (sp->altsize < req)
if (!(sp->altbuf =(char *)xrealloc(sp->altbuf, sp->altsize = req)))
return -1;
- TRC(fprintf(stderr, " Moving %d bytes to altbuf(0x%x)\n", tomove,
- (unsigned) sp->altbuf));
+ TRC(fprintf(stderr, " Moving %d bytes to altbuf(%p)\n", tomove,
+ sp->altbuf));
memcpy(sp->altbuf, *buf + berlen, sp->altlen = tomove);
}
if (berlen < CS_UNIX_BUFCHUNK - 1)
memcpy(sp->altbuf, *buf + berlen, sp->altlen = tomove);
}
if (berlen < CS_UNIX_BUFCHUNK - 1)