On Wed, May 10, 2023 at 01:48:08PM +0200, Laszlo Ersek wrote:
> This is the last wave (wave 5). Line length maxima:
>
> file before after
> -- -
> lib/states-run.c 102 98
> lib/states.c 116 80
> lib/states.h 123 86
On Wed, May 10, 2023 at 01:48:11PM +0200, Laszlo Ersek wrote:
> Wrap those comments in "lib/states.h" and "lib/states.c" that describe the
> automaton's states.
>
> Example changes from "lib/states.h":
>
> >/* CONNECT_TCP.CONNECT: Initial call to connect(2) on a TCP socket */
> >
On Wed, May 10, 2023 at 01:48:10PM +0200, Laszlo Ersek wrote:
> Add the "pr_wrap_c_comment" function, for wrapping C comments.
>
> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516
> Signed-off-by: Laszlo Ersek
> ---
> generator/utils.mli | 1 +
> generator/utils.ml | 87
We can shave off 17 characters by renaming "next_state" to "next", and
replacing its initialization with a standalone assignment.
Most impactful effect [lib/states.c]:
> int
> nbd_internal_enter_STATE_NEWSTYLE_OPT_STRUCTURED_REPLY_RECV_REPLY_PAYLOAD (
>struct nbd_handle *h, bool *blocked
>
Wrap those comments in "lib/states.h" and "lib/states.c" that describe the
automaton's states.
Example changes from "lib/states.h":
>/* CONNECT_TCP.CONNECT: Initial call to connect(2) on a TCP socket */
>STATE_CONNECT_TCP_CONNECT,
>
> - /* CONNECT_TCP.CONNECTING: Connecting to the
Similarly to commit bfef979aa372 ("generator: wrap "python/methods.h" at
80 characters", 2023-05-02), just break the fixed (and in itself, short)
parameter list to a new line.
Example effect in "lib/states.h":
> -extern int
>
More of the same.
Regarding the enter_*() calls, most impactful change is [lib/states.c]:
> @@ -2635,7 +2695,9 @@ nbd_internal_enter_STATE_NEWSTYLE_OPT_ST
>int r;
>enum state next_state =
> STATE_NEWSTYLE_OPT_STRUCTURED_REPLY_RECV_REPLY_PAYLOAD;
>
> - r =
The longest line in "lib/states-run.c" is folded as follows:
> @@ -513,8 +515,9 @@ nbd_internal_run (struct nbd_handle *h,
>goto ok;
> case notify_read:
>set_next_state (h, STATE_ISSUE_COMMAND_PAUSE_WRITE_SHUTDOWN);
> - debug (h, "event %s: %s -> %s",
> -
This is the last wave (wave 5). Line length maxima:
file before after
-- -
lib/states-run.c 102 98
lib/states.c 116 80
lib/states.h 123 86
The longest line in "lib/states.h" becomes:
> extern int
>
Add the "pr_wrap_c_comment" function, for wrapping C comments.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516
Signed-off-by: Laszlo Ersek
---
generator/utils.mli | 1 +
generator/utils.ml | 87
2 files changed, 88 insertions(+)
diff --git
On 5/9/23 16:51, Richard W.M. Jones wrote:
> eg. { '\r', '\n' } -> { '\\', 'n', '\\', 'r' }
> ---
> common/utils/utils.h | 1 +
> common/utils/quote.c | 58
> 2 files changed, 59 insertions(+)
>
> diff --git a/common/utils/utils.h
On 5/9/23 22:28, Richard W.M. Jones wrote:
>
> Thanks for everyone's feedback. I pushed this series with several
> enhancements as:
>
> 5fbf93a92..2f7ca818f
Thankfully, this time I *did* pull before continuing with the review,
and so I noticed the commits, and then read the rest of the thread
12 matches
Mail list logo