3178b8c448
- Compiled webserver and tcontrollerd for Linux amd64 - Added CGo stubs to build without FVM library - Added private module stubs (errors, log, settings) - Added proto stubs for gRPC - Added install.sh deployment script - Fixed auth.go type error and TOTP clock skew bypass
28 lines
508 B
C
28 lines
508 B
C
#ifndef CT_STRING_H
|
|
#define CT_STRING_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
typedef struct {
|
|
const char *ptr;
|
|
size_t length;
|
|
} ct_string_t;
|
|
|
|
static inline ct_string_t CT_STRING_FROM_PTR_LENGTH(const void *buf, size_t len) {
|
|
ct_string_t s;
|
|
s.ptr = (const char *)buf;
|
|
s.length = len;
|
|
return s;
|
|
}
|
|
|
|
static inline ct_string_t CT_STRING_FROM_CSTR(const char *str) {
|
|
ct_string_t s;
|
|
s.ptr = str;
|
|
s.length = str ? strlen(str) : 0;
|
|
return s;
|
|
}
|
|
|
|
#endif
|