diff options
Diffstat (limited to 'string')
| -rw-r--r-- | string/Makefile | 3 | ||||
| -rw-r--r-- | string/argz-append.c | 26 | ||||
| -rw-r--r-- | string/argz-count.c | 26 | ||||
| -rw-r--r-- | string/argz-create.c | 28 | ||||
| -rw-r--r-- | string/argz-delete.c | 26 | ||||
| -rw-r--r-- | string/argz-extract.c | 28 | ||||
| -rw-r--r-- | string/argz-insert.c | 26 | ||||
| -rw-r--r-- | string/argz-next.c | 25 | ||||
| -rw-r--r-- | string/argz-stringify.c | 30 | ||||
| -rw-r--r-- | string/basename.c | 30 | ||||
| -rw-r--r-- | string/envz.c | 26 | ||||
| -rw-r--r-- | string/memfrob.c | 38 | ||||
| -rw-r--r-- | string/strcoll.c | 69 | ||||
| -rw-r--r-- | string/strcoll_l.c | 21 | ||||
| -rw-r--r-- | string/strdup.c | 57 | ||||
| -rw-r--r-- | string/string.h | 14 | ||||
| -rw-r--r-- | string/strndup.c | 59 | ||||
| -rw-r--r-- | string/strnlen.c | 28 | ||||
| -rw-r--r-- | string/strsignal.c | 34 | ||||
| -rw-r--r-- | string/strxfrm.c | 29 | ||||
| -rw-r--r-- | string/strxfrm_l.c | 21 | ||||
| -rw-r--r-- | string/test-ffs.c | 35 | ||||
| -rw-r--r-- | string/testcopy.c | 35 |
23 files changed, 426 insertions, 288 deletions
diff --git a/string/Makefile b/string/Makefile index 97f2eedd79..8f35f207f6 100644 --- a/string/Makefile +++ b/string/Makefile @@ -37,7 +37,8 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \ $(addprefix argz-,append count create ctsep next \ delete extract insert stringify \ addsep) \ - envz basename + envz basename \ + strcoll_l strxfrm_l tests := tester testcopy test-ffs tst-strlen stratcliff distribute := memcopy.h pagecopy.h diff --git a/string/argz-append.c b/string/argz-append.c index e61e3acf58..6dd47e7709 100644 --- a/string/argz-append.c +++ b/string/argz-append.c @@ -1,22 +1,22 @@ /* Routines for dealing with '\0' separated arg vectors. - - Copyright (C) 1995, 1996 Free Software Foundation, Inc. - + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu> - 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 the Free Software Foundation; either version 2, or (at - your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <argz.h> #include <string.h> diff --git a/string/argz-count.c b/string/argz-count.c index a10119b722..1bc197a733 100644 --- a/string/argz-count.c +++ b/string/argz-count.c @@ -1,22 +1,22 @@ /* Routines for dealing with '\0' separated arg vectors. - - Copyright (C) 1995, 1996 Free Software Foundation, Inc. - + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu> - 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 the Free Software Foundation; either version 2, or (at - your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <argz.h> #include <string.h> diff --git a/string/argz-create.c b/string/argz-create.c index 2be16b03e7..1f70cfa2c2 100644 --- a/string/argz-create.c +++ b/string/argz-create.c @@ -1,22 +1,22 @@ /* Routines for dealing with '\0' separated arg vectors. - - Copyright (C) 1995, 1996 Free Software Foundation, Inc. - + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu> - 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 the Free Software Foundation; either version 2, or (at - your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <argz.h> #include <stdlib.h> @@ -40,7 +40,7 @@ __argz_create (char *const argv[], char **argz, size_t *len) *argz = NULL; else { - *argz = malloc(tlen); + *argz = malloc (tlen); if (*argz == NULL) return ENOMEM; diff --git a/string/argz-delete.c b/string/argz-delete.c index 584270a42f..a556656a9c 100644 --- a/string/argz-delete.c +++ b/string/argz-delete.c @@ -1,22 +1,22 @@ /* Routines for dealing with '\0' separated arg vectors. - - Copyright (C) 1995, 1996 Free Software Foundation, Inc. - + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu> - 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 the Free Software Foundation; either version 2, or (at - your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <argz.h> #include <string.h> diff --git a/string/argz-extract.c b/string/argz-extract.c index 99f6cdf97a..ed3a26604d 100644 --- a/string/argz-extract.c +++ b/string/argz-extract.c @@ -1,22 +1,22 @@ /* Routines for dealing with '\0' separated arg vectors. - - Copyright (C) 1995, 1996 Free Software Foundation, Inc. - + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu> - 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 the Free Software Foundation; either version 2, or (at - your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <argz.h> @@ -27,7 +27,7 @@ __argz_extract (char *argz, size_t len, char **argv) { while (len > 0) { - size_t part_len = strlen(argz); + size_t part_len = strlen (argz); *argv++ = argz; argz += part_len + 1; len -= part_len + 1; diff --git a/string/argz-insert.c b/string/argz-insert.c index 3905728f2a..d790bb5fda 100644 --- a/string/argz-insert.c +++ b/string/argz-insert.c @@ -1,22 +1,22 @@ /* Routines for dealing with '\0' separated arg vectors. - - Copyright (C) 1995, 1996 Free Software Foundation, Inc. - + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu> - 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 the Free Software Foundation; either version 2, or (at - your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <argz.h> #include <string.h> diff --git a/string/argz-next.c b/string/argz-next.c index 416b982306..46d393444e 100644 --- a/string/argz-next.c +++ b/string/argz-next.c @@ -1,21 +1,22 @@ /* Iterate through the elements of an argz block. - Copyright (C) 1995, 1996 Free Software Foundation, Inc. - + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu> - 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 the Free Software Foundation; either version 2, or (at - your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <argz.h> #include <string.h> diff --git a/string/argz-stringify.c b/string/argz-stringify.c index c7a109c0fb..cd57b98d42 100644 --- a/string/argz-stringify.c +++ b/string/argz-stringify.c @@ -1,22 +1,22 @@ /* Routines for dealing with '\0' separated arg vectors. - - Copyright (C) 1995, 1996 Free Software Foundation, Inc. - + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu> - 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 the Free Software Foundation; either version 2, or (at - your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <argz.h> #include <string.h> @@ -24,11 +24,11 @@ /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's except the last into the character SEP. */ void -__argz_stringify(char *argz, size_t len, int sep) +__argz_stringify (char *argz, size_t len, int sep) { while (len > 0) { - size_t part_len = strlen(argz); + size_t part_len = strlen (argz); argz += part_len; len -= part_len + 1; if (len > 0) diff --git a/string/basename.c b/string/basename.c index 57a59542ca..4f06843aeb 100644 --- a/string/basename.c +++ b/string/basename.c @@ -1,21 +1,21 @@ -/* basename -- return the name-within-directory of a file name. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Return the name-within-directory of a file name. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <string.h> diff --git a/string/envz.c b/string/envz.c index f00fe24d31..535f42e864 100644 --- a/string/envz.c +++ b/string/envz.c @@ -1,22 +1,22 @@ /* Routines for dealing with '\0' separated environment vectors - - Copyright (C) 1995, 1996 Free Software Foundation, Inc. - + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Written by Miles Bader <miles@gnu.ai.mit.edu> - 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 the Free Software Foundation; either version 2, or (at - your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <malloc.h> #include <string.h> |
