From d471d99a24d651c2a01140d55fd2fd484d1c0f6c Mon Sep 17 00:00:00 2001 From: sdgmt2 Date: Mon, 1 Apr 2024 12:48:58 +0200 Subject: [PATCH] fix libthecore header encoding --- src/libthecore/include/buffer.h | 40 ++++++++++++++++----------------- src/libthecore/include/heart.h | 2 +- src/libthecore/include/main.h | 2 +- src/libthecore/include/utils.h | 14 ++++++------ 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/libthecore/include/buffer.h b/src/libthecore/include/buffer.h index 8644ea1..a69ab95 100644 --- a/src/libthecore/include/buffer.h +++ b/src/libthecore/include/buffer.h @@ -1,8 +1,8 @@ /* * Filename: buffer.h - * Description: Buffer ó + * Description: Buffer 처리 모듈 * - * Author: (aka. , Cronan), ۿ (aka. myevan, ڷ) + * Author: 김한주 (aka. 비엽, Cronan), 송영진 (aka. myevan, 빗자루) */ #ifndef __INC_LIBTHECORE_BUFFER_H__ #define __INC_LIBTHECORE_BUFFER_H__ @@ -28,30 +28,30 @@ int flag; }; - extern LPBUFFER buffer_new(int size); // - extern void buffer_delete(LPBUFFER buffer); // - extern void buffer_reset(LPBUFFER buffer); // ̵ ʱȭ + extern LPBUFFER buffer_new(int size); // 새 버퍼 생성 + extern void buffer_delete(LPBUFFER buffer); // 버퍼 삭제 + extern void buffer_reset(LPBUFFER buffer); // 버퍼 길이들을 초기화 - extern DWORD buffer_size(LPBUFFER buffer); // ۿ - extern int buffer_has_space(LPBUFFER buffer); // ִ ̸ + extern DWORD buffer_size(LPBUFFER buffer); // 버퍼에 남은 길이 + extern int buffer_has_space(LPBUFFER buffer); // 쓸 수 있는 길이를 리턴 - extern void buffer_write (LPBUFFER& buffer, const void* src, int length); // ۿ . - extern void buffer_read(LPBUFFER buffer, void * buf, int bytes); // ۿ д´. + extern void buffer_write (LPBUFFER& buffer, const void* src, int length); // 버퍼에 쓴다. + extern void buffer_read(LPBUFFER buffer, void * buf, int bytes); // 버퍼에서 읽는다. extern BYTE buffer_get_byte(LPBUFFER buffer); extern WORD buffer_get_word(LPBUFFER buffer); extern DWORD buffer_get_dword(LPBUFFER buffer); - // buffer_proceed Լ buffer_peek б ͸ ޾Ƽ ʿ䰡 - // ó 󸶳 ó ٰ 뺸ؾ . - // (buffer_read, buffer_get_* ø 쿡 ˾Ƽ ó peek ó - // ׷ Ƿ) - extern const void * buffer_read_peek(LPBUFFER buffer); // д ġ - extern void buffer_read_proceed(LPBUFFER buffer, int length); // lengthŭ ó + // buffer_proceed 함수는 buffer_peek으로 읽기용 포인터를 리턴 받아서 쓸 필요가 + // 있을 때 처리가 끝나면 얼마나 처리가 끝났다고 통보해야 할 때 쓴다. + // (buffer_read, buffer_get_* 시리즈의 경우에는 알아서 처리되지만 peek으로 처리했을 + // 때는 그렇게 될 수가 없으므로) + extern const void * buffer_read_peek(LPBUFFER buffer); // 읽는 위치를 리턴 + extern void buffer_read_proceed(LPBUFFER buffer, int length); // length만큼의 처리가 끝남 - // write_peek ġ 󸶳 質 뺸 - // buffer_write_proceed Ѵ. - extern void * buffer_write_peek(LPBUFFER buffer); // ġ - extern void buffer_write_proceed(LPBUFFER buffer, int length); // length Ų. + // 마찬가지로 write_peek으로 쓰기 위치를 얻어온 다음 얼마나 썼나 통보할 때 + // buffer_write_proceed를 사용한다. + extern void * buffer_write_peek(LPBUFFER buffer); // 쓰는 위치를 리턴 + extern void buffer_write_proceed(LPBUFFER buffer, int length); // length만 증가 시킨다. - extern void buffer_adjust_size(LPBUFFER & buffer, int add_size); // add_sizeŭ ߰ ũ⸦ Ȯ + extern void buffer_adjust_size(LPBUFFER & buffer, int add_size); // add_size만큼 추가할 크기를 확보 #endif diff --git a/src/libthecore/include/heart.h b/src/libthecore/include/heart.h index f98431d..23fc259 100644 --- a/src/libthecore/include/heart.h +++ b/src/libthecore/include/heart.h @@ -20,7 +20,7 @@ struct heart extern LPHEART heart_new(int opt_usec, HEARTFUNC func); extern void heart_delete(LPHEART ht); -extern int heart_idle(LPHEART ht); // pulse Ѵ. +extern int heart_idle(LPHEART ht); // 몇 pulse가 지났나 리턴한다. extern void heart_beat(LPHEART ht, int pulses); #endif diff --git a/src/libthecore/include/main.h b/src/libthecore/include/main.h index 2ea09ed..ee6cfc0 100644 --- a/src/libthecore/include/main.h +++ b/src/libthecore/include/main.h @@ -32,7 +32,7 @@ extern "C" extern float thecore_pulse_per_second(void); extern int thecore_is_shutdowned(void); - extern void thecore_tick(void); // tics + extern void thecore_tick(void); // tics 증가 #ifdef __cplusplus } diff --git a/src/libthecore/include/utils.h b/src/libthecore/include/utils.h index c560f38..6f8908f 100644 --- a/src/libthecore/include/utils.h +++ b/src/libthecore/include/utils.h @@ -13,24 +13,24 @@ using Random = effolkronium::random_static; #define str_cmp strcasecmp #define core_dump() core_dump_unix(__FILE__, __LINE__) - extern void core_dump_unix(const char *who, WORD line); // ھ + extern void core_dump_unix(const char *who, WORD line); // 코어를 강제로 덤프 #define TOKEN(string) if (!str_cmp(token_string, string)) - // src = ū : + // src = 토큰 : 값 extern void parse_token(char * src, char * token, char * value); extern void trim_and_lower(const char * src, char * dest, size_t dest_size); - // a b ð 󸶳 ̳ + // a와 b의 시간이 얼마나 차이나는지 리턴 extern struct timeval * timediff(const struct timeval *a, const struct timeval *b); - // a ð b ð + // a의 시간에 b의 시간을 더해 리턴 extern struct timeval * timeadd(struct timeval *a, struct timeval *b); - // ð curr_tm days + // 현재 시간 curr_tm으로 부터 days가 지난 날을 리턴 extern struct tm * tm_calc(const struct tm *curr_tm, int days); - extern void thecore_sleep(struct timeval * timeout); // timeoutŭ μ + extern void thecore_sleep(struct timeval * timeout); // timeout만큼 프로세스 쉬기 extern float get_float_time(); extern DWORD get_dword_time(); @@ -50,7 +50,7 @@ using Random = effolkronium::random_static; sys_err("realloc failed [%d] %s", errno, strerror(errno)); \ abort(); } } while(0) - // Next Prev ִ Ʈ ߰ + // Next 와 Prev 가 있는 리스트에 추가 #define INSERT_TO_TW_LIST(item, head, prev, next) \ if (!(head)) \ { \