From dcce69e66d9bad47af21fc986fa601049ce054de Mon Sep 17 00:00:00 2001 From: josch Date: Thu, 25 Sep 2014 19:38:48 +0200 Subject: [PATCH] limit line length to 79 characters --- .indent.pro | 2 +- mfapi/apicalls.h | 3 ++- mfapi/apicalls/folder_get_info.c | 3 ++- mfapi/apicalls/user_session.c | 3 ++- mfapi/mfconn.h | 3 ++- mfshell/commands/get.c | 3 ++- mfshell/commands/lpwd.c | 3 ++- mfshell/commands/mkdir.c | 3 ++- mfshell/config.h | 3 ++- mfshell/options.c | 3 ++- utils/http.c | 9 ++++++--- utils/http.h | 3 ++- utils/stringv.c | 3 ++- 13 files changed, 29 insertions(+), 15 deletions(-) diff --git a/.indent.pro b/.indent.pro index 2b77e46..ce292d4 100644 --- a/.indent.pro +++ b/.indent.pro @@ -16,7 +16,7 @@ --dont-format-first-column-comments --indent-level4 --parameter-indentation0 ---line-length80 +--line-length79 --continue-at-parentheses --no-space-after-function-call-names --no-space-after-parentheses diff --git a/mfapi/apicalls.h b/mfapi/apicalls.h index 7448717..3459443 100644 --- a/mfapi/apicalls.h +++ b/mfapi/apicalls.h @@ -60,6 +60,7 @@ int mfconn_api_folder_delete(mfconn * conn, const char *folderkey); int mfconn_api_device_get_status(mfconn * conn, uint64_t * revision); -int mfconn_api_device_get_changes(mfconn * conn, uint64_t revision); +int mfconn_api_device_get_changes(mfconn * conn, + uint64_t revision); #endif diff --git a/mfapi/apicalls/folder_get_info.c b/mfapi/apicalls/folder_get_info.c index 72362c7..2060c13 100644 --- a/mfapi/apicalls/folder_get_info.c +++ b/mfapi/apicalls/folder_get_info.c @@ -57,7 +57,8 @@ mfconn_api_folder_get_info(mfconn * conn, mffolder * folder, } else { api_call = mfconn_create_signed_get(conn, 0, "folder/get_info.php", "?folder_key=%s" - "&response_format=json", folderkey); + "&response_format=json", + folderkey); } http = http_create(); diff --git a/mfapi/apicalls/user_session.c b/mfapi/apicalls/user_session.c index 245a14e..c6a43bb 100644 --- a/mfapi/apicalls/user_session.c +++ b/mfapi/apicalls/user_session.c @@ -60,7 +60,8 @@ mfconn_api_user_get_session_token(mfconn * conn, const char *server, // create user signature user_signature = - mfconn_create_user_signature(conn, username, password, app_id, app_key); + mfconn_create_user_signature(conn, username, password, app_id, + app_key); post_args = strdup_printf("email=%s" "&password=%s" diff --git a/mfapi/mfconn.h b/mfapi/mfconn.h index ef70d94..7d2b4d2 100644 --- a/mfapi/mfconn.h +++ b/mfapi/mfconn.h @@ -35,7 +35,8 @@ void mfconn_destroy(mfconn * conn); ssize_t mfconn_download_direct(mffile * file, const char *local_dir); const char *mfconn_create_signed_get(mfconn * conn, int ssl, - const char *api, const char *fmt, ...); + const char *api, const char *fmt, + ...); const char *mfconn_create_user_signature(mfconn * conn, const char *username, diff --git a/mfshell/commands/get.c b/mfshell/commands/get.c index afa4b3d..41b5529 100644 --- a/mfshell/commands/get.c +++ b/mfshell/commands/get.c @@ -74,7 +74,8 @@ int mfshell_cmd_get(mfshell * mfshell, int argc, char *const argv[]) } // make sure we have a valid working directory to download to if (mfshell->local_working_dir == NULL) { - mfshell->local_working_dir = (char *)calloc(PATH_MAX + 1, sizeof(char)); + mfshell->local_working_dir = + (char *)calloc(PATH_MAX + 1, sizeof(char)); getcwd(mfshell->local_working_dir, PATH_MAX); } diff --git a/mfshell/commands/lpwd.c b/mfshell/commands/lpwd.c index 769ef4e..3587f94 100644 --- a/mfshell/commands/lpwd.c +++ b/mfshell/commands/lpwd.c @@ -37,7 +37,8 @@ int mfshell_cmd_lpwd(mfshell * mfshell, int argc, char *const argv[]) } if (mfshell->local_working_dir == NULL) { - mfshell->local_working_dir = (char *)calloc(PATH_MAX + 1, sizeof(char)); + mfshell->local_working_dir = + (char *)calloc(PATH_MAX + 1, sizeof(char)); getcwd(mfshell->local_working_dir, PATH_MAX); } diff --git a/mfshell/commands/mkdir.c b/mfshell/commands/mkdir.c index a0fa16f..ba74bd1 100644 --- a/mfshell/commands/mkdir.c +++ b/mfshell/commands/mkdir.c @@ -47,7 +47,8 @@ int mfshell_cmd_mkdir(mfshell * mfshell, int argc, char *const argv[]) folder_curr = folder_get_key(mfshell->folder_curr); - retval = mfconn_api_folder_create(mfshell->conn, folder_curr, (char *)name); + retval = + mfconn_api_folder_create(mfshell->conn, folder_curr, (char *)name); mfconn_update_secret_key(mfshell->conn); return retval; diff --git a/mfshell/config.h b/mfshell/config.h index 06412ec..df4c950 100644 --- a/mfshell/config.h +++ b/mfshell/config.h @@ -25,6 +25,7 @@ void parse_config(struct mfshell_user_options *opts); -void parse_config_file(FILE * fp, struct mfshell_user_options *opts); +void parse_config_file(FILE * fp, + struct mfshell_user_options *opts); #endif diff --git a/mfshell/options.c b/mfshell/options.c index 3f842f3..bf0b612 100644 --- a/mfshell/options.c +++ b/mfshell/options.c @@ -66,7 +66,8 @@ void print_help(const char *cmd) "Lines starting with a # (hash) are ignored\n"); } -void parse_argv(int argc, char *const argv[], struct mfshell_user_options *opts) +void parse_argv(int argc, char *const argv[], + struct mfshell_user_options *opts) { static struct option long_options[] = { {"command", required_argument, 0, 'c'}, diff --git a/utils/http.c b/utils/http.c index 9e29090..6db90e1 100644 --- a/utils/http.c +++ b/utils/http.c @@ -123,7 +123,8 @@ http_get_buf(mfhttp * conn, const char *url, curl_easy_reset(conn->curl_handle); curl_easy_setopt(conn->curl_handle, CURLOPT_URL, url); - curl_easy_setopt(conn->curl_handle, CURLOPT_READFUNCTION, http_read_buf_cb); + curl_easy_setopt(conn->curl_handle, CURLOPT_READFUNCTION, + http_read_buf_cb); curl_easy_setopt(conn->curl_handle, CURLOPT_READDATA, (void *)conn); curl_easy_setopt(conn->curl_handle, CURLOPT_WRITEFUNCTION, http_write_buf_cb); @@ -190,7 +191,8 @@ http_post_buf(mfhttp * conn, const char *url, const char *post_args, curl_easy_reset(conn->curl_handle); curl_easy_setopt(conn->curl_handle, CURLOPT_URL, url); - curl_easy_setopt(conn->curl_handle, CURLOPT_READFUNCTION, http_read_buf_cb); + curl_easy_setopt(conn->curl_handle, CURLOPT_READFUNCTION, + http_read_buf_cb); curl_easy_setopt(conn->curl_handle, CURLOPT_READDATA, (void *)conn); curl_easy_setopt(conn->curl_handle, CURLOPT_WRITEFUNCTION, http_write_buf_cb); @@ -213,7 +215,8 @@ int http_get_file(mfhttp * conn, const char *url, const char *path) curl_easy_reset(conn->curl_handle); curl_easy_setopt(conn->curl_handle, CURLOPT_URL, url); - curl_easy_setopt(conn->curl_handle, CURLOPT_READFUNCTION, http_read_buf_cb); + curl_easy_setopt(conn->curl_handle, CURLOPT_READFUNCTION, + http_read_buf_cb); curl_easy_setopt(conn->curl_handle, CURLOPT_READDATA, (void *)conn); curl_easy_setopt(conn->curl_handle, CURLOPT_WRITEFUNCTION, http_write_file_cb); diff --git a/utils/http.h b/utils/http.h index d389af0..332d1ab 100644 --- a/utils/http.h +++ b/utils/http.h @@ -34,7 +34,8 @@ int http_post_buf(mfhttp * conn, const char *url, const char *post_args, int (*data_handler) (mfhttp * conn, void *data), void *data); -int http_get_file(mfhttp * conn, const char *url, const char *path); +int http_get_file(mfhttp * conn, const char *url, + const char *path); int http_post_file(mfhttp * conn, const char *url, const char *post_args, FILE * fd); json_t *http_parse_buf_json(mfhttp * conn, size_t flags, diff --git a/utils/stringv.c b/utils/stringv.c index 41a809a..403ec66 100644 --- a/utils/stringv.c +++ b/utils/stringv.c @@ -114,7 +114,8 @@ char **stringv_find(char *string, char *token, int limit) break; count++; - results = (char **)realloc((void *)results, sizeof(char *) * count + 1); + results = + (char **)realloc((void *)results, sizeof(char *) * count + 1); results[count - 1] = pos; }