qments/include/comment.h

25 lines
545 B
C
Raw Normal View History

2023-06-15 01:44:02 +03:00
#ifndef COMMENT_H
#define COMMENT_H
#include <string.h>
#include <time.h>
typedef struct {
int reply_id; /* should be 0 if comment is top-level */
time_t creation_time;
size_t text_length;
char *user_sid, *user_displayname;
} CommentHeader;
typedef struct {
int id;
CommentHeader *header;
char *text;
} Comment;
/* does not copy strings given by pointers */
CommentHeader *
mk_comment_header(int reply_id, time_t creation_time, size_t text_length, char *user_sid, char *user_displayname);
#endif /* COMMENT_H */