labwc/include/xbm/tokenize.h
Tomi Ollila 7ad5200f2e includes: identifier consistency in include guards
Made all header files to have LABWC_ prefix in include guard identifers.

Converted from __LABWC_ in 35 include/ files.
Converted from __LAB_ in 5 include/ files.
Added LABWC prefix to 3 include/ files.
Added include guards to 3 include/ files.

The double underscores were removed since according to C standard
those "are always reserved for any use".
2023-05-13 22:29:21 +01:00

34 lines
551 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* XBM file tokenizer
*
* Copyright Johan Malm 2020
*/
#ifndef LABWC_TOKENIZE_H
#define LABWC_TOKENIZE_H
enum token_type {
TOKEN_NONE = 0,
TOKEN_IDENT,
TOKEN_INT,
TOKEN_SPECIAL,
TOKEN_OTHER,
};
#define MAX_TOKEN_SIZE (256)
struct token {
char name[MAX_TOKEN_SIZE];
int value;
size_t pos;
enum token_type type;
};
/**
* tokenize - tokenize xbm file
* @buffer: buffer containing xbm file
* return token vector
*/
struct token *tokenize_xbm(char *buffer);
#endif /* LABWC_TOKENIZE_H */