Skip to content

Commit eb6ecda

Browse files
committed
Cleaning up the code. Also adding listEnv, getEnv to stdlib
1 parent af348f0 commit eb6ecda

File tree

21 files changed

+169
-36
lines changed

21 files changed

+169
-36
lines changed

src/ast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ expr_t *newExpr_Dictionary(keyValList_t *keyVals) {
271271
return expr;
272272
}
273273

274-
expr_t *newExpr_Cachepot() {
274+
expr_t *newExpr_Cachepot(void) {
275275
expr_t *expr = ast_emalloc(sizeof(expr_t));
276276
cachepot_t *cachepot = ast_emalloc(sizeof(expr_t));
277277

src/ast.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ expr_t *newExpr_Indexer(expr_t *left, expr_t *right, expr_t *offset);
377377
expr_t *newExpr_BigIntFromStr(const char *intStr);
378378
expr_t *newExpr_BigIntFromInt(intptr_t val);
379379
expr_t *newExpr_BigInt(mpz_t *n);
380-
expr_t *newExpr_Cachepot();
380+
expr_t *newExpr_Cachepot(void);
381381
expr_t *newExpr_PriorityQueue(int capacity, int is_minimum);
382382
expr_t *newClassAccesser(expr_t *classID, char *memberID);
383383
expr_t *newConditional(int type, expr_t *left, expr_t *right);
@@ -959,7 +959,7 @@ void free_ast(statement_t *stmt);
959959
printf("this is in it's very early stage... it only supports one liners!\n"); \
960960
printf("\n"); \
961961
printf("Some short tips:\nhelp() gives you a list of available functions\n"); \
962-
printf("printEnv() lists the names of variables defined in this session\n"); \
962+
printf("printVars() lists the names of variables defined in this session\n"); \
963963
printf("quit() quits this interpreter interactive mode\n"); \
964964
printf("\n"); \
965965
} while (0)

src/eval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3312,7 +3312,7 @@ void locals_remove(locals_stack_t *stack, char *id) {
33123312
}
33133313
}
33143314

3315-
hashtable_t *new_argstable() {
3315+
hashtable_t *new_argstable(void) {
33163316
hashtable_t *argTable = hashtable_new(20, 0.8);
33173317
assert(argTable != NULL);
33183318
argTable->allocated_data = 1;

src/eval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void call_func(functionCallContainer_t *funcCall, void *stmt, void *next, PROVID
3535

3636
void initClass(class_t *cls, EXPRESSION_PARAMS());
3737

38-
hashtable_t *new_argstable();
38+
hashtable_t *new_argstable(void);
3939
hashtable_t *hashtable_heapvals_copy(hashtable_t *hash, EXPRESSION_PARAMS());
4040

4141
dictionary_t *allocNewDictionary(dictionary_t *, EXPRESSION_PARAMS());

src/external/crypto-algorithms/aes.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ int aes_decrypt_ccm(const BYTE ciphertext[], // IN - Ciphertext, th
114114
///////////////////
115115
// Test functions
116116
///////////////////
117-
int aes_test();
118-
int aes_ecb_test();
119-
int aes_cbc_test();
120-
int aes_ctr_test();
121-
int aes_ccm_test();
117+
int aes_test(void);
118+
int aes_ecb_test(void);
119+
int aes_cbc_test(void);
120+
int aes_ctr_test(void);
121+
int aes_ccm_test(void);
122122

123123
#endif // AES_H

src/external/mini-gmp-6.2.1/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ minigmp_source_list = [
66

77
minigmp_args = [
88
'-DMINI_GMP_DONT_USE_FLOAT_H'
9-
]
9+
] + ric_c_args
1010

1111
minigmp_lib = static_library('minigmp',
1212
sources: minigmp_source_list,

src/garbage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "eval.h"
77
#include "sync.h"
88

9-
uint32_t generate_mark_value() {
9+
uint32_t generate_mark_value(void) {
1010
static int initial = 1;
1111
uint32_t r;
1212

src/garbage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ void mark_and_sweep(hashtable_t *varDecs, EXPRESSION_PARAMS());
1515
void mark(hashtable_t *varDecs, uint32_t markVal, EXPRESSION_PARAMS());
1616
void free_heap(void *hp, void *hbp);
1717

18-
uint32_t set_mark_value();
18+
uint32_t set_mark_value(void);
1919

2020
#endif

src/gram.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,11 +924,11 @@ otherChar:
924924
#include "hooks.h"
925925
926926
typedef struct yy_buffer_state * YY_BUFFER_STATE;
927-
extern int yyparse();
927+
extern int yyparse(void);
928928
extern YY_BUFFER_STATE yy_scan_string(char * str);
929929
extern void yy_delete_buffer(YY_BUFFER_STATE buffer);
930930
931-
void initParser() {
931+
void initParser(void) {
932932
setParser(yyparse);
933933
setRoot(&root);
934934
}

src/hooks.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ void setMainRoot(statement_t *newRoot) { mainProgramRoot = newRoot; }
1111

1212
void setRoot(statement_t **newRoot) { root = newRoot; }
1313

14-
MainParserFunc getParser() { return parser; }
14+
MainParserFunc getParser(void) { return parser; }
1515

16-
statement_t *getRoot() { return *root; }
16+
statement_t *getRoot(void) { return *root; }
1717

18-
statement_t *getMainRoot() { return mainProgramRoot; }
18+
statement_t *getMainRoot(void) { return mainProgramRoot; }

0 commit comments

Comments
 (0)