diff --git a/examples/configdata/configdata_main.c b/examples/configdata/configdata_main.c index 295f61d6f..4b93094b2 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 4f936948e..b22a640b9 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 + * 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 f5a3adba9..a5aa25a30 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 + * 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 b1a2223dc..d46ae9621 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 + * 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 5c5f15dde..1047e7887 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 96fc81e2f..374cbf5a7 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 +// 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 7e1067820..8cd366393 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 +// 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 1361995ed..2a74fb370 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 +// 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 ac794525e..13badfbaa 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 +// 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 f5822e683..5f6686333 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 +// 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 6be1748df..9e1036d11 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 +// 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 f9728c91c..0ba1be0d1 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 +// 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 89292f7ca..445b41679 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 +// 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 fb606b7aa..8f1b3ee6d 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 +// 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 89add880d..e37b12fac 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 +// 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 a4ed7d214..6fdc078cb 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 +// 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 3baf67529..a1449db42 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 +// 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 a3412466d..cf855ecae 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 +// 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 119d7c7d7..7728b70af 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 +// 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 6c9369fe2..f33d3b06b 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 + * 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 08864f239..41bd6efdd 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 + * 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 c78ce5e83..e3b27bc0c 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 + * 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 f700b7486..7c2250bc5 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 + * 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 ae3be23c9..bb19669b9 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 + * 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 a4f28d85f..d9dd7344c 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 + * 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 d35d4f2f1..a94540423 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 + * 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 9348be559..60d39f8d0 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 + * 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 6078562b4..ddf935ded 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 + * 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 0fd22c019..a27d05710 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 + * 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,