Changeset 3140 in kBuild for trunk/src/kmk/kbuild.c
- Timestamp:
- Mar 14, 2018 9:28:10 PM (7 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk
-
Property svn:mergeinfo
set to
/vendor/gnumake/current merged eligible
-
Property svn:mergeinfo
set to
-
trunk/src/kmk/kbuild.c
r3068 r3140 30 30 *******************************************************************************/ 31 31 #define NO_MEMCOPY_HACK 32 #include "make .h"32 #include "makeint.h" 33 33 #include "filedef.h" 34 34 #include "variable.h" … … 116 116 g_pszInitialCwd = xstrdup(szTmp); 117 117 else 118 fatal(NILF, _("getcwd failed"));118 O(fatal, NILF, _("getcwd failed")); 119 119 120 120 /* … … 282 282 strcat(strcpy(pszTmp2, get_kbuild_bin_path()), "/../.."); 283 283 if (!my_abspath(pszTmp2, szTmpPath)) 284 fatal(NILF, _("failed to determin KBUILD_PATH"));284 O(fatal, NILF, _("failed to determin KBUILD_PATH")); 285 285 #endif 286 286 } … … 332 332 333 333 if (!my_abspath(pszTmp2, szTmpPath)) 334 fatal(NILF, _("failed to determin KBUILD_BIN_PATH (pszTmp2=%s szTmpPath=%s)"), pszTmp2, szTmpPath);334 OSS(fatal, NILF, _("failed to determin KBUILD_BIN_PATH (pszTmp2=%s szTmpPath=%s)"), pszTmp2, szTmpPath); 335 335 #endif /* !KBUILD_PATH */ 336 336 } … … 506 506 struct variable *pVar = lookup_variable(pszName, cchName); 507 507 if (!pVar) 508 fatal(NILF, _("variable `%.*s' isn't defined!"), (int)cchName, pszName);508 fatal(NILF, cchName, _("variable `%.*s' isn't defined!"), (int)cchName, pszName); 509 509 if (pVar->recursive) 510 fatal(NILF, _("variable `%.*s' is defined as `recursive' instead of `simple'!"), (int)cchName, pszName);510 fatal(NILF, cchName, _("variable `%.*s' is defined as `recursive' instead of `simple'!"), (int)cchName, pszName); 511 511 512 512 MY_ASSERT_MSG(strlen(pVar->value) == pVar->value_length, … … 528 528 struct variable *pVar = lookup_variable(pszName, strlen(pszName)); 529 529 if (!pVar) 530 fatal(NILF, _("variable `%s' isn't defined!"), pszName);530 OS(fatal, NILF, _("variable `%s' isn't defined!"), pszName); 531 531 532 532 MY_ASSERT_MSG(strlen(pVar->value) == pVar->value_length, … … 980 980 psz = pVar->value; 981 981 pszEnd = psz + pVar->value_length; 982 while ( isblank((unsigned char)*psz))982 while (ISBLANK(*psz)) 983 983 psz++; 984 while (pszEnd > psz && isblank((unsigned char)pszEnd[-1]))984 while (pszEnd > psz && ISBLANK(pszEnd[-1])) 985 985 pszEnd--; 986 986 if (pszEnd > psz) … … 1035 1035 pszVarName); 1036 1036 if (!pVar) 1037 fatal(NILF, _("no tool for source `%s' in target `%s'!"), pSource->value, pTarget->value);1037 OSS(fatal, NILF, _("no tool for source `%s' in target `%s'!"), pSource->value, pTarget->value); 1038 1038 return pVar; 1039 1039 } … … 1084 1084 pszVarName); 1085 1085 if (!pVar) 1086 fatal(NILF, _("no OBJSUFF attribute or SUFF_OBJ default for source `%s' in target `%s'!"), pSource->value, pTarget->value); 1086 OSS(fatal, NILF, _("no OBJSUFF attribute or SUFF_OBJ default for source `%s' in target `%s'!"), 1087 pSource->value, pTarget->value); 1087 1088 return pVar; 1088 1089 } … … 1841 1842 iDirection = -1; 1842 1843 else 1843 fatal(NILF, _("incorrect direction argument `%s'!"), argv[2]);1844 OS(fatal, NILF, _("incorrect direction argument `%s'!"), argv[2]); 1844 1845 if (argv[3]) 1845 1846 { 1846 1847 const char *psz = argv[3]; 1847 while ( isspace(*psz))1848 while (ISSPACE(*psz)) 1848 1849 psz++; 1849 1850 if (*psz) … … 1919 1920 psz--; 1920 1921 if (psz <= pszResult) 1921 fatal(NULL, "whut!?! no path? result=`%s'", pszResult);1922 OS(fatal, NULL, "whut!?! no path? result=`%s'", pszResult); 1922 1923 #ifdef HAVE_DOS_PATHS 1923 1924 if (*psz == ':') … … 2042 2043 iVer = 0; 2043 2044 psz = argv[0]; 2044 while ( isblank((unsigned char)*psz))2045 while (ISBLANK(*psz)) 2045 2046 psz++; 2046 2047 if (*psz) … … 2264 2265 2265 2266 install_variable_buffer(&pszSavedVarBuf, &cchSavedVarBuf); 2266 eval_buffer(pszVal, psz);2267 eval_buffer(pszVal, NULL, psz); 2267 2268 restore_variable_buffer(pszSavedVarBuf, cchSavedVarBuf); 2268 2269 … … 2502 2503 */ 2503 2504 if (pszVersion[0] != '1' || pszVersion[1]) 2504 fatal(NULL, "%s: Unsupported version `%s'", pszFuncName, pszVersion);2505 OSS(fatal, NULL, "%s: Unsupported version `%s'", pszFuncName, pszVersion); 2505 2506 2506 2507 if (!cchBldTrg) 2507 fatal(NULL, "%s: missing bldtrg", pszFuncName);2508 OS(fatal, NULL, "%s: missing bldtrg", pszFuncName); 2508 2509 2509 2510 if (!cchBldTrgArch) 2510 fatal(NULL, "%s: missing bld_trg_arch", pszFuncName);2511 OS(fatal, NULL, "%s: missing bld_trg_arch", pszFuncName); 2511 2512 2512 2513 if (!cchBldTrgCpu) 2513 fatal(NULL, "%s: missing bld_trg_cpu", pszFuncName);2514 OS(fatal, NULL, "%s: missing bld_trg_cpu", pszFuncName); 2514 2515 2515 2516 if (!cchBldType) 2516 fatal(NULL, "%s: missing bld_type", pszFuncName);2517 OS(fatal, NULL, "%s: missing bld_type", pszFuncName); 2517 2518 2518 2519 /* … … 2633 2634 { 2634 2635 if ( pDefTemplate->value_length 2635 && ( isspace(pDefTemplate->value[0])2636 || isspace(pDefTemplate->value[pDefTemplate->value_length - 1])))2636 && ( ISSPACE(pDefTemplate->value[0]) 2637 || ISSPACE(pDefTemplate->value[pDefTemplate->value_length - 1]))) 2637 2638 { 2638 2639 unsigned int off; 2639 2640 if (pDefTemplate->rdonly_val) 2640 fatal(NULL, "%s: TEMPLATE is read-only", pszFuncName);2641 OS(fatal, NULL, "%s: TEMPLATE is read-only", pszFuncName); 2641 2642 2642 2643 /* head */ 2643 for (off = 0; isspace(pDefTemplate->value[off]); off++)2644 for (off = 0; ISSPACE(pDefTemplate->value[off]); off++) 2644 2645 /* nothing */; 2645 2646 if (off) … … 2651 2652 /* tail */ 2652 2653 off = pDefTemplate->value_length; 2653 while (off > 0 && isspace(pDefTemplate->value[off - 1]))2654 while (off > 0 && ISSPACE(pDefTemplate->value[off - 1])) 2654 2655 off--; 2655 2656 pDefTemplate->value_length = off; … … 2706 2707 pszTmpl = pTmpl->value; 2707 2708 cchTmpl = pTmpl->value_length; 2708 while ( isspace(*pszTmpl))2709 while (ISSPACE(*pszTmpl)) 2709 2710 cchTmpl--, pszTmpl++; 2710 2711 if (!cchTmpl)
Note:
See TracChangeset
for help on using the changeset viewer.