Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Matthias Brantner
Approved revision: 11195
Merged at revision: 11424
Proposed branch: lp:~paul-lucas/zorba/pjl-misc
Merge into: lp:zorba
Diff against target: 165 lines (+13/-56)
3 files modified
src/common/shared_types.h (+0/-3)
src/util/ascii_util.h (+8/-48)
src/util/utf8_util.tcc (+5/-5)
To merge this branch: bzr merge lp:~paul-lucas/zorba/pjl-misc
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+161770@code.launchpad.net

Commit message

1. Fixed ASCII testing (although it's not clear how it worked up until now on Mac OS X).
2. Removed remnants of xqpString types.

Description of the change

1. Fixed ASCII testing (although it's not clear how it worked up until now on Mac OS X).
2. Removed remnants of xqpString types.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job pjl-misc-2013-05-01T04-04-52.812Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1, Needs Information < 1, Resubmit < 1. Got: 1 Approve.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job pjl-misc-2013-05-01T15-23-50.11Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/common/shared_types.h'
--- src/common/shared_types.h 2013-02-07 17:24:36 +0000
+++ src/common/shared_types.h 2013-05-01 03:59:31 +0000
@@ -121,9 +121,6 @@
121class GMonthDay;121class GMonthDay;
122class GDay;122class GDay;
123class GMonth;123class GMonth;
124class xqpString;
125class xqpStringStore;
126typedef rchandle<xqpStringStore> xqpStringStore_t;
127typedef rchandle<DateTime> DateTime_t;124typedef rchandle<DateTime> DateTime_t;
128typedef rchandle<Date> Date_t;125typedef rchandle<Date> Date_t;
129typedef rchandle<Time> Time_t;126typedef rchandle<Time> Time_t;
130127
=== modified file 'src/util/ascii_util.h'
--- src/util/ascii_util.h 2013-03-26 00:11:11 +0000
+++ src/util/ascii_util.h 2013-05-01 03:59:31 +0000
@@ -118,12 +118,7 @@
118 */118 */
119template<typename CharType> inline119template<typename CharType> inline
120bool is_alpha( CharType c ) {120bool is_alpha( CharType c ) {
121#ifdef WIN32121 return is_ascii( c ) && isalpha( c );
122 // Windows' isalpha() implementation crashes for non-ASCII characters.
123 return __isascii( c ) && isalpha( c );
124#else
125 return isalpha( c );
126#endif
127}122}
128123
129/**124/**
@@ -137,12 +132,7 @@
137 */132 */
138template<typename CharType> inline133template<typename CharType> inline
139bool is_alnum( CharType c ) {134bool is_alnum( CharType c ) {
140#ifdef WIN32135 return is_ascii( c ) && isalnum( c );
141 // Windows' isalpha() implementation crashes for non-ASCII characters.
142 return __isascii( c ) && isalnum( c );
143#else
144 return isalnum( c );
145#endif
146}136}
147137
148/**138/**
@@ -156,12 +146,7 @@
156 */146 */
157template<typename CharType> inline147template<typename CharType> inline
158bool is_cntrl( CharType c ) {148bool is_cntrl( CharType c ) {
159#ifdef WIN32149 return is_ascii( c ) && iscntrl( c );
160 // Windows' iscntrl() implementation crashes for non-ASCII characters.
161 return __isascii( c ) && iscntrl( c );
162#else
163 return iscntrl( c );
164#endif
165}150}
166151
167/**152/**
@@ -175,12 +160,7 @@
175 */160 */
176template<typename CharType> inline161template<typename CharType> inline
177bool is_digit( CharType c ) {162bool is_digit( CharType c ) {
178#ifdef WIN32163 return is_ascii( c ) && isdigit( c );
179 // Windows' isdigit() implementation crashes for non-ASCII characters.
180 return __isascii( c ) && isdigit( c );
181#else
182 return isdigit( c );
183#endif
184}164}
185165
186/**166/**
@@ -194,12 +174,7 @@
194 */174 */
195template<typename CharType> inline175template<typename CharType> inline
196bool is_print( CharType c ) {176bool is_print( CharType c ) {
197#ifdef WIN32177 return is_ascii( c ) && isprint( c );
198 // Windows' isprint() implementation crashes for non-ASCII characters.
199 return __isascii( c ) && isprint( c );
200#else
201 return isprint( c );
202#endif
203}178}
204179
205/**180/**
@@ -213,12 +188,7 @@
213 */188 */
214template<typename CharType> inline189template<typename CharType> inline
215bool is_punct( CharType c ) {190bool is_punct( CharType c ) {
216#ifdef WIN32191 return is_ascii( c ) && ispunct( c );
217 // Windows' ispunct() implementation crashes for non-ASCII characters.
218 return __isascii( c ) && ispunct( c );
219#else
220 return ispunct( c );
221#endif
222}192}
223193
224/**194/**
@@ -232,12 +202,7 @@
232 */202 */
233template<typename CharType> inline203template<typename CharType> inline
234bool is_space( CharType c ) {204bool is_space( CharType c ) {
235#ifdef WIN32205 return is_ascii( c ) && isspace( c );
236 // Windows' isspace() implementation crashes for non-ASCII characters.
237 return __isascii( c ) && isspace( c );
238#else
239 return isspace( c );
240#endif
241}206}
242207
243/**208/**
@@ -270,12 +235,7 @@
270 */235 */
271template<typename CharType> inline236template<typename CharType> inline
272bool is_xdigit( CharType c ) {237bool is_xdigit( CharType c ) {
273#ifdef WIN32238 return is_ascii( c ) && isxdigit( c );
274 // Windows' isxdigit() implementation crashes for non-ASCII characters.
275 return __isascii( c ) && isxdigit( c );
276#else
277 return isxdigit( c );
278#endif
279}239}
280240
281////////// begins/ends_with ///////////////////////////////////////////////////241////////// begins/ends_with ///////////////////////////////////////////////////
282242
=== modified file 'src/util/utf8_util.tcc'
--- src/util/utf8_util.tcc 2013-04-20 00:50:38 +0000
+++ src/util/utf8_util.tcc 2013-05-01 03:59:31 +0000
@@ -33,12 +33,12 @@
33template<class StringType> back_html_uri_insert_iterator<StringType>&33template<class StringType> back_html_uri_insert_iterator<StringType>&
34back_html_uri_insert_iterator<StringType>::operator=( value_type c ) {34back_html_uri_insert_iterator<StringType>::operator=( value_type c ) {
35 char const dec2hex[] = "0123456789ABCDEF";35 char const dec2hex[] = "0123456789ABCDEF";
36 unsigned u = c & 0xFF;36 unsigned u = c & 0xFFu;
37 if ( !isprint( u ) ) {37 if ( !ascii::is_print( u ) ) {
38 utf8::encoded_char_type ec;38 utf8::encoded_char_type ec;
39 utf8::size_type const bytes = utf8::encode( c, ec );39 utf8::size_type const bytes = utf8::encode( c, ec );
40 for ( size_type i = 0; i < bytes; ++i ) {40 for ( size_type i = 0; i < bytes; ++i ) {
41 u = ec[i] & 0xFF;41 u = ec[i] & 0xFFu;
42 buf_[1] = dec2hex[ u >> 4 ];42 buf_[1] = dec2hex[ u >> 4 ];
43 buf_[2] = dec2hex[ u & 0x0F ];43 buf_[2] = dec2hex[ u & 0x0F ];
44 this->container->append( buf_, 3 );44 this->container->append( buf_, 3 );
@@ -52,13 +52,13 @@
52template<class StringType> back_iri_insert_iterator<StringType>&52template<class StringType> back_iri_insert_iterator<StringType>&
53back_iri_insert_iterator<StringType>::operator=( value_type c ) {53back_iri_insert_iterator<StringType>::operator=( value_type c ) {
54 char const dec2hex[] = "0123456789ABCDEF";54 char const dec2hex[] = "0123456789ABCDEF";
55 unsigned u = c & 0xFF;55 unsigned u = c & 0xFFu;
56 if ( unicode::is_ucschar( c ) || unicode::is_iprivate( c ) ||56 if ( unicode::is_ucschar( c ) || unicode::is_iprivate( c ) ||
57 unicode::is_invalid_in_iri( c ) ) {57 unicode::is_invalid_in_iri( c ) ) {
58 utf8::encoded_char_type ec;58 utf8::encoded_char_type ec;
59 utf8::size_type const bytes = utf8::encode( c, ec );59 utf8::size_type const bytes = utf8::encode( c, ec );
60 for ( size_type i = 0; i < bytes; ++i ) {60 for ( size_type i = 0; i < bytes; ++i ) {
61 u = ec[i] & 0xFF;;61 u = ec[i] & 0xFFu;
62 buf_[1] = dec2hex[ u >> 4 ];62 buf_[1] = dec2hex[ u >> 4 ];
63 buf_[2] = dec2hex[ u & 0x0F ];63 buf_[2] = dec2hex[ u & 0x0F ];
64 this->container->append( buf_, 3 );64 this->container->append( buf_, 3 );

Subscribers

People subscribed via source and target branches