diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-05-15 03:36:41 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-05-15 03:36:41 +0000 |
commit | 30224e2bd3bfde9e02802fb9f3e45c78237f34f0 (patch) | |
tree | 7b945b21c7aafa9166ebacda398eba3a814ff169 /debug/pcprofiledump.c | |
parent | b2bffca2e3b59dd882039e3b0ab835d127bdaf7a (diff) | |
download | glibc-30224e2bd3bfde9e02802fb9f3e45c78237f34f0.tar glibc-30224e2bd3bfde9e02802fb9f3e45c78237f34f0.tar.gz glibc-30224e2bd3bfde9e02802fb9f3e45c78237f34f0.tar.bz2 glibc-30224e2bd3bfde9e02802fb9f3e45c78237f34f0.zip |
Update.
2002-05-06 Jungshik Shin <jshin@mailaps.org>
* charmaps/UTF-8: Fix wcwidth for Hangul Conjoining medial vowels
and trailing consonant.
* charmaps/GB18030: Likewise
Diffstat (limited to 'debug/pcprofiledump.c')
-rw-r--r-- | debug/pcprofiledump.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/debug/pcprofiledump.c b/debug/pcprofiledump.c index 858fed2b85..6d3a2c7354 100644 --- a/debug/pcprofiledump.c +++ b/debug/pcprofiledump.c @@ -1,5 +1,5 @@ /* Dump information generated by PC profiling. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. @@ -18,7 +18,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* This is mainly and example. It shows how programs which want to use +/* This is mainly an example. It shows how programs which want to use the information should read the file. */ #ifdef HAVE_CONFIG_H # include <config.h> @@ -49,6 +49,7 @@ /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = { + { "unbuffered", 'u', NULL, 0, N_("Don't buffer output") }, { NULL, 0, NULL, 0, NULL } }; @@ -61,10 +62,13 @@ static const char args_doc[] = N_("[FILE]"); /* Function to print some extra text in the help message. */ static char *more_help (int key, const char *text, void *input); +/* Prototype for option handler. */ +static error_t parse_opt (int key, char *arg, struct argp_state *state); + /* Data structure to communicate with argp functions. */ static struct argp argp = { - options, NULL, args_doc, doc, NULL, more_help + options, parse_opt, args_doc, doc, NULL, more_help }; @@ -171,6 +175,20 @@ main (int argc, char *argv[]) return 0; } +static error_t +parse_opt (int key, char *arg, struct argp_state *state) +{ + switch (key) + { + case 'u': + setbuf (stdout, NULL); + break; + default: + return ARGP_ERR_UNKNOWN; + } + return 0; +} + static char * more_help (int key, const char *text, void *input) { |