L4Re/departure

Annotated libe2access/host/input.h

635:18f77ccd5ea8
8 months ago Paul Boddie Updated dataspace size type usage.
paul@263 1
/*
paul@263 2
 * Elementary input utilities.
paul@263 3
 *
paul@263 4
 * Copyright (C) 2022 Paul Boddie <paul@boddie.org.uk>
paul@263 5
 *
paul@263 6
 * This program is free software; you can redistribute it and/or
paul@263 7
 * modify it under the terms of the GNU General Public License as
paul@263 8
 * published by the Free Software Foundation; either version 2 of
paul@263 9
 * the License, or (at your option) any later version.
paul@263 10
 *
paul@263 11
 * This program is distributed in the hope that it will be useful,
paul@263 12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
paul@263 13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
paul@263 14
 * GNU General Public License for more details.
paul@263 15
 *
paul@263 16
 * You should have received a copy of the GNU General Public License
paul@263 17
 * along with this program; if not, write to the Free Software
paul@263 18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
paul@263 19
 * Boston, MA  02110-1301, USA
paul@263 20
 */
paul@263 21
paul@278 22
#pragma once
paul@263 23
paul@263 24
#include <stdio.h>
paul@263 25
paul@263 26
struct read_line_state
paul@263 27
{
paul@263 28
    char *buffer, *start, *end, *eolp;
paul@263 29
    size_t buffer_size, remaining;
paul@263 30
};
paul@263 31
paul@263 32
void parse_line(char *start, char *end, int *num_args, char *args[],
paul@263 33
                const int max_args);
paul@263 34
paul@263 35
char *read_line(FILE *fp, struct read_line_state *state);
paul@263 36
paul@263 37
/* vim: tabstop=4 expandtab shiftwidth=4
paul@263 38
*/