RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: popt/ CHANGES popthelp.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Sat 25 Aug 2007 - 02:49:45 CEST
Message-Id: <20070825004945.678E334845B@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: popt                             Date:   25-Aug-2007 02:49:45
  Branch: HEAD                             Handle: 2007082501494500

  Modified files:
    popt                    CHANGES popthelp.c

  Log:
    - isspace(3) has i18n encoding signednesss issues on Solaris
    (#172393).

  Summary:
    Revision    Changes     Path
    1.23        +1  -0      popt/CHANGES
    1.63        +6  -3      popt/popthelp.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: popt/CHANGES
  ============================================================================
  $ cvs diff -u -r1.22 -r1.23 CHANGES
  --- popt/CHANGES	15 Aug 2007 18:58:05 -0000	1.22
  +++ popt/CHANGES	25 Aug 2007 00:49:45 -0000	1.23
  @@ -1,4 +1,5 @@
   1.12 -> 1.13:
  +    - 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.
  @@ .
  patch -p0 <<'@@ .'
  Index: popt/popthelp.c
  ============================================================================
  $ cvs diff -u -r1.62 -r1.63 popthelp.c
  --- popt/popthelp.c	24 Aug 2007 13:14:41 -0000	1.62
  +++ popt/popthelp.c	25 Aug 2007 00:49:45 -0000	1.63
  @@ -24,6 +24,9 @@
   
   /*@access poptContext@*/
   
  +/* XXX isspace(3) has i18n encoding signednesss issues on Solaris. */
  +#define	_isspaceptr(_chp)	((int)(*(unsigned char *)(_chp)))
  +
   /**
    * Display arguments.
    * @param con		context
  @@ -426,10 +429,10 @@
   	char format[16];
   
   	ch = help + lineLength - 1;
  -	while (ch > help && !isspace(*ch))
  +	while (ch > help && !_isspaceptr(ch))
   	    ch = POPT_prev_char (ch);
   	if (ch == help) break;		/* give up */
  -	while (ch > (help + 1) && isspace(*ch))
  +	while (ch > (help + 1) && _isspaceptr(ch))
   	    ch = POPT_prev_char (ch);
   	ch++;
   
  @@ -438,7 +441,7 @@
   	POPT_fprintf(fp, format, help, " ");
   	/*@=formatconst@*/
   	help = ch;
  -	while (isspace(*help) && *help) help++;
  +	while (_isspaceptr(help) && *help) help++;
   	helpLength = strlen(help);
       }
   /*@=boundsread@*/
  @@ .
Received on Sat Aug 25 02:49:45 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.