summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author諏訪子 <suwako@076.moe>2024-06-20 05:52:29 +0900
committer諏訪子 <suwako@076.moe>2024-06-20 05:52:29 +0900
commit905d7a9b2321ce62a8afd65b703875397524cae9 (patch)
tree22c42673fe198fc8a8d401c3dd89a1a18b546517
parentc6fe85d881a68cb000609779b2abdcaa6a4e1ec3 (diff)
分けた方が良い
-rw-r--r--main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/main.c b/main.c
index 92a3b9e..108ec5c 100644
--- a/main.c
+++ b/main.c
@@ -92,11 +92,10 @@ int main(int argc, char *argv[]) {
const char *host = display_user_host();
if (name || host) {
printf("%s ", LOGO[lc]);
- printf(
- "%s%s%s@%s%s%s\n",
- titlecolor, name, reset,
- titlecolor, host, reset
- );
+ if (name) printf("%s%s%s",titlecolor, name, reset);
+ if (name && host) printf("@");
+ if (host) printf("%s%s%s", titlecolor, host, reset);
+ printf("\n");
if (name) free((void *)name);
if (host) free((void *)host);
lc++;