/[bison]/bison/lib/argmatch.c
ViewVC logotype

Diff of /bison/lib/argmatch.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by akim, Mon May 27 06:18:41 2002 UTC revision 1.2 by eggert, Mon Aug 12 14:10:23 2002 UTC
# Line 1  Line 1 
1  /* argmatch.c -- find a match for a string in an array  /* argmatch.c -- find a match for a string in an array
2     Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.     Copyright (C) 1990, 1998, 1999, 2001 Free Software Foundation, Inc.
3    
4     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
# Line 22  Line 22 
22    
23  #include <stdio.h>  #include <stdio.h>
24  #ifdef STDC_HEADERS  #ifdef STDC_HEADERS
25    # include <stdlib.h>
26  # include <string.h>  # include <string.h>
27  #endif  #endif
28    
# Line 38  Line 39 
39    
40  #include "error.h"  #include "error.h"
41  #include "quotearg.h"  #include "quotearg.h"
42    #include "quote.h"
43    
44  /* When reporting an invalid argument, show nonprinting characters  /* When reporting an invalid argument, show nonprinting characters
45     by using the quoting style ARGMATCH_QUOTING_STYLE.  Do not use     by using the quoting style ARGMATCH_QUOTING_STYLE.  Do not use
# Line 156  void Line 158  void
158  argmatch_invalid (const char *context, const char *value, int problem)  argmatch_invalid (const char *context, const char *value, int problem)
159  {  {
160    char const *format = (problem == -1    char const *format = (problem == -1
161                          ? _("invalid argument %s for `%s'")                          ? _("invalid argument %s for %s")
162                          : _("ambiguous argument %s for `%s'"));                          : _("ambiguous argument %s for %s"));
163    
164    error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value), context);    error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value),
165             quote_n (1, context));
166  }  }
167    
168  /* List the valid arguments for argmatch.  /* List the valid arguments for argmatch.

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26