Lines Matching defs:macro

28  *	macro.cc
38 #include <mksh/macro.h>
48 static void expand_value_with_daemon(Name, register Property macro, register String destination, Boolean cmd);
62 * Return expanded value of macro.
65 * The expanded value of the macro
68 * name The name of the macro we want the value for
93 expand_value(maybe_append_prop(name, macro_prop)->body.macro.value,
151 fatal_reader_mksh(gettext("Loop detected when expanding macro value `%s'"),
179 /* Quote $ in macro value */
199 /* Go expand the macro reference */
231 * the first char after the $ that starts a macro reference.
233 * the macro name.
234 * It will read the macro name, expanding any macros in it,
236 * destination is a String that is filled in with the expanded macro.
237 * It may be passed in referencing a buffer to expand the macro into.
252 * is_conditional Set if a conditional macro is refd
276 Property macro = NULL;
310 /* First copy the (macro-expanded) macro name into string. */
313 /* Check the first char of the macro name to figure out what to do. */
337 /* Single char macro name. Just suck it up */
343 /* Handle multi-char macro names */
378 /* Quote dollar in macro value. */
387 * macro name string.
407 /* Allow nested pairs of () in the macro name. */
413 /* Allow nested pairs of {} in the macro name. */
421 * End of the name. Save the string in the macro
436 * We got the macro name. We now inspect it to see if it
456 fatal_reader_mksh(gettext("Illegal macro reference `%s'"),
459 /* Internalize the macro name using the first char only. */
468 * Get the name of the macro proper.
483 fatal_reader_mksh(gettext("= missing from replacement macro reference"));
518 fatal_reader_mksh(gettext("= missing from replacement macro reference"));
522 fatal_reader_mksh(gettext("%% missing from replacement macro reference"));
525 fatal_reader_mksh(gettext("%% missing from replacement macro reference"));
599 * Use the whole string as the macro name.
625 /* Get the macro value. */
626 macro = get_prop(name->prop, macro_prop);
627 if ((macro != NULL) && macro->body.macro.is_conditional) {
630 * Add this conditional macro to the beginning of the
635 warning_mksh(gettext("Conditional macro `%s' referenced in file `%ws', line %d"),
640 if ((macro == NULL) || (macro->body.macro.value == NULL)) {
650 expand_value_with_daemon(name, macro, &string, cmd);
654 * If there were any transforms specified in the macro
659 expand_value_with_daemon(name, macro, &string, cmd);
811 * This is for the case when the macro name did not
823 expand_value_with_daemon(name, macro, destination, cmd);
854 if (macro_to_add->prop->body.macro.value != NULL) {
855 value_to_add = macro_to_add->prop->body.macro.value->string_mb;
861 * Check if this macro is already on list, if so, do nothing
891 * host_arch Property for magic macro HOST_ARCH
892 * target_arch Property for magic macro TARGET_ARCH
946 * host_mach Property for magic macro HOST_MACH
947 * target_mach Property for magic macro TARGET_MACH
994 * expand_value_with_daemon(name, macro, destination, cmd)
999 * name Name of the macro (Added by the NSE)
1000 * macro The property block with the value to expand
1008 expand_value_with_daemon(Name, register Property macro, register String destination, Boolean cmd)
1013 switch (macro->body.macro.daemon) {
1016 expand_value(macro->body.macro.value, destination, cmd);
1023 expand_value(macro->body.macro.value, destination, cmd);
1030 for (chain = (Chain) macro->body.macro.value;
1054 * Set a macro value, possibly supplying a daemon to be used
1061 * name Name of the macro to set
1072 * vpath_defined Set if the macro VPATH is set
1079 register Property macro = maybe_append_prop(name, macro_prop);
1091 macro->body.macro.read_only) {
1092 return macro;
1118 val = macro->body.macro.value;
1128 if ((macro != NULL) && (val != NULL)) {
1175 /* Set the new values in the macro property block */
1201 macro->body.macro.value = value;
1202 macro->body.macro.daemon = daemon;
1223 if (macro->body.macro.exported) {
1334 return macro;