Changeset 2532 for trunk/src/kmk/function.c
- Timestamp:
- Aug 2, 2011, 3:05:37 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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},
Note:
See TracChangeset
for help on using the changeset viewer.