From 0ed6e8d78e555a5267373664c38b5a674a6dc503 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 9 Jun 2025 20:48:39 +0200 Subject: [PATCH] send/source-browser --- send.h | 48 ++++++++++++++++++++++++++++++++---------------- web/Doxyfile | 6 +++--- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/send.h b/send.h index 3407bc5c..ff77e2d6 100644 --- a/send.h +++ b/send.h @@ -1,26 +1,42 @@ /* Copyright (C) 2005 Andre Noll , see file COPYING. */ -/** \file send.h Sender-related defines and structures. */ +/** \file send.h Sender-related defines and structures. + * + * The file contains a little preprocessor fu to create the sender_subcommand + * enumeration and the list of sender name strings without duplicating + * the commands. + */ /** - * A little preprocessor fu helps to create the sender_subcommand enumeration - * below and the list of sender name strings without duplicating the commands. + * The list of sender subcommands. This is only defined once and expands + * to a bunch of \ref SENDER_SUBCOMMAND (without the plural s) calls. We + * shall define and then redefine \ref SENDER_SUBCOMMAND, expanding the \ref + * SENDER_SUBCOMMANDS macro after each definition. The output is suitable + * to either declare an enumeration or to define a string array. + * + * The add and delete subcommands are only implemented by the udp sender + * to add/delete one or more targets. The allow and deny subcommands + * allow/deny connections from given IP address(es) and the on/off subcommands + * activate/deactivate a sender. */ #define SENDER_SUBCOMMANDS \ - SENDER_SUBCOMMAND(add) /**< Add a target (udp only). */ \ - SENDER_SUBCOMMAND(delete) /**< Delete a target (udp only). */ \ - SENDER_SUBCOMMAND(allow) /**< Allow connections from given IP address(es). */ \ - SENDER_SUBCOMMAND(deny) /**< Deny connections from given IP address(es). */ \ - SENDER_SUBCOMMAND(on) /**< Activate the sender. */ \ - SENDER_SUBCOMMAND(off) /**< Deactivate the sender. */ \ + SENDER_SUBCOMMAND(add) \ + SENDER_SUBCOMMAND(delete) \ + SENDER_SUBCOMMAND(allow) \ + SENDER_SUBCOMMAND(deny) \ + SENDER_SUBCOMMAND(on) \ + SENDER_SUBCOMMAND(off) \ -/** Concatenate "SENDER_" and the given arg and append a comma. */ +/** + * Concatenate "SENDER_" and the given argument, then append a comma. + * The expansion is suitable to declare an enumeration. + */ #define SENDER_SUBCOMMAND(_name) SENDER_ ## _name, /** - * Each sender subcommand gets an SENDER_xxx identifier. The identifier is - * passed from the sender command handler to the server process via shared - * memory. + * Each sender subcommand gets a SENDER_xxx identifier. The identifier is + * passed from the sender command handler to the server process to tell + * the server process which sender to address. */ enum sender_subcommand { SENDER_SUBCOMMANDS /**< List of SENDER_xxx identifiers. */ @@ -30,10 +46,10 @@ enum sender_subcommand { #undef SENDER_SUBCOMMAND /** - * Redefine it to expand to the stringified name of the sender so that + * Expand the argument to its stringified version so that \ref * SENDER_SUBCOMMANDS above now expands to the comma-separated list of sender - * name strings. This is used in command.c to define and initialize an array of - * char pointers. + * subcommand C-strings. The output is suitable to define and initialize an + * array of char pointers. */ #define SENDER_SUBCOMMAND(_name) #_name, diff --git a/web/Doxyfile b/web/Doxyfile index e8639b3f..4b0fbd9e 100644 --- a/web/Doxyfile +++ b/web/Doxyfile @@ -681,7 +681,7 @@ ENABLED_SECTIONS = # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. -MAX_INITIALIZER_LINES = 30 +MAX_INITIALIZER_LINES = 0 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the @@ -978,7 +978,7 @@ USE_MDFILE_AS_MAINPAGE = # also VERBATIM_HEADERS is set to NO. # The default value is: NO. -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. @@ -1043,7 +1043,7 @@ SOURCE_TOOLTIPS = YES # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. -USE_HTAGS = NO +USE_HTAGS = YES # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is -- 2.39.5