merge code

This commit is contained in:
Rongsong Shen 2025-04-21 13:13:34 +08:00
parent 1089ab8441
commit 5d64af4841
5 changed files with 2510 additions and 1522 deletions

35
examples/book/book.h Normal file
View file

@ -0,0 +1,35 @@
#if !defined(_BOOK_H_)
#define _BOOK_H_ 1
#include <stdint.h>
#include <string.h>
typedef struct {
char *caption;
int32_t start;
int32_t end;
} chapter_t;
typedef struct {
uint64_t isbn;
uint32_t year;
} publish_t;
typedef struct {
char *title;
int n_authors;
char **authors;
int n_chapters;
chapter_t *chapters;
publish_t publish;
int n_magic1;
uint32_t *magic1;
int acquire_method;
union {
char *buy;
char *donation;
} acquire;
} book_t;
#endif