+ wxChar ch = READ_STRING_CHAR(s, idx, length);
+
+ // Skip WS
+ while (ch==wxT(' ') || ch==wxT('\t'))
+ ch = READ_STRING_CHAR(s, idx, length);
+
+ // Read number
+ wxULongLong multiplier(0l, 10l);
+ while (ch>=wxT('0') && ch<=wxT('9')) {
+ long lValue = (unsigned) (ch - wxT('0'));
+ ll = ll * multiplier + wxULongLong(0l, lValue);
+ ch = READ_STRING_CHAR(s, idx, length);
+ }
+
+ return o;
+}
+
+WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &o, wxLongLong &ll)
+{
+ wxString s = o.ReadWord();
+
+ ll = wxLongLong(0l, 0l);
+ size_t length = s.length();
+ size_t idx = 0;
+
+ wxChar ch = READ_STRING_CHAR(s, idx, length);
+
+ // Skip WS
+ while (ch==wxT(' ') || ch==wxT('\t'))
+ ch = READ_STRING_CHAR(s, idx, length);
+
+ // Ask for sign
+ int iSign = 1;
+ if (ch==wxT('-') || ch==wxT('+')) {
+ iSign = ((ch==wxT('-')) ? -1 : 1);
+ ch = READ_STRING_CHAR(s, idx, length);
+ }
+
+ // Read number
+ wxLongLong multiplier(0l, 10l);
+ while (ch>=wxT('0') && ch<=wxT('9')) {
+ long lValue = (unsigned) (ch - wxT('0'));
+ ll = ll * multiplier + wxLongLong(0l, lValue);
+ ch = READ_STRING_CHAR(s, idx, length);