Run clang-format and check in Travis CI (#14)

* Run clang-format and add pre-commit hook for it.

* Modify .travis.yml to check

* Try to fix problems with .travis.yml

* Try to fix .travis.yml yet again

* Update .clang-format to Philipp's preferences

* Don't allow lint to fail in Travis

* Remove git-hooks directory

* Improve clang-format failure output

* Fix clang-format error

* Report which commit clang-format is comparing against, and add whitespace error

* Handle non-PR Travis in clang-format, and add another error

* Check $TRAVIS_PULL_REQUEST correctly and add another error

* Fix syntax error in check-git-clang-format-output.sh

* Add whitespace error

* Remove extra whitespace, add clang-format to README
This commit is contained in:
Richard Shin
2016-09-08 15:28:27 -07:00
committed by Robert Nishihara
parent a62c0f8fac
commit 04737f3f56
15 changed files with 736 additions and 165 deletions
+11 -5
View File
@@ -12,25 +12,31 @@ typedef struct {
int type;
/* If type is data transfer, this contains information about the status
* of the transfer. */
data_connection connection;
data_connection connection;
} event_loop_item;
typedef struct {
/* Array of event_loop_items that hold information for connections. */
UT_array *items;
UT_array *items;
/* Array of file descriptors that are waiting, corresponding to items. */
UT_array *waiting;
UT_array *waiting;
} event_loop;
/* Event loop functions. */
void event_loop_init(event_loop *loop);
void event_loop_free(event_loop *loop);
int64_t event_loop_attach(event_loop *loop, int type, data_connection* connection, int fd, int events);
int64_t event_loop_attach(event_loop *loop,
int type,
data_connection *connection,
int fd,
int events);
void event_loop_detach(event_loop *loop, int64_t index, int shall_close);
int event_loop_poll(event_loop *loop);
int64_t event_loop_size(event_loop *loop);
struct pollfd *event_loop_get(event_loop *loop, int64_t index);
void event_loop_set_connection(event_loop *loop, int64_t index, const data_connection* conn);
void event_loop_set_connection(event_loop *loop,
int64_t index,
const data_connection *conn);
data_connection *event_loop_get_connection(event_loop *loop, int64_t index);
#endif