You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/04/11 19:33:01 UTC
[incubator-nuttx-apps] 01/02: Remove CONFIG_CAN_PASS_STRUCT
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 05f2253a3329cdc7d439aad9fc2219ad52be6bee
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Sat Apr 11 12:13:56 2020 -0600
Remove CONFIG_CAN_PASS_STRUCT
This is the companion to PR #766. It removes the CONFIG_CAN_PASS_STRUCT option as recommended by Issue #620
NuttX PR #766 depends on PR being in place but not vice versa. This PR should be merge-able without #766 and then PR #766 should also pass its checks.
---
examples/configdata/configdata_main.c | 17 +-----
examples/elf/elf_main.c | 47 ++++------------
examples/posix_spawn/spawn_main.c | 47 ++++------------
examples/stat/stat_main.c | 58 +++++--------------
examples/usrsocktest/usrsocktest_main.c | 9 ++-
.../UnitTests/CButtonArray/cbuttonarray_main.cxx | 47 ++++------------
.../UnitTests/CCheckBox/ccheckbox_main.cxx | 47 ++++------------
.../UnitTests/CGlyphButton/cglyphbutton_main.cxx | 47 ++++------------
.../cglyphsliderhorizontal_main.cxx | 47 ++++------------
.../nxwidgets/UnitTests/CImage/cimage_main.cxx | 54 +++++-------------
.../nxwidgets/UnitTests/CKeypad/ckeypad_main.cxx | 47 ++++------------
.../CLatchButtonArray/clatchbuttonarray_main.cxx | 47 ++++------------
.../nxwidgets/UnitTests/CListBox/clistbox_main.cxx | 47 ++++------------
.../UnitTests/CProgressBar/cprogressbar_main.cxx | 47 ++++------------
.../UnitTests/CRadioButton/cradiobutton_main.cxx | 47 ++++------------
.../cscrollbarhorizontal_main.cxx | 47 ++++------------
.../CScrollbarVertical/cscrollbarvertical_main.cxx | 47 ++++------------
.../CSliderHorizonal/csliderhorizontal_main.cxx | 47 ++++------------
.../CSliderVertical/cslidervertical_main.cxx | 47 ++++------------
netutils/thttpd/thttpd_alloc.c | 44 +++++----------
system/composite/composite_main.c | 56 ++++---------------
system/usbmsc/usbmsc_main.c | 56 ++++---------------
system/zmodem/host/nuttx/compiler.h | 54 ++++--------------
testing/fstest/fstest_main.c | 57 +++++--------------
testing/nxffs/nxffs_main.c | 65 ++++++----------------
testing/ostest/ostest_main.c | 57 ++++---------------
testing/ostest/sigev_thread.c | 47 ++++------------
testing/ostest/sighand.c | 43 ++++----------
testing/smart/smart_main.c | 57 +++++--------------
29 files changed, 339 insertions(+), 1040 deletions(-)
diff --git a/examples/configdata/configdata_main.c b/examples/configdata/configdata_main.c
index 295f61d..4b93094 100644
--- a/examples/configdata/configdata_main.c
+++ b/examples/configdata/configdata_main.c
@@ -176,11 +176,7 @@ static void configdata_loopmemusage(void)
{
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
/* Show the change from the previous loop */
@@ -189,11 +185,7 @@ static void configdata_loopmemusage(void)
/* Set up for the next test */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmprevious = g_mmafter;
-#else
- memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
-#endif
}
#endif
@@ -203,11 +195,8 @@ static void configdata_loopmemusage(void)
static void configdata_endmemusage(void)
{
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
+
printf("\nFinal memory usage:\n");
configdata_showmemusage(&g_mmbefore, &g_mmafter);
@@ -679,11 +668,7 @@ int main(int argc, FAR char *argv[])
/* Initialize the before memory values */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmbefore = mallinfo();
-#else
- mallinfo(&g_mmbefore);
-#endif
/* Loop seveal times ... create some config data items, delete them
* randomly, verify them randomly, add new config items.
diff --git a/examples/elf/elf_main.c b/examples/elf/elf_main.c
index 4f93694..b22a640 100644
--- a/examples/elf/elf_main.c
+++ b/examples/elf/elf_main.c
@@ -1,35 +1,20 @@
/****************************************************************************
* examples/elf/elf_main.c
*
- * Copyright (C) 2012, 2017-2018 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -179,11 +164,7 @@ static void mm_update(FAR unsigned int *previous, FAR const char *msg)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -204,11 +185,7 @@ static void mm_initmonitor(void)
{
struct mallinfo mmcurrent;
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mminitial = mmcurrent.uordblks;
g_mmstep = mmcurrent.uordblks;
diff --git a/examples/posix_spawn/spawn_main.c b/examples/posix_spawn/spawn_main.c
index f5a3adb..a5aa25a 100644
--- a/examples/posix_spawn/spawn_main.c
+++ b/examples/posix_spawn/spawn_main.c
@@ -1,35 +1,20 @@
/****************************************************************************
* examples/posix_spawn/spawn_main.c
*
- * Copyright (C) 2013, 2018 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -172,11 +157,7 @@ static void mm_update(FAR unsigned int *previous, FAR const char *msg)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -197,11 +178,7 @@ static void mm_initmonitor(void)
{
struct mallinfo mmcurrent;
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mminitial = mmcurrent.uordblks;
g_mmstep = mmcurrent.uordblks;
diff --git a/examples/stat/stat_main.c b/examples/stat/stat_main.c
index b1a2223..d46ae96 100644
--- a/examples/stat/stat_main.c
+++ b/examples/stat/stat_main.c
@@ -1,35 +1,20 @@
/****************************************************************************
* examples/stat/stat_main.c
*
- * Copyright (C) 2008, 2017 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -78,11 +63,7 @@ static void stepusage(void)
{
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
/* Show the change from the previous loop */
@@ -90,20 +71,12 @@ static void stepusage(void)
/* Set up for the next test */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmprevious = g_mmafter;
-#else
- memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
-#endif
}
static void endusage(void)
{
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
showusage(&g_mmbefore, &g_mmafter, "End-of-test memory leak");
}
@@ -251,13 +224,8 @@ int main(int argc, FAR char *argv[])
/* Set up memory monitoring */
-#ifdef CONFIG_CAN_PASS_STRUCTS
- g_mmbefore = mallinfo();
+ g_mmbefore = mallinfo();
g_mmprevious = g_mmbefore;
-#else
- mallinfo(&g_mmbefore);
- memcpy(&g_mmprevious, &g_mmbefore, sizeof(struct mallinfo));
-#endif
/* Try stat first */
diff --git a/examples/usrsocktest/usrsocktest_main.c b/examples/usrsocktest/usrsocktest_main.c
index 5c5f15d..1047e78 100644
--- a/examples/usrsocktest/usrsocktest_main.c
+++ b/examples/usrsocktest/usrsocktest_main.c
@@ -97,17 +97,16 @@ bool usrsocktest_test_failed = false;
static void get_mallinfo(struct mallinfo *mem)
{
-#ifdef CONFIG_CAN_PASS_STRUCTS
*mem = mallinfo();
-#else
- mallinfo(mem);
-#endif
}
static void print_mallinfo(const struct mallinfo *mem, const char *title)
{
if (title)
- printf("%s:\n", title);
+ {
+ printf("%s:\n", title);
+ }
+
printf(" %11s%11s%11s%11s\n", "total", "used", "free", "largest");
printf("Mem: %11d%11d%11d%11d\n",
mem->arena, mem->uordblks, mem->fordblks, mem->mxordblk);
diff --git a/graphics/nxwidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx b/graphics/nxwidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx
index 96fc81e..374cbf5 100644
--- a/graphics/nxwidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CButtonArray/cbuttonarray_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -99,11 +84,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -129,11 +110,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmPrevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CCheckBox/ccheckbox_main.cxx b/graphics/nxwidgets/UnitTests/CCheckBox/ccheckbox_main.cxx
index 7e10678..8cd3663 100644
--- a/graphics/nxwidgets/UnitTests/CCheckBox/ccheckbox_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CCheckBox/ccheckbox_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CCheckBox/ccheckbox_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -117,11 +98,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmprevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx b/graphics/nxwidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx
index 1361995..2a74fb3 100644
--- a/graphics/nxwidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -89,11 +74,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -116,11 +97,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmprevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CGlyphSliderHorizontal/cglyphsliderhorizontal_main.cxx b/graphics/nxwidgets/UnitTests/CGlyphSliderHorizontal/cglyphsliderhorizontal_main.cxx
index ac79452..13badfb 100644
--- a/graphics/nxwidgets/UnitTests/CGlyphSliderHorizontal/cglyphsliderhorizontal_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CGlyphSliderHorizontal/cglyphsliderhorizontal_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CGlyphSliderHorizontal/cglyphsliderhorizontal_main.cxx
//
-// Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -117,11 +98,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmprevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CImage/cimage_main.cxx b/graphics/nxwidgets/UnitTests/CImage/cimage_main.cxx
index f5822e6..5f66863 100644
--- a/graphics/nxwidgets/UnitTests/CImage/cimage_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CImage/cimage_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CImage/cimage_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -106,11 +91,7 @@ static void updateMemoryUsage(FAR struct mallinfo *previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -119,11 +100,7 @@ static void updateMemoryUsage(FAR struct mallinfo *previous,
/* Set up for the next test */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmprevious = mmcurrent;
-#else
- memcpy(&g_mmprevious, &mmcurrent, sizeof(struct mallinfo));
-#endif
}
/////////////////////////////////////////////////////////////////////////////
@@ -132,13 +109,8 @@ static void updateMemoryUsage(FAR struct mallinfo *previous,
static void initMemoryUsage(void)
{
-#ifdef CONFIG_CAN_PASS_STRUCTS
- g_mmInitial = mallinfo();
+ g_mmInitial = mallinfo();
g_mmprevious = g_mmInitial;
-#else
- mallinfo(&g_mmInitial);
- memcpy(&g_mmprevious, &g_mmInitial, sizeof(struct mallinfo));
-#endif
}
/////////////////////////////////////////////////////////////////////////////
diff --git a/graphics/nxwidgets/UnitTests/CKeypad/ckeypad_main.cxx b/graphics/nxwidgets/UnitTests/CKeypad/ckeypad_main.cxx
index 6be1748..9e1036d 100644
--- a/graphics/nxwidgets/UnitTests/CKeypad/ckeypad_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CKeypad/ckeypad_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CKeypad/ckeypad_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -89,11 +74,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -119,11 +100,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmPrevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CLatchButtonArray/clatchbuttonarray_main.cxx b/graphics/nxwidgets/UnitTests/CLatchButtonArray/clatchbuttonarray_main.cxx
index f9728c9..0ba1be0 100644
--- a/graphics/nxwidgets/UnitTests/CLatchButtonArray/clatchbuttonarray_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CLatchButtonArray/clatchbuttonarray_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CLatchButtonArray/clatchbuttonarry_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -125,11 +110,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -155,11 +136,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmPrevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CListBox/clistbox_main.cxx b/graphics/nxwidgets/UnitTests/CListBox/clistbox_main.cxx
index 89292f7..445b416 100644
--- a/graphics/nxwidgets/UnitTests/CListBox/clistbox_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CListBox/clistbox_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CListBox/clistbox_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -125,11 +110,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -155,11 +136,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmPrevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CProgressBar/cprogressbar_main.cxx b/graphics/nxwidgets/UnitTests/CProgressBar/cprogressbar_main.cxx
index fb606b7..8f1b3ee 100644
--- a/graphics/nxwidgets/UnitTests/CProgressBar/cprogressbar_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CProgressBar/cprogressbar_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CProgressBar/cprogressbar_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -117,11 +98,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmprevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CRadioButton/cradiobutton_main.cxx b/graphics/nxwidgets/UnitTests/CRadioButton/cradiobutton_main.cxx
index 89add88..e37b12f 100644
--- a/graphics/nxwidgets/UnitTests/CRadioButton/cradiobutton_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CRadioButton/cradiobutton_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CRadioButton/cradiobutton_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -117,11 +98,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmprevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal_main.cxx b/graphics/nxwidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal_main.cxx
index a4ed7d2..6fdc078 100644
--- a/graphics/nxwidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -117,11 +98,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmprevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CScrollbarVertical/cscrollbarvertical_main.cxx b/graphics/nxwidgets/UnitTests/CScrollbarVertical/cscrollbarvertical_main.cxx
index 3baf675..a1449db 100644
--- a/graphics/nxwidgets/UnitTests/CScrollbarVertical/cscrollbarvertical_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CScrollbarVertical/cscrollbarvertical_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CScrollbarVertical/cscrollbarvertical_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -117,11 +98,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmprevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx b/graphics/nxwidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx
index a341246..cf855ec 100644
--- a/graphics/nxwidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CSliderHorizontal/csliderhorizontal_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -117,11 +98,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmprevious = mmcurrent.uordblks;
diff --git a/graphics/nxwidgets/UnitTests/CSliderVertical/cslidervertical_main.cxx b/graphics/nxwidgets/UnitTests/CSliderVertical/cslidervertical_main.cxx
index 119d7c7..7728b70 100644
--- a/graphics/nxwidgets/UnitTests/CSliderVertical/cslidervertical_main.cxx
+++ b/graphics/nxwidgets/UnitTests/CSliderVertical/cslidervertical_main.cxx
@@ -1,35 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// apps/graphics/nxwidgets/UnitTests/CSliderVertical/cslidervertical_main.cxx
//
-// Copyright (C) 2012 Gregory Nutt. All rights reserved.
-// Author: Gregory Nutt <gn...@nuttx.org>
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership. The
+// ASF licenses this file to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance with the
+// License. You may obtain a copy of the License at
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
+// http://www.apache.org/licenses/LICENSE-2.0
//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in
-// the documentation and/or other materials provided with the
-// distribution.
-// 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
-// me be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations
+// under the License.
//
//////////////////////////////////////////////////////////////////////////////
@@ -90,11 +75,7 @@ static void updateMemoryUsage(unsigned int previous,
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -117,11 +98,7 @@ static void initMemoryUsage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mmcurrent = mallinfo();
-#else
- mallinfo(&mmcurrent);
-#endif
g_mmInitial = mmcurrent.uordblks;
g_mmprevious = mmcurrent.uordblks;
diff --git a/netutils/thttpd/thttpd_alloc.c b/netutils/thttpd/thttpd_alloc.c
index 6c9369f..f33d3b0 100644
--- a/netutils/thttpd/thttpd_alloc.c
+++ b/netutils/thttpd/thttpd_alloc.c
@@ -1,35 +1,20 @@
/****************************************************************************
* netutils/thttpd/thttpd_alloc.c
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -87,11 +72,8 @@ void httpd_memstats(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
mm = mallinfo();
-#else
- mallinfo(&mm);
-#endif
+
ninfo("arena: %08x ordblks: %08x mxordblk: %08x uordblks: %08x fordblks: %08x\n",
mm.arena, mm.ordblks, mm.mxordblk, mm.uordblks, mm.fordblks);
}
diff --git a/system/composite/composite_main.c b/system/composite/composite_main.c
index 08864f2..41bd6ef 100644
--- a/system/composite/composite_main.c
+++ b/system/composite/composite_main.c
@@ -1,35 +1,20 @@
/****************************************************************************
* system/composite/composite_main.c
*
- * Copyright (C) 2012-2017 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -124,11 +109,7 @@ static void check_test_memory_usage(FAR const char *msg)
{
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_composite.mmcurrent = mallinfo();
-#else
- mallinfo(&g_composite.mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -137,11 +118,7 @@ static void check_test_memory_usage(FAR const char *msg)
/* Set up for the next test */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_composite.mmprevious = g_composite.mmcurrent;
-#else
- memcpy(&g_composite.mmprevious, &g_composite.mmcurrent, sizeof(struct mallinfo));
-#endif
}
#else
# define check_test_memory_usage(msg)
@@ -156,11 +133,7 @@ static void final_memory_usage(FAR const char *msg)
{
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_composite.mmcurrent = mallinfo();
-#else
- mallinfo(&g_composite.mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -443,13 +416,8 @@ int main(int argc, FAR char *argv[])
usbtrace_enable(TRACE_BITSET);
#ifdef CONFIG_SYSTEM_COMPOSITE_DEBUGMM
-# ifdef CONFIG_CAN_PASS_STRUCTS
g_composite.mmstart = mallinfo();
g_composite.mmprevious = g_composite.mmstart;
-# else
- mallinfo(&g_composite.mmstart);
- memcpy(&g_composite.mmprevious, &g_composite.mmstart, sizeof(struct mallinfo));
-# endif
#endif
/* Perform architecture-specific initialization */
diff --git a/system/usbmsc/usbmsc_main.c b/system/usbmsc/usbmsc_main.c
index c78ce5e..e3b27bc 100644
--- a/system/usbmsc/usbmsc_main.c
+++ b/system/usbmsc/usbmsc_main.c
@@ -1,35 +1,20 @@
/****************************************************************************
* system/usbmsc/usbmsc_main.c
*
- * Copyright (C) 2008-2012, 2016 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -149,11 +134,7 @@ static void check_test_memory_usage(FAR const char *msg)
{
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_usbmsc.mmcurrent = mallinfo();
-#else
- mallinfo(&g_usbmsc.mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -162,11 +143,7 @@ static void check_test_memory_usage(FAR const char *msg)
/* Set up for the next test */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_usbmsc.mmprevious = g_usbmsc.mmcurrent;
-#else
- memcpy(&g_usbmsc.mmprevious, &g_usbmsc.mmcurrent, sizeof(struct mallinfo));
-#endif
}
#else
# define check_test_memory_usage(msg)
@@ -181,11 +158,7 @@ static void final_memory_usage(FAR const char *msg)
{
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_usbmsc.mmcurrent = mallinfo();
-#else
- mallinfo(&g_usbmsc.mmcurrent);
-#endif
/* Show the change from the previous time */
@@ -455,13 +428,8 @@ int main(int argc, FAR char *argv[])
}
#ifdef CONFIG_SYSTEM_USBMSC_DEBUGMM
-# ifdef CONFIG_CAN_PASS_STRUCTS
g_usbmsc.mmstart = mallinfo();
g_usbmsc.mmprevious = g_usbmsc.mmstart;
-# else
- mallinfo(&g_usbmsc.mmstart);
- memcpy(&g_usbmsc.mmprevious, &g_usbmsc.mmstart, sizeof(struct mallinfo));
-# endif
#endif
/* Initialize USB trace output IDs */
diff --git a/system/zmodem/host/nuttx/compiler.h b/system/zmodem/host/nuttx/compiler.h
index f700b74..7c2250b 100644
--- a/system/zmodem/host/nuttx/compiler.h
+++ b/system/zmodem/host/nuttx/compiler.h
@@ -1,35 +1,20 @@
/****************************************************************************
* include/nuttx/compiler.h
*
- * Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -241,10 +226,6 @@
# define CONFIG_HAVE_DOUBLE 1
# define CONFIG_HAVE_LONG_DOUBLE 1
-/* Structures and unions can be assigned and passed as values */
-
-# define CONFIG_CAN_PASS_STRUCTS 1
-
/* SDCC-specific definitions ************************************************/
#elif defined(SDCC)
@@ -352,12 +333,6 @@
# undef CONFIG_HAVE_DOUBLE
# undef CONFIG_HAVE_LONG_DOUBLE
-/* Structures and unions cannot be passed as values or used
- * in assignments.
- */
-
-# undef CONFIG_CAN_PASS_STRUCTS
-
/* Zilog-specific definitions ***********************************************/
#elif defined(__ZILOG__)
@@ -469,10 +444,6 @@
# undef CONFIG_HAVE_DOUBLE
# undef CONFIG_HAVE_LONG_DOUBLE
-/* Structures and unions can be assigned and passed as values */
-
-# define CONFIG_CAN_PASS_STRUCTS 1
-
/* ICCARM-specific definitions ***********************************************/
#elif defined(__ICCARM__)
@@ -550,7 +521,6 @@
# define CONFIG_HAVE_FLOAT 1
# undef CONFIG_HAVE_DOUBLE
# undef CONFIG_HAVE_LONG_DOUBLE
-# undef CONFIG_CAN_PASS_STRUCTS
#endif
diff --git a/testing/fstest/fstest_main.c b/testing/fstest/fstest_main.c
index ae3be23..bb19669 100644
--- a/testing/fstest/fstest_main.c
+++ b/testing/fstest/fstest_main.c
@@ -1,35 +1,20 @@
/****************************************************************************
* testing/fstest/fstest_main.c
*
- * Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -150,11 +135,7 @@ static void fstest_loopmemusage(void)
{
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
/* Show the change from the previous loop */
@@ -163,11 +144,7 @@ static void fstest_loopmemusage(void)
/* Set up for the next test */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmprevious = g_mmafter;
-#else
- memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
-#endif
}
/****************************************************************************
@@ -176,11 +153,8 @@ static void fstest_loopmemusage(void)
static void fstest_endmemusage(void)
{
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
+
printf("\nFinal memory usage:\n");
fstest_showmemusage(&g_mmbefore, &g_mmafter);
}
@@ -963,13 +937,8 @@ int main(int argc, FAR char *argv[])
/* Set up memory monitoring */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmbefore = mallinfo();
g_mmprevious = g_mmbefore;
-#else
- mallinfo(&g_mmbefore);
- memcpy(&g_mmprevious, &g_mmbefore, sizeof(struct mallinfo));
-#endif
/* Loop a few times ... file the file system with some random, files,
* delete some files randomly, fill the file system with more random file,
diff --git a/testing/nxffs/nxffs_main.c b/testing/nxffs/nxffs_main.c
index a4f28d8..d9dd734 100644
--- a/testing/nxffs/nxffs_main.c
+++ b/testing/nxffs/nxffs_main.c
@@ -1,35 +1,20 @@
/****************************************************************************
* testing/nxffs/nxffs_main.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -181,11 +166,7 @@ static void nxffs_loopmemusage(void)
{
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
/* Show the change from the previous loop */
@@ -194,11 +175,7 @@ static void nxffs_loopmemusage(void)
/* Set up for the next test */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmprevious = g_mmafter;
-#else
- memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
-#endif
}
/****************************************************************************
@@ -207,13 +184,10 @@ static void nxffs_loopmemusage(void)
static void nxffs_endmemusage(void)
{
-#ifdef CONFIG_CAN_PASS_STRUCTS
- g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
- printf("\nFinal memory usage:\n");
- nxffs_showmemusage(&g_mmbefore, &g_mmafter);
+ g_mmafter = mallinfo();
+
+ printf("\nFinal memory usage:\n");
+ nxffs_showmemusage(&g_mmbefore, &g_mmafter);
}
/****************************************************************************
@@ -829,13 +803,8 @@ int main(int argc, FAR char *argv[])
/* Set up memory monitoring */
-#ifdef CONFIG_CAN_PASS_STRUCTS
- g_mmbefore = mallinfo();
+ g_mmbefore = mallinfo();
g_mmprevious = g_mmbefore;
-#else
- mallinfo(&g_mmbefore);
- memcpy(&g_mmprevious, &g_mmbefore, sizeof(struct mallinfo));
-#endif
/* Loop a few times ... file the file system with some random, files,
* delete some files randomly, fill the file system with more random file,
diff --git a/testing/ostest/ostest_main.c b/testing/ostest/ostest_main.c
index d35d4f2..a945404 100644
--- a/testing/ostest/ostest_main.c
+++ b/testing/ostest/ostest_main.c
@@ -1,36 +1,20 @@
/****************************************************************************
* apps/testing/ostest/ostest_main.c
*
- * Copyright (C) 2007-2009, 2011-2012, 2014-2015, 2018 Gregory Nutt. All
- * rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -139,11 +123,7 @@ static void check_test_memory_usage(void)
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
/* Show the change from the previous time */
@@ -152,11 +132,7 @@ static void check_test_memory_usage(void)
/* Set up for the next test */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmprevious = g_mmafter;
-#else
- memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
-#endif
/* If so enabled, show the use of priority inheritance resources */
@@ -224,13 +200,8 @@ static int user_main(int argc, char *argv[])
usleep(HALF_SECOND_USEC);
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmbefore = mallinfo();
g_mmprevious = g_mmbefore;
-#else
- mallinfo(&g_mmbefore);
- memcpy(&g_mmprevious, &g_mmbefore, sizeof(struct mallinfo));
-#endif
printf("\nuser_main: Begin argument test\n");
printf("user_main: Started with argc=%d\n", argc);
@@ -553,11 +524,7 @@ static int user_main(int argc, char *argv[])
usleep(HALF_SECOND_USEC);
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
printf("\nFinal memory usage:\n");
show_memory_usage(&g_mmbefore, &g_mmafter);
diff --git a/testing/ostest/sigev_thread.c b/testing/ostest/sigev_thread.c
index 9348be5..60d39f8 100644
--- a/testing/ostest/sigev_thread.c
+++ b/testing/ostest/sigev_thread.c
@@ -1,35 +1,20 @@
/****************************************************************************
* testing/ostest/sigev_thread.c
*
- * Copyright (C) 2015 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -68,17 +53,9 @@ static int g_value_received;
* Private Functions
****************************************************************************/
-#ifdef CONFIG_CAN_PASS_STRUCTS
static void sigev_thread_callback(union sigval value)
-#else
-static void sigev_thread_callback(FAR void *sival_ptr)
-#endif
{
-#ifdef CONFIG_CAN_PASS_STRUCTS
int sival_int = value.sival_int;
-#else
- int sival_int = (int)((intptr_t)sival_ptr);
-#endif
printf("sigev_thread_callback: Received value %d\n" , sival_int);
diff --git a/testing/ostest/sighand.c b/testing/ostest/sighand.c
index 6078562..ddf935d 100644
--- a/testing/ostest/sighand.c
+++ b/testing/ostest/sighand.c
@@ -1,35 +1,20 @@
/****************************************************************************
* apps/testing/ostest/sighand.c
*
- * Copyright (C) 2007, 2008, 2011, 2016 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -300,11 +285,7 @@ void sighand_test(void)
waiterpid, WAKEUP_SIGNAL, SIGVALUE_INT);
sigvalue.sival_int = SIGVALUE_INT;
-#ifdef CONFIG_CAN_PASS_STRUCTS
status = sigqueue(waiterpid, WAKEUP_SIGNAL, sigvalue);
-#else
- status = sigqueue(waiterpid, WAKEUP_SIGNAL, sigvalue.sival_ptr);
-#endif
if (status != OK)
{
printf("sighand_test: ERROR sigqueue failed\n" );
diff --git a/testing/smart/smart_main.c b/testing/smart/smart_main.c
index 0fd22c0..a27d057 100644
--- a/testing/smart/smart_main.c
+++ b/testing/smart/smart_main.c
@@ -1,35 +1,20 @@
/****************************************************************************
* testing/smart/smart_main.c
*
- * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
*
****************************************************************************/
@@ -184,11 +169,7 @@ static void smart_loopmemusage(void)
{
/* Get the current memory usage */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
/* Show the change from the previous loop */
@@ -197,11 +178,7 @@ static void smart_loopmemusage(void)
/* Set up for the next test */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmprevious = g_mmafter;
-#else
- memcpy(&g_mmprevious, &g_mmafter, sizeof(struct mallinfo));
-#endif
}
/****************************************************************************
@@ -210,11 +187,8 @@ static void smart_loopmemusage(void)
static void smart_endmemusage(void)
{
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmafter = mallinfo();
-#else
- mallinfo(&g_mmafter);
-#endif
+
printf("\nFinal memory usage:\n");
smart_showmemusage(&g_mmbefore, &g_mmafter);
}
@@ -846,13 +820,8 @@ int main(int argc, FAR char *argv[])
/* Set up memory monitoring */
-#ifdef CONFIG_CAN_PASS_STRUCTS
g_mmbefore = mallinfo();
g_mmprevious = g_mmbefore;
-#else
- mallinfo(&g_mmbefore);
- memcpy(&g_mmprevious, &g_mmbefore, sizeof(struct mallinfo));
-#endif
/* Loop a few times ... file the file system with some random, files,
* delete some files randomly, fill the file system with more random file,