[Bf-blender-cvs] [fd2e143eaff] master: Cleanup: --help doc string formatting

Campbell Barton noreply at git.blender.org
Wed Jun 12 09:04:02 CEST 2019


Commit: fd2e143eaff85993da4235bbd64ab5d3f36bc8b3
Author: Campbell Barton
Date:   Wed Jun 12 16:59:03 2019 +1000
Branches: master
https://developer.blender.org/rBfd2e143eaff85993da4235bbd64ab5d3f36bc8b3

Cleanup: --help doc string formatting

STRINGIFY macro was being split across lines
causing problems extracting the strings for the references manual.

===================================================================

M	source/creator/creator_args.c

===================================================================

diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index fe7f9c52f4d..3cd02fde8ac 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -493,7 +493,9 @@ static void print_version_short(void)
 #  endif
 }
 
-static const char arg_handle_print_version_doc[] = "\n\tPrint Blender version and exit.";
+static const char arg_handle_print_version_doc[] =
+    "\n\t"
+    "Print Blender version and exit.";
 static int arg_handle_print_version(int UNUSED(argc),
                                     const char **UNUSED(argv),
                                     void *UNUSED(data))
@@ -503,9 +505,12 @@ static int arg_handle_print_version(int UNUSED(argc),
   return 0;
 }
 
-static const char arg_handle_print_help_doc[] = "\n\tPrint this help text and exit.";
+static const char arg_handle_print_help_doc[] =
+    "\n\t"
+    "Print this help text and exit.";
 static const char arg_handle_print_help_doc_win32[] =
-    "\n\tPrint this help text and exit (windows only).";
+    "\n\t"
+    "Print this help text and exit (windows only).";
 static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), void *data)
 {
   bArgs *ba = (bArgs *)data;
@@ -686,7 +691,8 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo
 }
 
 static const char arg_handle_arguments_end_doc[] =
-    "\n\tEnd option processing, following arguments passed unchanged. Access via Python's "
+    "\n\t"
+    "End option processing, following arguments passed unchanged. Access via Python's "
     "'sys.argv'.";
 static int arg_handle_arguments_end(int UNUSED(argc),
                                     const char **UNUSED(argv),
@@ -705,10 +711,11 @@ static int arg_handle_arguments_end(int UNUSED(argc),
 #  endif
 
 static const char arg_handle_python_set_doc_enable[] =
-    "\n\tEnable automatic Python script execution" PY_ENABLE_AUTO ".";
+    "\n\t"
+    "Enable automatic Python script execution" PY_ENABLE_AUTO ".";
 static const char arg_handle_python_set_doc_disable[] =
-    "\n\tDisable automatic Python script execution (pydrivers & startup scripts)" PY_DISABLE_AUTO
-    ".";
+    "\n\t"
+    "Disable automatic Python script execution (pydrivers & startup scripts)" PY_DISABLE_AUTO ".";
 #  undef PY_ENABLE_AUTO
 #  undef PY_DISABLE_AUTO
 
@@ -724,7 +731,9 @@ static int arg_handle_python_set(int UNUSED(argc), const char **UNUSED(argv), vo
   return 0;
 }
 
-static const char arg_handle_crash_handler_disable_doc[] = "\n\tDisable the crash handler.";
+static const char arg_handle_crash_handler_disable_doc[] =
+    "\n\t"
+    "Disable the crash handler.";
 static int arg_handle_crash_handler_disable(int UNUSED(argc),
                                             const char **UNUSED(argv),
                                             void *UNUSED(data))
@@ -733,7 +742,9 @@ static int arg_handle_crash_handler_disable(int UNUSED(argc),
   return 0;
 }
 
-static const char arg_handle_abort_handler_disable_doc[] = "\n\tDisable the abort handler.";
+static const char arg_handle_abort_handler_disable_doc[] =
+    "\n\t"
+    "Disable the abort handler.";
 static int arg_handle_abort_handler_disable(int UNUSED(argc),
                                             const char **UNUSED(argv),
                                             void *UNUSED(data))
@@ -743,7 +754,8 @@ static int arg_handle_abort_handler_disable(int UNUSED(argc),
 }
 
 static const char arg_handle_background_mode_set_doc[] =
-    "\n\tRun in background (often used for UI-less rendering).";
+    "\n\t"
+    "Run in background (often used for UI-less rendering).";
 static int arg_handle_background_mode_set(int UNUSED(argc),
                                           const char **UNUSED(argv),
                                           void *UNUSED(data))
@@ -755,9 +767,8 @@ static int arg_handle_background_mode_set(int UNUSED(argc),
 
 static const char arg_handle_log_level_set_doc[] =
     "<level>\n"
-    "\n"
-    "\tSet the logging verbosity level (higher for more details) defaults to 1, use -1 to log all "
-    "levels.";
+    "\tSet the logging verbosity level (higher for more details) defaults to 1,\n"
+    "\tuse -1 to log all levels.";
 static int arg_handle_log_level_set(int argc, const char **argv, void *UNUSED(data))
 {
   const char *arg_id = "--log-level";
@@ -781,7 +792,8 @@ static int arg_handle_log_level_set(int argc, const char **argv, void *UNUSED(da
 }
 
 static const char arg_handle_log_show_basename_set_doc[] =
-    "\n\tOnly show file name in output (not the leading path).";
+    "\n\t"
+    "Only show file name in output (not the leading path).";
 static int arg_handle_log_show_basename_set(int UNUSED(argc),
                                             const char **UNUSED(argv),
                                             void *UNUSED(data))
@@ -791,7 +803,8 @@ static int arg_handle_log_show_basename_set(int UNUSED(argc),
 }
 
 static const char arg_handle_log_show_backtrace_set_doc[] =
-    "\n\tShow a back trace for each log message (debug builds only).";
+    "\n\t"
+    "Show a back trace for each log message (debug builds only).";
 static int arg_handle_log_show_backtrace_set(int UNUSED(argc),
                                              const char **UNUSED(argv),
                                              void *UNUSED(data))
@@ -803,7 +816,8 @@ static int arg_handle_log_show_backtrace_set(int UNUSED(argc),
 }
 
 static const char arg_handle_log_show_timestamp_set_doc[] =
-    "\n\tShow a timestamp for each log message in seconds since start.";
+    "\n\t"
+    "Show a timestamp for each log message in seconds since start.";
 static int arg_handle_log_show_timestamp_set(int UNUSED(argc),
                                              const char **UNUSED(argv),
                                              void *UNUSED(data))
@@ -814,7 +828,6 @@ static int arg_handle_log_show_timestamp_set(int UNUSED(argc),
 
 static const char arg_handle_log_file_set_doc[] =
     "<filename>\n"
-    "\n"
     "\tSet a file to output the log to.";
 static int arg_handle_log_file_set(int argc, const char **argv, void *UNUSED(data))
 {
@@ -910,41 +923,57 @@ static int arg_handle_debug_mode_set(int UNUSED(argc), const char **UNUSED(argv)
 
 #  ifdef WITH_FFMPEG
 static const char arg_handle_debug_mode_generic_set_doc_ffmpeg[] =
-    "\n\tEnable debug messages from FFmpeg library.";
+    "\n\t"
+    "Enable debug messages from FFmpeg library.";
 #  endif
 #  ifdef WITH_FREESTYLE
 static const char arg_handle_debug_mode_generic_set_doc_freestyle[] =
-    "\n\tEnable debug messages for FreeStyle.";
+    "\n\t"
+    "Enable debug messages for FreeStyle.";
 #  endif
 static const char arg_handle_debug_mode_generic_set_doc_python[] =
-    "\n\tEnable debug messages for Python.";
+    "\n\t"
+    "Enable debug messages for Python.";
 static const char arg_handle_debug_mode_generic_set_doc_events[] =
-    "\n\tEnable debug messages for the event system.";
+    "\n\t"
+    "Enable debug messages for the event system.";
 static const char arg_handle_debug_mode_generic_set_doc_handlers[] =
-    "\n\tEnable debug messages for event handling.";
+    "\n\t"
+    "Enable debug messages for event handling.";
 static const char arg_handle_debug_mode_generic_set_doc_wm[] =
-    "\n\tEnable debug messages for the window manager, shows all operators in search, shows "
+    "\n\t"
+    "Enable debug messages for the window manager, shows all operators in search, shows "
     "keymap errors.";
 static const char arg_handle_debug_mode_generic_set_doc_jobs[] =
-    "\n\tEnable time profiling for background jobs.";
+    "\n\t"
+    "Enable time profiling for background jobs.";
 static const char arg_handle_debug_mode_generic_set_doc_gpu[] =
-    "\n\tEnable gpu debug context and information for OpenGL 4.3+.";
+    "\n\t"
+    "Enable gpu debug context and information for OpenGL 4.3+.";
 static const char arg_handle_debug_mode_generic_set_doc_depsgraph[] =
-    "\n\tEnable all debug messages from dependency graph.";
+    "\n\t"
+    "Enable all debug messages from dependency graph.";
 static const char arg_handle_debug_mode_generic_set_doc_depsgraph_build[] =
-    "\n\tEnable debug messages from dependency graph related on graph construction.";
+    "\n\t"
+    "Enable debug messages from dependency graph related on graph construction.";
 static const char arg_handle_debug_mode_generic_set_doc_depsgraph_tag[] =
-    "\n\tEnable debug messages from dependency graph related on tagging.";
+    "\n\t"
+    "Enable debug messages from dependency graph related on tagging.";
 static const char arg_handle_debug_mode_generic_set_doc_depsgraph_time[] =
-    "\n\tEnable debug messages from dependency graph related on timing.";
+    "\n\t"
+    "Enable debug messages from dependency graph related on timing.";
 static const char arg_handle_debug_mode_generic_set_doc_depsgraph_eval[] =
-    "\n\tEnable debug messages from dependency graph related on evaluation.";
+    "\n\t"
+    "Enable debug messages from dependency graph related on evaluation.";
 static const char arg_handle_debug_mode_generic_set_doc_depsgraph_no_threads[] =
-    "\n\tSwitch dependency graph to a single threaded evaluation.";
+    "\n\t"
+    "Switch dependency graph to a single threaded evaluation.";
 static const char arg_handle_debug_mode_generic_set_doc_depsgraph_pretty[] =
-    "\n\tEnable colors for dependency graph debug messages.";
+    "\n\t"
+    "Enable colors for dependency graph debug messages.";
 static const char arg_handle_debug_mode_generic_set_doc_gpumem[] =
-    "\n\tEnable GPU memory stats in status bar.";
+    "\n\t"
+    "Enable GPU memory stats in status bar.";
 
 static int arg_handle_debug_mode_generic_set(int UNUSED(argc),
                                              const char **UNUSED(argv),
@@ -955,7 +984,8 @@ static int arg_handle_debug_mode_generic_set(int UNUSED(argc),
 }
 
 static const char arg_handle_debug_mode_io_doc[] =
-    "\n\tEnable debug messages for I/O (collada, ...).";
+    "\n\t"
+    "Enable debug messages for I/O (collada, ...).";
 static int arg_handle_debug_mode_io(int UNUSED(argc),
                                     const char **UNUSED(argv),


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list