use gnu indent to enforce coding style and adapt source

- indent options are listed in ./.indent.pro
 - use test case to run indent
This commit is contained in:
josch
2014-09-20 10:59:54 +02:00
parent d8e00119b4
commit 097a855751
43 changed files with 1325 additions and 1278 deletions

View File

@@ -17,23 +17,22 @@
*
*/
#include <stdio.h>
#include "../../mfapi/apicalls.h"
#include "../mfshell.h"
#include "../../mfapi/folder.h"
#include "../../mfapi/mfconn.h"
#include "../commands.h" // IWYU pragma: keep
#include "../commands.h" // IWYU pragma: keep
int
mfshell_cmd_list(mfshell *mfshell, int argc, char **argv)
int mfshell_cmd_list(mfshell * mfshell, int argc, char **argv)
{
(void)argv;
int retval;
const char *folder_curr;
int retval;
const char *folder_curr;
if(mfshell == NULL) return -1;
if (mfshell == NULL)
return -1;
if (argc != 1) {
fprintf(stderr, "Invalid number of arguments\n");
@@ -43,22 +42,22 @@ mfshell_cmd_list(mfshell *mfshell, int argc, char **argv)
folder_curr = folder_get_key(mfshell->folder_curr);
// safety check... this should never happen
if(folder_curr == NULL)
folder_set_key(mfshell->folder_curr,"myfiles");
if (folder_curr == NULL)
folder_set_key(mfshell->folder_curr, "myfiles");
// safety check... this should never happen
if(folder_curr[0] == '\0')
folder_set_key(mfshell->folder_curr,"myfiles");
if (folder_curr[0] == '\0')
folder_set_key(mfshell->folder_curr, "myfiles");
// first folders
retval = mfconn_api_folder_get_content(mfshell->conn, 0, mfshell->folder_curr);
retval =
mfconn_api_folder_get_content(mfshell->conn, 0, mfshell->folder_curr);
mfconn_update_secret_key(mfshell->conn);
// then files
retval = mfconn_api_folder_get_content(mfshell->conn, 1, mfshell->folder_curr);
retval =
mfconn_api_folder_get_content(mfshell->conn, 1, mfshell->folder_curr);
mfconn_update_secret_key(mfshell->conn);
return retval;
}