/* chunk.h -- working with chunks of Vinora Screenplay. Copyright (c) 2025 Evgeniy "Parthen" Parfenyuk This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef CHUNKS_H #define CHUNKS_H #define MAX_LINE_LENGTH 320 #define WARN_LINE_LENGTH 80 typedef enum { CHUNK_DIALOG, CHUNK_CHARACTER, CHUNK_HEADER, CHUNK_CHOICE, CHUNK_IMAGE, CHUNK_MEDIA, CHUNK_COMMENT, CHUNK_DIRECTIVE, CHUNK_LITERAL, CHUNK_EMPTY } chunk_t; typedef struct { char data[MAX_LINE_LENGTH]; size_t len; } string_t; // First line of chunk is enough to identify type chunk_t get_chunk_type(const char *s); char *chunk_type_to_name(const chunk_t t); #endif