Changeset 267

Show
Ignore:
Timestamp:
09/19/2006 07:24:22 PM
Author:
shiva
Message:

Drop and warn about control characters in metadata.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Ken/restore-widetime/ssphys/utils/tinyxml.cpp

    r262 r267  
    2929#include <sstream> 
    3030#include <iostream> 
     31#include <iomanip> 
    3132#endif 
    3233 
     
    113114                else if (iscntrl (c)) // ( c < 32) 
    114115                { 
     116#if 0 
    115117                        // Easy pass at non-alpha/numeric/symbol 
    116118                        // Below 32 is symbolic. 
     
    125127                        //*ME:  warning C4267: convert 'size_t' to 'int' 
    126128                        //*ME:  Int-Cast to make compiler happy ... 
    127                         outString->append( buf, (int)strlen( buf ) ); 
     129                                outString->append( buf, (int)strlen( buf ) ); 
     130#else 
     131                        std::cerr << "WARNING: control character 0x" 
     132                                        << std::hex << std::setw(2) << std::setfill('0') << (unsigned)c 
     133                                        << " in text input at character " 
     134                                        << std::dec << std::setw(0) << i 
     135                                        << std::endl; 
     136                         
     137#endif 
    128138                        ++i; 
    129139                } 

These ads are automatically generated by Google based on the content of this page. Revenue from these ads helps to pay for hosting fees of this site; however, these ads do not constitute an endorsement by PumaCode.org.