Revision | 8a569c6e525ab0169b3629f5e213bb741e174c8a (tree) |
---|---|
Time | 2018-03-11 01:54:15 |
Author | Starg <starg@user...> |
Commiter | Starg |
Print arch info in version dialogs
@@ -4558,21 +4558,14 @@ static void VersionWnd(HWND hParentWnd) | ||
4558 | 4558 | { |
4559 | 4559 | char VersionText[2024]; |
4560 | 4560 | sprintf(VersionText, |
4561 | -"TiMidity++ %s%s%s" NLS NLS | |
4561 | +"TiMidity++ %s%s %s" NLS NLS | |
4562 | 4562 | "TiMidity-0.2i by Tuukka Toivonen <tt@cgs.fi>." NLS |
4563 | 4563 | "TiMidity Win32 version by Davide Moretti <dave@rimini.com>." NLS |
4564 | 4564 | "TiMidity Windows 95 port by Nicolas Witczak." NLS |
4565 | 4565 | "TiMidity Win32 GUI by Daisuke Aoki <dai@y7.net>." NLS |
4566 | 4566 | " Japanese menu, dialog, etc by Saito <timidity@flashmail.com>." NLS |
4567 | 4567 | "TiMidity++ by Masanao Izumo <mo@goice.co.jp>." NLS |
4568 | -,(strcmp(timidity_version, "current")) ? "version " : "", timidity_version, | |
4569 | -#if defined(_M_X64) || defined(__x86_64__) | |
4570 | -" [x64]" | |
4571 | -#elif defined(_M_IX86) || defined(__i386__) | |
4572 | -" [x86]" | |
4573 | -#else | |
4574 | -"" | |
4575 | -#endif | |
4568 | +,(strcmp(timidity_version, "current")) ? "version " : "", timidity_version, arch_string | |
4576 | 4569 | ); |
4577 | 4570 | MessageBox(hParentWnd, VersionText, "Version", MB_OK); |
4578 | 4571 | } |
@@ -4581,7 +4574,7 @@ static void TiMidityWnd(HWND hParentWnd) | ||
4581 | 4574 | { |
4582 | 4575 | char TiMidityText[2024]; |
4583 | 4576 | sprintf(TiMidityText, |
4584 | -" TiMidity++ %s%s%s -- MIDI to WAVE converter and player" NLS | |
4577 | +" TiMidity++ %s%s %s -- MIDI to WAVE converter and player" NLS | |
4585 | 4578 | " Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>" NLS |
4586 | 4579 | " Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>" NLS |
4587 | 4580 | NLS |
@@ -4603,14 +4596,7 @@ NLS | ||
4603 | 4596 | " along with this program; if not, write to the Free Software" NLS |
4604 | 4597 | " Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA" NLS |
4605 | 4598 | , |
4606 | -(strcmp(timidity_version, "current")) ? "version " : "", timidity_version, | |
4607 | -#if defined(_M_X64) || defined(__x86_64__) | |
4608 | -" [x64]" | |
4609 | -#elif defined(_M_IX86) || defined(__i386__) | |
4610 | -" [x86]" | |
4611 | -#else | |
4612 | -"" | |
4613 | -#endif | |
4599 | +(strcmp(timidity_version, "current")) ? "version " : "", timidity_version, arch_string | |
4614 | 4600 | ); |
4615 | 4601 | MessageBox(hParentWnd, TiMidityText, "TiMidity++", MB_OK); |
4616 | 4602 | } |
@@ -1571,7 +1571,7 @@ static void VersionWnd(HWND hParentWnd) | ||
1571 | 1571 | { |
1572 | 1572 | char VersionText[2024]; |
1573 | 1573 | sprintf(VersionText, |
1574 | -"TiMidity++ %s%s" NLS NLS | |
1574 | +"TiMidity++ %s%s %s" NLS NLS | |
1575 | 1575 | "TiMidity-0.2i by Tuukka Toivonen <tt@cgs.fi>." NLS |
1576 | 1576 | "TiMidity Win32 version by Davide Moretti <dave@rimini.com>." NLS |
1577 | 1577 | "TiMidity Windows 95 port by Nicolas Witczak." NLS |
@@ -1579,7 +1579,7 @@ static void VersionWnd(HWND hParentWnd) | ||
1579 | 1579 | "Twsynth GUI by Daisuke Aoki <dai@y7.net>." NLS |
1580 | 1580 | " Japanese menu, dialog, etc by Saito <timidity@flashmail.com>." NLS |
1581 | 1581 | "TiMidity++ by Masanao Izumo <mo@goice.co.jp>." NLS |
1582 | -, (strcmp(timidity_version, "current")) ? "version " : "", timidity_version); | |
1582 | +, (strcmp(timidity_version, "current")) ? "version " : "", timidity_version, arch_string); | |
1583 | 1583 | MessageBoxA(hParentWnd, VersionText, "Version", MB_OK); |
1584 | 1584 | } |
1585 | 1585 |
@@ -1587,7 +1587,7 @@ static void TiMidityWnd(HWND hParentWnd) | ||
1587 | 1587 | { |
1588 | 1588 | char TiMidityText[2024]; |
1589 | 1589 | sprintf(TiMidityText, |
1590 | -" TiMidity++ %s%s -- MIDI to WAVE converter and player" NLS | |
1590 | +" TiMidity++ %s%s %s -- MIDI to WAVE converter and player" NLS | |
1591 | 1591 | " Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>" NLS |
1592 | 1592 | " Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>" NLS |
1593 | 1593 | NLS |
@@ -1609,7 +1609,7 @@ NLS | ||
1609 | 1609 | " along with this program; if not, write to the Free Software" NLS |
1610 | 1610 | " Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA" NLS |
1611 | 1611 | , |
1612 | -(strcmp(timidity_version, "current")) ? "version " : "", timidity_version | |
1612 | +(strcmp(timidity_version, "current")) ? "version " : "", timidity_version, arch_string | |
1613 | 1613 | ); |
1614 | 1614 | MessageBoxA(hParentWnd, TiMidityText, "TiMidity", MB_OK); |
1615 | 1615 | } |
@@ -177,6 +177,7 @@ extern void code_convert(char *in, char *out, size_t outsiz, | ||
177 | 177 | extern void safe_exit(int status); |
178 | 178 | |
179 | 179 | extern const char *timidity_version; |
180 | +extern const char *arch_string; /* optcode.c */ | |
180 | 181 | extern MBlockList tmpbuffer; |
181 | 182 | extern char *output_text_code; |
182 | 183 |
@@ -29,6 +29,57 @@ | ||
29 | 29 | #endif /* stdc */ |
30 | 30 | |
31 | 31 | #include "timidity.h" |
32 | +#include "common.h" | |
33 | + | |
34 | +const char *arch_string = | |
35 | +#ifdef IX64CPU | |
36 | + #if USE_X64_EXT_INTRIN == 9 | |
37 | + "[x64 AVX2]" | |
38 | + #elif USE_X64_EXT_INTRIN == 8 | |
39 | + "[x64 AVX]" | |
40 | + #elif USE_X64_EXT_INTRIN == 7 | |
41 | + "[x64 SSE4.2]" | |
42 | + #elif USE_X64_EXT_INTRIN == 6 | |
43 | + "[x64 SSE4.1]" | |
44 | + #elif USE_X64_EXT_INTRIN == 5 | |
45 | + "[x64 SSSE3]" | |
46 | + #elif USE_X64_EXT_INTRIN == 4 | |
47 | + "[x64 SSE3]" | |
48 | + #elif USE_X64_EXT_INTRIN == 3 | |
49 | + "[x64 SSE2]" | |
50 | + #elif USE_X64_EXT_INTRIN == 2 | |
51 | + "[x64 SSE]" | |
52 | + #elif USE_X64_EXT_INTRIN == 1 | |
53 | + "[x64 MMX]" | |
54 | + #else | |
55 | + "[x64]" | |
56 | + #endif | |
57 | +#elif defined(IX86CPU) | |
58 | + #if USE_X86_EXT_INTRIN == 9 | |
59 | + "[x86 AVX2]" | |
60 | + #elif USE_X86_EXT_INTRIN == 8 | |
61 | + "[x86 AVX]" | |
62 | + #elif USE_X86_EXT_INTRIN == 7 | |
63 | + "[x86 SSE4.2]" | |
64 | + #elif USE_X86_EXT_INTRIN == 6 | |
65 | + "[x86 SSE4.1]" | |
66 | + #elif USE_X86_EXT_INTRIN == 5 | |
67 | + "[x86 SSSE3]" | |
68 | + #elif USE_X86_EXT_INTRIN == 4 | |
69 | + "[x86 SSE3]" | |
70 | + #elif USE_X86_EXT_INTRIN == 3 | |
71 | + "[x86 SSE2]" | |
72 | + #elif USE_X86_EXT_INTRIN == 2 | |
73 | + "[x86 SSE]" | |
74 | + #elif USE_X86_EXT_INTRIN == 1 | |
75 | + "[x86 MMX]" | |
76 | + #else | |
77 | + "[x86]" | |
78 | + #endif | |
79 | +#else | |
80 | + "" | |
81 | +#endif | |
82 | +; | |
32 | 83 | |
33 | 84 | |
34 | 85 | /*****************************************************************************/ |
@@ -6125,7 +6125,7 @@ static int parse_opt_h(const char *arg) | ||
6125 | 6125 | }; |
6126 | 6126 | void show_ao_device_info(FILE *fp); |
6127 | 6127 | FILE *fp; |
6128 | - char version[32], *help_args[7], per_mark[2]; | |
6128 | + char version[64], *help_args[7], per_mark[2]; | |
6129 | 6129 | int i, j; |
6130 | 6130 | char *h; |
6131 | 6131 | ControlMode *cmp, **cmpp; |
@@ -6136,6 +6136,8 @@ static int parse_opt_h(const char *arg) | ||
6136 | 6136 | fp = open_pager(); |
6137 | 6137 | strcpy(version, (!strstr(timidity_version, "current")) ? "version " : ""); |
6138 | 6138 | strcat(version, timidity_version); |
6139 | + strcat(version, " "); | |
6140 | + strcat(version, arch_string); | |
6139 | 6141 | per_mark[0] = '%'; |
6140 | 6142 | per_mark[1] = '\0'; |
6141 | 6143 | help_args[0] = version; |
@@ -7666,7 +7668,7 @@ static inline int parse_opt_v(const char *arg) | ||
7666 | 7668 | #else |
7667 | 7669 | "TiMidity++ ", |
7668 | 7670 | (strcmp(timidity_version, "current")) ? "version " : "", |
7669 | - timidity_version, NLS, | |
7671 | + timidity_version, " ", arch_string, NLS, | |
7670 | 7672 | NLS, |
7671 | 7673 | #endif |
7672 | 7674 | "Copyright (C) 1999-2004 Masanao Izumo <iz@onicos.co.jp>", NLS, |
@@ -7969,7 +7971,7 @@ static inline void close_pager(FILE *fp) | ||
7969 | 7971 | static void interesting_message(void) |
7970 | 7972 | { |
7971 | 7973 | printf( |
7972 | -"TiMidity++ %s%s -- MIDI to WAVE converter and player" NLS | |
7974 | +"TiMidity++ %s%s %s -- MIDI to WAVE converter and player" NLS | |
7973 | 7975 | "Copyright (C) 1999-2004 Masanao Izumo <iz@onicos.co.jp>" NLS |
7974 | 7976 | "Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>" NLS |
7975 | 7977 | NLS |
@@ -7992,7 +7994,9 @@ static void interesting_message(void) | ||
7992 | 7994 | "along with this program; if not, write to the Free Software" NLS |
7993 | 7995 | "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA" NLS |
7994 | 7996 | NLS, (strcmp(timidity_version, "current")) ? "version " : "", |
7995 | - timidity_version); | |
7997 | + timidity_version, | |
7998 | + arch_string | |
7999 | + ); | |
7996 | 8000 | } |
7997 | 8001 | |
7998 | 8002 | /* -------- functions for getopt_long ends here --------- */ |