Changeset 2159 for trunk/src/kmk/function.c
- Timestamp:
- Dec 29, 2008, 5:08:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/function.c
r2157 r2159 5175 5175 unsigned int len; 5176 5176 #endif 5177 #if defined (CONFIG_WITH_EVALPLUS) || defined (CONFIG_WITH_VALUE_LENGTH) 5178 char num[11]; 5179 #endif 5177 5180 5178 5181 /* There is no way to define a variable with a space in the name, so strip … … 5230 5233 5231 5234 for (i=0; *argv; ++i, ++argv) 5235 #ifdef CONFIG_WITH_VALUE_LENGTH 5236 define_variable (num, sprintf (num, "%d", i), *argv, o_automatic, 0); 5237 #else 5232 5238 { 5233 5239 char num[11]; … … 5236 5242 define_variable (num, strlen (num), *argv, o_automatic, 0); 5237 5243 } 5244 #endif 5245 5246 #ifdef CONFIG_WITH_EVALPLUS 5247 /* $(.ARGC) is the argument count. */ 5248 5249 len = sprintf (num, "%d", i - 1); 5250 define_variable_vl (".ARGC", sizeof (".ARGC") - 1, num, len, 5251 1 /* dup val */, o_automatic, 0); 5252 define_variable (".ARGC", sizeof (".ARGC") - 1, num, o_automatic, 0); 5253 #endif 5238 5254 5239 5255 /* If the number of arguments we have is < max_args, it means we're inside … … 5243 5259 5244 5260 for (; i < max_args; ++i) 5261 #ifdef CONFIG_WITH_VALUE_LENGTH 5262 define_variable (num, sprintf (num, "%d", i), "", o_automatic, 0); 5263 #else 5245 5264 { 5246 5265 char num[11]; 5247 5266 5248 #ifndef CONFIG_WITH_VALUE_LENGTH5249 5267 sprintf (num, "%d", i); 5250 5268 define_variable (num, strlen (num), "", o_automatic, 0); 5251 #else 5252 define_variable (num, sprintf (num, "%d", i), "", o_automatic, 0); 5253 #endif 5254 } 5269 } 5270 #endif 5255 5271 5256 5272 saved_args = max_args;
Note:
See TracChangeset
for help on using the changeset viewer.