File: string.h

package info (click to toggle)
muon-meson 0.5.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,532 kB
  • sloc: ansic: 67,766; python: 4,391; cpp: 1,983; sh: 709; javascript: 570; asm: 226; xml: 67; objc: 36; makefile: 29; modula3: 8; f90: 7
file content (27 lines) | stat: -rw-r--r-- 834 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * SPDX-FileCopyrightText: Stone Tickle <lattis@mochiro.moe>
 * SPDX-License-Identifier: GPL-3.0-only
 */

#ifndef MUON_FUNCTIONS_STRING_H
#define MUON_FUNCTIONS_STRING_H
#include "lang/func_lookup.h"

enum format_cb_result {
	format_cb_found,
	format_cb_not_found,
	format_cb_error,
	format_cb_skip,
};

bool version_compare(const struct str *ver1, const struct str *_ver2);
bool version_compare_list(struct workspace *wk, const struct str *ver, obj cmp_arr);

typedef enum format_cb_result(
	(*string_format_cb)(struct workspace *wk, uint32_t node, void *ctx, const struct str *key, uint32_t *elem));

bool string_format(struct workspace *wk, uint32_t err_node, obj str, obj *res, void *ctx, string_format_cb cb);

extern const struct func_impl impl_tbl_string[];
extern const struct func_impl impl_tbl_string_internal[];
#endif