From b76f19577dbab4dae827f303cb53dc9b71f4c019 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 30 Mar 2011 21:15:57 +0000 Subject: [PATCH] Move more files into subdirectories under lib/ git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3441 42af7a65-404d-4744-a932-0658087f49c3 --- lib/Makefile | 28 +++++++++---------- lib/queue/Make.defs | 40 ++++++++++++++++++++++++++++ lib/{ => queue}/dq_addafter.c | 4 +-- lib/{ => queue}/dq_addbefore.c | 4 +-- lib/{ => queue}/dq_addfirst.c | 4 +-- lib/{ => queue}/dq_addlast.c | 4 +-- lib/{ => queue}/dq_rem.c | 4 +-- lib/{ => queue}/dq_remfirst.c | 4 +-- lib/{ => queue}/dq_remlast.c | 4 +-- lib/{ => queue}/sq_addafter.c | 4 +-- lib/{ => queue}/sq_addfirst.c | 4 +-- lib/{ => queue}/sq_addlast.c | 4 +-- lib/{ => queue}/sq_rem.c | 4 +-- lib/{ => queue}/sq_remafter.c | 4 +-- lib/{ => queue}/sq_remfirst.c | 4 +-- lib/{ => queue}/sq_remlast.c | 4 +-- lib/stdlib/Make.defs | 36 +++++++++++++++++++++++++ lib/{ => stdlib}/lib_abs.c | 4 +-- lib/{ => stdlib}/lib_imaxabs.c | 4 +-- lib/{ => stdlib}/lib_labs.c | 4 +-- lib/{ => stdlib}/lib_llabs.c | 4 +-- lib/{ => stdlib}/lib_qsort.c | 4 +-- lib/{ => stdlib}/lib_rand.c | 4 +-- lib/time/Make.defs | 37 +++++++++++++++++++++++++ lib/{ => time}/lib_calendar2utc.c | 4 +-- lib/{ => time}/lib_daysbeforemonth.c | 4 +-- lib/{ => time}/lib_gmtime.c | 4 +-- lib/{ => time}/lib_gmtimer.c | 4 +-- lib/{ => time}/lib_isleapyear.c | 4 +-- lib/{ => time}/lib_mktime.c | 4 +-- lib/{ => time}/lib_strftime.c | 4 +-- 31 files changed, 179 insertions(+), 70 deletions(-) create mode 100644 lib/queue/Make.defs rename lib/{ => queue}/dq_addafter.c (96%) rename lib/{ => queue}/dq_addbefore.c (96%) rename lib/{ => queue}/dq_addfirst.c (96%) rename lib/{ => queue}/dq_addlast.c (96%) rename lib/{ => queue}/dq_rem.c (96%) rename lib/{ => queue}/dq_remfirst.c (96%) rename lib/{ => queue}/dq_remlast.c (96%) rename lib/{ => queue}/sq_addafter.c (96%) rename lib/{ => queue}/sq_addfirst.c (96%) rename lib/{ => queue}/sq_addlast.c (96%) rename lib/{ => queue}/sq_rem.c (97%) rename lib/{ => queue}/sq_remafter.c (96%) rename lib/{ => queue}/sq_remfirst.c (96%) rename lib/{ => queue}/sq_remlast.c (96%) create mode 100644 lib/stdlib/Make.defs rename lib/{ => stdlib}/lib_abs.c (96%) rename lib/{ => stdlib}/lib_imaxabs.c (96%) rename lib/{ => stdlib}/lib_labs.c (96%) rename lib/{ => stdlib}/lib_llabs.c (96%) rename lib/{ => stdlib}/lib_qsort.c (98%) rename lib/{ => stdlib}/lib_rand.c (98%) create mode 100644 lib/time/Make.defs rename lib/{ => time}/lib_calendar2utc.c (98%) rename lib/{ => time}/lib_daysbeforemonth.c (97%) rename lib/{ => time}/lib_gmtime.c (97%) rename lib/{ => time}/lib_gmtimer.c (99%) rename lib/{ => time}/lib_isleapyear.c (97%) rename lib/{ => time}/lib_mktime.c (98%) rename lib/{ => time}/lib_strftime.c (99%) diff --git a/lib/Makefile b/lib/Makefile index b72415b6e1..94dfe888c1 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -35,7 +35,10 @@ -include $(TOPDIR)/Make.defs include stdio/Make.defs +include stdlib/Make.defs include string/Make.defs +include time/Make.defs +include queue/Make.defs ASRCS = AOBJS = $(ASRCS:.S=$(OBJEXT)) @@ -47,8 +50,6 @@ endif CTYPE_SRCS = -STDLIB_SRCS = lib_abs.c lib_imaxabs.c lib_labs.c lib_llabs.c lib_rand.c lib_qsort.c - MATH_SRCS = lib_rint.c lib_fixedmath.c lib_b16sin.c lib_b16cos.c UNISTD_SRCS = lib_getopt.c lib_getoptargp.c lib_getoptindp.c lib_getoptoptp.c @@ -58,9 +59,6 @@ UNISTD_SRCS += lib_chdir.c lib_getcwd.c endif endif -TIME_SRCS = lib_mktime.c lib_gmtime.c lib_gmtimer.c lib_strftime.c \ - lib_calendar2utc.c lib_daysbeforemonth.c lib_isleapyear.c - NET_SRCS = lib_htons.c lib_htonl.c lib_inetntoa.c lib_etherntoa.c LIBGEN_SRCS = lib_basename.c lib_dirname.c @@ -69,17 +67,11 @@ REGEX_SRCS = lib_match.c CRC_SRCS = lib_crc32.c -SQ_SRCS = sq_addlast.c sq_addfirst.c sq_addafter.c \ - sq_rem.c sq_remlast.c sq_remfirst.c sq_remafter.c - -DQ_SRCS = dq_addlast.c dq_addfirst.c dq_addafter.c dq_addbefore.c \ - dq_rem.c dq_remlast.c dq_remfirst.c - DBG_SRCS = lib_dbg.c lib_dumpbuffer.c -CSRCS = $(MISC_SRCS) $(STRING_SRCS) $(CTYPE_SRCS) $(STDIO_SRCS) $(STDLIB_SRCS) \ - $(MATH_SRCS) $(UNISTD_SRCS) $(TIME_SRCS) $(NET_SRCS) $(LIBGEN_SRCS) \ - $(REGEX_SRCS) $(CRC_SRCS) $(SQ_SRCS) $(DQ_SRCS) $(DBG_SRCS) +CSRCS = $(MISC_SRCS) $(CTYPE_SRCS) $(STDIO_SRCS) $(STDLIB_SRCS) $(STRING_SRCS) \ + $(TIME_SRCS) $(MATH_SRCS) $(UNISTD_SRCS) $(NET_SRCS) $(LIBGEN_SRCS) \ + $(REGEX_SRCS) $(CRC_SRCS) $(QUEUE_SRCS) $(DBG_SRCS) COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) @@ -87,8 +79,11 @@ OBJS = $(AOBJS) $(COBJS) ROOTDEPPATH = --dep-path . STDIODEPPATH = --dep-path stdio +STDLIBDEPPATH = --dep-path stdlib STRINGDEPPATH = --dep-path string -VPATH = stdio:string +TIMEDEPPATH = --dep-path time +QUEUEDEPPATH = --dep-path queue +VPATH = stdio:stdlib:string:time:queue BIN = liblib$(LIBEXT) @@ -106,7 +101,8 @@ $(BIN): $(OBJS) done ; ) .depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) $(STRINGDEPPATH) $(STDIODEPPATH) \ + @$(MKDEP) $(ROOTDEPPATH) $(STDIODEPPATH) $(STDLIBDEPPATH) \ + $(STRINGDEPPATH) $(TIMEDEPPATH) $(QUEUEDEPPATH) \ $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep @touch $@ diff --git a/lib/queue/Make.defs b/lib/queue/Make.defs new file mode 100644 index 0000000000..94e8125e7c --- /dev/null +++ b/lib/queue/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# lib/queue/Make.defs +# +# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 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. +# +############################################################################ + +QUEUE_SRCS = sq_addlast.c sq_addfirst.c sq_addafter.c \ + sq_rem.c sq_remlast.c sq_remfirst.c sq_remafter.c + +QUEUE_SRCS += dq_addlast.c dq_addfirst.c dq_addafter.c dq_addbefore.c \ + dq_rem.c dq_remlast.c dq_remfirst.c diff --git a/lib/dq_addafter.c b/lib/queue/dq_addafter.c similarity index 96% rename from lib/dq_addafter.c rename to lib/queue/dq_addafter.c index dd2f672c8e..e9f0d9a3ec 100644 --- a/lib/dq_addafter.c +++ b/lib/queue/dq_addafter.c @@ -1,7 +1,7 @@ /************************************************************ - * dq_addafter.c + * lib/queue/dq_addafter.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/dq_addbefore.c b/lib/queue/dq_addbefore.c similarity index 96% rename from lib/dq_addbefore.c rename to lib/queue/dq_addbefore.c index 6c23ee9c88..c49dff78b7 100644 --- a/lib/dq_addbefore.c +++ b/lib/queue/dq_addbefore.c @@ -1,7 +1,7 @@ /**************************************************************************** - * lib/dq_addbefore.c + * lib/queue/dq_addbefore.c * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/dq_addfirst.c b/lib/queue/dq_addfirst.c similarity index 96% rename from lib/dq_addfirst.c rename to lib/queue/dq_addfirst.c index 6d5330122d..27da2c491c 100644 --- a/lib/dq_addfirst.c +++ b/lib/queue/dq_addfirst.c @@ -1,7 +1,7 @@ /************************************************************ - * dq_addfirst.c + * lib/queue/dq_addfirst.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/dq_addlast.c b/lib/queue/dq_addlast.c similarity index 96% rename from lib/dq_addlast.c rename to lib/queue/dq_addlast.c index 761099e7e3..c7a0609612 100644 --- a/lib/dq_addlast.c +++ b/lib/queue/dq_addlast.c @@ -1,7 +1,7 @@ /************************************************************ - * dq_addlast.c + * lib/queue/dq_addlast.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/dq_rem.c b/lib/queue/dq_rem.c similarity index 96% rename from lib/dq_rem.c rename to lib/queue/dq_rem.c index e81d072330..adf99efed2 100644 --- a/lib/dq_rem.c +++ b/lib/queue/dq_rem.c @@ -1,7 +1,7 @@ /************************************************************ - * dq_rem.c + * lib/queue/dq_rem.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/dq_remfirst.c b/lib/queue/dq_remfirst.c similarity index 96% rename from lib/dq_remfirst.c rename to lib/queue/dq_remfirst.c index b31f619387..c42f3f2cc5 100644 --- a/lib/dq_remfirst.c +++ b/lib/queue/dq_remfirst.c @@ -1,7 +1,7 @@ /************************************************************ - * dq_remfirst.c + * lib/queue/dq_remfirst.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/dq_remlast.c b/lib/queue/dq_remlast.c similarity index 96% rename from lib/dq_remlast.c rename to lib/queue/dq_remlast.c index 8688c0960e..6280a0e516 100644 --- a/lib/dq_remlast.c +++ b/lib/queue/dq_remlast.c @@ -1,7 +1,7 @@ /**************************************************************************** - * dq_remlast.c + * lib/queue/dq_remlast.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/sq_addafter.c b/lib/queue/sq_addafter.c similarity index 96% rename from lib/sq_addafter.c rename to lib/queue/sq_addafter.c index f2037c2760..05e1157fd4 100644 --- a/lib/sq_addafter.c +++ b/lib/queue/sq_addafter.c @@ -1,7 +1,7 @@ /************************************************************ - * sq_addafter.c + * lib/queue/sq_addafter.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/sq_addfirst.c b/lib/queue/sq_addfirst.c similarity index 96% rename from lib/sq_addfirst.c rename to lib/queue/sq_addfirst.c index 037af825e6..8f55053d41 100644 --- a/lib/sq_addfirst.c +++ b/lib/queue/sq_addfirst.c @@ -1,7 +1,7 @@ /************************************************************ - * sq_addfirst.c + * lib/queue/sq_addfirst.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/sq_addlast.c b/lib/queue/sq_addlast.c similarity index 96% rename from lib/sq_addlast.c rename to lib/queue/sq_addlast.c index f02c3d70be..15054a7033 100644 --- a/lib/sq_addlast.c +++ b/lib/queue/sq_addlast.c @@ -1,7 +1,7 @@ /************************************************************ - * sq_addlast.c + * lib/queue/sq_addlast.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/sq_rem.c b/lib/queue/sq_rem.c similarity index 97% rename from lib/sq_rem.c rename to lib/queue/sq_rem.c index 31eef04085..972e8e1c32 100644 --- a/lib/sq_rem.c +++ b/lib/queue/sq_rem.c @@ -1,7 +1,7 @@ /************************************************************ - * sq_rem.c + * lib/queue/sq_rem.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/sq_remafter.c b/lib/queue/sq_remafter.c similarity index 96% rename from lib/sq_remafter.c rename to lib/queue/sq_remafter.c index c22613c5b9..781a2b6ad2 100644 --- a/lib/sq_remafter.c +++ b/lib/queue/sq_remafter.c @@ -1,7 +1,7 @@ /************************************************************ - * sq_remafter.c + * lib/queue/sq_remafter.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/sq_remfirst.c b/lib/queue/sq_remfirst.c similarity index 96% rename from lib/sq_remfirst.c rename to lib/queue/sq_remfirst.c index c77bd37a31..5a273ad6af 100644 --- a/lib/sq_remfirst.c +++ b/lib/queue/sq_remfirst.c @@ -1,7 +1,7 @@ /************************************************************ - * sq_remfirst.c + * lib/queue/sq_remfirst.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/sq_remlast.c b/lib/queue/sq_remlast.c similarity index 96% rename from lib/sq_remlast.c rename to lib/queue/sq_remlast.c index 87a8fc8bd1..a66c6bcbb7 100644 --- a/lib/sq_remlast.c +++ b/lib/queue/sq_remlast.c @@ -1,7 +1,7 @@ /************************************************************ - * sq_remlast.c + * lib/queue/sq_remlast.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/stdlib/Make.defs b/lib/stdlib/Make.defs new file mode 100644 index 0000000000..42bf13bdab --- /dev/null +++ b/lib/stdlib/Make.defs @@ -0,0 +1,36 @@ +############################################################################ +# lib/stdlib/Make.defs +# +# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 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. +# +############################################################################ + +STDLIB_SRCS = lib_abs.c lib_imaxabs.c lib_labs.c lib_llabs.c lib_rand.c lib_qsort.c diff --git a/lib/lib_abs.c b/lib/stdlib/lib_abs.c similarity index 96% rename from lib/lib_abs.c rename to lib/stdlib/lib_abs.c index 39339b86cd..5c805d8579 100644 --- a/lib/lib_abs.c +++ b/lib/stdlib/lib_abs.c @@ -1,7 +1,7 @@ /************************************************************************ - * lib/lib_abs.c + * lib/stdlib/lib_abs.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/lib_imaxabs.c b/lib/stdlib/lib_imaxabs.c similarity index 96% rename from lib/lib_imaxabs.c rename to lib/stdlib/lib_imaxabs.c index 7b474cd0fa..d16791b268 100644 --- a/lib/lib_imaxabs.c +++ b/lib/stdlib/lib_imaxabs.c @@ -1,7 +1,7 @@ /************************************************************************ - * lib/lib_abs.c + * lib/stdlib//lib_abs.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/lib_labs.c b/lib/stdlib/lib_labs.c similarity index 96% rename from lib/lib_labs.c rename to lib/stdlib/lib_labs.c index db569c8531..c9d9c19351 100644 --- a/lib/lib_labs.c +++ b/lib/stdlib/lib_labs.c @@ -1,7 +1,7 @@ /************************************************************************ - * lib/lib_labs.c + * lib/stdlib/lib_labs.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/lib_llabs.c b/lib/stdlib/lib_llabs.c similarity index 96% rename from lib/lib_llabs.c rename to lib/stdlib/lib_llabs.c index 7dab31dbf2..24e26e9e11 100644 --- a/lib/lib_llabs.c +++ b/lib/stdlib/lib_llabs.c @@ -1,7 +1,7 @@ /************************************************************************ - * lib/lib_llabs.c + * lib/stdlib/lib_llabs.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/lib_qsort.c b/lib/stdlib/lib_qsort.c similarity index 98% rename from lib/lib_qsort.c rename to lib/stdlib/lib_qsort.c index 42d895a66a..13bca7499a 100644 --- a/lib/lib_qsort.c +++ b/lib/stdlib/lib_qsort.c @@ -1,7 +1,7 @@ /**************************************************************************** - * lib/lib_qsort.c + * lib/stdlib/lib_qsort.c * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Leveraged from: diff --git a/lib/lib_rand.c b/lib/stdlib/lib_rand.c similarity index 98% rename from lib/lib_rand.c rename to lib/stdlib/lib_rand.c index 6624305ab8..3f3b33d5fc 100644 --- a/lib/lib_rand.c +++ b/lib/stdlib/lib_rand.c @@ -1,7 +1,7 @@ /************************************************************ - * lib_rand.c + * lib/stdlib/lib_rand.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007,l 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/time/Make.defs b/lib/time/Make.defs new file mode 100644 index 0000000000..652019f5ba --- /dev/null +++ b/lib/time/Make.defs @@ -0,0 +1,37 @@ +############################################################################ +# lib/time/Make.defs +# +# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 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. +# +############################################################################ + +TIME_SRCS = lib_mktime.c lib_gmtime.c lib_gmtimer.c lib_strftime.c \ + lib_calendar2utc.c lib_daysbeforemonth.c lib_isleapyear.c diff --git a/lib/lib_calendar2utc.c b/lib/time/lib_calendar2utc.c similarity index 98% rename from lib/lib_calendar2utc.c rename to lib/time/lib_calendar2utc.c index dab69b0d97..642e23568a 100644 --- a/lib/lib_calendar2utc.c +++ b/lib/time/lib_calendar2utc.c @@ -1,7 +1,7 @@ /**************************************************************************** - * lib/lib_calendar2utc.c + * lib/time/lib_calendar2utc.c * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/lib_daysbeforemonth.c b/lib/time/lib_daysbeforemonth.c similarity index 97% rename from lib/lib_daysbeforemonth.c rename to lib/time/lib_daysbeforemonth.c index 0dbe4aeee6..4312adaba2 100644 --- a/lib/lib_daysbeforemonth.c +++ b/lib/time/lib_daysbeforemonth.c @@ -1,7 +1,7 @@ /**************************************************************************** - * lib/lib_daysbeforemonth.c + * lib/time/lib_daysbeforemonth.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/lib_gmtime.c b/lib/time/lib_gmtime.c similarity index 97% rename from lib/lib_gmtime.c rename to lib/time/lib_gmtime.c index 692159a92e..58dc11c663 100644 --- a/lib/lib_gmtime.c +++ b/lib/time/lib_gmtime.c @@ -1,7 +1,7 @@ /**************************************************************************** - * lib/lib_gmtime.c + * lib/time/lib_gmtime.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/lib_gmtimer.c b/lib/time/lib_gmtimer.c similarity index 99% rename from lib/lib_gmtimer.c rename to lib/time/lib_gmtimer.c index 823aa8bb99..f027e678d5 100644 --- a/lib/lib_gmtimer.c +++ b/lib/time/lib_gmtimer.c @@ -1,7 +1,7 @@ /**************************************************************************** - * lib/lib_gmtimer.c + * lib/time/lib_gmtimer.c * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/lib_isleapyear.c b/lib/time/lib_isleapyear.c similarity index 97% rename from lib/lib_isleapyear.c rename to lib/time/lib_isleapyear.c index 15d379c86b..24d7d6153d 100644 --- a/lib/lib_isleapyear.c +++ b/lib/time/lib_isleapyear.c @@ -1,7 +1,7 @@ /**************************************************************************** - * lib/lib_isleapyear.c + * lib/time/lib_isleapyear.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/lib_mktime.c b/lib/time/lib_mktime.c similarity index 98% rename from lib/lib_mktime.c rename to lib/time/lib_mktime.c index a9fece6318..f0168aa6bc 100644 --- a/lib/lib_mktime.c +++ b/lib/time/lib_mktime.c @@ -1,7 +1,7 @@ /**************************************************************************** - * lib/lib_mktime.c + * lib/time/lib_mktime.c * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/lib/lib_strftime.c b/lib/time/lib_strftime.c similarity index 99% rename from lib/lib_strftime.c rename to lib/time/lib_strftime.c index 2e150aae71..c1ac345ee0 100644 --- a/lib/lib_strftime.c +++ b/lib/time/lib_strftime.c @@ -1,7 +1,7 @@ /**************************************************************************** - * lib/lib_strftime.c + * lib/time/lib_strftime.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without