From: Trent Huber Date: Tue, 30 Sep 2025 00:54:41 +0000 (-0400) Subject: Use C-style comments X-Git-Url: https://trenthuber.com/code?a=commitdiff_plain;h=d76b7510935003b97080060064a5ea4e85b8ba95;p=thus.git Use C-style comments --- diff --git a/external/cbs b/external/cbs index beedfb7..e998819 160000 --- a/external/cbs +++ b/external/cbs @@ -1 +1 @@ -Subproject commit beedfb79168cadd181b26ee46e50a01a6a44de52 +Subproject commit e998819b1d1e191d035600967abd84e9f2eb9cf8 diff --git a/src/builtins/README.md b/src/builtins/README.md index 27595ad..ab2364f 100644 --- a/src/builtins/README.md +++ b/src/builtins/README.md @@ -3,7 +3,7 @@ To add a built-in command to the shell, first make a source file in the `src/builtins/` directory with the same name as the built-in. The source file should contain at least the following code (where "foo" is the name of the built-in). ```c -// foo.c +/* foo.c */ #include diff --git a/src/history.c b/src/history.c index 2c50ba5..cac16e8 100644 --- a/src/history.c +++ b/src/history.c @@ -46,7 +46,7 @@ void inithistory(void) { int gethistory(int back, char *buffer) { if (history.c == (back ? history.b : history.t)) return 0; - // Save the most recently modified history entry at the top of the list + /* Save the most recently modified history entry at the top of the list */ if (strcmp(history.entries[history.c], buffer) != 0) strcpy(history.entries[history.t], buffer); diff --git a/src/input.c b/src/input.c index 5160b6f..53b9b9c 100644 --- a/src/input.c +++ b/src/input.c @@ -16,7 +16,7 @@ enum { CLEAR = '\014', ESCAPE = '\033', - // See ESCAPE case in userinput() + /* See ESCAPE case in userinput() */ ALT = '2' + 1, UP = 'A', @@ -41,7 +41,7 @@ int stringinput(struct context *c) { end = c->string; while (*end && *end != '\n') ++end; l = end - c->string; - while (*end == '\n') ++end; // scriptinput() repeatedly uses stringinput() + while (*end == '\n') ++end; /* scriptinput() repeatedly uses stringinput() */ if (l > MAXCHARS) { note("Line too long, exceeds %d character limit", MAXCHARS); return 0;