代码拉取完成,页面将自动刷新
同步操作将从 lengjing/json 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*******************************************
* SPDX-License-Identifier: MIT *
* Copyright (C) 2019-.... Jing Leng *
* Contact: Jing Leng <lengjingzju@163.com> *
* URL: https://github.com/lengjingzju/json *
*******************************************/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
JNUM_BOOL,
JNUM_INT,
JNUM_HEX,
JNUM_LINT,
JNUM_LHEX,
JNUM_DOUBLE,
} jnum_type_t;
typedef union {
bool vbool;
int32_t vint;
uint32_t vhex;
int64_t vlint;
uint64_t vlhex;
double vdbl;
} jnum_value_t;
int jnum_itoa(int32_t num, char *buffer);
int jnum_ltoa(int64_t num, char *buffer);
int jnum_htoa(uint32_t num, char *buffer);
int jnum_lhtoa(uint64_t num, char *buffer);
int jnum_dtoa(double num, char *buffer);
int32_t jnum_atoi(const char *str);
int64_t jnum_atol(const char *str);
uint32_t jnum_atoh(const char *str);
uint64_t jnum_atolh(const char *str);
double jnum_atod(const char *str);
int jnum_parse_hex(const char *str, jnum_type_t *type, jnum_value_t *value);
int jnum_parse_num(const char *str, jnum_type_t *type, jnum_value_t *value);
static inline int jnum_parse(const char *str, jnum_type_t *type, jnum_value_t *value)
{
const char *s = str;
if (*s == '0' && (*(s+1) == 'x' || *(s+1) == 'X'))
return jnum_parse_hex(str, type, value);
return jnum_parse_num(str, type, value);
}
#ifdef __cplusplus
}
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。