|
0
|
1 //=========================================================================== |
|
|
2 // |
|
|
3 // strcoll.cxx |
|
|
4 // |
|
|
5 // Real function definition for ANSI string strcoll() function - not |
|
|
6 // that there is an inline alternative |
|
|
7 // |
|
|
8 //=========================================================================== |
|
|
9 //####COPYRIGHTBEGIN#### |
|
|
10 // |
|
|
11 // ------------------------------------------- |
|
|
12 // The contents of this file are subject to the Cygnus eCos Public License |
|
|
13 // Version 1.0 (the "License"); you may not use this file except in |
|
|
14 // compliance with the License. You may obtain a copy of the License at |
|
|
15 // http://sourceware.cygnus.com/ecos |
|
|
16 // |
|
|
17 // Software distributed under the License is distributed on an "AS IS" |
|
|
18 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
|
|
19 // License for the specific language governing rights and limitations under |
|
|
20 // the License. |
|
|
21 // |
|
|
22 // The Original Code is eCos - Embedded Cygnus Operating System, released |
|
|
23 // September 30, 1998. |
|
|
24 // |
|
|
25 // The Initial Developer of the Original Code is Cygnus. Portions created |
|
2
|
26 // by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions. All Rights Reserved. |
|
0
|
27 // ------------------------------------------- |
|
|
28 // |
|
|
29 //####COPYRIGHTEND#### |
|
|
30 //=========================================================================== |
|
|
31 //#####DESCRIPTIONBEGIN#### |
|
|
32 // |
|
|
33 // Author(s): jlarmour |
|
2
|
34 // Contributors: jlarmour |
|
0
|
35 // Date: 1998-02-13 |
|
|
36 // Purpose: |
|
|
37 // Description: |
|
|
38 // Usage: |
|
|
39 // |
|
|
40 //####DESCRIPTIONEND#### |
|
|
41 // |
|
|
42 //=========================================================================== |
|
|
43 |
|
|
44 // CONFIGURATION |
|
|
45 |
|
|
46 #include <pkgconf/libc.h> // Configuration header |
|
|
47 |
|
|
48 // Include the C library? |
|
|
49 #ifdef CYGPKG_LIBC |
|
|
50 |
|
|
51 // INCLUDES |
|
|
52 |
|
|
53 // We don't want the inline versions of string functions defined here |
|
|
54 |
|
|
55 #ifdef CYGIMP_LIBC_STRING_INLINES |
|
|
56 #undef CYGIMP_LIBC_STRING_INLINES |
|
|
57 #endif |
|
|
58 |
|
|
59 #include <cyg/infra/cyg_type.h> // Common type definitions |
|
|
60 #include <cyg/infra/cyg_trac.h> // Tracing support |
|
|
61 #include <cyg/infra/cyg_ass.h> // Assertion support |
|
|
62 #include <string.h> // Header for this file |
|
|
63 #include "clibincl/stringsupp.hxx" // Useful string function support and |
|
|
64 // prototypes |
|
|
65 |
|
|
66 // EXPORTED SYMBOLS |
|
|
67 |
|
|
68 externC int |
|
|
69 strcoll( const char *s1, const char *s2 ) CYGPRI_LIBC_WEAK_ALIAS("_strcoll"); |
|
|
70 |
|
|
71 |
|
|
72 int |
|
|
73 _strcoll( const char *s1, const char *s2 ) |
|
|
74 { |
|
|
75 int retval; |
|
|
76 |
|
|
77 CYG_REPORT_FUNCNAMETYPE( "_strcoll", "returning %d" ); |
|
|
78 CYG_REPORT_FUNCARG2( "s1=%08x, s2=%d", s1, s2 ); |
|
|
79 |
|
|
80 CYG_CHECK_DATA_PTR( s1, "s1 is not a valid pointer!" ); |
|
|
81 CYG_CHECK_DATA_PTR( s2, "s2 is not a valid pointer!" ); |
|
|
82 |
|
|
83 retval = _strcmp(s1, s2); |
|
|
84 |
|
|
85 return retval; |
|
|
86 } // _strcoll() |
|
|
87 |
|
|
88 |
|
|
89 #endif // ifdef CYGPKG_LIBC |
|
|
90 |
|
|
91 // EOF strcoll.cxx |