Re: popt-1.13 release

2008-01-26 Thread Robert Scheck
On Fri, 25 Jan 2008, Takao Fujiwara - Tokyo S/W Center wrote:
> I'm attaching the additional patch to fix several problems.
> Please check it.

This patch seems to work for me very well...thanks :)

Jeff, can you review it as well (especially from the C coding etc.) and
maybe include when rumbling around popt HEAD the next days? Thank you.


Greetings,
  Robert
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2008-01-24 Thread Takao Fujiwara - Tokyo S/W Center

I'm attaching the additional patch to fix several problems.
Please check it.

Thanks,
fujiwara

Robert Scheck wrote:

On Wed, 16 Jan 2008, Takao Fujiwara - Tokyo S/W Center wrote:


I burned DVD, installed Fedora 8 and could reproduced your problem.
Some of applications do not set bind_textdomain_codeset().

I think the attached patch will fix your main problem with removing your 
change of the workaround.



Yes, the patch solves mostly the problem. But there's still one problem
with POPT_printf() (?) left, looks like a minor one, nevertheless it is
a regression:

popt 1.13 with your last patch: [EMAIL PROTECTED] kudzu --help

Verwendung: kudzu [OPTION...]
  -s, --safesicheren 
Erkennungsmodus verwenden, der Hardware-Funktionen nicht beeinträchtigt
  -t, --timeout=INTEGER 
Zeitüberschreitung in Sekunden festlegen
  -p, --probe   nur suchen, 
Informationen auf der Standardausgabe ausgeben
  -b, --bus=STRING  nur 
angegebenen 'bus' untersuchen
  -c, --class=STRINGnur nach 
der angegebene 'class' suchen
  -f, --file=Datei für das Einlesen der Hardware-Informationen erkannte 
Hardware aus Datei lesen
  -k, --kernel=KernelversionNach 
Modulen für eine bestimmte Kernelversion suchen
  -q, --quiet   
Konfiguration ohne Benutzereingaben durchführen

Help options:
  -?, --helpShow this 
help message
  --usage   Display 
brief usage message

And this is popt 1.13 with my latest patch: [EMAIL PROTECTED] kudzu --help

Verwendung: kudzu [OPTION...]
  -s, --safe   sicheren 
Erkennungsmodus verwenden, der Hardware-Funktionen nicht beeinträchtigt
  -t, --timeout=INTEGER
Zeitüberschreitung in Sekunden festlegen
  -p, --probe  nur suchen, 
Informationen auf der Standardausgabe ausgeben
  -b, --bus=STRING nur 
angegebenen 'bus' untersuchen
  -c, --class=STRING   nur nach der 
angegebene 'class' suchen
  -f, --file=Datei für das Einlesen der Hardware-Informationen erkannte 
Hardware aus Datei lesen
  -k, --kernel=Kernelversion   Nach Modulen 
für eine bestimmte Kernelversion suchen
  -q, --quiet  
Konfiguration ohne Benutzereingaben durchführen

Help options:
  -?, --help   Show this 
help message
  --usage  Display 
brief usage message

As of my point of view, something regarding POPT_printf() (?) and umlauts
at "-f, --file=Datei für das Einlesen der Hardware-Informationen" seems to
be mis-handled. Something is making that string one character smaller as it
was and should be. Maybe we're even lacking the use of POPT_printf() some
where in the code?

Are you able to catch this minor thing also up? Thank you. And of course,
thank you very much for your past work and for figuring out the real issue;
I'm no C programmer, I'm just able to understand the code at least a bit.


Greetings,
  Robert



--- popt/popthelp.c.orig2008-01-16 02:19:01.0 +0900
+++ popt/popthelp.c 2008-01-25 02:18:08.0 +0900
@@ -15,13 +15,6 @@
 #include 
 #endif
 
-#definePOPT_WCHAR_HACK
-#ifdef POPT_WCHAR_HACK
-#include  /* for mbsrtowcs */
-/[EMAIL PROTECTED] mbstate_t @*/
-#endif
-
-
 #include "poptint.h"
 
 /[EMAIL PROTECTED] [EMAIL PROTECTED]/
@@ -374,6 +367,16 @@ static void singleOptionHelp(FILE * fp, 
case POPT_ARG_STRING:
*le++ = (opt->longName != NULL ? '=' : ' ');
strcpy(le, argDescrip); le += strlen(le);
+   {   const char * scopy = argDescrip;
+   size_t n = 0;
+
+   while (*scopy != '\0') {
+   scopy = POPT_next_char (scopy);
+   n++;
+   }
+
+   displaypad = (int) (strlen (argDescrip) - n);
+   }
break;
default:
break;
@@ -387,18 +390,17 @@ static void singleOptionHelp(FILE * fp, 
lelen = strlen(le);
le += lelen;
 
-#ifdef POPT_WCHAR_HACK
{   const char * scopy = argDescrip;
-   mbstate_t t;
-   size_t n;
+   size_t n = 0;
 
-   memset ((void *)&t, 0, sizeof (t)); /* In initial state.  */
 

Re: popt-1.13 release

2008-01-16 Thread Robert Scheck
On Wed, 16 Jan 2008, Takao Fujiwara - Tokyo S/W Center wrote:
> I burned DVD, installed Fedora 8 and could reproduced your problem.
> Some of applications do not set bind_textdomain_codeset().
>
> I think the attached patch will fix your main problem with removing your 
> change of the workaround.

Yes, the patch solves mostly the problem. But there's still one problem
with POPT_printf() (?) left, looks like a minor one, nevertheless it is
a regression:

popt 1.13 with your last patch: [EMAIL PROTECTED] kudzu --help

Verwendung: kudzu [OPTION...]
  -s, --safesicheren 
Erkennungsmodus verwenden, der Hardware-Funktionen nicht beeinträchtigt
  -t, --timeout=INTEGER 
Zeitüberschreitung in Sekunden festlegen
  -p, --probe   nur suchen, 
Informationen auf der Standardausgabe ausgeben
  -b, --bus=STRING  nur 
angegebenen 'bus' untersuchen
  -c, --class=STRINGnur nach 
der angegebene 'class' suchen
  -f, --file=Datei für das Einlesen der Hardware-Informationen erkannte 
Hardware aus Datei lesen
  -k, --kernel=KernelversionNach 
Modulen für eine bestimmte Kernelversion suchen
  -q, --quiet   
Konfiguration ohne Benutzereingaben durchführen

Help options:
  -?, --helpShow this 
help message
  --usage   Display 
brief usage message

And this is popt 1.13 with my latest patch: [EMAIL PROTECTED] kudzu --help

Verwendung: kudzu [OPTION...]
  -s, --safe   sicheren 
Erkennungsmodus verwenden, der Hardware-Funktionen nicht beeinträchtigt
  -t, --timeout=INTEGER
Zeitüberschreitung in Sekunden festlegen
  -p, --probe  nur suchen, 
Informationen auf der Standardausgabe ausgeben
  -b, --bus=STRING nur 
angegebenen 'bus' untersuchen
  -c, --class=STRING   nur nach der 
angegebene 'class' suchen
  -f, --file=Datei für das Einlesen der Hardware-Informationen erkannte 
Hardware aus Datei lesen
  -k, --kernel=Kernelversion   Nach Modulen 
für eine bestimmte Kernelversion suchen
  -q, --quiet  
Konfiguration ohne Benutzereingaben durchführen

Help options:
  -?, --help   Show this 
help message
  --usage  Display 
brief usage message

As of my point of view, something regarding POPT_printf() (?) and umlauts
at "-f, --file=Datei für das Einlesen der Hardware-Informationen" seems to
be mis-handled. Something is making that string one character smaller as it
was and should be. Maybe we're even lacking the use of POPT_printf() some
where in the code?

Are you able to catch this minor thing also up? Thank you. And of course,
thank you very much for your past work and for figuring out the real issue;
I'm no C programmer, I'm just able to understand the code at least a bit.


Greetings,
  Robert
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2008-01-15 Thread Takao Fujiwara - Tokyo S/W Center

I burned DVD, installed Fedora 8 and could reproduced your problem.
Some of applications do not set bind_textdomain_codeset().

I think the attached patch will fix your main problem with removing your change 
of the workaround.

Thanks,
fujiwara

Robert Scheck wrote:

On Mon, 14 Jan 2008, Takao Fujiwara - Tokyo S/W Center wrote:


Robert Scheck wrote:


Fedora 7 has popt delivered with rpm, so it's an old popt version which
never saw your changes. And all popt packages I officially prepared for
Fedora 8 are currently undoing your changes per patch to avoid really any
regression for the Fedora users.


Hmm.., I mean I've already applied the POPT_printf parts with popt sources 
and I cannot reproduce your problem.



Well...rpm, kudzu and most of the rest were static linked to popt in Fedora
7. This changed with Fedora 8 the first time. If you really want to try to
reproduce this, go and rebuild all packages depending on popt first. Or try
Fedora 8 which doesn't link statically to popt any longer for rpm and kudzu
- at least it shouldn't.


Greetings,
  Robert



--- popt/poptint.c.orig 2008-01-16 10:20:39.0 +0900
+++ popt/poptint.c  2008-01-16 10:28:57.0 +0900
@@ -2,6 +2,24 @@
 #include 
 #include "poptint.h"
 
+#if defined(HAVE_DCGETTEXT) && !defined(__LCLINT__)
+char *
+_D_ (const char * dom, const char * str)
+{
+  char * codeset = NULL;
+  char * retval = NULL;
+
+  if (!dom) 
+dom = textdomain (NULL);
+  codeset = bind_textdomain_codeset (dom, NULL);
+  bind_textdomain_codeset (dom, "UTF-8");
+  retval = dgettext(dom, str);
+  bind_textdomain_codeset (dom, codeset);
+
+  return retval;
+}
+#endif
+
 #ifdef HAVE_ICONV
 static /[EMAIL PROTECTED]@*/ /[EMAIL PROTECTED]@*/ char *
 strdup_locale_from_utf8 (/[EMAIL PROTECTED]@*/ char *buffer)
--- popt/poptint.h.orig 2008-01-16 02:01:07.0 +0900
+++ popt/poptint.h  2008-01-16 02:34:38.0 +0900
@@ -105,7 +105,7 @@ struct poptContext_s {
 #endif
 
 #if defined(HAVE_DCGETTEXT) && !defined(__LCLINT__)
-#define D_(dom, str) dgettext(dom, str)
+#define D_(dom, str) _D_(dom, str)
 #define POPT_(foo) D_("popt", foo)
 #else
 #define D_(dom, str) str


Re: popt-1.13 release

2008-01-13 Thread Robert Scheck
On Mon, 14 Jan 2008, Takao Fujiwara - Tokyo S/W Center wrote:
> Robert Scheck wrote:
>> Fedora 7 has popt delivered with rpm, so it's an old popt version which
>> never saw your changes. And all popt packages I officially prepared for
>> Fedora 8 are currently undoing your changes per patch to avoid really any
>> regression for the Fedora users.
>
> Hmm.., I mean I've already applied the POPT_printf parts with popt sources 
> and I cannot reproduce your problem.

Well...rpm, kudzu and most of the rest were static linked to popt in Fedora
7. This changed with Fedora 8 the first time. If you really want to try to
reproduce this, go and rebuild all packages depending on popt first. Or try
Fedora 8 which doesn't link statically to popt any longer for rpm and kudzu
- at least it shouldn't.


Greetings,
  Robert
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2008-01-13 Thread Takao Fujiwara - Tokyo S/W Center



Robert Scheck wrote:

On Sun, 13 Jan 2008, Takao Fujiwara wrote:

When I run "rpm --help" or "kudzu --help" on [EMAIL PROTECTED] locale in Fedora 7, 
I don't find any problems.



Fedora 7 has popt delivered with rpm, so it's an old popt version which
never saw your changes. And all popt packages I officially prepared for
Fedora 8 are currently undoing your changes per patch to avoid really any
regression for the Fedora users.


Hmm.., I mean I've already applied the POPT_printf parts with popt sources and 
I cannot reproduce your problem.




Do you make sure your terminal emulater is launched on [EMAIL PROTECTED] locale 
instead of UTF-8 locales?



My terminal emulator has the correct locales - same when connecting via SSH
to that machine e.g. using PuTTY and Windows :)


I have the concern to use Windows.
Please make sure you log on [EMAIL PROTECTED] locale modifing 
/etc/gdm/locale.alias.



If you want to reproduce that, you could take the srpm popt-1.13-1 package
in testing for Fedora 8, rip my patch out, rebuild and install it. Then you
should see what I'm seeing. And what I'm seeing is no typical ISO-8859-1(5)
vs. UTF-8 problem, I know them already.


In my env, popt shows correct ISO-8859-1 and I cannot reproduce it.

Thanks,
fujiwara




Greetings,
  Robert




__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2008-01-13 Thread Robert Scheck
On Sun, 13 Jan 2008, Takao Fujiwara wrote:
> When I run "rpm --help" or "kudzu --help" on [EMAIL PROTECTED] locale in 
> Fedora 7, 
> I don't find any problems.

Fedora 7 has popt delivered with rpm, so it's an old popt version which
never saw your changes. And all popt packages I officially prepared for
Fedora 8 are currently undoing your changes per patch to avoid really any
regression for the Fedora users.

> Do you make sure your terminal emulater is launched on [EMAIL PROTECTED] 
> locale 
> instead of UTF-8 locales?

My terminal emulator has the correct locales - same when connecting via SSH
to that machine e.g. using PuTTY and Windows :)

If you want to reproduce that, you could take the srpm popt-1.13-1 package
in testing for Fedora 8, rip my patch out, rebuild and install it. Then you
should see what I'm seeing. And what I'm seeing is no typical ISO-8859-1(5)
vs. UTF-8 problem, I know them already.


Greetings,
  Robert
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2008-01-13 Thread Takao Fujiwara

When I run "rpm --help" or "kudzu --help" on [EMAIL PROTECTED] locale in Fedora 
7, I don't find any problems.
I attached my out logs with bzip2.

% locale
[EMAIL PROTECTED]
LC_CTYPE="[EMAIL PROTECTED]"
LC_NUMERIC="[EMAIL PROTECTED]"
LC_TIME="[EMAIL PROTECTED]"
LC_COLLATE="[EMAIL PROTECTED]"
LC_MONETARY="[EMAIL PROTECTED]"
LC_MESSAGES="[EMAIL PROTECTED]"
LC_PAPER="[EMAIL PROTECTED]"
LC_NAME="[EMAIL PROTECTED]"
LC_ADDRESS="[EMAIL PROTECTED]"
LC_TELEPHONE="[EMAIL PROTECTED]"
LC_MEASUREMENT="[EMAIL PROTECTED]"
LC_IDENTIFICATION="[EMAIL PROTECTED]"
LC_ALL=

Do you make sure your terminal emulater is launched on [EMAIL PROTECTED] locale 
instead of UTF-8 locales?

% env [EMAIL PROTECTED] xterm

Thanks,
fujiwara

Robert Scheck さんは書きました:

On Fri, 11 Jan 2008, Takao Fujiwara - Tokyo S/W Center wrote:

Actually I'm not sure what is your problem.
Which applications do you try?


Using POPT_fprintf(), all umlauts are broken when doing "[EMAIL PROTECTED]
rpm --help" or "[EMAIL PROTECTED] kudzu --help". Whenever an umlaut should be
displayed, it isn't and the rest of the line as well. Instead the next line
is displayed. So it looks like to me, that POPT_fprintf() has problems with
non-ASCII characters when the locale isn't a UTF-8 one.

See http://rpm5.org/community/popt-devel/0038.html and following of this
thread (e.g. http://rpm5.org/community/popt-devel/0043.html). Maybe you can
then see what my problem is.

It seems recently some of modules, GTK, Bonobo and GNOME session, uses 
goption. When the application uses --help options, it includes the output 
of both goption and popt.
goption has the current encoding but popt is UTF-8 then you may encounter 
the problem.

Could you apply POPT_fprintf() for popt options only?


I've no matter about the goption/popt handling at all, I'm just seeing this
problem with popt 1.13 on a konsole without GNOME, Bonobo or whatelse.


Greetings,
  Robert




kudzu.log.bz2
Description: application/bzip


rpm.log.bz2
Description: application/bzip


Re: popt-1.13 release

2008-01-11 Thread Robert Scheck
On Fri, 11 Jan 2008, Takao Fujiwara - Tokyo S/W Center wrote:
> Actually I'm not sure what is your problem.
> Which applications do you try?

Using POPT_fprintf(), all umlauts are broken when doing "[EMAIL PROTECTED]
rpm --help" or "[EMAIL PROTECTED] kudzu --help". Whenever an umlaut should be
displayed, it isn't and the rest of the line as well. Instead the next line
is displayed. So it looks like to me, that POPT_fprintf() has problems with
non-ASCII characters when the locale isn't a UTF-8 one.

See http://rpm5.org/community/popt-devel/0038.html and following of this
thread (e.g. http://rpm5.org/community/popt-devel/0043.html). Maybe you can
then see what my problem is.

> It seems recently some of modules, GTK, Bonobo and GNOME session, uses 
> goption. When the application uses --help options, it includes the output 
> of both goption and popt.
> goption has the current encoding but popt is UTF-8 then you may encounter 
> the problem.
> Could you apply POPT_fprintf() for popt options only?

I've no matter about the goption/popt handling at all, I'm just seeing this
problem with popt 1.13 on a konsole without GNOME, Bonobo or whatelse.


Greetings,
  Robert
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2008-01-11 Thread Jeff Johnson


On Jan 11, 2008, at 2:49 AM, Takao Fujiwara - Tokyo S/W Center wrote:


Actually I'm not sure what is your problem.
Which applications do you try?

It seems recently some of modules, GTK, Bonobo and GNOME session,  
uses goption. When the application uses --help options, it includes  
the output of both goption and popt.
goption has the current encoding but popt is UTF-8 then you may  
encounter the problem.

Could you apply POPT_fprintf() for popt options only?



In principle POPT_fprintf could be applied for popt options only. The
context of "popt options only" is extremely difficult to identify  
however,

because popt behvaior is driven by application data.

No matter what, I'm not going to be accepting patches for
popt such as POPT_fprintf (or the Solaris signed character
"fix") without explicit regression tests in the future.

And I'm likely to revert to Robert Scheck's patch for the next  
version of popt

as that seems to be closest to being explicitly identified as "working".

73 de Jeff

__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2008-01-11 Thread Takao Fujiwara - Tokyo S/W Center

Actually I'm not sure what is your problem.
Which applications do you try?

It seems recently some of modules, GTK, Bonobo and GNOME session, uses goption. 
When the application uses --help options, it includes the output of both 
goption and popt.
goption has the current encoding but popt is UTF-8 then you may encounter the 
problem.
Could you apply POPT_fprintf() for popt options only?

Thanks,
fujiwara

Robert Scheck wrote:

On Mon, 31 Dec 2007, Takao Fujiwara - Tokyo S/W Center wrote:


Is your problem fixed by replacing "char++" with POPT_next_char() ?
If it's right, I think POPT_fprintf() does need to be reverted.



I'm a bit clueless regarding the code. It's mostly Jeff's work and I hacked
the rest to get a "working" popt for Fedora. Replacing POPT_fprintf() by
the previous fprintf() seems to work around the problems, which ends from
my point of view in: POPT_fprintf() has problems with non-ASCII characters
when the locale isn't a UTF8 one.

Do you mean "ch++;" vs. "ch = POPT_next_char(ch)"? I can't see any big
difference there, as far as POPT_fprintf() vs. fprintf() brought visible
results to me only.


Greetings,
  Robert




__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2007-12-31 Thread Robert Scheck
On Mon, 31 Dec 2007, Takao Fujiwara - Tokyo S/W Center wrote:
> Is your problem fixed by replacing "char++" with POPT_next_char() ?
> If it's right, I think POPT_fprintf() does need to be reverted.

I'm a bit clueless regarding the code. It's mostly Jeff's work and I hacked
the rest to get a "working" popt for Fedora. Replacing POPT_fprintf() by
the previous fprintf() seems to work around the problems, which ends from
my point of view in: POPT_fprintf() has problems with non-ASCII characters
when the locale isn't a UTF8 one.

Do you mean "ch++;" vs. "ch = POPT_next_char(ch)"? I can't see any big
difference there, as far as POPT_fprintf() vs. fprintf() brought visible
results to me only.


Greetings,
  Robert
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2007-12-30 Thread Robert Scheck
Evening,

On Wed, 19 Dec 2007, Robert Scheck wrote:
> *arghl* I've to revoke that partitially - as Jeff pointed to me:
> 
> Using [EMAIL PROTECTED], the sub-headers ("Gemeinsame Optionen für
> [something]" is broken. Happens not with de_DE.UTF-8 or LANG=C.

the attached patch seems to "solve" all problems for me - at least it
reverts the problems to the same ones, that already existed in 1.12.


Greetings,
  Robert
--- popt-1.13/popthelp.c2007-11-04 
16:46:25.0 +0100
+++ popt-1.13/popthelp.c.popt_fprintf   2007-12-30 
22:10:24.0 +0100
@@ -281,7 +281,6 @@
 char * left;
 size_t nb = maxLeftCol + 1;
 int displaypad = 0;
-int xx;
 
 /* Make sure there's more than enough room in target buffer. */
 if (opt->longName) nb += strlen(opt->longName);
@@ -406,9 +405,9 @@
 }
 
 if (help)
-   xx = POPT_fprintf(fp,"  %-*s   ", (int)(maxLeftCol+displaypad), left);
+   fprintf(fp,"  %-*s   ", (int)(maxLeftCol+displaypad), left);
 else {
-   xx = POPT_fprintf(fp,"  %s\n", left); 
+   fprintf(fp,"  %s\n", left);
goto out;
 }
 
@@ -428,18 +427,19 @@
if (ch == help) break;  /* give up */
while (ch > (help + 1) && _isspaceptr(ch))
ch = POPT_prev_char (ch);
-   ch++;
+   ch = POPT_next_char(ch);
 
sprintf(format, "%%.%ds\n%%%ds", (int) (ch - help), (int) indentLength);
/[EMAIL PROTECTED]@*/
-   xx = POPT_fprintf(fp, format, help, " ");
+   fprintf(fp, format, help, " ");
/[EMAIL PROTECTED]@*/
help = ch;
-   while (_isspaceptr(help) && *help) help++;
+   while (_isspaceptr(help) && *help)
+   help = POPT_next_char(help);
helpLength = strlen(help);
 }
 
-if (helpLength) xx = POPT_fprintf(fp, "%s\n", help);
+if (helpLength) fprintf(fp, "%s\n", help);
 help = NULL;
 
 out:
@@ -553,7 +553,6 @@
 {
 const struct poptOption * opt;
 const char *sub_transdom;
-int xx;
 
 if (table == poptAliasOptions) {
itemHelp(fp, con->aliases, con->numAliases, columns, NULL);
@@ -577,7 +576,7 @@
sub_transdom = translation_domain;

if (opt->descrip)
-   xx = POPT_fprintf(fp, "\n%s\n", D_(sub_transdom, opt->descrip));
+   fprintf(fp, "\n%s\n", D_(sub_transdom, opt->descrip));
 
singleTableHelp(con, fp, opt->arg, columns, sub_transdom);
 }
@@ -767,7 +766,7 @@
translation_domain = (const char *)opt->arg;
} else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
if (done) {
-   int i;
+   int i = done->nopts;
if (done->opts != NULL)
for (i = 0; i < done->nopts; i++) {
const void * that = done->opts[i];
--- popt-1.13/poptint.c 2007-11-04 
16:56:24.0 +0100
+++ popt-1.13/poptint.c.popt_fprintf2007-12-30 
22:10:24.0 +0100
@@ -124,6 +124,18 @@
 }
 }
 
+char *
+POPT_next_char (const char *str)
+{
+char *p = (char *)str;
+
+while (1) {
+   p++;
+   if ((*p & 0xc0) != (char)0x80)
+   return (char *)p;
+}
+}
+
 int
 POPT_fprintf (FILE* stream, const char *format, ...)
 {
--- popt-1.13/poptint.h 2007-12-11 
19:02:29.0 +0100
+++ popt-1.13/poptint.h.popt_fprintf2007-12-30 
22:10:24.0 +0100
@@ -144,11 +144,14 @@
 #endif
 #endif
 
+char *POPT_prev_char (/[EMAIL PROTECTED]@*/ const char *str)
+   /[EMAIL PROTECTED]/;
+
+char *POPT_next_char (/[EMAIL PROTECTED]@*/ const char *str)
+   /[EMAIL PROTECTED]/;
+
 int   POPT_fprintf (FILE* stream, const char *format, ...)
/[EMAIL PROTECTED] fileSystem @*/
/[EMAIL PROTECTED] stream, fileSystem @*/;
 
-char *POPT_prev_char (/[EMAIL PROTECTED]@*/ const char *str)
-   /[EMAIL PROTECTED]/;
-
 #endif


Re: popt-1.13 release

2007-12-19 Thread Robert Scheck
On Wed, 19 Dec 2007, Robert Scheck wrote:
> yes, that patch works for me as well.

*arghl* I've to revoke that partitially - as Jeff pointed to me:

Using [EMAIL PROTECTED], the sub-headers ("Gemeinsame Optionen für
[something]" is broken. Happens not with de_DE.UTF-8 or LANG=C.

Gemeinsame Optionen f  -D, --define='MAKRO AUSDRUCK'MAKRO mit Wert 
AUSDRUCK definieren
  -E, --eval='AUSDRUCK'Makro-Ausdehnung des AUSDRUCKS 
anzeigen
  --macros= lese  anstatt der 
Standard-Datei(en)
  --target=CPU-VENDOR-OS   Zielplattform bestimmen
  --nodigest   Paket-Prüfsumme(n) nicht überprüfen
  --nosignaturePaket-Signatur(en) nicht überprüfen
  --rcfile= lese  anstatt der 
Standard-Datei(en)
  -r, --root=WURZELVERZEICHNIS benutze WURZELVERZEICHNIS als 
oberstes Verzeichnis (default: "/")
  --querytags  Zeige bekannte Abfrage-Tags
  --showrc Zeige entgültige rpmrc- und 
Makro-Konfiguration
  --quiet  Zeige weniger informative Ausgabe
  -v, --verboseZeige detailliertere Ausgabe
  --versionZeige benutzte RPM-Version


Greetings,
  Robert
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2007-12-19 Thread Robert Scheck
On Wed, 19 Dec 2007, Jeff Johnson wrote:
> Would you mind checking the attached patch? It adds POPT_next_char()
> to undo POPT_prev_char() wide character ptr positioning, and pretty much
> (if it works for you) points the finger at POPT_fprintf() being broken 
> somehow.
>
> Note that POPT_fprintf() is supposed to translate from UTF-8 to
> whatever locale is desired using iconv(3). GNOME wishes
> to distribute only UTF-8 locale files, so popt gets to do the
> final conversion using iconv(3).

yes, that patch works for me as well.


Greetings,
  Robert
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2007-12-19 Thread Jeff Johnson


On Dec 19, 2007, at 2:26 AM, Robert Scheck wrote:


Moin Jeff,

On Wed, 19 Dec 2007, Jeff Johnson wrote:
See if the attached patch (the minimum necessary reversion to  
popt-1.12

afaict) fixes your linux problems.

If the patch fixes the linux problems, I'll see if I can rework the
Solaris patch to not break linux.


Yes, it really fixes my Linux problems:



OK, thanks for verify.

Would you mind checking the attached patch? It adds POPT_next_char()
to undo POPT_prev_char() wide character ptr positioning, and pretty much
(if it works for you) points the finger at POPT_fprintf() being  
broken somehow.


Note that POPT_fprintf() is supposed to translate from UTF-8 to
whatever locale is desired using iconv(3). GNOME wishes
to distribute only UTF-8 locale files, so popt gets to do the
final conversion using iconv(3).

73 de Jeff


d
Description: Binary data


Re: popt-1.13 release

2007-12-18 Thread Robert Scheck
Moin Jeff,

On Wed, 19 Dec 2007, Jeff Johnson wrote:
> See if the attached patch (the minimum necessary reversion to popt-1.12 
> afaict) fixes your linux problems.
>
> If the patch fixes the linux problems, I'll see if I can rework the
> Solaris patch to not break linux.

Yes, it really fixes my Linux problems:

$ [EMAIL PROTECTED] kudzu --help
Verwendung: kudzu [OPTION...]
  -s, --safe   sicheren 
Erkennungsmodus verwenden, der Hardware-Funktionen nicht beeinträchtigt
  -t, --timeout=INTEGER
Zeitüberschreitung in Sekunden festlegen
  -p, --probe  nur suchen, 
Informationen auf der Standardausgabe ausgeben
  -b, --bus=STRING nur 
angegebenen 'bus' untersuchen
  -c, --class=STRING   nur nach der 
angegebene 'class' suchen
  -f, --file=Datei für das Einlesen der Hardware-Informationen erkannte 
Hardware aus Datei lesen
  -k, --kernel=Kernelversion   Nach Modulen 
für eine bestimmte Kernelversion suchen
  -q, --quiet  
Konfiguration ohne Benutzereingaben durchführen

Help options:
  -?, --help   Show this 
help message
  --usage  Display 
brief usage message
$ 


Greetings,
  Robert
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2007-12-18 Thread Jeff Johnson


On Dec 15, 2007, at 7:34 PM, Robert Scheck wrote:



Yes the colum spacing looks better, but whenever an umlaut (ä, ö,  
ü, Ä, Ö,
Ü, ß) or similar should be displayed, it aborts somehow. Please  
note, that
I can't reproduce when having LANG=C for example. Oh, and it's NOT  
kudzu
having this problem, it's popt - so "[EMAIL PROTECTED] rpm --help"  
has just

the same problem.



See if the attached patch (the minimum necessary reversion to  
popt-1.12 afaict)

fixes your linux problems.

If the patch fixes the linux problems, I'll see if
I can rework the Solaris patch to not break linux.

73 de Jeff



d
Description: Binary data


Re: popt-1.13 release

2007-12-15 Thread Robert Scheck
Hello everybody,

On Tue, 11 Dec 2007, Jeff Johnson wrote:
> This will be released as popt-1.13 through rpm5.org after receiving 3 
> positive reports of WORKSFORME or Thursday evening, which ever comes
> first.

unluckily, I would say, I discovered a bug within popt 1.13. I don't know
when it exactly slipped in. The following is the result of "[EMAIL PROTECTED]
kudzu --help" on a Fedora system. It just looks a bit strange, but is okay
so far. Kudzu was built using popt 1.12 (at that time, kudzu linked static
to popt).

--- snipp ---
Verwendung: kudzu [OPTION...]
  -s, --safe   sicheren
   
Erkennungsmodus verwenden, der Hardware-Funktionen nicht beeinträchtigt
  -t, --timeout=INTEGER
Zeitüberschreitung in Sekunden festlegen
  -p, --probe  nur suchen,
   
Informationen auf der Standardausgabe ausgeben
  -b, --bus=STRING nur
   angegebenen
   'bus'
   untersuchen
  -c, --class=STRING   nur nach
   der
   angegebene
   'class'
   suchen
  -f, --file=Datei für das Einlesen der Hardware-Informationen erkannte
   Hardware
   aus Datei
   lesen
  -k, --kernel=Kernelversion   Nach
   Modulen für
   eine
   bestimmte
   
Kernelversion suchen
  -q, --quiet  
Konfiguration ohne Benutzereingaben durchführen

Help options:
  -?, --help   Show this
   help message
  --usage  Display
   brief usage
   message
--- snapp ---

When I now do the same after upgrading to popt 1.13 and using a kudzu
version linking dynamic to popt, I get the following result which just
horrible (again "[EMAIL PROTECTED] kudzu --help"): 

--- snipp ---
Verwendung: kudzu [OPTION...]
  -s, --safe   sicheren 
Erkennungsmodus verwenden, der Hardware-Funktionen nicht beeintr  -t, 
--timeout=INTEGERZeit  -p, --probe  
nur suchen, Informationen 
auf der Standardausgabe ausgeben
  -b, --bus=STRING nur 
angegebenen 'bus' untersuchen
  -c, --class=STRING   nur nach der 
angegebene 'class' suchen
  -f, --file=Datei ferkannte Hardware aus Datei lesen
  -k, --kernel=Kernelversion   Nach Modulen 
f  -q, --quiet  
Konfiguration ohne Benutzereingaben durchf
Help options:
  -?, --help   Show this 
help message
  --usage  Display 
brief usage message
--- snapp ---

Yes the colum spacing looks better, but whenever an umlaut (ä, ö, ü, Ä, Ö,
Ü, ß) or similar should be displayed, it aborts somehow. Please note, that
I can't reproduce when having LANG=C for example. Oh, and it's NOT kudzu
having this problem, it's popt - so "[EMAIL PROTECTED] rpm --help" has just
the same problem.


Greetings,
  Robert
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2007-12-11 Thread Jeff Johnson


On Dec 12, 2007, at 1:50 AM, Ralf S. Engelschall wrote:


On Tue, Dec 11, 2007, Jeff Johnson wrote:


I've built popt-1.13 packages at
ftp://wraptastic.org/pub/i386-linux/SRPMS/popt-1.13-1.src.rpm


URL does not exist, cannot fetch.


Sorry. Daemons restarted, try http.


Also, reminder: for rpm5.org we need the plain tarball, too. ;-)



tarball and xarball and rpm and wdj, yes.

73 de Jeff
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


Re: popt-1.13 release

2007-12-11 Thread Ralf S. Engelschall
On Tue, Dec 11, 2007, Jeff Johnson wrote:

> I've built popt-1.13 packages at
> ftp://wraptastic.org/pub/i386-linux/SRPMS/popt-1.13-1.src.rpm

URL does not exist, cannot fetch.
Also, reminder: for rpm5.org we need the plain tarball, too. ;-)

   Ralf S. Engelschall
   [EMAIL PROTECTED]
   www.engelschall.com

__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org


popt-1.13 release

2007-12-11 Thread Jeff Johnson

I've built popt-1.13 packages at
ftp://wraptastic.org/pub/i386-linux/SRPMS/popt-1.13-1.src.rpm

This  will be released as popt-1.13 through rpm5.org after receiving  
3 positive reports

of WORKSFORME or Thursday evening, which ever comes first.

Here's the final changelog for popt-1.13:

1.12 -> 1.13:
- release popt-1.13.
- jbj: add a %track section (as in rpm-5.0) to popt.spec.
- jbj: chg poptGetOptArg() to "char *", document application  
needs to free.
- jbj: re-add it.po (from Sandro Bonazzola  
<[EMAIL PROTECTED]>).

- jbj: rescuscitate the splint annotations.
- jbj: change sizeof to use the type implicitly, rather than  
explicitly.

- jbj: remove incorrect casts, changing to size_t where needed.
- jbj: remove unused STD_VFPRINTF macro.
- jbj: reindent (and otherwise diddle) recent patch for popt  
coding style.
- jbj: remove splint bounds/branch annotations, little gain,  
much pain.

- jbj: revert alloca usage again again.
- jbj: handle Solaris signed character isspace(3) issues  
consistently.

- bero: read /etc/popt.d/* files.
- jbj: don't read /etc/popt twice (#290531).
- jbj: isspace(3) has i18n encoding signednesss issues on  
Solaris (#172393).
- jbj: refactor column cursor to a structure, carry maxcols as  
well.

- jbj: use TIOCGWINSZ to determine --help column wrapping.
- jbj: help formatting for POPT_ARG_MAINCALL.
- jbj: remove N_(...) markings from popt.h, markers in  
popthelp.c instead.

- jbj: add zh_CN.po (Translation Project).
- jbj: use PACKAGE_BUGREPORT.
- jbj: hotwire POPT_AUTOHELP/POPT_AUTOALIAS lookup in popt i18n  
domain.


Enjoy!

73 de Jeff
__
POPT Library   http://rpm5.org
Developer Communication List   popt-devel@rpm5.org