mirror of
https://github.com/janet-lang/janet
synced 2026-11-23 15:47:11 +00:00
Add make format to format code.
A consistent style should help with contributors and readability. We use astyle as the formatter as can make a pretty good approximation of the current style and my preferred style. Astyle can be found at http://astyle.sourceforge.net/astyle.html
This commit is contained in:
1 parent
7c19ed8a48
commit
9d4effc02e
37 files changed
+2472
-2503
No files matched your search
+16
-16
@@ -277,7 +277,7 @@ typedef struct JanetView JanetView;
|
||||
typedef struct JanetByteView JanetByteView;
|
||||
typedef struct JanetDictView JanetDictView;
|
||||
typedef struct JanetRange JanetRange;
|
||||
typedef Janet (*JanetCFunction)(int32_t argc, Janet *argv);
|
||||
typedef Janet(*JanetCFunction)(int32_t argc, Janet *argv);
|
||||
|
||||
/* Basic types for all Janet Values */
|
||||
typedef enum JanetType {
|
||||
@@ -724,7 +724,7 @@ enum JanetParserStatus {
|
||||
|
||||
/* A janet parser */
|
||||
struct JanetParser {
|
||||
Janet* args;
|
||||
Janet *args;
|
||||
const char *error;
|
||||
JanetParseState *states;
|
||||
uint8_t *buf;
|
||||
@@ -744,7 +744,7 @@ struct JanetAbstractType {
|
||||
const char *name;
|
||||
int (*gc)(void *data, size_t len);
|
||||
int (*gcmark)(void *data, size_t len);
|
||||
Janet (*get)(void *data, Janet key);
|
||||
Janet(*get)(void *data, Janet key);
|
||||
void (*put)(void *data, Janet key, Janet value);
|
||||
};
|
||||
|
||||
@@ -955,8 +955,8 @@ JANET_API int janet_scan_number(const uint8_t *str, int32_t len, double *out);
|
||||
JANET_API void janet_debug_break(JanetFuncDef *def, int32_t pc);
|
||||
JANET_API void janet_debug_unbreak(JanetFuncDef *def, int32_t pc);
|
||||
JANET_API void janet_debug_find(
|
||||
JanetFuncDef **def_out, int32_t *pc_out,
|
||||
const uint8_t *source, int32_t offset);
|
||||
JanetFuncDef **def_out, int32_t *pc_out,
|
||||
const uint8_t *source, int32_t offset);
|
||||
|
||||
/* Array functions */
|
||||
JANET_API JanetArray *janet_array(int32_t capacity);
|
||||
@@ -1084,18 +1084,18 @@ JANET_API JanetModule janet_native(const char *name, const uint8_t **error);
|
||||
|
||||
/* Marshaling */
|
||||
JANET_API int janet_marshal(
|
||||
JanetBuffer *buf,
|
||||
Janet x,
|
||||
Janet *errval,
|
||||
JanetTable *rreg,
|
||||
int flags);
|
||||
JanetBuffer *buf,
|
||||
Janet x,
|
||||
Janet *errval,
|
||||
JanetTable *rreg,
|
||||
int flags);
|
||||
JANET_API int janet_unmarshal(
|
||||
const uint8_t *bytes,
|
||||
size_t len,
|
||||
int flags,
|
||||
Janet *out,
|
||||
JanetTable *reg,
|
||||
const uint8_t **next);
|
||||
const uint8_t *bytes,
|
||||
size_t len,
|
||||
int flags,
|
||||
Janet *out,
|
||||
JanetTable *reg,
|
||||
const uint8_t **next);
|
||||
JANET_API JanetTable *janet_env_lookup(JanetTable *env);
|
||||
|
||||
/* GC */
|
||||
|
||||
Reference in new issue
Block a user