PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
scan.h File Reference
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/defs.h>
#include "digits.h"
Include dependency graph for scan.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _scan_ctx_t
 
struct  _scan_format_ctx_t
 
struct  _scanset_t
 

Enumerations

enum  _scan_format_flags_t { _SCAN_SUPPRESS_ASSIGNMENT = 1 << 0 }
 
enum  _scan_format_length_t {
  _SCAN_DEFAULT = 0 , _SCAN_HH , _SCAN_H , _SCAN_L ,
  _SCAN_LL , _SCAN_J , _SCAN_Z , _SCAN_T
}
 
enum  _scan_format_integer_flags_t { _SCAN_INTEGER_UNSIGNED = 0 , _SCAN_INTEGER_SIGNED = 1 << 0 }
 

Functions

static int _scan_next (_scan_ctx_t *ctx)
 
static void _scan_undo (_scan_ctx_t *ctx, int c)
 
static int _scan_whitespace (_scan_ctx_t *ctx)
 
static int _scan_asign_signed_int (_scan_ctx_t *ctx, _scan_format_ctx_t *format, int64_t value)
 
static int _scan_asign_unsigned_int (_scan_ctx_t *ctx, _scan_format_ctx_t *format, uint64_t value)
 
static int _scan_format_integer (_scan_ctx_t *ctx, _scan_format_ctx_t *format, uint32_t base, _scan_format_integer_flags_t flags)
 
static int _scan_format_float (_scan_ctx_t *ctx, _scan_format_ctx_t *format)
 
static int _scan_format_char (_scan_ctx_t *ctx, _scan_format_ctx_t *format)
 
static int _scan_format_string (_scan_ctx_t *ctx, _scan_format_ctx_t *format)
 
static void _scanset_set (_scanset_t *scanset, uint8_t c)
 
static bool _scanset_get (_scanset_t *scanset, uint8_t c)
 
static int _scan_format_scanset (_scan_ctx_t *ctx, _scan_format_ctx_t *format)
 
static int _scan_format_count (_scan_ctx_t *ctx, _scan_format_ctx_t *format)
 
static int _scan_format_percent (_scan_ctx_t *ctx, _scan_format_ctx_t *format)
 
static int _scan_format (_scan_ctx_t *ctx)
 
static int _scan (const char *_RESTRICT format, va_list arg, void *data)