From 30224e2bd3bfde9e02802fb9f3e45c78237f34f0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 15 May 2002 03:36:41 +0000 Subject: Update. 2002-05-06 Jungshik Shin * charmaps/UTF-8: Fix wcwidth for Hangul Conjoining medial vowels and trailing consonant. * charmaps/GB18030: Likewise --- debug/pcprofiledump.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'debug/pcprofiledump.c') 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 , 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 @@ -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) { -- cgit v1.2.1