]> Trent Huber's Code - thus.git/commitdiff
Use C-style comments
authorTrent Huber <trentmhuber@gmail.com>
Tue, 30 Sep 2025 00:54:41 +0000 (20:54 -0400)
committerTrent Huber <trentmhuber@gmail.com>
Tue, 30 Sep 2025 00:54:41 +0000 (20:54 -0400)
external/cbs
src/builtins/README.md
src/history.c
src/input.c

index beedfb79168cadd181b26ee46e50a01a6a44de52..e998819b1d1e191d035600967abd84e9f2eb9cf8 160000 (submodule)
@@ -1 +1 @@
-Subproject commit beedfb79168cadd181b26ee46e50a01a6a44de52
+Subproject commit e998819b1d1e191d035600967abd84e9f2eb9cf8
index 27595ad6ff77b0e0fa5be7cf3e1799f9d7b7c2cc..ab2364fe5d26a0c49cdcc23bf36baf15002477d5 100644 (file)
@@ -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 <stdlib.h>
 
index 2c50ba5b35ad1ec839c9da981c409494fd7bec07..cac16e8c9402b4505ae88d18a3a6ba00ffe97a06 100644 (file)
@@ -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);
 
index 5160b6f896c0569f4f7776db6135446830ed24b4..53b9b9c6c9a56e54293dd5f8fb88c69c4bd464c9 100644 (file)
@@ -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;