public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
From: eugene.loh@oracle.com
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: [PATCH 14/20] doc: Link to "Character Escape Sequences" table
Date: Fri, 26 Sep 2025 15:05:51 -0400	[thread overview]
Message-ID: <20250926190557.8485-14-eugene.loh@oracle.com> (raw)
In-Reply-To: <20250926190557.8485-1-eugene.loh@oracle.com>

From: Eugene Loh <eugene.loh@oracle.com>

A link to this table did not work since it referenced an ID that did not
exist.  Add an anchor ID by the table and use it.

While we're at it, convert the table from HTML to Markdown and break up
some longer lines, improving readability and maintainability of the
Markdown source file.

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
 ...dtrace-ref-TypesOperatorsandExpressions.md | 139 ++----------------
 .../dtrace_builtin_variable_reference.md      |  10 +-
 2 files changed, 20 insertions(+), 129 deletions(-)

diff --git a/doc/userguide/reference/dtrace-ref-TypesOperatorsandExpressions.md b/doc/userguide/reference/dtrace-ref-TypesOperatorsandExpressions.md
index 2d7172366..05d772c7c 100644
--- a/doc/userguide/reference/dtrace-ref-TypesOperatorsandExpressions.md
+++ b/doc/userguide/reference/dtrace-ref-TypesOperatorsandExpressions.md
@@ -474,135 +474,18 @@ D type
 </td></tr><tbody></table>
 Character constants are written as a single character or escape sequence that's inside a pair of single quotes \(`'a'`\). Character constants are assigned the `int` type rather than `char` and are equivalent to an integer constant with a value that's determined by that character's value in the ASCII character set. See the `ascii(7)` manual page for a list of characters and their values. You can also use any of the special escape sequences that are listed in the following table. D uses the same escape sequences as those found in ANSI C.
 
-<table><thead><tr><th>
-
-Escape Sequence
-
-</th><th>
-
-Represents
-
-</th><th>
-
-Escape Sequence
-
-</th><th>
-
-Represents
-
-</th></tr></thead><tbody><tr><td>
-
-`\a`
-
-</td><td>
-
-alert
-
-</td><td>
-
-`\\`
-
-</td><td>
-
-backslash
-
-</td></tr><tr><td>
-
-`\b`
-
-</td><td>
-
-backspace
-
-</td><td>
-
-`\?`
-
-</td><td>
-
-question mark
-
-</td></tr><tr><td>
-
-`\f`
-
-</td><td>
-
-form feed
-
-</td><td>
-
-`\'`
-
-</td><td>
-
-single quote
-
-</td></tr><tr><td>
-
-`\n`
-
-</td><td>
-
-newline
-
-</td><td>
-
-`\"`
-
-</td><td>
-
-double quote
-
-</td></tr><tr><td>
-
-`\r`
-
-</td><td>
-
-carriage return
-
-</td><td>
-
-`\0*oo*`
-
-</td><td>
-
-octal value 0*oo*
-
-</td></tr><tr><td>
-
-`\t`
-
-</td><td>
-
-horizontal tab
-
-</td><td>
-
-`\x*hh*`
-
-</td><td>
-
-hexadecimal value 0x*hh*
-
-</td></tr><tr><td>
-
-`\v`
-
-</td><td>
-
-vertical tab
-
-</td><td>
-
-`\0`
-
-</td><td>
-
-null character
+**Table:**  Character Escape Sequences<a id="char_esc_seqs">
+
+| Escape Sequence | Represents      |     | Escape Sequence | Represents               |
+| :---            | :---            | --- | :---            | :---                     |
+| `\a`            | alert           |     | `\\`            | backslash                |
+| `\b`            | backspace       |     | `\?`            | question mark            |
+| `\f`            | form feed       |     | `\'`            | single quote             |
+| `\n`            | newline         |     | `\"`            | double quote             |
+| `\r`            | carriage return |     | `\0`*oo*        | octal value 0*oo*        |
+| `\t`            | horizontal tab  |     | `\x`*hh*        | hexadecimal value 0x*hh* |
+| `\v`            | vertical tab    |     | `\0`            | null character           |
 
-</td></tr><tbody></table>
 You can include more than one character specifier inside single quotes to create integers with individual bytes that are initialized according to the corresponding character specifiers. The bytes are read left-to-right from a character constant and assigned to the resulting integer in the order corresponding to the native endianness of the operating environment. Up to eight character specifiers can be included in a single character constant.
 
 Strings constants of any length can be composed by enclosing them in a pair of double quotes \(`"hello"`\). A string constant can't contain a literal newline character. To create strings containing newlines, use the `\n` escape sequence instead of a literal newline. String constants can contain any of the special character escape sequences that are shown for character constants before. Similar to ANSI C, strings are represented as arrays of characters that end with a null character \(`\0`\) that's implicitly added to each string constant you declare. String constants are assigned the special D type `string`. The D compiler provides a set of special features for comparing and tracing character arrays that are declared as strings.
diff --git a/doc/userguide/reference/dtrace_builtin_variable_reference.md b/doc/userguide/reference/dtrace_builtin_variable_reference.md
index fd1af0f75..1132a041a 100644
--- a/doc/userguide/reference/dtrace_builtin_variable_reference.md
+++ b/doc/userguide/reference/dtrace_builtin_variable_reference.md
@@ -221,7 +221,15 @@ The macro argument values must match the form of an integer, identifier, or stri
 sudo ./foo '"a string argument"'
 ```
 
-If you want D macro arguments to be interpreted as string tokens, even if they match the form of an integer or identifier, prefix the macro variable or argument name with two leading dollar signs, for example, `$$1`, which forces the D compiler to interpret the argument value as if it were a string surrounded by double quotes. All the usual D string escape sequences, per [Table 5](dtrace-ref-TypesOperatorsandExpressions.md#dt_t6_dlang), are expanded inside any string macro arguments, regardless of whether they're referenced by using the `$arg` or `$$arg` form of the macro. If the `defaultargs` option is set, unspecified arguments that are referenced with the `$$arg` form have the value of the empty string \(`""`\).
+If you want D macro arguments to be interpreted as string tokens,
+even if they match the form of an integer or identifier,
+prefix the macro variable or argument name with two leading dollar signs,
+for example, `$$1`, which forces the D compiler to interpret the argument value as if it were a string surrounded by double quotes.
+All the usual D string escape sequences, in the table of [Character Escape Sequences](dtrace-ref-TypesOperatorsandExpressions.md#char_esc_seqs),
+are expanded inside any string macro arguments,
+regardless of whether they're referenced by using the `$arg` or `$$arg` form of the macro.
+If the `defaultargs` option is set,
+unspecified arguments that are referenced with the `$$arg` form have the value of the empty string \(`""`\).
 
 ### Target Process ID
 
-- 
2.47.3


  parent reply	other threads:[~2025-09-26 19:06 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26 19:05 [PATCH 01/20] Fix comment since pkt_addr is not NULL eugene.loh
2025-09-26 19:05 ` [PATCH 02/20] doc: Add a space eugene.loh
2025-10-23 19:50   ` [DTrace-devel] " Elena Zannoni
2025-09-26 19:05 ` [PATCH 03/20] doc: Add separator lines to cpc Markdown tables eugene.loh
2025-10-23 19:51   ` [DTrace-devel] " Elena Zannoni
2025-09-26 19:05 ` [PATCH 04/20] doc: Convert stability attribute tables to Markdown for readability eugene.loh
2025-10-23 19:52   ` [DTrace-devel] " Elena Zannoni
2025-09-26 19:05 ` [PATCH 05/20] doc: Remove duplicate id eugene.loh
2025-09-26 19:05 ` [PATCH 06/20] doc: Clean up dangling anchor links eugene.loh
2025-09-26 19:05 ` [PATCH 07/20] doc: Remove internal ID definition at top of file eugene.loh
2025-10-22  3:03   ` Eugene Loh
2025-09-26 19:05 ` [PATCH 08/20] doc: Fix anchor links for built-in variables eugene.loh
2025-09-26 19:05 ` [PATCH 09/20] doc: Fix anchor links for providers eugene.loh
2025-09-26 19:05 ` [PATCH 10/20] doc: Fix anchor links for explanation/ eugene.loh
2025-09-26 19:05 ` [PATCH 11/20] doc: Fix anchor links for how-to/ eugene.loh
2025-09-26 19:05 ` [PATCH 12/20] doc: Fix anchor links for reference/ eugene.loh
2025-09-26 19:05 ` [PATCH 13/20] doc: Clean up the table for string relational operators eugene.loh
2025-09-26 19:05 ` eugene.loh [this message]
2025-09-26 19:05 ` [PATCH 15/20] doc: Clean up profile unit table eugene.loh
2025-09-26 19:05 ` [PATCH 16/20] doc: Clean up undefined anchor links eugene.loh
2025-09-26 19:05 ` [PATCH v2 17/20] doc: Add IP provider documentation eugene.loh
2025-10-09 17:03   ` Kris Van Hees
2025-10-09 21:00     ` Eugene Loh
2025-10-09 21:45       ` Kris Van Hees
2025-10-09 22:28         ` Eugene Loh
2025-09-26 19:05 ` [PATCH 18/20] doc: Add TCP " eugene.loh
2025-10-24  8:24   ` Alan Maguire
2025-09-26 19:05 ` [PATCH 19/20] doc: Add UDP " eugene.loh
2025-10-24  8:18   ` Alan Maguire
2025-09-26 19:05 ` [PATCH 20/20] doc: Add rawfbt " eugene.loh
2025-10-07 15:23 ` [PATCH 01/20] Fix comment since pkt_addr is not NULL Kris Van Hees

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250926190557.8485-14-eugene.loh@oracle.com \
    --to=eugene.loh@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox