char *buf;
SCM_ASSERT (SCM_STRINGP (zone), zone, pos, subr);
- buf = scm_must_malloc (SCM_STRING_LENGTH (zone) + sizeof (tzvar) + 1, subr);
+ buf = scm_malloc (SCM_STRING_LENGTH (zone) + sizeof (tzvar) + 1);
sprintf (buf, "%s=%s", tzvar, SCM_STRING_CHARS (zone));
oldenv = environ;
tmpenv[0] = buf;
{
if (!SCM_UNBNDP (zone))
{
- scm_must_free (environ[0]);
+ free (environ[0]);
environ = oldenv;
#ifdef HAVE_TZSET
/* for the possible benefit of user code linked with libguile. */
#else
ptr = "";
#endif
- zname = SCM_MUST_MALLOC (strlen (ptr) + 1);
+ zname = scm_malloc (strlen (ptr) + 1);
strcpy (zname, ptr);
}
/* the struct is copied in case localtime and gmtime share a buffer. */
result = filltime (<, zoff, zname);
SCM_ALLOW_INTS;
- scm_must_free (zname);
+ if (zname)
+ free (zname);
return result;
}
#undef FUNC_NAME
#else
ptr = "";
#endif
- zname = SCM_MUST_MALLOC (strlen (ptr) + 1);
+ zname = scm_malloc (strlen (ptr) + 1);
strcpy (zname, ptr);
}
result = scm_cons (scm_long2num ((long) itime),
filltime (<, zoff, zname));
SCM_ALLOW_INTS;
- scm_must_free (zname);
+ if (zname)
+ free (zname);
return result;
}
#undef FUNC_NAME
a zero-byte output string! Workaround is to prepend a junk
character to the format string, so that valid returns are always
nonzero. */
- myfmt = SCM_MUST_MALLOC (len+2);
+ myfmt = scm_malloc (len+2);
*myfmt = 'x';
strncpy(myfmt+1, fmt, len);
myfmt[len+1] = 0;
- tbuf = SCM_MUST_MALLOC (size);
+ tbuf = scm_malloc (size);
{
#if !defined (HAVE_TM_ZONE)
/* it seems the only way to tell non-GNU versions of strftime what
case. */
while ((len = strftime (tbuf, size, myfmt, &t)) == 0 || len == size)
{
- scm_must_free (tbuf);
+ free (tbuf);
size *= 2;
- tbuf = SCM_MUST_MALLOC (size);
+ tbuf = scm_malloc (size);
}
#if !defined (HAVE_TM_ZONE)
}
result = scm_mem2string (tbuf + 1, len - 1);
- scm_must_free (tbuf);
- scm_must_free(myfmt);
+ free (tbuf);
+ free (myfmt);
return result;
}
#undef FUNC_NAME