From 814c9ad7d46deafe10c12bb124f5c28a68fae626 Mon Sep 17 00:00:00 2001 From: Hoorad Farrokh Date: Sat, 12 Oct 2024 19:36:44 +1300 Subject: [PATCH] Formatted code --- src/include/input.h | 8 ++++---- src/include/stdafx.h | 2 +- src/include/utils.h | 4 ++-- src/output.c | 3 +-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/include/input.h b/src/include/input.h index a2b5bf3..9e1d312 100644 --- a/src/include/input.h +++ b/src/include/input.h @@ -21,7 +21,7 @@ enum editorKeys { ARROW_UP = VK_UP, ARROW_DOWN = VK_DOWN, ARROW_LEFT = VK_RIGHT, - ARROW_RIGHT = VK_LEFT, // swap left and right ? + ARROW_RIGHT = VK_LEFT, // swap left and right ? DEL_KEY = VK_DELETE, ESC_KEY = VK_ESCAPE, #else @@ -34,7 +34,7 @@ enum editorKeys { ARROW_RIGHT, DEL_KEY, ESC_KEY = 27, -#endif // _WIN32 +#endif // _WIN32 }; typedef struct keyPair { @@ -42,7 +42,7 @@ typedef struct keyPair { WORD key; #else int key; -#endif // _WIN32 +#endif // _WIN32 void (*func)(void); } keysPair; @@ -54,7 +54,7 @@ void insertNewLine(void); KEY_EVENT_RECORD readKey(void); #else int readKey(void); -#endif // _WIN32 +#endif // _WIN32 void procKey(void); diff --git a/src/include/stdafx.h b/src/include/stdafx.h index 374691e..485f571 100644 --- a/src/include/stdafx.h +++ b/src/include/stdafx.h @@ -28,4 +28,4 @@ #include #endif -#endif // !H_STDAFX +#endif // !H_STDAFX diff --git a/src/include/utils.h b/src/include/utils.h index 4ca0b19..1e8d4c8 100644 --- a/src/include/utils.h +++ b/src/include/utils.h @@ -2,8 +2,8 @@ #ifndef _UTILS_H_ #define _UTILS_H_ -void * xmalloc(size_t size); -void * xrealloc(void * ptr, size_t size); +void *xmalloc(size_t size); +void *xrealloc(void *ptr, size_t size); char *rowsToString(int *buflen); void setStatusMessage(const char *fmt, ...); diff --git a/src/output.c b/src/output.c index bdb33b1..29a0b26 100644 --- a/src/output.c +++ b/src/output.c @@ -7,8 +7,7 @@ #include #include -#define INIT_BUFF \ - { NULL, 0 } +#define INIT_BUFF {NULL, 0} void drawLineNumber(struct screenBuffer *buff, int frow) { char linenum[6];