CVS: msp430-libc/include ctype.h, 1.6, 1.7 debug.h, 1.1, 1.2 errno.h, 1.2, 1.3 iomacros.h, 1.29, 1.30 msp430x16x.h, 1.6, 1.7 msp430x20x1.h, 1.3, 1.4 msp430x20x2.h, 1.3, 1.4 msp430x33x.h, 1.7, 1.8 msp430x44x.h, 1.10, 1.11 msp430xG461x.h, 1.4, 1.5 msp430xW42x.h, 1.5, 1.6 setjmp.h, 1.3, 1.4 signal.h, 1.14, 1.15 stdint.h, 1.4, 1.5 stdlib.h, 1.11, 1.12 string.h, 1.3, 1.4
Steve Underwood <[email protected]> Wed, 15 Nov 2006 06:35:01 -0800
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mspgcc/msp430-libc/include
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21474/msp430-libc/include
Modified Files:
ctype.h debug.h errno.h iomacros.h msp430x16x.h msp430x20x1.h
msp430x20x2.h msp430x33x.h msp430x44x.h msp430xG461x.h
msp430xW42x.h setjmp.h signal.h stdint.h stdlib.h string.h
Log Message:
A bunch of cleanups to include files, and the introduction of 32 entry
interrupt vector tables for the MSP430X parts
Index: ctype.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/ctype.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -d -r1.6 -r1.7
--- ctype.h 12 Sep 2005 12:14:09 -0000 1.6
+++ ctype.h 15 Nov 2006 14:34:56 -0000 1.7
@@ -1,6 +1,30 @@
-#ifndef __CTYPE_H_
-#define __CTYPE_H_
+/*
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id$
+ */
+#if !defined(__CTYPE_H_)
+#define __CTYPE_H_
extern inline int isalpha(int c) { return ((c>='A'&&c<='Z')||(c>='a'&&c<='z')); }
@@ -32,13 +56,10 @@
return (isprint (c) && !islower(c) && !isupper(c) && c != ' ' && !isdigit(c));
}
-
extern inline int toupper(int c) { return ((c) - 0x20 * (((c) >= 'a') && ((c) <= 'z')));}
extern inline int tolower(int c) { return ((c) + 0x20 * (((c) >= 'A') && ((c) <= 'Z'))) ;}
extern inline int toascii(int c) { return (c&0x7f);}
-
-
#endif
Index: debug.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/debug.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- debug.h 27 Aug 2002 08:17:39 -0000 1.1
+++ debug.h 15 Nov 2006 14:34:56 -0000 1.2
@@ -26,11 +26,9 @@
* $Id$
*/
-#ifndef __DEBUG_H_
+#if !defined(__DEBUG_H_)
#define __DEBUG_H_
#define DEBUG_TRAP() __asm__ __volatile__(".word 1")
#endif
-
-
Index: errno.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/errno.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- errno.h 16 Jan 2002 14:04:09 -0000 1.2
+++ errno.h 15 Nov 2006 14:34:57 -0000 1.3
@@ -26,7 +26,7 @@
* $Id$
*/
-#ifndef __ERRNO_H_
+#if !defined(__ERRNO_H_)
#define __ERRNO_H_
#ifdef __cplusplus
@@ -37,10 +37,8 @@
#define ERANGE 34
-
#ifdef __cplusplus
}
#endif
#endif
-
Index: iomacros.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/iomacros.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -w -d -r1.29 -r1.30
--- iomacros.h 22 Mar 2006 19:53:18 -0000 1.29
+++ iomacros.h 15 Nov 2006 14:34:57 -0000 1.30
@@ -26,10 +26,10 @@
* $Id$
*/
-#ifndef _IOMACROS_H_
-#define _IOMACROS_H_
+#if !defined(__IOMACROS_H_)
+#define __IOMACROS_H_
-#ifndef _GNU_ASSEMBLER_
+#if !defined(_GNU_ASSEMBLER_)
#include <sys/inttypes.h>
@@ -60,9 +60,6 @@
#define NOINIT __attribute__ ((section(".noinit")))
#define NoInit __attribute__ ((section(".noinit")))
-
-#if __GNUC_MINOR__ >= 2
-
/* Reentrant */
#define reentrant __attribute__ ((reentrant))
#define _REENTRANT __attribute__ ((reentrant))
@@ -72,8 +69,6 @@
#define SavePrologue __attribute__ ((saveprologue))
#define SAVEPROLOGUE __attribute__ ((saveprologue))
-#endif
-
/* Reserve RAM defenition */
#define RESERVE_RAM(x) __attribute__ ((reserve(x)))
@@ -99,7 +94,7 @@
/*
* Can do assembler assignement with r1
- * but wrote next two for consistentcy
+ * but wrote next two for consistency
*/
#define WRITE_SP(x) \
@@ -137,7 +132,7 @@
#define __EXIT_LPM(x) do {int *p = __get_frame_address(); *p = x;} while(0)
#else
-/*only use the following two macros within interrupt functions*/
+/* Only use the following two macros within interrupt functions */
#define _BIS_SR_IRQ(x)\
__asm__ __volatile__ (\
"bis %0, .L__FrameOffset_" __FUNCTION__ "(r1)"\
@@ -185,7 +180,8 @@
#define __EXIT_LPM(x) \
-do{ \
+do \
+{ \
int *p = GET_FRAME_ADDR_F(__FUNCTION__);\
*p = x; \
}while(0)
@@ -206,15 +202,11 @@
volatile unsigned int x asm(#x_)
#endif //__cplusplus
-#define sfrb(x,x_) \
-sfrb_(x,x_)
-
-#define sfrw(x,x_) \
-sfrw_(x,x_)
-
+#define sfrb(x,x_) sfrb_(x,x_)
-/***** USEFUL MACROS DEFINITIONS *********/
+#define sfrw(x,x_) sfrw_(x,x_)
+/***** USEFUL MACRO DEFINITIONS *********/
/* No operation */
#define nop() __asm__ __volatile__("nop"::)
@@ -246,7 +238,6 @@
(uint8_t)*((uint8_t*)__x); \
})
-
#define AND_LOW(v, i) \
({ \
int __t; \
@@ -260,7 +251,6 @@
__t; \
})
-
#define AND_HI(v, i) \
({ \
int __t; \
@@ -274,7 +264,6 @@
__t; \
})
-
#define AND_LOW_V(v, i) \
({ \
int __t; \
@@ -288,7 +277,6 @@
__t; \
})
-
#define AND_HI_V(v, i) \
({ \
int __t; \
@@ -302,20 +290,19 @@
__t; \
})
-
#define MARK_VOLATILE __asm__ __volatile__("; volatile")
#endif /* not _GNU_ASSEMBLER_ */
/*
* Defines for assembler.
- * hope there is a better way to do this.
+ * Hope there is a better way to do this.
*/
-#ifdef _GNU_ASSEMBLER_
+#if defined(_GNU_ASSEMBLER_)
#define sfrb(x,x_) x=x_
#define sfrw(x,x_) x=x_
#endif
-#endif /* _IOMACROS_H_ */
+#endif /* __IOMACROS_H_ */
Index: msp430x16x.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430x16x.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -d -r1.6 -r1.7
--- msp430x16x.h 18 Oct 2005 13:29:21 -0000 1.6
+++ msp430x16x.h 15 Nov 2006 14:34:57 -0000 1.7
@@ -1,4 +1,4 @@
-#ifndef __msp430x16x
+#if !defined(__msp430x16x)
#define __msp430x16x
/* msp430x16x.h
Index: msp430x20x1.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430x20x1.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- msp430x20x1.h 5 Apr 2006 12:06:34 -0000 1.3
+++ msp430x20x1.h 15 Nov 2006 14:34:57 -0000 1.4
@@ -1,4 +1,4 @@
-#ifndef __msp430x20x1
+#if !defined(__msp430x20x1)
#define __msp430x20x1
/* msp430x20x1.h
Index: msp430x20x2.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430x20x2.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- msp430x20x2.h 5 Apr 2006 12:06:34 -0000 1.3
+++ msp430x20x2.h 15 Nov 2006 14:34:57 -0000 1.4
@@ -1,4 +1,4 @@
-#ifndef __msp430x20x2
+#if !defined(__msp430x20x2)
#define __msp430x20x2
/* msp430x20x2.h
Index: msp430x33x.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430x33x.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- msp430x33x.h 17 Aug 2005 14:28:46 -0000 1.7
+++ msp430x33x.h 15 Nov 2006 14:34:57 -0000 1.8
@@ -1,4 +1,4 @@
-#ifndef __msp430x33x
+#if !defined(__msp430x33x)
#define __msp430x33x
/* msp430x33x.h
Index: msp430x44x.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430x44x.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -d -r1.10 -r1.11
--- msp430x44x.h 7 Jun 2006 13:01:30 -0000 1.10
+++ msp430x44x.h 15 Nov 2006 14:34:57 -0000 1.11
@@ -1,4 +1,4 @@
-#ifndef __msp430x44x
+#if !defined(__msp430x44x)
#define __msp430x44x
/* msp430x44x.h
Index: msp430xG461x.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430xG461x.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- msp430xG461x.h 15 Nov 2006 00:18:55 -0000 1.4
+++ msp430xG461x.h 15 Nov 2006 14:34:57 -0000 1.5
@@ -1,4 +1,4 @@
-#ifndef __msp430xG461x
+#if !defined(__msp430xG461x)
#define __msp430xG461x
/* msp430xG461x.h
Index: msp430xW42x.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430xW42x.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- msp430xW42x.h 7 Jun 2006 13:01:30 -0000 1.5
+++ msp430xW42x.h 15 Nov 2006 14:34:57 -0000 1.6
@@ -1,4 +1,4 @@
-#ifndef __msp430xW42x
+#if !defined(__msp430xW42x)
#define __msp430xW42x
/* msp430xW42x.h
Index: setjmp.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/setjmp.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- setjmp.h 28 Jan 2004 22:25:29 -0000 1.3
+++ setjmp.h 15 Nov 2006 14:34:57 -0000 1.4
@@ -26,29 +26,46 @@
* $Id$
*/
-#ifndef __SETJMP_H_
+#if !defined(__SETJMP_H_)
#define __SETJMP_H_
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
+#if defined(__MSP430X__) && defined(__MSP430X_LARGE__)
/* r3 does not have to be saved */
typedef struct
{
- unsigned int __j_pc; /* return address */
- unsigned int __j_sp; /* r1 stack pointer */
- unsigned int __j_sr; /* r2 status register */
- unsigned int __j_r4;
- unsigned int __j_r5;
- unsigned int __j_r6;
- unsigned int __j_r7;
- unsigned int __j_r8;
- unsigned int __j_r9;
- unsigned int __j_r10;
- unsigned int __j_r11;
+ uint32_t __j_pc; /* return address */
+ uint32_t __j_sp; /* r1 stack pointer */
+ uint32_t __j_sr; /* r2 status register */
+ uint32_t __j_r4;
+ uint32_t __j_r5;
+ uint32_t __j_r6;
+ uint32_t __j_r7;
+ uint32_t __j_r8;
+ uint32_t __j_r9;
+ uint32_t __j_r10;
+ uint32_t __j_r11;
} jmp_buf[1]; /* size = 20 bytes */
-
+#else
+/* r3 does not have to be saved */
+typedef struct
+{
+ uint16_t __j_pc; /* return address */
+ uint16_t __j_sp; /* r1 stack pointer */
+ uint16_t __j_sr; /* r2 status register */
+ uint16_t __j_r4;
+ uint16_t __j_r5;
+ uint16_t __j_r6;
+ uint16_t __j_r7;
+ uint16_t __j_r8;
+ uint16_t __j_r9;
+ uint16_t __j_r10;
+ uint16_t __j_r11;
+} jmp_buf[1]; /* size = 20 bytes */
+#endif
#ifndef __ATTR_NORETURN__
#define __ATTR_NORETURN__ __attribute__((__noreturn__))
@@ -62,4 +79,3 @@
#endif //__cplusplus
#endif
-
Index: signal.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/signal.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -w -d -r1.14 -r1.15
--- signal.h 22 Feb 2005 16:29:46 -0000 1.14
+++ signal.h 15 Nov 2006 14:34:57 -0000 1.15
@@ -27,18 +27,25 @@
* $Id$
*/
-#ifndef _SIGNAL_H_
-#define _SIGNAL_H_
+#if !defined(__SIGNAL_H_)
+#define __SIGNAL_H_
#include <iomacros.h>
-#ifndef _GNU_ASSEMBLER_
+#if defined(__MSP430X__)
+#define INTERRUPT_VECTOR_SLOTS 32
+#define RESET_VECTOR 62
+#else
+#define INTERRUPT_VECTOR_SLOTS 16
+#define RESET_VECTOR 30
+#endif
+
+#if !defined(_GNU_ASSEMBLER_)
#define Interrupt(x) void __attribute__((interrupt (x)))
#define INTERRUPT(x) void __attribute__((interrupt (x)))
#define interrupt(x) void __attribute__((interrupt (x)))
-
#define wakeup __attribute__((wakeup))
#define Wakeup __attribute__((wakeup))
#define WAKEUP __attribute__((wakeup))
@@ -47,7 +54,6 @@
#define EnableNested __attribute__((signal))
#define ENABLENESTED __attribute__((signal))
-
/* Enable/Disable interrupts */
#define eint() __asm__ __volatile__("eint"::)
#define dint() __asm__ __volatile__("dint"::)
@@ -58,14 +64,11 @@
#define _DINT() dint()
#define __disable_interrupt() dint()
-
#define INTERRUPT_VECTORS \
-void *InterruptVectors[16] __attribute__ ((section(".vectors")))
-
-/* Declare interrupt service routine with no interrup vector assigned. */
-#define NOVECTOR 0xff
+ void *InterruptVectors[INTERRUPT_VECTOR_SLOTS] __attribute__ ((section(".vectors")))
-#define RESET_VECTOR 30
+/* Declare interrupt service routine with no interrupt vector assigned. */
+#define NOVECTOR 0xFF
#define _RESET() void __attribute__ ((naked)) _reset_vector__(void)
@@ -73,15 +76,46 @@
#else /*_GNU_ASSEMBLER_ / assember definitions*/
-#define RESET_VECTOR 30
-
-/*double macro trick to achieve that the x gets expanded*/
+/* Double macro trick to achieve that the x gets expanded*/
#define interrupt(x) xinterrupt(x)
#define xinterrupt(x) vector_##x: .global vector_##x
-/*direct generation of the labels is impossible, so just replace the dummy ones
+/* Direct generation of the labels is impossible, so just replace the dummy ones
with the real ones through those defs:*/
-
+#if INTERRUPT_VECTOR_SLOTS == 32
+#define vector_0 vector_ffc0
+#define vector_2 vector_ffc2
+#define vector_4 vector_ffc4
+#define vector_6 vector_ffc6
+#define vector_8 vector_ffc8
+#define vector_10 vector_ffca
+#define vector_12 vector_ffcc
+#define vector_14 vector_ffce
+#define vector_16 vector_ffd0
+#define vector_18 vector_ffd2
+#define vector_20 vector_ffd4
+#define vector_22 vector_ffd6
+#define vector_24 vector_ffd8
+#define vector_26 vector_ffda
+#define vector_28 vector_ffdc
+#define vector_30 vector_ffde
+#define vector_32 vector_ffe0
+#define vector_34 vector_ffe2
+#define vector_36 vector_ffe4
+#define vector_38 vector_ffe6
+#define vector_40 vector_ffe8
+#define vector_42 vector_ffea
+#define vector_44 vector_ffec
+#define vector_46 vector_ffee
+#define vector_48 vector_fff0
+#define vector_50 vector_fff2
+#define vector_52 vector_fff4
+#define vector_54 vector_fff6
+#define vector_56 vector_fff8
+#define vector_58 vector_fffa
+#define vector_60 vector_fffc
+#define vector_62 vector_fffe
+#else
#define vector_0 vector_ffe0
#define vector_2 vector_ffe2
#define vector_4 vector_ffe4
@@ -98,9 +132,8 @@
#define vector_26 vector_fffa
#define vector_28 vector_fffc
#define vector_30 vector_fffe
+#endif
#endif /*_GNU_ASSEMBLER_*/
#endif
-
-
Index: stdint.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/stdint.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- stdint.h 28 Jan 2005 01:03:32 -0000 1.4
+++ stdint.h 15 Nov 2006 14:34:57 -0000 1.5
@@ -26,8 +26,8 @@
* $Id$
*/
-#ifndef _STDINT_H_
-#define _STDINT_H_
+#if !defined(__STDINT_H_)
+#define __STDINT_H_
/*
* ISO C99: 7.18 Integer types <stdint.h>
@@ -77,10 +77,15 @@
/* Types for `void *' pointers. */
-#ifndef __intptr_t_defined
+#if !defined(__intptr_t_defined)
#define __intptr_t_defined
-typedef int intptr_t;
-typedef unsigned int uintptr_t;
+#if defined(__MSP430X__) && defined(__MSP430X_LARGE__)
+typedef int32_t intptr_t;
+typedef uint32_t uintptr_t;
+#else
+typedef int16_t intptr_t;
+typedef uint16_t uintptr_t;
+#endif
#endif
@@ -153,10 +158,15 @@
/* Values to test for integral types holding `void *' pointer. */
+#if defined(__MSP430X__) && defined(__MSP430X_LARGE__)
+#define INTPTR_MIN (-2147483647-1)
+#define INTPTR_MAX (2147483647)
+#define UINTPTR_MAX (4294967295UL)
+#else
#define INTPTR_MIN (-32768)
#define INTPTR_MAX (32767)
#define UINTPTR_MAX (65535U)
-
+#endif
/* Minimum for largest signed integral type. */
#define INTMAX_MIN (-__INT64_C(9223372036854775807)-1)
@@ -166,12 +176,16 @@
/* Maximum for largest unsigned integral type. */
#define UINTMAX_MAX (__UINT64_C(18446744073709551615))
-
/* Limits of other integer types. */
/* Limits of `ptrdiff_t' type. */
+#if defined(__MSP430X__) && defined(__MSP430X_LARGE__)
+#define PTRDIFF_MIN (-2147483647-1)
+#define PTRDIFF_MAX (2147483647)
+#else
#define PTRDIFF_MIN (-32768)
#define PTRDIFF_MAX (32767)
+#endif
/* Limits of `sig_atomic_t'. */
#define SIG_ATOMIC_MIN (-32768)
@@ -193,7 +207,6 @@
#endif /* C++ && limit macros */
-
/* The ISO C99 standard specifies that in C++ implementations these
should only be defined if explicitly requested. */
#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
Index: stdlib.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/stdlib.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -d -r1.11 -r1.12
--- stdlib.h 23 Aug 2004 20:20:53 -0000 1.11
+++ stdlib.h 15 Nov 2006 14:34:57 -0000 1.12
@@ -26,67 +26,60 @@
* $Id$
*/
-#ifndef _STDLIB_H_
-#define _STDLIB_H_
+#if !defined(__STDLIB_H_)
+#define __STDLIB_H_
#include <stddef.h>
#include <sys/types.h>
-#ifndef __ATTR_CONST__
+#if !defined(__ATTR_CONST__)
#define __ATTR_CONST__ __attribute__((__const__))
#endif
-#ifndef __ATTR_MALLOC__
+#if !defined(__ATTR_MALLOC__)
#define __ATTR_MALLOC__ __attribute__((__malloc__))
#endif
-#ifndef __ATTR_NORETURN__
+#if !defined(__ATTR_NORETURN__)
#define __ATTR_NORETURN__ __attribute__((__noreturn__))
#endif
-#ifndef __ATTR_PURE__
+#if !defined(__ATTR_PURE__)
#define __ATTR_PURE__ __attribute__((__pure__))
#endif
-#ifndef exit
+#if !defined(exit)
extern void exit(int) __asm__("__stop_progExec__") __ATTR_CONST__;
#endif
-
-typedef struct {
+typedef struct
+{
int quot;
int rem;
} div_t;
extern div_t div(int num, int denom);
-
-typedef struct {
+typedef struct
+{
long quot;
long rem;
} ldiv_t;
extern ldiv_t ldiv(long num, long denom);
-
-
-
extern __inline__ int abs(int __x) __ATTR_CONST__;
-extern __inline__ int
-abs(int __x)
+extern __inline__ int abs(int __x)
{
return (__x < 0) ? -__x : __x;
}
extern __inline__ long labs(long __x) __ATTR_CONST__;
-extern __inline__ long
-labs(long __x)
+extern __inline__ long labs(long __x)
{
return (__x < 0) ? -__x : __x;
}
-
-
long strtol(const char *, char **, int);
unsigned long strtoul(const char *, char **, int);
@@ -101,8 +94,6 @@
void free (void *p);
void * bsearch(const void *, const void *, size_t, size_t, register int (*compar)(const void *, const void *));
-
-
#ifndef RAND_MAX
#define RAND_MAX 0x7fffffffL
#endif
@@ -112,4 +103,3 @@
int rand_r(unsigned *__seed);
#endif
-
Index: string.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/string.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- string.h 8 Apr 2004 20:21:26 -0000 1.3
+++ string.h 15 Nov 2006 14:34:57 -0000 1.4
@@ -26,14 +26,12 @@
* $Id$
*/
-
-#ifndef _STRING_H_
-#define _STRING_H_
+#if !defined(__STRING_H_)
+#define __STRING_H_
#include <stddef.h>
#include <sys/types.h>
-
extern void *memccpy(void *, const void *, int, size_t);
extern void *memchr(const void *, int, size_t);
extern int memcmp(const void *, const void *, size_t);
@@ -68,6 +66,4 @@
extern char * strtok_r(char *s, const char *delim, char **last);
extern char * strtok(char *s, const char *delim);
-
#endif /* _STRING_H_ */
-
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV