653 B
653 B
code.c
Handle a single line of code by writing it to the output file and updating the state.
Includes
#include <stdio.h>
#include "internal/transpile_internal.h"
Function Descriptions
handle_code_line
Handle a single line of code by writing it to the output file and updating the state.
Parameters
s: Pointer to the current state structure.line: Pointer to the line of code to be handled.
Return Value
Return 0 on success, or 1 on failure.
Implementation
int8_t
handle_code_line(t_state *s, char *line)
{
if (0 > fputs(line, s->out))
return (1);
s->dst_line++;
return (0);
}