Mercurial > hg > octave-nkf
changeset 1854:95a580423e62
[project @ 1996-02-03 14:33:18 by jwe]
author | jwe |
---|---|
date | Sat, 03 Feb 1996 14:33:41 +0000 |
parents | a058618316b1 |
children | cdc5b74cc261 |
files | libcruft/misc/dostop.c |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libcruft/misc/dostop.c +++ b/libcruft/misc/dostop.c @@ -40,15 +40,16 @@ volatile void #if defined (F77_APPEND_UNDERSCORE) -dostop_ (const char *s, long slen) +dostop_ (const char *s, const int *slen) #else -dostop (const char *s, long slen) +dostop (const char *s, const int *slen) #endif { - if (slen > 0) + int len = *slen; + if (len > 0) { - char *tmp = malloc (slen + 1); - strncpy (tmp, s, slen); + char *tmp = malloc (len + 1); + strncpy (tmp, s, len); (*current_liboctave_error_handler) ("%s", tmp); free (tmp); }