#ifndef DK4TSP_H_INCLUDED #define DK4TSP_H_INCLUDED 1 /** @file dk4tsp.h Text stream processing. */ #ifndef DK4CONF_H_INCLUDED #include "dk4conf.h" #endif #ifndef DK4TYPES_H_INCLUDED #include "dk4types.h" #endif /** Position in a data stream. */ typedef struct { dk4_um_t bytes; /**< Number of bytes successfully processed. */ dk4_um_t chars; /**< Number of current character. */ dk4_um_t lineno; /**< Current line number. */ dk4_um_t charil; /**< Number of current character in line. */ } dk4_text_stream_position_t; /** Results from processing a text character or a line. */ enum { /** Text processing succeeded. */ DK4_TSP_RES_OK = 1, /** There was an error while applying the information, but we can continue. */ DK4_TSP_RES_ERROR = 0, /** Fatal error while applying information, abort processing. */ DK4_TSP_RES_FATAL = -1 }; #endif