annotate lib/alphasort.c @ 17255:d81be792518a

update from texinfo
author Karl Berry <karl@freefriends.org>
date Tue, 01 Jan 2013 15:51:49 -0800
parents e542fd46ad6f
children 344018b6e5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16366
diff changeset
1 /* Copyright (C) 1992, 1997-1998, 2009-2013 Free Software Foundation, Inc.
11039
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 This file is part of the GNU C Library.
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify it
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 under the terms of the GNU General Public License as published by the
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 Free Software Foundation; either version 2, or (at your option) any
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 later version.
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
16366
bb182ee4a09d maint: replace FSF snail-mail addresses with URLs
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
15 along with this program; if not, see <http://www.gnu.org/licenses/>. */
11039
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 #include <config.h>
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 #include <dirent.h>
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 #include <string.h>
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 int
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 alphasort (const struct dirent **a, const struct dirent **b)
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 {
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 return strcoll ((*a)->d_name, (*b)->d_name);
8842f30244d1 New module 'alphasort'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 }