Skip to content

Commit 66dbfff

Browse files
committed
Change multiple puts to a single
1 parent 7ea1cb0 commit 66dbfff

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/commands.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ static void handle_quit(struct LacoState* laco, const char** arguments) {
1616
}
1717

1818
static void handle_help(struct LacoState* laco, const char** arguments) {
19-
puts(" Commands available:\n");
20-
puts(" :q, :quit Exit laco");
21-
puts(" :?, :help Display this list of commands");
22-
puts(" :info <name> Show information on given function");
19+
puts(
20+
" Commands available:\n\n"
21+
" :q, :quit Exit laco\n"
22+
" :?, :help Display this list of commands\n"
23+
" :info <name> Show information on given function"
24+
);
2325
}
2426

2527
static void handle_debug_info(struct LacoState* laco,

src/flags.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ static void handle_version(LacoState* laco, const char** arguments) {
1818

1919
/* Print off the help screen */
2020
static void handle_help(LacoState* laco, const char** arguments) {
21-
puts("A better REPL for Lua.\n");
22-
puts("Usage: laco [options]\n");
23-
puts("-h, --help Print this help screen");
24-
puts("-v, --version Print current version");
21+
puts(
22+
"A better REPL for Lua.\n\n"
23+
"Usage: laco [options]\n\n"
24+
"-h, --help Print this help screen\n"
25+
"-v, --version Print current version"
26+
);
2527

2628
laco_kill(laco, 0, NULL);
2729
}

0 commit comments

Comments
 (0)