Changeset 76512 in vbox
- Timestamp:
- Dec 30, 2018 5:14:08 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 127813
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/.scm-settings
r76508 r76512 73 73 /iprt/runtime-loader.h: --no-fix-header-guards 74 74 /iprt/bldprog-strtab-template.cpp.h: --no-fix-header-guards 75 /iprt/asm*watcom*.h: --no-pragma-once 75 76 -
trunk/include/iprt/asm-amd64-x86-watcom-16.h
r76507 r76512 26 26 #ifndef ___iprt_asm_amd64_x86_watcom_16_h 27 27 #define ___iprt_asm_amd64_x86_watcom_16_h 28 #ifndef RT_WITHOUT_PRAGMA_ONCE 29 # pragma once 30 #endif 28 /* no pragma once */ 31 29 32 30 #ifndef ___iprt_asm_amd64_x86_h -
trunk/include/iprt/asm-amd64-x86-watcom-32.h
r76507 r76512 26 26 #ifndef ___iprt_asm_amd64_x86_watcom_32_h 27 27 #define ___iprt_asm_amd64_x86_watcom_32_h 28 #ifndef RT_WITHOUT_PRAGMA_ONCE 29 # pragma once 30 #endif 28 /* no pragma once */ 31 29 32 30 #ifndef ___iprt_asm_amd64_x86_h -
trunk/include/iprt/asm-watcom-x86-16.h
r76507 r76512 26 26 #ifndef ___iprt_asm_watcom_x86_16_h 27 27 #define ___iprt_asm_watcom_x86_16_h 28 #ifndef RT_WITHOUT_PRAGMA_ONCE 29 # pragma once 30 #endif 28 /* no pragma once */ 31 29 32 30 #ifndef ___iprt_asm_h -
trunk/include/iprt/asm-watcom-x86-32.h
r76507 r76512 26 26 #ifndef ___iprt_asm_watcom_x86_32_h 27 27 #define ___iprt_asm_watcom_x86_32_h 28 #ifndef RT_WITHOUT_PRAGMA_ONCE 29 # pragma once 30 #endif 28 /* no pragma once */ 31 29 32 30 #ifndef ___iprt_asm_h -
trunk/src/bldprogs/scm.cpp
r76506 r76512 77 77 SCMOPT_FIX_HEADER_GUARDS, 78 78 SCMOPT_NO_FIX_HEADER_GUARDS, 79 SCMOPT_PRAGMA_ONCE, 80 SCMOPT_NO_PRAGMA_ONCE, 79 81 SCMOPT_FIX_TODOS, 80 82 SCMOPT_NO_FIX_TODOS, … … 178 180 /* .cMinBlankLinesBeforeFlowerBoxMakers = */ 2, 179 181 /* .fFixHeaderGuards = */ false, /** @todo fFixHeaderGuards = true */ 182 /* .fPragmaOnce = */ true, 180 183 /* .fFixTodos = */ true, 181 184 /* .fFixErrH = */ true, … … 220 223 { "--fix-header-guards", SCMOPT_FIX_HEADER_GUARDS, RTGETOPT_REQ_NOTHING }, 221 224 { "--no-fix-header-guards", SCMOPT_NO_FIX_HEADER_GUARDS, RTGETOPT_REQ_NOTHING }, 225 { "--pragma-once", SCMOPT_PRAGMA_ONCE, RTGETOPT_REQ_NOTHING }, 226 { "--no-pragma-once", SCMOPT_NO_PRAGMA_ONCE, RTGETOPT_REQ_NOTHING }, 222 227 { "--fix-todos", SCMOPT_FIX_TODOS, RTGETOPT_REQ_NOTHING }, 223 228 { "--no-fix-todos", SCMOPT_NO_FIX_TODOS, RTGETOPT_REQ_NOTHING }, … … 1020 1025 case SCMOPT_NO_FIX_HEADER_GUARDS: 1021 1026 pSettings->fFixHeaderGuards = false; 1027 return VINF_SUCCESS; 1028 1029 case SCMOPT_PRAGMA_ONCE: 1030 pSettings->fPragmaOnce = true; 1031 return VINF_SUCCESS; 1032 case SCMOPT_NO_PRAGMA_ONCE: 1033 pSettings->fPragmaOnce = false; 1022 1034 return VINF_SUCCESS; 1023 1035 … … 2693 2705 RTPrintf(" Fix header guards and #pragma once. Default: %RTbool\n", g_Defaults.fFixHeaderGuards); 2694 2706 break; 2707 case SCMOPT_PRAGMA_ONCE: 2708 RTPrintf(" Whether to include #pragma once with the header guard. Default: %RTbool\n", g_Defaults.fPragmaOnce); 2709 break; 2695 2710 case SCMOPT_FIX_TODOS: 2696 2711 RTPrintf(" Fix @todo statements so doxygen sees them. Default: %RTbool\n", g_Defaults.fFixTodos); -
trunk/src/bldprogs/scm.h
r76506 r76512 334 334 /** Whether to fix C/C++ header guards and \#pragma once directives. */ 335 335 bool fFixHeaderGuards; 336 /** Whether to include a pragma once statement with the header guard. */ 337 bool fPragmaOnce; 336 338 337 339 /** Whether to fix C/C++ todos. */ -
trunk/src/bldprogs/scmrw.cpp
r76509 r76512 3019 3019 iPragmaOnce + 3, ErrInfo.Core.pszMsg, cchLine, pchLine); 3020 3020 ScmVerbose(pState, 3, "Found pragma once\n"); 3021 fRet |= !pSettings->fPragmaOnce; 3021 3022 } 3022 3023 else … … 3025 3026 if (RT_FAILURE(rc)) 3026 3027 return ScmError(pState, rc, "seek error\n"); 3027 fRet = true;3028 fRet = pSettings->fPragmaOnce; 3028 3029 ScmVerbose(pState, 2, "Missing #pragma once\n"); 3029 3030 } … … 3032 3033 * Write the pragma once stuff. 3033 3034 */ 3034 ScmStreamPutLine(pOut, RT_STR_TUPLE("#ifndef RT_WITHOUT_PRAGMA_ONCE"), enmEol); 3035 ScmStreamPutLine(pOut, RT_STR_TUPLE("# pragma once"), enmEol); 3036 rc = ScmStreamPutLine(pOut, RT_STR_TUPLE("#endif"), enmEol); 3037 if (RT_FAILURE(rc)) 3038 return false; 3035 if (pSettings->fPragmaOnce) 3036 { 3037 ScmStreamPutLine(pOut, RT_STR_TUPLE("#ifndef RT_WITHOUT_PRAGMA_ONCE"), enmEol); 3038 ScmStreamPutLine(pOut, RT_STR_TUPLE("# pragma once"), enmEol); 3039 rc = ScmStreamPutLine(pOut, RT_STR_TUPLE("#endif"), enmEol); 3040 if (RT_FAILURE(rc)) 3041 return false; 3042 } 3039 3043 3040 3044 /*
Note:
See TracChangeset
for help on using the changeset viewer.