https://github.com/Kitware/CMake
Revision f0ebdce4e8f3400e9ecec698506ddf03ca4e053e authored by Brad King on 11 June 2022, 09:52:08 UTC, committed by Kitware Robot on 11 June 2022, 09:52:15 UTC
497397bd17 cmake-gui: Support non-ASCII chars on Windows with Qt6

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7346
2 parent s a3e2aa3 + 497397b
Raw File
Tip revision: f0ebdce4e8f3400e9ecec698506ddf03ca4e053e authored by Brad King on 11 June 2022, 09:52:08 UTC
Merge topic 'cmake-gui-qt6-decode' into release-3.24
Tip revision: f0ebdce
TestEndianess.c.in
/* A 16 bit integer is required. */
typedef @CMAKE_16BIT_TYPE@ cmakeint16;

/* On a little endian machine, these 16bit ints will give "THIS IS LITTLE ENDIAN."
   On a big endian machine the characters will be exchanged pairwise. */
const cmakeint16 info_little[] =  {0x4854, 0x5349, 0x4920, 0x2053, 0x494c, 0x5454, 0x454c, 0x4520, 0x444e, 0x4149, 0x2e4e, 0x0000};

/* on a big endian machine, these 16bit ints will give "THIS IS BIG ENDIAN."
   On a little endian machine the characters will be exchanged pairwise. */
const cmakeint16 info_big[] =     {0x5448, 0x4953, 0x2049, 0x5320, 0x4249, 0x4720, 0x454e, 0x4449, 0x414e, 0x2e2e, 0x0000};

#ifdef __CLASSIC_C__
int main(argc, argv) int argc; char *argv[];
#else
int main(int argc, char *argv[])
#endif
{
  int require = 0;
  require += info_little[argc];
  require += info_big[argc];
  (void)argv;
  return require;
}
back to top