diff options
Diffstat (limited to 'pic/misc.c')
-rw-r--r-- | pic/misc.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/pic/misc.c b/pic/misc.c index 4aa9b06d5c4c..73ea3d7db771 100644 --- a/pic/misc.c +++ b/pic/misc.c @@ -93,8 +93,8 @@ double getcomp(obj *p, int t) /* return component of a position */ return 0; } -double exprlist[100]; -int nexpr = 0; +static double exprlist[100]; +static int nexpr = 0; void exprsave(double f) { @@ -177,16 +177,13 @@ void printpos(obj *p) /* print position for debugging */ printf("%g, %g\n", p->o_x, p->o_y); } -char *tostring(char *s) +char *tostring(const char *s) { - register char *p; - size_t l; + char *p; - l = strlen(s)+1; - p = malloc(l); + p = strdup(s); if (p == NULL) FATAL("out of space in tostring on %s", s); - n_strcpy(p, s, l); return(p); } |