mirror of
https://github.com/janet-lang/janet
synced 2025-11-07 11:03:04 +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:
@@ -210,10 +210,10 @@ int janet_cstrcmp(const uint8_t *str, const char *other) {
|
||||
* have a string as its first element, and the struct must be sorted
|
||||
* lexicographically by that element. */
|
||||
const void *janet_strbinsearch(
|
||||
const void *tab,
|
||||
size_t tabcount,
|
||||
size_t itemsize,
|
||||
const uint8_t *key) {
|
||||
const void *tab,
|
||||
size_t tabcount,
|
||||
size_t itemsize,
|
||||
const uint8_t *key) {
|
||||
size_t low = 0;
|
||||
size_t hi = tabcount;
|
||||
const char *t = (const char *)tab;
|
||||
@@ -311,8 +311,8 @@ JanetBindingType janet_resolve(JanetTable *env, const uint8_t *sym, Janet *out)
|
||||
return JANET_BINDING_NONE;
|
||||
entry_table = janet_unwrap_table(entry);
|
||||
if (!janet_checktype(
|
||||
janet_table_get(entry_table, janet_ckeywordv("macro")),
|
||||
JANET_NIL)) {
|
||||
janet_table_get(entry_table, janet_ckeywordv("macro")),
|
||||
JANET_NIL)) {
|
||||
*out = janet_table_get(entry_table, janet_ckeywordv("value"));
|
||||
return JANET_BINDING_MACRO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user