~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/string.in.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- buffer-read-only: t -*- vi: set ro: */
2
 
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3
1
/* A GNU-like <string.h>.
4
2
 
5
 
   Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc.
 
3
   Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc.
6
4
 
7
5
   This program is free software; you can redistribute it and/or modify
8
6
   it under the terms of the GNU General Public License as published by
15
13
   GNU General Public License for more details.
16
14
 
17
15
   You should have received a copy of the GNU General Public License
18
 
   along with this program; if not, write to the Free Software Foundation,
19
 
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
16
   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
20
17
 
21
18
#ifndef _@GUARD_PREFIX@_STRING_H
22
19
 
727
724
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
728
725
#   define mbslen rpl_mbslen
729
726
#  endif
730
 
_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
 
727
_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string)
 
728
                                  _GL_ATTRIBUTE_PURE
 
729
                                  _GL_ARG_NONNULL ((1)));
731
730
_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string));
732
731
# else
733
 
_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
 
732
_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string)
 
733
                                  _GL_ATTRIBUTE_PURE
 
734
                                  _GL_ARG_NONNULL ((1)));
734
735
_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
735
736
# endif
736
737
_GL_CXXALIASWARN (mbslen);
740
741
/* Return the number of multibyte characters in the character string starting
741
742
   at STRING and ending at STRING + LEN.  */
742
743
_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len)
 
744
     _GL_ATTRIBUTE_PURE
743
745
     _GL_ARG_NONNULL ((1));
744
746
#endif
745
747
 
753
755
#   define mbschr rpl_mbschr /* avoid collision with HP-UX function */
754
756
#  endif
755
757
_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c)
 
758
                                  _GL_ATTRIBUTE_PURE
756
759
                                  _GL_ARG_NONNULL ((1)));
757
760
_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c));
758
761
# else
759
762
_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c)
 
763
                                  _GL_ATTRIBUTE_PURE
760
764
                                  _GL_ARG_NONNULL ((1)));
761
765
_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c));
762
766
# endif
773
777
#   define mbsrchr rpl_mbsrchr /* avoid collision with system function */
774
778
#  endif
775
779
_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
 
780
                                   _GL_ATTRIBUTE_PURE
776
781
                                   _GL_ARG_NONNULL ((1)));
777
782
_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c));
778
783
# else
779
784
_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c)
 
785
                                   _GL_ATTRIBUTE_PURE
780
786
                                   _GL_ARG_NONNULL ((1)));
781
787
_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c));
782
788
# endif
789
795
   Unlike strstr(), this function works correctly in multibyte locales with
790
796
   encodings different from UTF-8.  */
791
797
_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle)
 
798
     _GL_ATTRIBUTE_PURE
792
799
     _GL_ARG_NONNULL ((1, 2));
793
800
#endif
794
801
 
800
807
   different lengths!
801
808
   Unlike strcasecmp(), this function works correctly in multibyte locales.  */
802
809
_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2)
 
810
     _GL_ATTRIBUTE_PURE
803
811
     _GL_ARG_NONNULL ((1, 2));
804
812
#endif
805
813
 
814
822
   Unlike strncasecmp(), this function works correctly in multibyte locales.
815
823
   But beware that N is not a byte count but a character count!  */
816
824
_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
 
825
     _GL_ATTRIBUTE_PURE
817
826
     _GL_ARG_NONNULL ((1, 2));
818
827
#endif
819
828
 
827
836
   Unlike strncasecmp(), this function works correctly in multibyte
828
837
   locales.  */
829
838
_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
 
839
     _GL_ATTRIBUTE_PURE
830
840
     _GL_ARG_NONNULL ((1, 2));
831
841
#endif
832
842
 
837
847
   strlen (haystack) < strlen (needle) !
838
848
   Unlike strcasestr(), this function works correctly in multibyte locales.  */
839
849
_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle)
 
850
     _GL_ATTRIBUTE_PURE
840
851
     _GL_ARG_NONNULL ((1, 2));
841
852
#endif
842
853
 
847
858
   if none exists.
848
859
   Unlike strcspn(), this function works correctly in multibyte locales.  */
849
860
_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept)
 
861
     _GL_ATTRIBUTE_PURE
850
862
     _GL_ARG_NONNULL ((1, 2));
851
863
#endif
852
864
 
860
872
#   define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
861
873
#  endif
862
874
_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept)
 
875
                                   _GL_ATTRIBUTE_PURE
863
876
                                   _GL_ARG_NONNULL ((1, 2)));
864
877
_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept));
865
878
# else
866
879
_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept)
 
880
                                   _GL_ATTRIBUTE_PURE
867
881
                                   _GL_ARG_NONNULL ((1, 2)));
868
882
_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept));
869
883
# endif
877
891
   if none exists.
878
892
   Unlike strspn(), this function works correctly in multibyte locales.  */
879
893
_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject)
 
894
     _GL_ATTRIBUTE_PURE
880
895
     _GL_ARG_NONNULL ((1, 2));
881
896
#endif
882
897
 
996
1011
#if @GNULIB_STRVERSCMP@
997
1012
# if !@HAVE_STRVERSCMP@
998
1013
_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
 
1014
                                   _GL_ATTRIBUTE_PURE
999
1015
                                   _GL_ARG_NONNULL ((1, 2)));
1000
1016
# endif
1001
1017
_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));