]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Comments.
authorBruno Haible <bruno@clisp.org>
Tue, 14 Jan 2003 13:19:16 +0000 (13:19 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:08:55 +0000 (12:08 +0200)
lib/fstrcmp.h
lib/minmax.h
lib/stpcpy.h
lib/stpncpy.h
lib/strcase.h
lib/vasprintf.h
libasprintf/vasnprintf.h

index fa3f1bbe564376ba0d904a989c8d98665d0ed902..9f55c33e4cfffc2c38e1da438beb334b6355067a 100644 (file)
@@ -1,5 +1,5 @@
-/* GNU gettext - internationalization aids
-   Copyright (C) 1995, 2000, 2002 Free Software Foundation, Inc.
+/* Fuzzy string comparison.
+   Copyright (C) 1995, 2000, 2002-2003 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <pmiller@agso.gov.au>
 
@@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #ifndef _FSTRCMP_H
 #define _FSTRCMP_H
 
-extern double fstrcmp (const char *__s1, const char *__s2);
+/* Fuzzy compare of S1 and S2.  Return a measure for the similarity of S1
+   and S1.  The higher the result, the more similar the strings are.  */
+extern double fstrcmp (const char *s1, const char *s2);
 
 #endif
index b26174dc22cd300454da5c68ac6d537f7e9dd468..376fc13480c1a865280fb18a863c316c10e1584f 100644 (file)
@@ -1,5 +1,5 @@
 /* MIN, MAX macros.
-   Copyright (C) 1995, 1998, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1998, 2001, 2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -22,6 +22,7 @@
    since otherwise we get redefinitions on some systems.  */
 #include <limits.h>
 
+/* MAX(a,b) returns the maximum of A and B.  */
 #ifndef MAX
 # if __STDC__ && defined __GNUC__ && __GNUC__ >= 2
 #  define MAX(a,b) (__extension__                                          \
@@ -34,6 +35,7 @@
 # endif
 #endif
 
+/* MIN(a,b) returns the minimum of A and B.  */
 #ifndef MIN
 # if __STDC__ && defined __GNUC__ && __GNUC__ >= 2
 #  define MIN(a,b) (__extension__                                          \
index 6583189ffb539b0a0606c3084c41b29849c4c671..b579c5c9dee3408b11ff66e46dd89c6b2c9cc85d 100644 (file)
@@ -1,5 +1,5 @@
 /* String copying.
-   Copyright (C) 1995, 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001, 2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,7 +25,8 @@
 
 #else
 
-extern char *stpcpy (char *__dst, const char *__src);
+/* Copy SRC to DST, returning the address of the terminating '\0' in DST.  */
+extern char *stpcpy (char *dst, const char *src);
 
 #endif
 
index af239dc55d37d598e79152a3dfe1057f6358dbf0..ad3586173e74769f225ea284a5fbd91f7c5c80bf 100644 (file)
@@ -1,5 +1,5 @@
 /* String copying.
-   Copyright (C) 1995, 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #ifndef __GNU_LIBRARY__
 
+/* Copy no more than N characters of SRC to DST, returning the address of
+   the last character written into DST.  */
 /* When not using the GNU libc we use the stpncpy implementation we
    provide here.  */
-extern char *gnu_stpncpy (char *__dst, const char *__src, size_t __n);
+extern char *gnu_stpncpy (char *dst, const char *src, size_t n);
 #define stpncpy(Dst, Src, N) gnu_stpncpy (Dst, Src, N)
 
 #endif
index f590e8d21dcde9e2e85ab9c933270cd6c1925896..f17e64832ff1bd22565ab3c135253dee2752358c 100644 (file)
@@ -1,5 +1,5 @@
 /* Case-insensitive string comparison functions.
-   Copyright (C) 1995-1996, 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 2001, 2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <stddef.h>
 
-extern int strcasecmp (const char *__s1, const char *__s2);
-extern int strncasecmp (const char *__s1, const char *__s2, size_t __n);
+/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
+   greater than zero if S1 is lexicographically less than, equal to or greater
+   than S2.
+   Note: This function does not work correctly in multibyte locales.  */
+extern int strcasecmp (const char *s1, const char *s2);
+
+/* Compare no more than N characters of strings S1 and S2, ignoring case,
+   returning less than, equal to or greater than zero if S1 is
+   lexicographically less than, equal to or greater than S2.
+   Note: This function can not work correctly in multibyte locales.  */
+extern int strncasecmp (const char *s1, const char *s2, size_t n);
 
 #endif /* _STRCASE_H */
index cd4a8aa822b069c87f8085ecf52cec3d8eec0107..b71798d082df25e034099d85b61b99dad7db7df9 100644 (file)
@@ -1,5 +1,5 @@
 /* vsprintf with automatic memory allocation.
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 extern "C" {
 #endif
 
+/* Write formatted output to a string dynamically allocated with malloc().
+   If the memory allocation succeeds, store the address of the string in
+   *RESULT and return the number of resulting bytes, excluding the trailing
+   NUL.  Upon memory allocation error, or some other error, return -1.  */
 extern int asprintf (char **result, const char *format, ...)
        __attribute__ ((__format__ (__printf__, 2, 3)));
 extern int vasprintf (char **result, const char *format, va_list args)
index 6822ae9ac44e877e903ef775e1c0dfbabd3721c2..65f1bc13dd2cbcd2ea693c7b26100e455ac8284f 100644 (file)
@@ -1,5 +1,5 @@
 /* vsprintf with automatic memory allocation.
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU Library General Public License as published
 extern "C" {
 #endif
 
+/* Write formatted output to a string dynamically allocated with malloc().
+   You can pass a preallocated buffer for the result in RESULTBUF and its
+   size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
+   If successful, return the address of the string (this may be = RESULTBUF
+   if no dynamic memory allocation was necessary) and set *LENGTHP to the
+   number of resulting bytes, excluding the trailing NUL.  Upon error, set
+   errno and return NULL.  */
 extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
        __attribute__ ((__format__ (__printf__, 3, 4)));
 extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)