XmacsLabs / mogan

Mogan STEM Suite (based on GNU TeXmacs): Enjoy exploring science and technology!
https://mogan.app
GNU General Public License v3.0
384 stars 31 forks source link

Miscellaneous cpp macro definition #936

Open jingkaimori opened 1 year ago

jingkaimori commented 1 year ago

There are several preprocess macro usage which lack xmake integration. These usage should be examined and either added to xmake as option, convert to user settings or remove from mogan.

Macros found by looking up #if in cpp codebase
234 个结果 - 97 文件

src\Data\Tree\tree_cursor.cpp:
  521: #ifdef SANITY_CHECKS

src\Data\Tree\tree_select.cpp:
  222: #ifdef SANITY_CHECKS

src\Data\Tree\tree_traverse.cpp:
  181: #ifdef SANITY_CHECKS
  267: #ifdef SANITY_CHECKS
  314: #ifdef SANITY_CHECKS

src\Edit\editor.hpp:
   18: #ifdef AQUATEXMACS
   29: #ifdef EXPERIMENTAL
   69: #ifdef EXPERIMENTAL
  287: #ifdef EXPERIMENTAL

src\Edit\Editor\edit_main.cpp:
   29: #ifdef EXPERIMENTAL
   65: #ifdef EXPERIMENTAL
   76: #ifdef EXPERIMENTAL
  341: #ifdef THISISTHEPREVIOUSCODE_IJUSTLEFTITHEREINCASE

src\Edit\Editor\edit_typeset.cpp:
   29: #ifdef EXPERIMENTAL
  357: #ifdef EXPERIMENTAL
  983: #ifdef USE_EXCEPTIONS
  987: #ifdef USE_EXCEPTIONS

src\Edit\Editor\edit_typeset.hpp:
  66: #ifdef EXPERIMENTAL

src\Edit\Interface\edit_cursor.cpp:
   41: #ifdef old_cursor_accessible
  131: #ifdef old_cursor_accessible

src\Edit\Interface\edit_interface.cpp:
   25: #ifdef EXPERIMENTAL
  796: #ifdef EXPERIMENTAL
  821: #ifdef X11TEXMACS
  831: #ifdef X11TEXMACS
  842: #ifdef X11TEXMACS

src\Edit\Interface\edit_keyboard.cpp:
  357: #ifdef USE_EXCEPTIONS
  399: #ifdef USE_EXCEPTIONS

src\Edit\Interface\edit_mouse.cpp:
  198: #if defined (QTTEXMACS) || defined(AQUATEXMACS)
  338: #ifdef USE_EXCEPTIONS
  373: #ifdef USE_EXCEPTIONS
  728: #ifdef USE_EXCEPTIONS
  768: #ifdef USE_EXCEPTIONS

src\Edit\Modify\edit_modify.cpp:
   19: #ifdef EXPERIMENTAL
  257: #ifdef EXPERIMENTAL

src\Edit\Replace\edit_spell.cpp:
  16: #ifdef MACOSX_EXTENSIONS

src\Graphics\Fonts\font.cpp:
  507: #ifndef X11TEXMACS

src\Graphics\Mathematics\test_math.cpp:
  13: #ifdef ENABLE_TESTS

src\Graphics\Renderer\basic_renderer.cpp:
  12: #if (defined(QTTEXMACS) || defined(AQUATEXMACS))

src\Graphics\Renderer\renderer.cpp:
  522: #ifndef X11TEXMACS

src\Graphics\Types\math_util.hpp:
  26: #ifndef __SUNPRO_CC

src\Kernel\Types\tree.hpp:
  127: #ifdef debug_trees

src\Mogan\Research\research.cpp:
   19: #ifdef STACK_SIZE
   33: #ifdef AQUATEXMACS
   47: #ifdef MACOSX_EXTENSIONS
   51: #if defined(X11TEXMACS) && defined(MACOSX_EXTENSIONS)
   85: #ifdef ENABLE_TESTS
  158: #if defined(AQUATEXMACS) || defined(Q_OS_MAC) ||                               \
  201: #ifdef OS_HAIKU
  334: #ifdef MACOSX_EXTENSIONS
  430: #ifdef MACOSX_EXTENSIONS
  468: #if defined(X11TEXMACS) && defined(MACOSX_EXTENSIONS)
  543: #if defined(X11TEXMACS) && defined(MACOSX_EXTENSIONS)
  573: #ifdef MACOSX_EXTENSIONS
  578: #if defined(MAC_OS_X_VERSION_10_9) || defined(MAC_OS_X_VERSION_10_10)
  646: #ifdef QTTEXMACS
  666: #ifdef STACK_SIZE
  690: #if defined(OS_MACOS) && !defined(__arm64__)
  707: #ifdef MACOSX_EXTENSIONS
  733: #ifdef ENABLE_TESTS
  736:   // #ifdef EXPERIMENTAL

src\Plugins\Bibtex\bibtex.cpp:
  189: #ifdef OS_WIN32_LATER

src\Plugins\Ghostscript\ghostscript.cpp:
  17: #ifdef X11TEXMACS

src\Plugins\Ghostscript\ghostscript.hpp:
  15: #ifdef X11TEXMACS

src\Plugins\Ispell\ispell.cpp:
  109: #ifdef ASPELL

src\Plugins\MacOS\HIDRemote.h:
  131:  #ifdef _HIDREMOTE_EXTENSIONS
  262:  #ifdef HIDREMOTE_THREADSAFETY_HARDENED_NOTIFICATION_HANDLING /* #define HIDREMOTE_THREADSAFETY_HARDENED_NOTIFICATION_HANDLING if you're running your HIDRemote instance on a background thread (requires OS X 10.5 or later) */

src\Plugins\MacOS\HIDRemote.m:
    94:         #ifdef HIDREMOTE_THREADSAFETY_HARDENED_NOTIFICATION_HANDLING
   155:     #ifdef HIDREMOTE_THREADSAFETY_HARDENED_NOTIFICATION_HANDLING
   586:     #ifdef HIDREMOTE_THREADSAFETY_HARDENED_NOTIFICATION_HANDLING
   699:     #ifdef HIDREMOTE_THREADSAFETY_HARDENED_NOTIFICATION_HANDLING
  1042:                 #ifdef _HIDREMOTE_EXTENSIONS
  1208:                     #ifdef _HIDREMOTE_EXTENSIONS
  1221:                         #ifdef _HIDREMOTE_EXTENSIONS
  1235:                         #ifdef _HIDREMOTE_EXTENSIONS
  1830:                     #ifdef _HIDREMOTE_EXTENSIONS
  1880:         #ifdef _HIDREMOTE_EXTENSIONS

src\Plugins\MacOS\mac_app.mm:
  24: #if defined (MAC_OS_X_VERSION_10_11)

src\Plugins\MacOS\mac_spellservice.mm:
  132: #if MAC_OS_X_VERSION_MIN_ALLOWED < MAC_OS_X_VERSION_10_6

src\Plugins\MacOS\mac_utilities.mm:
   29: #ifdef USE_EXCEPTIONS
   32: #ifdef DEBUG_ASSERT
   50: #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
   60: #ifdef AQUATEXMACS
   89: #if 1
  157: #if NS_BLOCKS_AVAILABLE
  173: //#ifdef Q_WS_MAC
  192: #ifdef QT_MAC_USE_COCOA
  349: #ifdef X11TEXMACS
  450: #if !defined(MAC_OS_X_VERSION_10_7) || \
  482: #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_9
  483: #if defined (MAC_OS_X_VERSION_10_10)
  514: #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_8
  515: #if defined (MAC_OS_X_VERSION_10_9)
  528: #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_8
  529: #if defined (MAC_OS_X_VERSION_10_9)

src\Plugins\Pdf\pdf_hummus_renderer.cpp:
  31: #ifdef QT_CORE_LIB

src\Plugins\Qt\qt_gui.cpp:
   65: #ifdef qt_static_plugin_qjpeg
   68: #ifdef qt_static_plugin_qgif
   71: #ifdef qt_static_plugin_qico
   74: #ifdef qt_static_plugin_qsvg
   81: #ifdef QT_MAC_USE_COCOA
   93: #ifdef QT_CPU_FIX
  137: #ifdef QT_MAC_USE_COCOA
  154: #ifdef MACOSX_EXTENSIONS
  520: #ifdef MACOSX_EXTENSIONS
  554: #ifdef MACOSX_EXTENSIONS
  612: #ifdef QT_CPU_FIX
  796: #ifdef QT_CPU_FIX

src\Plugins\Qt\qt_gui.hpp:
  29: #if defined(OS_MACOS) && defined(CocoaPlugin)
  30: #ifndef QT_MAC_USE_COCOA

src\Plugins\Qt\qt_printer_widget.cpp:
  28: #if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
  32: #ifdef Q_OS_WIN

src\Plugins\Qt\qt_printer_widget.hpp:
  11: #ifndef QT_PRINTER_WIDGET_HPP

src\Plugins\Qt\qt_renderer.cpp:
  295: #ifdef __arm__
  548: #ifdef QTMPIXMAPS

src\Plugins\Qt\qt_simple_widget.hpp:
  12: #ifndef QT_SIMPLE_WIDGET_HPP

src\Plugins\Qt\qt_sys_utils.cpp:
  45: #ifdef OS_MINGW

src\Plugins\Qt\qt_sys_utils.hpp:
  12: #ifndef QT_SYS_UTILS_H

src\Plugins\Qt\qt_tm_widget.cpp:
   277: #ifdef UNIFIED_TOOLBAR
   482: //#if 0
   483: #ifdef UNIFIED_TOOLBAR
  1000: #ifdef UNIFIED_TOOLBAR
  1027: #ifdef UNIFIED_TOOLBAR

src\Plugins\Qt\qt_utilities.cpp:
   782: #ifndef _MBD_EXPERIMENTAL_PRINTER_WIDGET  // this is in qt_printer_widget
  1006: #ifdef OS_GNU_LINUX

src\Plugins\Qt\QTMApplication.hpp:
  88:  #ifdef USE_EXCEPTIONS

src\Plugins\Qt\QTMPixmapOrImage.hpp:
  89: #ifdef QTMPIXMAPS

src\Plugins\Qt\QTMPrintDialog.hpp:
   22: #ifndef UI_QTMPRINTDIALOG_H
  330: #ifndef QT_NO_SHORTCUT
  409: #ifndef QTMPRINTDIALOG_HPP

src\Plugins\Qt\QTMPrinterSettings.hpp:
  101: #if QT_VERSION <  QT_VERSION_CHECK(6, 0, 0)

src\Plugins\Qt\QTMScrollView.cpp:
  209: #ifndef QT_NO_GESTURES
  241: #ifndef QT_NO_GESTURES

src\Plugins\Qt\QTMSockets.cpp:
  87: #if !defined (OS_MINGW) || (_WIN32_WINNT >= 0x0600)

src\Plugins\Qt\QTMStyle.cpp:
  205: #ifdef Q_OS_LINUX
  284: #if QT_VERSION <  QT_VERSION_CHECK(6, 0, 0)
  423: #ifdef UNIFIED_TOOLBAR

src\Plugins\Qt\QTMStyle.hpp:
  12: #ifndef QTMSTYLE_HPP
  19: #ifdef Q_OS_MAC
  26: #ifdef Q_OS_MAC

src\Plugins\Qt\QTMTreeModel.hpp:
  12: #ifndef QTMTREEMODEL_HPP

src\Plugins\Qt\QTMWidget.cpp:
  151: #ifdef OS_MINGW
  187: #if (QT_VERSION >= QT_VERSION_CHECK(5,9,0))
  254: #if QT_VERSION <  QT_VERSION_CHECK(6, 0, 0)
  302: #ifdef OS_MINGW
  315: #ifdef OS_MINGW 
  361: #ifdef Q_OS_WIN
  392: #ifdef Q_OS_MAC
  422: #ifdef Q_OS_MAC
  429: #if QT_VERSION <  QT_VERSION_CHECK(6, 0, 0)
  449: #ifdef Q_OS_MAC
  474: #ifdef Q_OS_MAC
  577: #if QT_VERSION <  QT_VERSION_CHECK(6, 0, 0)
  651: #if QT_VERSION <  QT_VERSION_CHECK(6, 0, 0)
  843: #ifdef OS_MACOS
  849: #ifdef OS_MINGW
  922: #ifdef Q_OS_MAC
  942: #if (QT_VERSION >= 0x060000)
  956: #if QT_VERSION <  QT_VERSION_CHECK(6, 0, 0)

src\Plugins\Qt\QTMWidget.hpp:
  12: #ifndef QTMWIDGET_HPP

src\Plugins\Qt\QTMWindow.hpp:
  12: #ifndef QTMWINDOW_HPP

src\Plugins\Tex\convert_tex.hpp:
  12: #ifndef CONVERT_TEX_H

src\Plugins\Tex\metadata.hpp:
  15: #ifndef METADATA_H

src\Plugins\Tex\tex.hpp:
  12: #ifndef TEX_HPP

src\Plugins\Unix\unix_sys_utils.cpp:
  64: #if !defined(OS_MINGW) && !defined(X11TEXMACS)

src\Plugins\Unix\unix_sys_utils.hpp:
  12: #ifndef UNIX_SYS_UTILS_H

src\Plugins\Updater\tm_sparkle.mm:
  14: #if defined (OS_MACOS) && defined (USE_SPARKLE)

src\Plugins\Updater\tm_updater.cpp:
  16: #if defined (OS_MACOS) && defined (USE_SPARKLE)
  28:     #if defined (OS_MACOS) && defined (USE_SPARKLE)
  47:   #if defined (OS_MACOS) && defined (USE_SPARKLE)

src\Plugins\Updater\tm_updater.hpp:
  11: #ifndef TM_UPDATER_HPP

src\Plugins\Updater\tm_winsparkle.cpp:
  14: #if defined (USE_SPARKLE) && defined (OS_MINGW)

src\Plugins\Windows\mingw_sys_utils.cpp:
  117: #ifndef SECURITY_WIN32

src\Plugins\Windows\mingw_sys_utils.hpp:
  12: #ifndef MINGW_SYS_UTILS_H

src\Plugins\Windows\win-utf8-compat.hpp:
  30: #ifdef __MINGW64__
  41: #ifndef S_ISLNK
  45: #ifdef fopen
  62: #ifdef stat
  68: //#ifdef remove
  73: #ifdef rename
  88: #ifdef getenv
  93: #ifdef setenv
  98: #ifdef putenv

src\Scheme\scheme.hpp:
  105: #ifdef WIDGET_H // FIXME: dirty hack

src\Scheme\L5\init_glue_l5.cpp:
   33: #if 0
  242: #ifdef USE_EXCEPTIONS
  248: #ifdef USE_EXCEPTIONS

src\Scheme\S7\s7_tm.cpp:
  358: #ifdef DEBUG_ON

src\Scheme\S7\s7_tm.hpp:
  11: #ifndef S7_TM_H

src\Style\Environment\std_environment.cpp:
  255: #ifdef CLASSICAL_MACRO_EXPANSION
  346: #ifdef CLASSICAL_MACRO_EXPANSION

src\Style\Environment\std_environment.hpp:
  12: #ifndef STD_ENVIRONMENT_H
  22: #ifdef CLASSICAL_MACRO_EXPANSION

src\Style\Evaluate\evaluate_macro.cpp:
  107: #ifdef CLASSICAL_MACRO_EXPANSION
  200: #ifdef ALTERNATIVE_MACRO_EXPANSION
  346: #ifdef CLASSICAL_MACRO_EXPANSION

src\Style\Evaluate\evaluate_main.cpp:
  127: #ifdef CLASSICAL_MACRO_EXPANSION

src\Style\Evaluate\evaluate_quote.cpp:
  21: #ifdef CLASSICAL_MACRO_EXPANSION
  34: #ifdef CLASSICAL_MACRO_EXPANSION
  43: #ifdef CLASSICAL_MACRO_EXPANSION

src\Style\Evaluate\evaluate_rewrite.cpp:
  104: #ifdef CLASSICAL_MACRO_EXPANSION
  147: #ifdef CLASSICAL_MACRO_EXPANSION      

src\System\Boot\init_texmacs.cpp:
  237: #if defined (OS_MINGW) || defined (OS_MACOS)
  322: #ifdef OS_CYGWIN

src\System\Language\language.cpp:
  431: #ifdef MACOSX_EXTENSIONS

src\System\Language\locale.cpp:
  16: #ifndef X11TEXMACS

src\System\Link\dyn_link.cpp:
  28: #if (defined (TM_DYNAMIC_LINKING) && !defined(OS_MINGW))

src\System\Link\pipe_link.cpp:
  14: #if !(defined (QTTEXMACS) && (defined (OS_MINGW) || defined (QTPIPES)))
  33: #if !defined(__APPLE__) && !defined(__FreeBSD__)

src\System\Link\socket_link.cpp:
  263: #ifdef QT_CPU_FIX

src\System\Link\socket_server.cpp:
  11: #ifndef QTTEXMACS
  24: #ifdef __FreeBSD__

src\System\Link\socket_server.hpp:
  13: #ifndef SOCKET_SERVER_H

src\System\Link\texmacs_client.cpp:
  17: #ifdef QTTEXMACS

src\System\Link\texmacs_server.cpp:
  17: #ifdef QTTEXMACS
  20: #if defined(OS_MACOS)
  42: #if defined(OS_MACOS)
  49: #if defined(OS_MACOS)

src\System\Link\tm_link.hpp:
  12: #ifndef TM_LINK_H

src\System\Misc\data_cache.cpp:
   17: #ifndef KERNEL_L2
  179: #ifdef KERNEL_L2
  224: #ifdef KERNEL_L2

src\System\Misc\data_cache.hpp:
  12: #ifndef DATA_CACHE_H

src\System\Misc\fakedlopen.c:
  7: #if defined(__TMSTATIC__) && !defined(OS_MINGW) && !defined(__WIN32__)

src\System\Misc\persistent.hpp:
  12: #ifndef PERSISTENT_H

src\System\Misc\stack_trace.cpp:
  15: #ifdef USE_STACK_TRACE

src\System\Misc\sys_utils.cpp:
  129: #if defined(STD_SETENV) && !defined(OS_MINGW)

src\Texmacs\Server\tm_debug.cpp:
  156: #ifdef DEBUG_ASSERT

src\Texmacs\Server\tm_server.cpp:
  130: #ifdef OS_GNU_LINUX
  171: #ifndef QTPIPES

src\Texmacs\Window\tm_button.cpp:
  18: #ifdef AQUATEXMACS

src\Texmacs\Window\tm_window.cpp:
  719: #ifdef X11TEXMACS

tests\System\Classes\url_test.cpp:
  22: #ifdef OS_MINGW
  81: #ifdef OS_MINGW

tests\System\Files\image_files_test.cpp:
  25: #ifndef KERNEL_L2
jingkaimori commented 1 year ago

UNIFIED_TOOLBAR is used on macos only, and defined in src\Plugins\Qt\QTMStyle.hpp