This repository has been archived on 2026-07-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
acquire-core-full/app/shared/include/acq_util.h

27 lines
926 B
C

/*
* acq_util.h - 공통 유틸리티 (일자/금액/전문) 선언 (공유)
*/
#ifndef ACQ_UTIL_H
#define ACQ_UTIL_H
#include "msg_layout.h"
int date_is_valid(const char *yyyymmdd);
int date_weekday(const char *yyyymmdd);
int date_is_weekend(const char *yyyymmdd);
int date_next_business(const char *yyyymmdd, char *out);
void date_today(char *out);
long amount_parse(const char *field, int len);
int amount_format(long amount, char *out, int len);
void amount_format_won(long amount, char *out, int outlen);
int amount_is_valid(long amount);
void msg_field_copy(char *out, const char *field, int len);
void msg_field_set(char *field, const char *src, int len);
void msg_field_set_num(char *field, const char *src, int len);
int msg_unpack(acq_msg_t *msg, const char *raw, int rawlen);
int msg_pack(const acq_msg_t *msg, char *raw, int rawlen);
int msg_validate(const acq_msg_t *msg);
#endif /* ACQ_UTIL_H */