Mercurial
comparison mrjunejune/latex_renderer.h @ 248:b8b6e726964a
[style] Use Dowa type aliases in C
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Tue, 04 Aug 2026 02:44:06 -0700 |
| parents | b8aa08503378 |
| children |
comparison
equal
deleted
inserted
replaced
| 247:70f2a3dafc1c | 248:b8b6e726964a |
|---|---|
| 1 #ifndef MRJUNEJUNE_LATEX_RENDERER_H | 1 #ifndef MRJUNEJUNE_LATEX_RENDERER_H |
| 2 #define MRJUNEJUNE_LATEX_RENDERER_H | 2 #define MRJUNEJUNE_LATEX_RENDERER_H |
| 3 | 3 |
| 4 #include <stddef.h> | 4 #include "dowa/dowa.h" |
| 5 #include <stdint.h> | |
| 6 | 5 |
| 7 #define LATEX_SOURCE_MAX_BYTES (64 * 1024) | 6 #define LATEX_SOURCE_MAX_BYTES (64 * 1024) |
| 8 #define LATEX_PDF_MAX_BYTES (4 * 1024 * 1024) | 7 #define LATEX_PDF_MAX_BYTES (4 * 1024 * 1024) |
| 9 | 8 |
| 10 typedef enum { | 9 typedef enum { |
| 17 LATEX_RENDER_INTERNAL_ERROR, | 16 LATEX_RENDER_INTERNAL_ERROR, |
| 18 } Latex_Render_Status; | 17 } Latex_Render_Status; |
| 19 | 18 |
| 20 typedef struct { | 19 typedef struct { |
| 21 Latex_Render_Status status; | 20 Latex_Render_Status status; |
| 22 uint8_t *pdf_data; | 21 uint8 *pdf_data; |
| 23 size_t pdf_size; | 22 size_t pdf_size; |
| 24 char *diagnostics; | 23 char *diagnostics; |
| 25 } Latex_Render_Result; | 24 } Latex_Render_Result; |
| 26 | 25 |
| 27 Latex_Render_Result Latex_Render(const uint8_t *source, size_t source_size); | 26 Latex_Render_Result Latex_Render(const uint8 *source, size_t source_size); |
| 28 void Latex_Render_Result_Destroy(Latex_Render_Result *result); | 27 void Latex_Render_Result_Destroy(Latex_Render_Result *result); |
| 29 | 28 |
| 30 #endif | 29 #endif |