Changeset 92842 in vbox
- Timestamp:
- Dec 9, 2021 9:51:57 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
r92835 r92842 319 319 'const uint32_t g_cHelpLangEntries = RT_ELEMENTS(g_apHelpLangEntries);' \ 320 320 '' \ 321 ' void * volatile g_pHelpLangEntry = (void *)&g_apHelpLangEntries[0];'\321 'PHELP_LANG_ENTRY volatile g_pHelpLangEntry = &g_apHelpLangEntries[0];'\ 322 322 '' 323 323 $(QUIET)$(CP) --changed -- "$@" "$(patsubst %.ts,%,$@)" … … 366 366 'extern const uint32_t g_cHelpLangEntries;' \ 367 367 '' \ 368 'extern void *volatile g_pHelpLangEntry;' \368 'extern PHELP_LANG_ENTRY volatile g_pHelpLangEntry;' \ 369 369 '' \ 370 370 'RT_C_DECLS_END' \ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r92830 r92842 511 511 if (pszLang == NULL || pszLang[0] == 0 || (pszLang[0] == 'C' && pszLang[1] == 0)) 512 512 pszLang = "en_US"; 513 void *pHelpLangEntry = NULL;513 PHELP_LANG_ENTRY pHelpLangEntry = NULL; 514 514 /* find language entry matching exactly pszLang */ 515 515 for (uint32_t i = 0; i < g_cHelpLangEntries; i++) … … 517 517 if (strcmp(g_apHelpLangEntries[i].pszLang, pszLang) == 0) 518 518 { 519 pHelpLangEntry = (void *)&g_apHelpLangEntries[i];519 pHelpLangEntry = &g_apHelpLangEntries[i]; 520 520 break; 521 521 } … … 530 530 && memcmp(g_apHelpLangEntries[i].pszLang, pszLang, cbLang) == 0) 531 531 { 532 pHelpLangEntry = (void *)&g_apHelpLangEntries[i];532 pHelpLangEntry = &g_apHelpLangEntries[i]; 533 533 break; 534 534 } … … 537 537 /* set to en_US (i.e. untranslated) if not found */ 538 538 if (pHelpLangEntry == NULL) 539 pHelpLangEntry = (void *)&g_apHelpLangEntries[0];540 541 ASMAtomicWritePtrVoid(&g_pHelpLangEntry, pHelpLangEntry);539 pHelpLangEntry = &g_apHelpLangEntries[0]; 540 541 ASMAtomicWritePtr(&g_pHelpLangEntry, pHelpLangEntry); 542 542 #else 543 543 NOREF(pszLang); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r92835 r92842 114 114 uint32_t cFound = 0; 115 115 #ifdef VBOX_WITH_VBOXMANAGE_NLS 116 HELP_LANG_ENTRY *pHelpLangEntry[2] = {(HELP_LANG_ENTRY *)ASMAtomicReadPtr(&g_pHelpLangEntry), &g_apHelpLangEntries[0] };116 PHELP_LANG_ENTRY pHelpLangEntry[2] = {ASMAtomicReadPtrT(&g_pHelpLangEntry, PHELP_LANG_ENTRY), &g_apHelpLangEntries[0] }; 117 117 #else 118 HELP_LANG_ENTRY *pHelpLangEntry[1] = {(HELP_LANG_ENTRY *)g_pHelpLangEntry};118 PHELP_LANG_ENTRY pHelpLangEntry[1] = {(PHELP_LANG_ENTRY)g_pHelpLangEntry}; 119 119 #endif 120 120 /* Try to find translated, then untranslated */ … … 176 176 uint32_t cFound = 0; 177 177 #ifdef VBOX_WITH_VBOXMANAGE_NLS 178 HELP_LANG_ENTRY *pHelpLangEntry[2] = {(HELP_LANG_ENTRY *)ASMAtomicReadPtr(&g_pHelpLangEntry), &g_apHelpLangEntries[0] };178 PHELP_LANG_ENTRY pHelpLangEntry[2] = {ASMAtomicReadPtrT(&g_pHelpLangEntry, PHELP_LANG_ENTRY), &g_apHelpLangEntries[0] }; 179 179 #else 180 HELP_LANG_ENTRY *pHelpLangEntry[1] = {(HELP_LANG_ENTRY *)g_pHelpLangEntry};180 PHELP_LANG_ENTRY pHelpLangEntry[1] = {(PHELP_LANG_ENTRY)g_pHelpLangEntry}; 181 181 #endif 182 182 /* Try to find translated, then untranslated */ … … 1036 1036 uint32_t cPendingBlankLines = 0; 1037 1037 #ifdef VBOX_WITH_VBOXMANAGE_NLS 1038 HELP_LANG_ENTRY *pHelpLangEntry = (HELP_LANG_ENTRY *)ASMAtomicReadPtr(&g_pHelpLangEntry);1038 PHELP_LANG_ENTRY pHelpLangEntry = ASMAtomicReadPtrT(&g_pHelpLangEntry, PHELP_LANG_ENTRY); 1039 1039 #else 1040 HELP_LANG_ENTRY *pHelpLangEntry = (HELP_LANG_ENTRY *)g_pHelpLangEntry;1040 PHELP_LANG_ENTRY pHelpLangEntry = (PHELP_LANG_ENTRY)g_pHelpLangEntry; 1041 1041 #endif 1042 1042 for (uint32_t i = 0; i < pHelpLangEntry->cHelpEntries; i++)
Note:
See TracChangeset
for help on using the changeset viewer.