[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-cvs
Subject:    MinGW-cvs Digest, Vol 10, Issue 2
From:       mingw-cvs-request () lists ! sourceforge ! net
Date:       2007-05-11 22:48:22
Message-ID: mailman.242453.1178923702.32383.mingw-cvs () lists ! sourceforge ! net
[Download RAW message or body]

Send MinGW-cvs mailing list submissions to
	mingw-cvs@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.sourceforge.net/lists/listinfo/mingw-cvs
or, via email, send a message with subject or body 'help' to
	mingw-cvs-request@lists.sourceforge.net

You can reach the person managing the list at
	mingw-cvs-owner@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-cvs digest..."


This list will notify you of updates to the code stored in CVS.  Typically only \
developers with access to update the CVS are interested in this list.  However, this \
list can be beneficial to see what is happening with your changes.  If you wish to \
unsubscribe please do so at https://lists.sourceforge.net/lists/listinfo/mingw-cvs.

Today's Topics:

   1. regex ChangeLog,1.6,1.7 (Keith Marshall)
   2. catgets ChangeLog,1.2,1.3 catopen.c,1.2,1.3 (Keith Marshall)
   3. catgets mcsource.c,1.2,1.3 (Keith Marshall)
   4. catgets ChangeLog,1.3,1.4 (Keith Marshall)
   5. catgets ChangeLog,1.4,1.5 mcsource.c,1.3,1.4 (Keith Marshall)
   6. catgets ChangeLog,1.5,1.6 mcsource.c,1.4,1.5 (Keith Marshall)


----------------------------------------------------------------------

Message: 1
Date: Mon, 07 May 2007 21:51:40 +0000
From: Keith Marshall <keithmarshall@users.sourceforge.net>
Subject: [MinGW-cvs] regex ChangeLog,1.6,1.7
To: mingw-cvs@lists.sourceforge.net
Message-ID: <E1HlB7N-00082M-Lm@mail.sourceforge.net>

Update of /cvsroot/mingw/regex
In directory sc8-pr-cvs16:/tmp/cvs-serv25405

Modified Files:
	ChangeLog 
Log Message:
Version 2.5.1 released.


Index: ChangeLog
===================================================================
RCS file: /cvsroot/mingw/regex/ChangeLog,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ChangeLog	7 May 2007 21:05:53 -0000	1.6
--- ChangeLog	7 May 2007 21:51:38 -0000	1.7
***************
*** 1,4 ****
--- 1,10 ----
  2007-05-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
  
+ 	Version 2.5.1 released on MinGW download site.
+ 
+ 	* r2-5-1: Release tag assigned.
+ 
+ 2007-05-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
+ 
  	Another bug reported by Julien Lecomte <julien@famille-lecomte.net>
  
***************
*** 9,12 ****
--- 15,24 ----
  	* configure: Regenerated.
  
+ 2007-05-07  Keith Marshall  <keithmarshall@users.sourceforge.net>
+ 
+ 	Version 2.5 released on MinGW download site.
+ 
+ 	* r2-5-as-built: Release tag assigned.
+ 
  2007-05-05  Keith Marshall  <keithmarshall@users.sourceforge.net>
  




------------------------------

Message: 2
Date: Wed, 09 May 2007 22:43:54 +0000
From: Keith Marshall <keithmarshall@users.sourceforge.net>
Subject: [MinGW-cvs] catgets ChangeLog,1.2,1.3 catopen.c,1.2,1.3
To: mingw-cvs@lists.sourceforge.net
Message-ID: <E1Hlut2-000089-KY@mail.sourceforge.net>

Update of /cvsroot/mingw/catgets
In directory sc8-pr-cvs16:/tmp/cvs-serv23041

Modified Files:
	ChangeLog catopen.c 
Log Message:
Provide more robust handling of possibly incomplete LC_MESSAGES macro expansions, \
when parsing NLSPATH.


Index: catopen.c
===================================================================
RCS file: /cvsroot/mingw/catgets/catopen.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** catopen.c	20 Apr 2007 22:24:02 -0000	1.2
--- catopen.c	9 May 2007 22:43:51 -0000	1.3
***************
*** 127,130 ****
--- 127,157 ----
  
  static
+ int mc_check_break_code( wchar_t chk, wchar_t *break_code )
+ {
+   /* Helper function, called by `mc_nlspath_open;
+    * it checks a given character against each of the
+    * contextually valid delimiters, to establish where
+    * to split the LC_MESSAGES string into components.
+    */
+   if( chk )
+   {
+     /* If we haven't run out of characters to parse...
+      */
+     while( *break_code )
+     {
+       /* Check the current character against each valid delimiter,
+        * and return the character code if a match is found.
+        */
+       if( chk == *break_code++ )
+ 	return (int)(chk);
+     }
+   }
+   /* Fall through on no match,
+    * returning zero, to tell `mc_nlspath_open' to keep parsing.
+    */
+   return 0;
+ }
+ 
+ static
  int mc_nlspath_open( __const char *msgcat, unsigned flags )
  {
***************
*** 276,297 ****
  		 ||  ((nls_locale = setlocale( LC_MESSAGES, NULL )) != NULL)  )
  		 {
- 		   wchar_t break_code = L'\0';
  		   subst = nls_locale;
  
! 		   if( chk == L'l' )
  		   {
! 		     break_code = L'_';
  		   }
  
  		   else if( (chk == L't') || (chk == L'c') )
  		   {
! 		     break_code = (chk == L't') ? L'_' : L'.';
  		     do subst += (copy_index = mbtowc( &chk, subst, MB_CUR_MAX ));
! 		     while( (copy_index > 0) && (chk != break_code) );
! 		     break_code = (break_code == L'_') ? L'.' : L'\0';
  		   }
  
  		   while( ((copy_index = mbtowc( &chk, subst, MB_CUR_MAX )) > 0)
! 		   &&      (chk != break_code)    )
  		   {
  		     if( headroom > copy_index )
--- 303,326 ----
  		 ||  ((nls_locale = setlocale( LC_MESSAGES, NULL )) != NULL)  )
  		 {
  		   subst = nls_locale;
+ 		   wchar_t *break_code = L"_.@";
  
! 		   if( chk == L'L' )
  		   {
! 		     break_code += 3;
  		   }
  
  		   else if( (chk == L't') || (chk == L'c') )
  		   {
! 		     if( chk == L'c' )
! 		       ++break_code;
  		     do subst += (copy_index = mbtowc( &chk, subst, MB_CUR_MAX ));
! 		     while( (copy_index > 0) && (chk != *break_code) );
! 		     if( *++break_code == L'@' )
! 		       ++break_code;
  		   }
  
  		   while( ((copy_index = mbtowc( &chk, subst, MB_CUR_MAX )) > 0)
! 		   &&     ! mc_check_break_code( chk, break_code )    )
  		   {
  		     if( headroom > copy_index )

Index: ChangeLog
===================================================================
RCS file: /cvsroot/mingw/catgets/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ChangeLog	20 Apr 2007 22:24:02 -0000	1.2
--- ChangeLog	9 May 2007 22:43:51 -0000	1.3
***************
*** 1,2 ****
--- 1,11 ----
+ 2007-05-09  Keith Marshall  <keithmarshall@users.sourceforge.net>
+ 
+ 	Provide more robust handling of possibly incomplete LC_MESSAGES macro
+ 	expansions, when parsing NLSPATH.
+ 
+ 	* catopen.c (mc_check_break_code): New function.
+ 	(mc_nlspath_open): Use it to identify break points, when splitting
+ 	LC_MESSAGES string into its component parts.
+ 
  2007-04-20  Keith Marshall  <keithmarshall@users.sourceforge.net>
  




------------------------------

Message: 3
Date: Fri, 11 May 2007 19:34:40 +0000
From: Keith Marshall <keithmarshall@users.sourceforge.net>
Subject: [MinGW-cvs] catgets mcsource.c,1.2,1.3
To: mingw-cvs@lists.sourceforge.net
Message-ID: <E1Hmasz-0006sU-39@mail.sourceforge.net>

Update of /cvsroot/mingw/catgets
In directory sc8-pr-cvs16:/tmp/cvs-serv31715

Modified Files:
	mcsource.c 
Log Message:
Avoid calling `iconv' with unintialised codeset converter.


Index: mcsource.c
===================================================================
RCS file: /cvsroot/mingw/catgets/mcsource.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** mcsource.c	20 Apr 2007 22:24:03 -0000	1.2
--- mcsource.c	11 May 2007 19:34:37 -0000	1.3
***************
*** 131,134 ****
--- 131,153 ----
  
  static
+ char *mc_default_codeset( void )
+ {
+   /* Helper function, called when the message definition file for a
+    * catalogue doesn't explicitly specify a codeset for the messages;
+    * establish the default codeset for the message catalogue, using
+    * the codeset of the LC_MESSAGES category in the present locale.
+    */
+   char *codeset;
+ 
+   if( (codeset = setlocale( LC_MESSAGES, "" )) == NULL )
+     codeset = setlocale( LC_MESSAGES, NULL );
+   setlocale( LC_CTYPE, codeset );
+   codeset = strdup( nl_langinfo( CODESET ));
+   setlocale( LC_CTYPE, "C" );
+ 
+   return codeset;
+ }
+ 
+ static
  int errout( const char *src, long linenum, const char *fmt, ... )
  {
***************
*** 239,243 ****
           * we have established an appropriate codeset mapping.
           */
- 
          if( codeset == NULL )
          {
--- 258,261 ----
***************
*** 245,255 ****
  	   * so default to the codeset of the system locale.
  	   */
! 
!           if( (codeset = setlocale( LC_MESSAGES, "" )) == NULL )
!             codeset = setlocale( LC_MESSAGES, NULL );
!           setlocale( LC_CTYPE, codeset );
!           codeset = strdup( nl_langinfo( CODESET ));
!           setlocale( LC_CTYPE, "C" );
!           codeset = map_codeset( iconv_map, codeset, "wchar_t" );
  	  codeset_decl_lineno = linenum;
  	  codeset_decl_src = input;
--- 263,267 ----
  	   * so default to the codeset of the system locale.
  	   */
!           codeset = map_codeset( iconv_map, mc_default_codeset(), "wchar_t" );
  	  codeset_decl_lineno = linenum;
  	  codeset_decl_src = input;
***************
*** 260,264 ****
           * transforming to the wide character domain, for local processing.
           */
- 
          p += ((skip = iconv_mbtowc( &c, p, count )) > 0) ? skip : 0;
        }
--- 272,275 ----
***************
*** 269,273 ****
           * or "C" locale, so read single byte character sequences.
           */
- 
          c = (wchar_t)(*p++);
        }
--- 280,283 ----
***************
*** 756,759 ****
--- 766,778 ----
          {
            wchar_t terminator = L'\0';
+ 	  if( codeset == NULL )
+ 	  {
+ 	    /* No codeset mapping is yet in place,
+ 	     * so default to the codeset of the system locale.
+ 	     */
+ 	    codeset = map_codeset( iconv_map, mc_default_codeset(), "wchar_t" );
+ 	    codeset_decl_lineno = linenum;
+ 	    codeset_decl_src = input;
+ 	  }
            int xcount = iconv_wctomb( messages + msgloc, terminator );
            if( xcount >= 0 )




------------------------------

Message: 4
Date: Fri, 11 May 2007 19:35:37 +0000
From: Keith Marshall <keithmarshall@users.sourceforge.net>
Subject: [MinGW-cvs] catgets ChangeLog,1.3,1.4
To: mingw-cvs@lists.sourceforge.net
Message-ID: <E1Hmatu-00068R-Rc@mail.sourceforge.net>

Update of /cvsroot/mingw/catgets
In directory sc8-pr-cvs16:/tmp/cvs-serv3180

Modified Files:
	ChangeLog 
Log Message:
Avoid calling `iconv' with unintialised codeset converter.


Index: ChangeLog
===================================================================
RCS file: /cvsroot/mingw/catgets/ChangeLog,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ChangeLog	9 May 2007 22:43:51 -0000	1.3
--- ChangeLog	11 May 2007 19:35:35 -0000	1.4
***************
*** 1,2 ****
--- 1,10 ----
+ 2007-05-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
+ 
+ 	Avoid calling `iconv' with unintialised codeset converter.
+ 
+ 	* mcsource.c (mc_default_codeset): New static function.
+ 	(mc_source): Use it, before each `iconv' call, to initialise the
+ 	codeset converters, if `codeset' has not been assigned.
+ 
  2007-05-09  Keith Marshall  <keithmarshall@users.sourceforge.net>
  




------------------------------

Message: 5
Date: Fri, 11 May 2007 19:56:19 +0000
From: Keith Marshall <keithmarshall@users.sourceforge.net>
Subject: [MinGW-cvs] catgets ChangeLog,1.4,1.5 mcsource.c,1.3,1.4
To: mingw-cvs@lists.sourceforge.net
Message-ID: <E1HmbDy-0003Gi-Iw@mail.sourceforge.net>

Update of /cvsroot/mingw/catgets
In directory sc8-pr-cvs16:/tmp/cvs-serv26676

Modified Files:
	ChangeLog mcsource.c 
Log Message:
Avoid attempt to read input again, after EOF detected.


Index: mcsource.c
===================================================================
RCS file: /cvsroot/mingw/catgets/mcsource.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** mcsource.c	11 May 2007 19:34:37 -0000	1.3
--- mcsource.c	11 May 2007 19:56:17 -0000	1.4
***************
*** 205,210 ****
  # define CODESET_DECLARED       codeset_decl_src, codeset_decl_lineno
  
-   int fd, count;
    long accumulator;
    char buf[BUFSIZ], keyword[64];
    char *id;
--- 205,210 ----
  # define CODESET_DECLARED       codeset_decl_src, codeset_decl_lineno
  
    long accumulator;
+   int fd, input_fd, count;
    char buf[BUFSIZ], keyword[64];
    char *id;
***************
*** 231,239 ****
    if( (strcmp( input, "-") == 0) || (strcmp( input, dev_stdin ) == 0) )
    {
!     fd = STDIN_FILENO;
      input = dev_stdin;
    }
  
!   else if( (fd = open( input, O_RDONLY | O_BINARY )) < 0 )
      return NULL;
  
--- 231,239 ----
    if( (strcmp( input, "-") == 0) || (strcmp( input, dev_stdin ) == 0) )
    {
!     input_fd = fd = STDIN_FILENO;
      input = dev_stdin;
    }
  
!   else if( (input_fd = fd = open( input, O_RDONLY | O_BINARY )) < 0 )
      return NULL;
  
***************
*** 243,247 ****
  
    msgloc = (off_t)(0);
!   while( (count = read( fd, buf, sizeof( buf ) )) > 0 )
    {
      char *p = buf;
--- 243,247 ----
  
    msgloc = (off_t)(0);
!   while( (fd >= 0) && ((count = read( fd, buf, sizeof( buf ) )) > 0) )
    {
      char *p = buf;
***************
*** 796,805 ****
  	if( (p - buf) > high_water_mark )
  	{
  	  char *copyptr;
  	  for( copyptr = buf; count; count-- )
  	    *copyptr++ = *p++;
! 	  p = buf; count = copyptr - p;
  	  dfprintf(( stderr, "\n%s:%u:input count depleted: %u byte%s remaining", input, \
                linenum, count, count == 1 ? "" : "s" ));
! 	  count += read( fd, copyptr, sizeof( buf ) - count );
  	  dfprintf(( stderr, "; read new input: count adjusted to %u byte%s", count, count \
== 1 ? "" : "s" ));  high_water_mark = count - ( count >> 2 );
--- 796,808 ----
  	if( (p - buf) > high_water_mark )
  	{
+ 	  int ref;
  	  char *copyptr;
  	  for( copyptr = buf; count; count-- )
  	    *copyptr++ = *p++;
! 	  p = buf; ref = count = copyptr - p;
  	  dfprintf(( stderr, "\n%s:%u:input count depleted: %u byte%s remaining", input, \
                linenum, count, count == 1 ? "" : "s" ));
! 	  if( (fd >= 0)
! 	  &&  (ref == (count += read( fd, copyptr, sizeof( buf ) - count )))  )
! 	    fd = -1;
  	  dfprintf(( stderr, "; read new input: count adjusted to %u byte%s", count, count \
== 1 ? "" : "s" ));  high_water_mark = count - ( count >> 2 );
***************
*** 873,876 ****
--- 876,883 ----
    dfputc(( L'\n', stderr ));
  
+   /* We are done with the current input source;
+    * close its file descriptor, and return the message list.
+    */
+   close( input_fd );
    return head;
  }

Index: ChangeLog
===================================================================
RCS file: /cvsroot/mingw/catgets/ChangeLog,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ChangeLog	11 May 2007 19:35:35 -0000	1.4
--- ChangeLog	11 May 2007 19:56:17 -0000	1.5
***************
*** 1,4 ****
--- 1,14 ----
  2007-05-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
  
+ 	Avoid attempt to read input again, after EOF detected; this caused
+ 	strange behaviour if processing an interactive input stream.
+ 
+ 	* mcsource.c (mc_source): New local variable `input_fd'; assign it as
+ 	a duplicate of `fd'.  Set `fd' to -1, when EOF detected; don't do any
+ 	more reads, after `fd' set to this invalid value.  Call `close' on
+ 	`input_fd', before return.
+ 
+ 2007-05-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
+ 
  	Avoid calling `iconv' with unintialised codeset converter.
  




------------------------------

Message: 6
Date: Fri, 11 May 2007 22:48:19 +0000
From: Keith Marshall <keithmarshall@users.sourceforge.net>
Subject: [MinGW-cvs] catgets ChangeLog,1.5,1.6 mcsource.c,1.4,1.5
To: mingw-cvs@lists.sourceforge.net
Message-ID: <E1HmduP-00045E-Ew@mail.sourceforge.net>

Update of /cvsroot/mingw/catgets
In directory sc8-pr-cvs16:/tmp/cvs-serv15402

Modified Files:
	ChangeLog mcsource.c 
Log Message:
Miscellaneous comment and layout improvements.


Index: mcsource.c
===================================================================
RCS file: /cvsroot/mingw/catgets/mcsource.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mcsource.c	11 May 2007 19:56:17 -0000	1.4
--- mcsource.c	11 May 2007 22:48:17 -0000	1.5
***************
*** 10,14 ****
   *
   * Written by Keith Marshall  <keithmarshall@users.sourceforge.net>
!  * Last modification: 27-Mar-2007
   *
   *
--- 10,14 ----
   *
   * Written by Keith Marshall  <keithmarshall@users.sourceforge.net>
!  * Last modification: 11-May-2007
   *
   *
***************
*** 96,100 ****
     * and activate the appropriate parser attribute bits to process it.
     */
- 
    static struct directives
    {
--- 96,99 ----
***************
*** 150,155 ****
  
  static
! int errout( const char *src, long linenum, const char *fmt, ... )
  {
    va_list args;
    va_start( args, fmt );
--- 149,157 ----
  
  static
! int mc_errout( const char *src, long linenum, const char *fmt, ... )
  {
+   /* Message dispatcher for error messages,
+    * used when `gencat_errno' is to be set to indicate `EXIT_FAILURE'.
+    */
    va_list args;
    va_start( args, fmt );
***************
*** 161,165 ****
  
  static
! off_t wanted( int fd )
  {
    struct stat info;
--- 163,167 ----
  
  static
! off_t mc_workspace_wanted( int fd )
  {
    struct stat info;
***************
*** 176,190 ****
  
  static
! size_t add_escape( iconv_t *iconv_map, char *msgbuf, wchar_t code )
  {
  /* A trivial helper function, for encoding an escape sequence into the
   * compiled message stream.
   */
!   dfprintf(( stderr, DCODEFMT, code ));
    return iconv_wctomb( msgbuf, code );
  }
  
  static
! char *update_workspace( char *buf, char *cache, unsigned int count )
  {
  # ifdef DEBUG
--- 178,192 ----
  
  static
! size_t mc_add_escape( iconv_t *iconv_map, char *msgbuf, wchar_t code )
  {
  /* A trivial helper function, for encoding an escape sequence into the
   * compiled message stream.
   */
!   dfprintf(( stderr, "add escape code: %0#4.4x", code ));
    return iconv_wctomb( msgbuf, code );
  }
  
  static
! char *mc_update_workspace( char *buf, char *cache, unsigned int count )
  {
  # ifdef DEBUG
***************
*** 239,243 ****
  
    dfprintf(( stderr, "\n%s:new source file\n%s:", input, input ));
!   if( (messages = mc_malloc( headroom = wanted( fd ))) == NULL )
      return NULL;
  
--- 241,245 ----
  
    dfprintf(( stderr, "\n%s:new source file\n%s:", input, input ));
!   if( (messages = mc_malloc( headroom = mc_workspace_wanted( fd ))) == NULL )
      return NULL;
  
***************
*** 292,296 ****
             * and clear the set/message number accumulator.
             */
- 
            ++linenum;
            status &= ~( DIRECTIVE | NUMERIC | CATEGORY );
--- 294,297 ----
***************
*** 302,306 ****
               * of the previous line...
               */
- 
              status &= ~MSGTEXT;
              dfprintf(( stderr, "\n\n%s:%d:new input record", input, linenum ));
--- 303,306 ----
***************
*** 311,315 ****
                 * or it's a comment.
                 */
- 
                status |= DIRECTIVE;
                id = keyword;
--- 311,314 ----
***************
*** 321,325 ****
                 * with a the message identified by an explicit numeric key.
                 */
- 
                status |= NUMERIC;
                accumulator = c - L'0';
--- 320,323 ----
***************
*** 334,338 ****
               * as part of the message definition.
               */
- 
              if( c == quote )
              {
--- 332,335 ----
***************
*** 351,355 ****
             * so clear the related NEWLINE and CONTINUATION flags.
             */
- 
            status &= ~( NEWLINE | CONTINUED );
          }
--- 348,351 ----
***************
*** 361,370 ****
             * directive identifying keyword.
             */
- 
            if( isspace( c ) )
            {
              /* We found the keyword delimiting space ...
              */
- 
              if( id == keyword )
              {
--- 357,364 ----
***************
*** 375,379 ****
  	       * set the comment state, to parse any codeset assignment.
                 */
- 
  	      status = (status & ~CATEGORY) | DEFCONV;
                dfprintf(( stderr, "\n%s:%u:record type: comment", input, linenum ));
--- 369,372 ----
***************
*** 420,424 ****
                 * identify it, and establish its associated parser state.
                 */
- 
                *id = '\0';
                status = mc_directive( status, keyword );
--- 413,416 ----
***************
*** 433,437 ****
               * add the current character to the keyword parse buffer.
               */
- 
              if( (id - keyword) < (sizeof( keyword ) - 1) )
                *id++ = c;
--- 425,428 ----
***************
*** 443,447 ****
            /* We are parsing a numeric value...
            */
- 
            if( isdigit( c ) )
            {
--- 434,437 ----
***************
*** 449,453 ****
               * so add it into the accumulator.
               */
- 
              accumulator = accumulator * 10 + c - L'0';
            }
--- 439,442 ----
***************
*** 459,463 ****
               * and process as appropriate.
               */
- 
              switch( status & CATEGORY )
              {
--- 448,451 ----
***************
*** 466,472 ****
                   * Invoked by a "set" directive,
                   * open a new numbered message set within the catalogue ...
-                  *
                   */
- 
                  dfprintf(( stderr, ": add set with id = %ld", accumulator ));
                  if( accumulator > setnum )
--- 454,458 ----
***************
*** 480,484 ****
                     * and reset the "msgnum", for the start of a new set.
                     */
- 
                    setnum = accumulator;
                    msgnum = 0;
--- 466,469 ----
***************
*** 490,496 ****
                     * so complain, and bail out.
                     */
- 
                    dfputc(( '\n', stderr ));
!                   gencat_errno = errout( FATAL( MSG_SETNUM_NOT_INCR ), setnum, \
accumulator );  return NULL;
                  }
--- 475,480 ----
                     * so complain, and bail out.
                     */
                    dfputc(( '\n', stderr ));
!                   gencat_errno = mc_errout( FATAL( MSG_SETNUM_NOT_INCR ), setnum, \
accumulator );  return NULL;
                  }
***************
*** 501,505 ****
                   * Invoked by a "delset" directive,
                   * mark a numbered message set for deletion from the catalogue.
- 		 *
                   */
                  dfprintf(( stderr, ": delete set with id = %ld", accumulator ));
--- 485,488 ----
***************
*** 512,516 ****
  		     * so fill it in as a `delset' request entry.
  		     */
- 
  		    this->src = input;
  		    this->lineno = linenum;
--- 495,498 ----
***************
*** 523,527 ****
                         * so simply insert this as the first one.
                         */
- 
                        head = tail = this;
                        this->link = NULL;
--- 505,508 ----
***************
*** 533,537 ****
                         * so the new one must be added at the end.
                         */
- 
                        this->link = tail->link;
                        tail->link = this;
--- 514,517 ----
***************
*** 550,554 ****
                     * this requirement, so add a new message to the catalogue.
                     */
- 
                    struct msgdict *this;
                    if( (this = mc_malloc( sizeof( struct msgdict ))) != NULL )
--- 530,533 ----
***************
*** 560,564 ****
                       * simply open the default set.
                       */
- 
                      if( setnum == 0 )
                        setnum = NL_SETD;
--- 539,542 ----
***************
*** 567,571 ****
                       * dictionary slot, and commit the record to the catalogue.
                       */
- 
  		    this->src = input;
  		    this->base = messages;
--- 545,548 ----
***************
*** 579,583 ****
                         * so simply insert this as the first one.
                         */
- 
                        head = tail = this;
                        this->link = NULL;
--- 556,559 ----
***************
*** 589,593 ****
                         * so the new one must be added at the end.
                         */
- 
                        this->link = tail->link;
                        tail->link = this;
--- 565,568 ----
***************
*** 602,608 ****
                     * so complain, and bail out.
                     */
- 
                    dfputc(( '\n', stderr ));
!                   gencat_errno = errout( FATAL( MSG_MSGNUM_NOT_INCR ), msgnum, \
accumulator );  return NULL;
                  }
--- 577,582 ----
                     * so complain, and bail out.
                     */
                    dfputc(( '\n', stderr ));
!                   gencat_errno = mc_errout( FATAL( MSG_MSGNUM_NOT_INCR ), msgnum, \
accumulator );  return NULL;
                  }
***************
*** 626,630 ****
             * character appears before end of line.
             */
- 
            quote = (c == L'\n') ? L'\0' : c;
            dfprintf(( stderr, quote ? ": assigned as %#4.4x" : ": none assigned", \
                quote ));
--- 600,603 ----
***************
*** 638,642 ****
             * until we find the end-of-line marker.
             */
- 
            if( c != L'\n' )
            {
--- 611,614 ----
***************
*** 644,648 ****
               * Check for other characters with special significance.
               */
- 
              if( status & ESCAPE )
              {
--- 616,619 ----
***************
*** 650,669 ****
                 * Clear the ESCAPE flag, and interpret this case.
                 */
- 
  	      size_t len = 0;
                status &= ~ESCAPE;
                switch ( c )
                {
                  case L'r':      /* embed a carriage return */
! 		  len = add_escape( iconv_map, messages + msgloc, L'\r' );
                    break;
  
                  case L'n':      /* embed a newline */
! 		  len = add_escape( iconv_map, messages + msgloc, L'\n' );
                    break;
  
                  default:        /* not a special case; just pass it through */
                    xcount += skip;
!                   dfputc(( c, stderr ));
                }
  	      if( len > (size_t)(0) )
--- 621,640 ----
                 * Clear the ESCAPE flag, and interpret this case.
                 */
  	      size_t len = 0;
                status &= ~ESCAPE;
+               dfprintf(( stderr, "%s:%u:", input, linenum ));
                switch ( c )
                {
                  case L'r':      /* embed a carriage return */
! 		  len = mc_add_escape( iconv_map, messages + msgloc, L'\r' );
                    break;
  
                  case L'n':      /* embed a newline */
! 		  len = mc_add_escape( iconv_map, messages + msgloc, L'\n' );
                    break;
  
                  default:        /* not a special case; just pass it through */
                    xcount += skip;
!                   dfprintf(( stderr, "pass through escape code: %0#4.4x", c ));
                }
  	      if( len > (size_t)(0) )
***************
*** 680,684 ****
                 * and switch to ESCAPE mode, to interpret the next character.
                 */
- 
                status |= FLUSH | ESCAPE;
              }
--- 651,654 ----
***************
*** 709,713 ****
             * for flushing to the message collection buffer.
             */
- 
            status |= NEWLINE | FLUSH;
  
--- 679,682 ----
***************
*** 715,719 ****
             * then we have an implicit continuation, so force it.
             */
- 
            if( (status & QUOTED) == QUOTED )
              status |= CONTINUED;
--- 684,687 ----
***************
*** 721,725 ****
            /* Clean up the context of any pending directive processing.
             */
- 
            switch( status & CATEGORY )
            {
--- 689,692 ----
***************
*** 730,734 ****
                 * so we must disable "quote" character recognition.
                 */
- 
                quote = L'\0';
                dfprintf(( stderr, ": none assigned" ));
--- 697,700 ----
***************
*** 755,759 ****
            if( (messages = realloc( messages, msgloc + headroom )) == NULL )
  	  {
!             gencat_errno = errout( FATAL( MSG_OUT_OF_MEMORY ));
  	    return NULL;
  	  }
--- 721,725 ----
            if( (messages = realloc( messages, msgloc + headroom )) == NULL )
  	  {
!             gencat_errno = mc_errout( FATAL( MSG_OUT_OF_MEMORY ));
  	    return NULL;
  	  }
***************
*** 761,765 ****
          headroom -= xcount;
  	dfprintf(( stderr, "\n%s:%u:", input, linenum ));
!         msgloc = update_workspace( messages + msgloc, p - xcount - skip, xcount ) - \
messages;  dfprintf(( stderr, "; %u byte%s free\n", headroom, headroom == 1 ? "" : \
                "s" ));
          if( (status & (MSGTEXT | NEWLINE | CONTINUED)) == (MSGTEXT | NEWLINE) )
--- 727,732 ----
          headroom -= xcount;
  	dfprintf(( stderr, "\n%s:%u:", input, linenum ));
!         msgloc = mc_update_workspace( messages + msgloc, p - xcount - skip, xcount \
                )
!                - messages;
  	dfprintf(( stderr, "; %u byte%s free\n", headroom, headroom == 1 ? "" : "s" ));
          if( (status & (MSGTEXT | NEWLINE | CONTINUED)) == (MSGTEXT | NEWLINE) )

Index: ChangeLog
===================================================================
RCS file: /cvsroot/mingw/catgets/ChangeLog,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ChangeLog	11 May 2007 19:56:17 -0000	1.5
--- ChangeLog	11 May 2007 22:48:17 -0000	1.6
***************
*** 1,4 ****
--- 1,19 ----
  2007-05-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
  
+ 	* mcsource.c: Miscellaneous comment and layout improvements;
+ 	improved formatting of some debugging/tracing messages.
+ 	(add_escape): Static function renamed...
+ 	(mc_add_escape): ...to this.
+ 	(wanted): Static function renamed...
+ 	(mc_workspace_wanted): ...to this.
+ 	(update_workspace): Static function renamed...
+ 	(mc_update_workspace): ...to this.
+ 	(errout): Static function renamed...
+ 	(mc_errout): ...to this.
+ 
+ 	* include/debug.h (DCODEFMT): Redundant macro; deleted.
+ 
+ 2007-05-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
+ 
  	Avoid attempt to read input again, after EOF detected; this caused
  	strange behaviour if processing an interactive input stream.




------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

------------------------------

_______________________________________________
MinGW-cvs mailing list
MinGW-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-cvs


End of MinGW-cvs Digest, Vol 10, Issue 2
****************************************


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic