From 9c030ea1425f164af9bff3a187f2dd11a4ac73dc Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 11 May 2007 15:49:39 +0000 Subject: [PATCH] Fix in patch. --- flex-2.5.33-opts.patch | 16 +++++++++------- flex.spec | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/flex-2.5.33-opts.patch b/flex-2.5.33-opts.patch index 5e45009..3189fe3 100644 --- a/flex-2.5.33-opts.patch +++ b/flex-2.5.33-opts.patch @@ -1,6 +1,6 @@ diff -urp flex-2.5.33/scanopt.c flex-2.5.33-pm/scanopt.c --- flex-2.5.33/scanopt.c 2002-08-29 22:30:25.000000000 +0200 -+++ flex-2.5.33-pm/scanopt.c 2007-05-11 17:03:01.000000000 +0200 ++++ flex-2.5.33-pm/scanopt.c 2007-05-11 17:48:29.000000000 +0200 @@ -789,12 +789,12 @@ int scanopt (svoid, arg, optindex) } @@ -19,18 +19,20 @@ diff -urp flex-2.5.33/scanopt.c flex-2.5.33-pm/scanopt.c } /* At this point, we have a long or short option matched at opt_offset into -@@ -812,13 +812,10 @@ int scanopt (svoid, arg, optindex) +@@ -812,13 +812,16 @@ int scanopt (svoid, arg, optindex) /* case: no args allowed */ if (auxp->flags & ARG_NONE) { - if (optarg) { -- scanopt_err (s, opt_offset, is_short, errcode = -- SCANOPT_ERR_ARG_NOT_ALLOWED); -+ if (!optarg) ++ if (optarg && !is_short) { + scanopt_err (s, opt_offset, is_short, errcode = + SCANOPT_ERR_ARG_NOT_ALLOWED); INC_INDEX (s, 1); -- return errcode; -- } + return errcode; + } - INC_INDEX (s, 1); ++ else if (!optarg) ++ INC_INDEX (s, 1); + else + s->subscript++; return optp->r_val; diff --git a/flex.spec b/flex.spec index 77a5abd..3d4e932 100644 --- a/flex.spec +++ b/flex.spec @@ -1,7 +1,7 @@ Summary: A tool for creating scanners (text pattern recognizers) Name: flex Version: 2.5.33 -Release: 6%{?dist} +Release: 7%{?dist} License: BSD Group: Development/Tools URL: http://flex.sourceforge.net/ @@ -80,7 +80,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_infodir}/flex.info* %changelog -* Fri May 11 2007 Petr Machata - 2.5.33-6 +* Fri May 11 2007 Petr Machata - 2.5.33-7 - Allow joining short options into one commandline argument. - Resolves: #239695