1 extern /*@only@*/ char *string_copyext (char *s) ;
9 s = string_copyext ("asdf");
15 /*@only@*/ char *string_copy (char *s)
17 return s; /* 1. returns temp as only! */
20 /*@only@*/ char *copy_string1 (char *s)
22 return string_copy (s); /* okay */
25 /*@only@*/ char *copy_string2 (char *s)
27 return string_copyext (s); /* okay */
30 void string_free1 (char *s)
32 free (s); /* 2. unqualified as only */
35 void string_free2 (/*@only@*/ char *s)
40 void string_free3 (/*@only@*/ char *s)
42 char *t = string_copy (s);
45 } /* 3. bad, t not released */
47 void string_free4 (/*@only@*/ char *s)
52 for (i = 0; i < 3; i++)