this is (Copyleft) 1996, Han-Wen Nienhuys, <hanwen@cs.uu.nl>
*/
+#include <string.h>
#include <stdio.h>
#include <iostream.h>
#include <assert.h>
+#include <stdlib.h>
+
#include "config.h"
#include "getopt-long.hh"
#include "international.hh"
#include "string-convert.hh"
+
#if !HAVE_GETTEXT
inline char*
gettext (char const* s)
{
- return s;
+ return (char*)s;
}
#else
#include <libintl.h>
switch (c)
{
case E_ARGEXPECT:
- str += _f ("option `%s\' requires an argument",
+ str += _f ("option `%s' requires an argument",
found_option_l_->str ());
break;
case E_NOARGEXPECT:
- str += _f ("option `%s\' doesn't allow an argument",
+ str += _f ("option `%s' doesn't allow an argument",
found_option_l_->str ());
break;
case E_UNKNOWNOPTION:
- str += _f ("unrecognized option: `%s\'",
+ str += _f ("unrecognized option: `%s'",
String (argument_index_i_
- ? String ("-" + _f("%c",arg_value_ch_a_a_[array_index_i_][argument_index_i_]))
+ ? String ("-" + String_convert::form_str ("%c",
+ arg_value_ch_a_a_[array_index_i_][argument_index_i_]))
: String (arg_value_ch_a_a_[array_index_i_])));
break;
case E_ILLEGALARG:
- str += _f ("invalid argument `%s\' to option `%s'",
+ str += _f ("invalid argument `%s' to option `%s'",
optional_argument_ch_C_, found_option_l_->str ());
+ break;
default:
assert (false);
}