Files
quip/include/common/state.h
Ian Moffett 0fa8ad12ca initial commit
Signed-off-by: Ian Moffett <ian@mirocom.org>
2026-03-21 06:15:27 -04:00

44 lines
837 B
C

/*
* Copyright (c) 2026, Mirocom Laboratories
* Provided under the BSD-3 clause
*
* Abstract:
* This header defines the quip state machine
* Author:
* Ian M. Moffett <ian@mirocom.org>
*/
#ifndef COMMON_STATE_H
#define COMMON_STATE_H 1
#include <stdint.h>
#include <stddef.h>
/*
* Represents the build state machine
*
* @in_fd: Input file descriptor of build file
* @line_num: Current line number
*/
struct quip_state {
int in_fd;
size_t line_num;
};
/*
* Initialize the quip state machine
*
* @build_file: Path to build file
* @state: State instance to initialize
*
* Returns zero on success
*/
int quip_state_init(const char *build_file, struct quip_state *state);
/*
* Destroy a quip state
*/
void quip_state_destroy(struct quip_state *state);
#endif /* !COMMON_STATE_H */