comparison src/variables.cc @ 1363:ed5757e3333b

[project @ 1995-09-05 23:26:59 by jwe]
author jwe
date Tue, 05 Sep 1995 23:26:59 +0000
parents dc9c01f66a19
children 083787534e18
comparison
equal deleted inserted replaced
1362:f9745982c987 1363:ed5757e3333b
127 tree_fvc * 127 tree_fvc *
128 is_valid_function (const tree_constant& arg, char *warn_for, int warn) 128 is_valid_function (const tree_constant& arg, char *warn_for, int warn)
129 { 129 {
130 tree_fvc *ans = 0; 130 tree_fvc *ans = 0;
131 131
132 char *fcn_name = arg.string_value (); 132 const char *fcn_name = arg.string_value ();
133 133
134 if (error_state) 134 if (error_state)
135 { 135 {
136 if (warn) 136 if (warn)
137 error ("%s: expecting function name as argument", warn_for); 137 error ("%s: expecting function name as argument", warn_for);
186 { 186 {
187 print_usage ("is_global"); 187 print_usage ("is_global");
188 return retval; 188 return retval;
189 } 189 }
190 190
191 char *name = args(0).string_value (); 191 const char *name = args(0).string_value ();
192 192
193 if (error_state) 193 if (error_state)
194 { 194 {
195 error ("is_global: expecting string argument"); 195 error ("is_global: expecting string argument");
196 return retval; 196 return retval;
845 { 845 {
846 tree_constant val = defn->eval (0); 846 tree_constant val = defn->eval (0);
847 847
848 if (! error_state && val.is_string ()) 848 if (! error_state && val.is_string ())
849 { 849 {
850 char *s = val.string_value (); 850 const char *s = val.string_value ();
851 851
852 if (s) 852 if (s)
853 retval = strsave (s); 853 retval = strsave (s);
854 } 854 }
855 } 855 }