mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-07 03:21:34 +02:00
More options for buddies
* Generic writer options * Generic reader options * All converter tools are equipped with writer options * strm2gds is equipped with reader options already
This commit is contained in:
@@ -472,9 +472,15 @@ CommandLineOptions::parse (int argc, char *argv[])
|
||||
for (std::vector<ArgBase *>::const_iterator i = m_args.begin (); i != m_args.end (); ++i) {
|
||||
if ((*i)->is_option ()) {
|
||||
if (! (*i)->option ().short_option.empty ()) {
|
||||
if (arg_by_short_option.find ((*i)->option ().short_option) != arg_by_short_option.end ()) {
|
||||
throw tl::Exception ("Command line parser setup: duplicate option -" + (*i)->option ().short_option);
|
||||
}
|
||||
arg_by_short_option.insert (std::make_pair ((*i)->option ().short_option, *i));
|
||||
}
|
||||
if (! (*i)->option ().long_option.empty ()) {
|
||||
if (arg_by_long_option.find ((*i)->option ().long_option) != arg_by_long_option.end ()) {
|
||||
throw tl::Exception ("Command line parser setup: duplicate option --" + (*i)->option ().long_option);
|
||||
}
|
||||
arg_by_long_option.insert (std::make_pair ((*i)->option ().long_option, *i));
|
||||
}
|
||||
} else {
|
||||
|
||||
+1
-7
@@ -932,13 +932,7 @@ OutputStream::OutputStream (const std::string &abstract_path, OutputStreamMode o
|
||||
: m_pos (0), mp_delegate (0), m_owns_delegate (false)
|
||||
{
|
||||
// Determine output mode
|
||||
if (om == OM_Auto) {
|
||||
if (tl::match_filename_to_format (abstract_path, "(*.gz *.gzip *.GZ *.GZIP)")) {
|
||||
om = OM_Zlib;
|
||||
} else {
|
||||
om = OM_Plain;
|
||||
}
|
||||
}
|
||||
om = output_mode_from_filename (abstract_path, om);
|
||||
|
||||
tl::Extractor ex (abstract_path.c_str ());
|
||||
if (ex.test ("http:") || ex.test ("https:")) {
|
||||
|
||||
Reference in New Issue
Block a user