- Timestamp:
- Aug 2, 2011 1:05:37 PM (13 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/Makefile.am
r2489 r2532 143 143 -DCONFIG_WITH_STACK \ 144 144 -DCONFIG_WITH_STRING_FUNCTIONS \ 145 -DCONFIG_WITH_WHERE_FUNCTION \ 145 146 -DCONFIG_WITH_WHICH \ 146 147 -DCONFIG_WITH_XARGS \ -
trunk/src/kmk/Makefile.kmk
r2489 r2532 168 168 CONFIG_WITH_STACK \ 169 169 CONFIG_WITH_STRING_FUNCTIONS \ 170 CONFIG_WITH_WHERE_FUNCTION \ 170 171 CONFIG_WITH_WHICH \ 171 172 CONFIG_WITH_XARGS \ -
trunk/src/kmk/function.c
r2516 r2532 684 684 } 685 685 686 #ifdef CONFIG_WITH_WHERE_FUNCTION 687 static char * 688 func_where (char *o, char **argv, const char *funcname UNUSED) 689 { 690 struct variable *v = lookup_variable (argv[0], strlen (argv[0])); 691 char buf[64]; 692 693 if (v == 0) 694 o = variable_buffer_output (o, "undefined", 9); 695 else 696 if (v->fileinfo.filenm) 697 { 698 o = variable_buffer_output (o, v->fileinfo.filenm, strlen(v->fileinfo.filenm)); 699 sprintf (buf, ":%lu", v->fileinfo.lineno); 700 o = variable_buffer_output (o, buf, strlen(buf)); 701 } 702 else 703 o = variable_buffer_output (o, "no-location", 11); 704 705 return o; 706 } 707 #endif /* CONFIG_WITH_WHERE_FUNCTION */ 708 686 709 #ifdef VMS 687 710 # define IS_PATHSEP(c) ((c) == ']') … … 5286 5309 { STRING_SIZE_TUPLE("sort"), 0, 1, 1, func_sort}, 5287 5310 { STRING_SIZE_TUPLE("strip"), 0, 1, 1, func_strip}, 5311 #ifdef CONFIG_WITH_WHERE_FUNCTION 5312 { STRING_SIZE_TUPLE("where"), 0, 1, 1, func_where}, 5313 #endif 5288 5314 { STRING_SIZE_TUPLE("wildcard"), 0, 1, 1, func_wildcard}, 5289 5315 { STRING_SIZE_TUPLE("word"), 2, 2, 1, func_word}, -
trunk/src/kmk/variable.c
r2489 r2532 1289 1289 && defined (CONFIG_WITH_DATE) \ 1290 1290 && defined (CONFIG_WITH_FILE_SIZE) \ 1291 && defined (CONFIG_WITH_WHERE_FUNCTION) \ 1291 1292 && defined (CONFIG_WITH_WHICH) \ 1292 1293 && defined (CONFIG_WITH_EVALPLUS) \ … … 1316 1317 " file-size" 1317 1318 " expr if-expr select" 1319 " where" 1318 1320 " which" 1319 1321 " evalctx evalval evalvalctx evalcall evalcall2 eval-opt-var" … … 1375 1377 strcat (buf, " expr if-expr select"); 1376 1378 # endif 1379 # if defined (CONFIG_WITH_WHERE_FUNCTION) 1380 strcat (buf, " where"); 1381 # endif 1377 1382 # if defined (CONFIG_WITH_WHICH) 1378 1383 strcat (buf, " which");
Note:
See TracChangeset
for help on using the changeset viewer.