limit line length to 79 characters

This commit is contained in:
josch
2014-09-25 19:38:48 +02:00
parent 32fcb30572
commit dcce69e66d
13 changed files with 29 additions and 15 deletions

2
.indent.pro vendored
View File

@@ -16,7 +16,7 @@
--dont-format-first-column-comments --dont-format-first-column-comments
--indent-level4 --indent-level4
--parameter-indentation0 --parameter-indentation0
--line-length80 --line-length79
--continue-at-parentheses --continue-at-parentheses
--no-space-after-function-call-names --no-space-after-function-call-names
--no-space-after-parentheses --no-space-after-parentheses

View File

@@ -60,6 +60,7 @@ int mfconn_api_folder_delete(mfconn * conn, const char *folderkey);
int mfconn_api_device_get_status(mfconn * conn, int mfconn_api_device_get_status(mfconn * conn,
uint64_t * revision); 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 #endif

View File

@@ -57,7 +57,8 @@ mfconn_api_folder_get_info(mfconn * conn, mffolder * folder,
} else { } else {
api_call = mfconn_create_signed_get(conn, 0, "folder/get_info.php", api_call = mfconn_create_signed_get(conn, 0, "folder/get_info.php",
"?folder_key=%s" "?folder_key=%s"
"&response_format=json", folderkey); "&response_format=json",
folderkey);
} }
http = http_create(); http = http_create();

View File

@@ -60,7 +60,8 @@ mfconn_api_user_get_session_token(mfconn * conn, const char *server,
// create user signature // create user signature
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" post_args = strdup_printf("email=%s"
"&password=%s" "&password=%s"

View File

@@ -35,7 +35,8 @@ void mfconn_destroy(mfconn * conn);
ssize_t mfconn_download_direct(mffile * file, const char *local_dir); ssize_t mfconn_download_direct(mffile * file, const char *local_dir);
const char *mfconn_create_signed_get(mfconn * conn, int ssl, 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 *mfconn_create_user_signature(mfconn * conn,
const char *username, const char *username,

View File

@@ -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 // make sure we have a valid working directory to download to
if (mfshell->local_working_dir == NULL) { 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); getcwd(mfshell->local_working_dir, PATH_MAX);
} }

View File

@@ -37,7 +37,8 @@ int mfshell_cmd_lpwd(mfshell * mfshell, int argc, char *const argv[])
} }
if (mfshell->local_working_dir == NULL) { 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); getcwd(mfshell->local_working_dir, PATH_MAX);
} }

View File

@@ -47,7 +47,8 @@ int mfshell_cmd_mkdir(mfshell * mfshell, int argc, char *const argv[])
folder_curr = folder_get_key(mfshell->folder_curr); 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); mfconn_update_secret_key(mfshell->conn);
return retval; return retval;

View File

@@ -25,6 +25,7 @@
void parse_config(struct mfshell_user_options *opts); 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 #endif

View File

@@ -66,7 +66,8 @@ void print_help(const char *cmd)
"Lines starting with a # (hash) are ignored\n"); "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[] = { static struct option long_options[] = {
{"command", required_argument, 0, 'c'}, {"command", required_argument, 0, 'c'},

View File

@@ -123,7 +123,8 @@ http_get_buf(mfhttp * conn, const char *url,
curl_easy_reset(conn->curl_handle); curl_easy_reset(conn->curl_handle);
curl_easy_setopt(conn->curl_handle, CURLOPT_URL, url); 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_READDATA, (void *)conn);
curl_easy_setopt(conn->curl_handle, CURLOPT_WRITEFUNCTION, curl_easy_setopt(conn->curl_handle, CURLOPT_WRITEFUNCTION,
http_write_buf_cb); 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_reset(conn->curl_handle);
curl_easy_setopt(conn->curl_handle, CURLOPT_URL, url); 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_READDATA, (void *)conn);
curl_easy_setopt(conn->curl_handle, CURLOPT_WRITEFUNCTION, curl_easy_setopt(conn->curl_handle, CURLOPT_WRITEFUNCTION,
http_write_buf_cb); 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_reset(conn->curl_handle);
curl_easy_setopt(conn->curl_handle, CURLOPT_URL, url); 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_READDATA, (void *)conn);
curl_easy_setopt(conn->curl_handle, CURLOPT_WRITEFUNCTION, curl_easy_setopt(conn->curl_handle, CURLOPT_WRITEFUNCTION,
http_write_file_cb); http_write_file_cb);

View File

@@ -34,7 +34,8 @@ int http_post_buf(mfhttp * conn, const char *url,
const char *post_args, const char *post_args,
int (*data_handler) (mfhttp * conn, void *data), int (*data_handler) (mfhttp * conn, void *data),
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, int http_post_file(mfhttp * conn, const char *url,
const char *post_args, FILE * fd); const char *post_args, FILE * fd);
json_t *http_parse_buf_json(mfhttp * conn, size_t flags, json_t *http_parse_buf_json(mfhttp * conn, size_t flags,

View File

@@ -114,7 +114,8 @@ char **stringv_find(char *string, char *token, int limit)
break; break;
count++; count++;
results = (char **)realloc((void *)results, sizeof(char *) * count + 1); results =
(char **)realloc((void *)results, sizeof(char *) * count + 1);
results[count - 1] = pos; results[count - 1] = pos;
} }