Changeset 1716 for trunk/src/kmk/function.c
- Timestamp:
- Sep 3, 2008, 3:40:13 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/function.c
r1699 r1716 2088 2088 2089 2089 2090 #ifdef CONFIG_WITH_DEFINED 2091 /* Similar to ifdef. */ 2092 static char * 2093 func_defined (char *o, char **argv, const char *funcname) 2094 { 2095 struct variable *v = lookup_variable (argv[0], strlen (argv[0])); 2096 int result = v != NULL && *v->value != '\0'; 2097 o = variable_buffer_output (o, result ? "1" : "", result); 2098 return o; 2099 } 2100 #endif /* CONFIG_WITH_DEFINED*/ 2101 2102 2103 2090 2104 /* Return the absolute name of file NAME which does not contain any `.', 2091 2105 `..' components nor any repeated path separators ('/'). */ … … 3917 3931 { STRING_SIZE_TUPLE("not"), 0, 1, 1, func_not}, 3918 3932 #endif 3933 #ifdef CONFIG_WITH_DEFINED 3934 { STRING_SIZE_TUPLE("defined"), 1, 1, 1, func_defined}, 3935 #endif 3919 3936 #ifdef CONFIG_WITH_TOUPPER_TOLOWER 3920 3937 { STRING_SIZE_TUPLE("toupper"), 0, 1, 1, func_toupper_tolower},
Note:
See TracChangeset
for help on using the changeset viewer.