mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 05:04:29 -08:00
limit line length to 79 characters
This commit is contained in:
2
.indent.pro
vendored
2
.indent.pro
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'},
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user