Skip to content

Commit 0b073a7

Browse files
authored
enhance: indent width to 4 (#127)
1 parent c06e9a6 commit 0b073a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+4775
-4732
lines changed

.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ SpacesInContainerLiterals: false
7474
SpacesInCStyleCastParentheses: false
7575
SpacesInParentheses: false
7676
SpacesInSquareBrackets: false
77-
TabWidth: 8
77+
TabWidth: 4
7878
UseTab: Always
7979
...

format.slash

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/local/bin/slash
22
loop file in (find -name "*.c" -o -name "*.h") {
3-
clang-format -i -style=file $file
3+
clang-format --verbose -i -style=file $file
44
}

include/builtin/builtin.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@
2525
typedef int (*BuiltinFunc)(Interpreter *interpreter, ArenaLL *ast_nodes);
2626

2727
typedef struct {
28-
char *name;
29-
BuiltinFunc func;
28+
char *name;
29+
BuiltinFunc func;
3030
} Builtin;
3131

3232
typedef enum {
33-
WHICH_BUILTIN,
34-
WHICH_EXTERN,
35-
WHICH_NOT_FOUND,
33+
WHICH_BUILTIN,
34+
WHICH_EXTERN,
35+
WHICH_NOT_FOUND,
3636
} WhichResultType;
3737

3838
typedef struct {
39-
WhichResultType type;
40-
union {
41-
char path[PROGRAM_PATH_MAX_LEN];
42-
BuiltinFunc builtin;
43-
};
39+
WhichResultType type;
40+
union {
41+
char path[PROGRAM_PATH_MAX_LEN];
42+
BuiltinFunc builtin;
43+
};
4444
} WhichResult;
4545

4646

include/interactive/prompt.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424

2525

2626
typedef struct {
27-
char *buf; // prompt buffer
28-
size_t buf_len;
29-
size_t buf_cap;
30-
size_t cursor_pos_in_line; // cursor position in the current line
31-
size_t prev_line_end; // where the previous line ended
32-
char ps1[256];
33-
struct termios termios_og;
34-
struct termios termios_new;
27+
char *buf; // prompt buffer
28+
size_t buf_len;
29+
size_t buf_cap;
30+
size_t cursor_pos_in_line; // cursor position in the current line
31+
size_t prev_line_end; // where the previous line ended
32+
char ps1[256];
33+
struct termios termios_og;
34+
struct termios termios_new;
3535
} Prompt;
3636

3737

0 commit comments

Comments
 (0)