Skip to content
Browse files

Remove newline character from get_fuzzy_time result

  • Loading branch information...
1 parent cacd152 commit c6d9f24bbdc662bad1baf8bd9b135b4eb8db7083 @caio committed Mar 27, 2012
Showing with 13 additions and 13 deletions.
  1. +12 −12 src/fuzzyclock.c
  2. +1 −1 src/main.c
View
24 src/fuzzyclock.c
@@ -18,18 +18,18 @@ char* HOUR_NAMES[] = {
};
char* FUZZY_MSG[] = {
- "%s o' clock\n",
- "five past %s\n",
- "ten past %s\n",
- "quarter past %s\n",
- "twenty past %s\n",
- "twenty five past %s\n",
- "half past %s\n",
- "twenty five to %s\n",
- "twenty to %s\n",
- "quarter to %s\n",
- "ten to %s\n",
- "five to %s\n",
+ "%s o' clock",
+ "five past %s",
+ "ten past %s",
+ "quarter past %s",
+ "twenty past %s",
+ "twenty five past %s",
+ "half past %s",
+ "twenty five to %s",
+ "twenty to %s",
+ "quarter to %s",
+ "ten to %s",
+ "five to %s",
};
char* const get_hour_string(int hour) {
View
2 src/main.c
@@ -7,6 +7,6 @@ int main(int argc, char const* argv[])
char msg[MAX_MSG_SIZE];
time_t now = time(NULL);
get_fuzzy_time(localtime(&now), msg);
- printf(msg);
+ printf("%s\n", msg);
return 0;
}

0 comments on commit c6d9f24

Please sign in to comment.
Something went wrong with that request. Please try again.