- Timestamp:
- Mar 8, 2022 10:01:30 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/function.c
r3545 r3561 82 82 #endif /* CONFIG_WITH_OS2_LIBPATH */ 83 83 84 #if def KMK84 #if defined(KMK) || defined(CONFIG_WITH_LAZY_DEPS_VARS) 85 85 /** Checks if the @a_cch characters (bytes) in @a a_psz equals @a a_szConst. */ 86 86 # define STR_N_EQUALS(a_psz, a_cch, a_szConst) \ 87 87 ( (a_cch) == sizeof (a_szConst) - 1 && !strncmp ((a_psz), (a_szConst), sizeof (a_szConst) - 1) ) 88 88 #endif 89 90 #ifdef KMK 89 91 # ifdef _MSC_VER 90 92 # include "kmkbuiltin/mscfakes.h" … … 5404 5406 } 5405 5407 5408 #endif /* KMK */ 5409 #if defined (KMK) || defined (CONFIG_WITH_LAZY_DEPS_VARS) 5410 5406 5411 /* Helper for performer GNU make style quoting of one filename. */ 5407 5412 … … 5489 5494 } 5490 5495 5496 # ifdef KMK 5497 5491 5498 /* Helper for func_quote_make that checks if there are more arguments 5492 5499 that produces output or not. */ … … 5562 5569 return o; 5563 5570 } 5571 5572 # endif /* KMK */ 5564 5573 5565 5574 /* Worker for func_quote_shell() for escaping a string that's inside … … 5596 5605 } 5597 5606 5607 # ifdef KMK 5598 5608 /* quote-sh-dq */ 5599 5609 … … 5602 5612 return func_escape_shell_in_dq (o, argv[0], strlen (argv[0])); 5603 5613 } 5604 5614 # endif 5605 5615 5606 5616 /* Worker for func_quote_shell() for escaping a string that's inside … … 5626 5636 } 5627 5637 5638 # ifdef KMK 5628 5639 /* quote-sh-dq */ 5629 5640 … … 5632 5643 return func_escape_shell_in_sq (o, argv[0], strlen (argv[0])); 5633 5644 } 5645 #endif 5634 5646 5635 5647 /* Output a shell argument with quoting as needed. */ … … 5680 5692 } 5681 5693 5694 # ifdef KMK 5695 5682 5696 /* Takes zero or more plain strings and escapes/quotes spaces and other 5683 5697 problematic characters, bourne make style. … … 5726 5740 } 5727 5741 } 5742 5743 # endif /* KMK */ 5728 5744 5729 5745 /* Decoded style options for the $(q* ) and $(*file* ) functions. */ … … 5764 5780 #endif 5765 5781 5766 5782 # ifdef KMK 5767 5783 /* Decodes the optional style argument. This is chiefly for the return 5768 5784 style, but can also pick the input and space styles (just because we can). */ … … 5849 5865 return intstyle; 5850 5866 } 5867 # endif /* KMK */ 5851 5868 5852 5869 /* Output (returns) a separator according to STYLE. */ … … 5948 5965 } 5949 5966 5967 #endif /* KMK || CONFIG_WITH_LAZY_DEPS_VARS */ 5968 #ifdef KMK 5969 5950 5970 /* Outputs (returns) the given CHAIN and frees it. */ 5951 5971 … … 7086 7106 { 7087 7107 if (pp->percent) 7088 for (wp = wordhead; wp != 0; wp = wp->next) 7089 if (!wp->matched 7090 && pattern_matches_ex (pp->str, pp->percent, pp->sfxlen, 7091 wp->str, wp->length)) 7092 { 7093 wp->matched = 1; 7094 if (is_filter) 7095 words_len += wp->length + 1; 7096 else 7097 words_len -= wp->length + 1; 7098 } 7108 { 7109 for (wp = wordhead; wp != 0; wp = wp->next) 7110 if (!wp->matched 7111 && pattern_matches_ex (pp->str, pp->percent, pp->sfxlen, 7112 wp->str, wp->length)) 7113 { 7114 wp->matched = 1; 7115 if (is_filter) 7116 words_len += wp->length + 1; 7117 else 7118 words_len -= wp->length + 1; 7119 } 7120 } 7099 7121 else if (hashing) 7100 7122 {
Note:
See TracChangeset
for help on using the changeset viewer.