From 4fa8cce4f5406df0cab63330d76875336502969f Mon Sep 17 00:00:00 2001 From: misonyo Date: Mon, 26 Nov 2018 18:11:49 +0800 Subject: [PATCH] astyle codes --- mkdir_sample.c | 14 +++++++------- opendir_sample.c | 14 +++++++------- readdir_sample.c | 14 +++++++------- rename_sample.c | 14 +++++++------- stat_sample.c | 18 +++++++++--------- tell_seek_dir_sample.c | 16 ++++++++-------- 6 files changed, 45 insertions(+), 45 deletions(-) diff --git a/mkdir_sample.c b/mkdir_sample.c index f997f15..ee9f04d 100644 --- a/mkdir_sample.c +++ b/mkdir_sample.c @@ -1,11 +1,11 @@ -/* - * Copyright (c) 2006-2018, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: * Date Author Notes - * + * */ /* * 程序清单:创建目录 diff --git a/opendir_sample.c b/opendir_sample.c index 740a055..234244c 100644 --- a/opendir_sample.c +++ b/opendir_sample.c @@ -1,11 +1,11 @@ -/* - * Copyright (c) 2006-2018, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: * Date Author Notes - * + * */ /* * 程序清单:打开目录 diff --git a/readdir_sample.c b/readdir_sample.c index 9c31563..289dacf 100644 --- a/readdir_sample.c +++ b/readdir_sample.c @@ -1,11 +1,11 @@ -/* - * Copyright (c) 2006-2018, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: * Date Author Notes - * + * */ /* * 程序清单:读取目录 diff --git a/rename_sample.c b/rename_sample.c index 8eacf5d..81c864c 100644 --- a/rename_sample.c +++ b/rename_sample.c @@ -1,11 +1,11 @@ -/* - * Copyright (c) 2006-2018, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: * Date Author Notes - * + * */ /* * 程序清单:更改名称 diff --git a/stat_sample.c b/stat_sample.c index d984920..5cbad14 100644 --- a/stat_sample.c +++ b/stat_sample.c @@ -1,11 +1,11 @@ -/* - * Copyright (c) 2006-2018, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: * Date Author Notes - * + * */ /* * 程序清单:取得状态 @@ -23,8 +23,8 @@ static void stat_sample(void) { int ret; struct stat buf; - ret=stat("/text.txt", &buf); - if(ret==0) + ret = stat("/text.txt", &buf); + if (ret == 0) rt_kprintf("text.txt file size = %d\n", buf.st_size); else rt_kprintf("text.txt file not fonud\n"); diff --git a/tell_seek_dir_sample.c b/tell_seek_dir_sample.c index 25a17f1..e7b8293 100644 --- a/tell_seek_dir_sample.c +++ b/tell_seek_dir_sample.c @@ -1,11 +1,11 @@ -/* - * Copyright (c) 2006-2018, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: * Date Author Notes - * + * */ /* * 程序清单:保存与设置读取目录位置 @@ -30,7 +30,7 @@ static void telldir_sample(void) /* 打开根目录 */ rt_kprintf("the directory is:\n"); dirp = opendir("/"); - + for (dp = readdir(dirp); dp != RT_NULL; dp = readdir(dirp)) { /* 保存第三个目录项的目录指针*/