21468dfb727a694b58c9cb574711110895f82214 — Cristian Adri├ín Ontivero 19 days ago
Rename *_func_t types to *_func

POSIX reserves the _t suffix, so it's advisable to avoid it.
M builtin/builtin.c => builtin/builtin.c +1 -1
@@ 8,7 8,7 @@   struct builtin {
  	const char *name;
- 	mrsh_builtin_func_t func;
+ 	mrsh_builtin_func func;
  	bool special;
  };
  

M hashtable.c => hashtable.c +1 -1
@@ 106,7 106,7 @@ }
  
  void mrsh_hashtable_for_each(struct mrsh_hashtable *table,
- 		mrsh_hashtable_iterator_func_t iterator, void *user_data) {
+ 		mrsh_hashtable_iterator_func iterator, void *user_data) {
  	for (size_t i = 0; i < MRSH_HASHTABLE_BUCKETS; ++i) {
  		struct mrsh_hashtable_entry *entry = table->buckets[i];
  		while (entry != NULL) {

M include/builtin.h => include/builtin.h +1 -1
@@ 3,7 3,7 @@   struct mrsh_state;
  
- typedef int (*mrsh_builtin_func_t)(struct mrsh_state *state,
+ typedef int (*mrsh_builtin_func)(struct mrsh_state *state,
  	int argc, char *argv[]);
  
  void print_escaped(const char *value);

M include/mrsh/hashtable.h => include/mrsh/hashtable.h +2 -2
@@ 14,7 14,7 @@ struct mrsh_hashtable_entry *buckets[MRSH_HASHTABLE_BUCKETS];
  };
  
- typedef void (*mrsh_hashtable_iterator_func_t)(const char *key, void *value,
+ typedef void (*mrsh_hashtable_iterator_func)(const char *key, void *value,
  	void *user_data);
  
  void mrsh_hashtable_finish(struct mrsh_hashtable *table);


@@ 28,6 28,6 @@ * do so an any other element.
   */
  void mrsh_hashtable_for_each(struct mrsh_hashtable *table,
- 	mrsh_hashtable_iterator_func_t iterator, void *user_data);
+ 	mrsh_hashtable_iterator_func iterator, void *user_data);
  
  #endif

M include/mrsh/parser.h => include/mrsh/parser.h +2 -2
@@ 11,7 11,7 @@ * An alias callback. The alias named is given as a parameter and the alias
   * value should be returned. NULL should be returned if the alias doesn't exist.
   */
- typedef const char *(*mrsh_parser_alias_func_t)(const char *name,
+ typedef const char *(*mrsh_parser_alias_func)(const char *name,
  	void *user_data);
  
  /**


@@ 53,7 53,7 @@ * Set the alias callback.
   */
  void mrsh_parser_set_alias_func(struct mrsh_parser *state,
- 	mrsh_parser_alias_func_t alias, void *user_data);
+ 	mrsh_parser_alias_func alias, void *user_data);
  /**
   * Check if the parser ended with a syntax error. The error message is returned.
   * The error position can optionally be obtained.

M include/parser.h => include/parser.h +2 -2
@@ 59,11 59,11 @@ struct mrsh_array here_documents;
  	bool continuation_line;
  
- 	mrsh_parser_alias_func_t alias;
+ 	mrsh_parser_alias_func alias;
  	void *alias_user_data;
  };
  
- typedef struct mrsh_word *(*word_func_t)(struct mrsh_parser *state, char end);
+ typedef struct mrsh_word *(*word_func)(struct mrsh_parser *state, char end);
  
  size_t parser_peek(struct mrsh_parser *state, char *buf, size_t size);
  char parser_peek_char(struct mrsh_parser *state);

M parser/parser.c => parser/parser.c +1 -1
@@ 353,7 353,7 @@ }
  
  void mrsh_parser_set_alias_func(struct mrsh_parser *state,
- 		mrsh_parser_alias_func_t alias, void *user_data) {
+ 		mrsh_parser_alias_func alias, void *user_data) {
  	state->alias = alias;
  	state->alias_user_data = user_data;
  }

M parser/word.c => parser/word.c +1 -1
@@ 174,7 174,7 @@ }
  
  static struct mrsh_word *word_list(struct mrsh_parser *state, char end,
- 		word_func_t f) {
+ 		word_func f) {
  	struct mrsh_array children = {0};
  
  	while (true) {