w_input.cpp

00001 /*<std-header orig-src='shore'>
00002 
00003  $Id: w_input.cpp,v 1.14 2010/05/26 01:20:25 nhall Exp $
00004 
00005 SHORE -- Scalable Heterogeneous Object REpository
00006 
00007 Copyright (c) 1994-99 Computer Sciences Department, University of
00008                       Wisconsin -- Madison
00009 All Rights Reserved.
00010 
00011 Permission to use, copy, modify and distribute this software and its
00012 documentation is hereby granted, provided that both the copyright
00013 notice and this permission notice appear in all copies of the
00014 software, derivative works or modified versions, and any portions
00015 thereof, and that both notices appear in supporting documentation.
00016 
00017 THE AUTHORS AND THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY
00018 OF WISCONSIN - MADISON ALLOW FREE USE OF THIS SOFTWARE IN ITS
00019 "AS IS" CONDITION, AND THEY DISCLAIM ANY LIABILITY OF ANY KIND
00020 FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
00021 
00022 This software was developed with support by the Advanced Research
00023 Project Agency, ARPA order number 018 (formerly 8230), monitored by
00024 the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518.
00025 Further funding for this work was provided by DARPA through
00026 Rome Research Laboratory Contract No. F30602-97-2-0247.
00027 
00028 */
00029 
00030 #include "w_defines.h"
00031 
00032 /*  -- do not edit anything above this line --   </std-header>*/
00033 
00034 #define W_SOURCE
00035 
00036 #include <w_base.h>
00037 #include <cctype>
00038 #include <iostream>
00039 
00040 /**\cond skip */
00041 enum states {   start, sgned, leadz,  
00042         new_hex, new_oct, new_dec,
00043         is_hex, is_oct, is_dec, 
00044         end, error, no_hex, no_state };
00045 
00046     // NB: these first 16 MUST have the values given
00047 enum charclass { zero=0, one=1, two=2, three=3, four=4, 
00048         five=5, six=6, seven=7, eight=8, 
00049         nine=9, ten=10, eleven=11,
00050         twelve=12, thirteen=13, fourteen=14, fifteen=15,
00051         exx, JJJJ, eofile, white, sign, no_charclass
00052         };
00053 
00054 static int equiv[127] = {
00055     /* 10 per line */
00056     /* 0 */
00057     JJJJ, JJJJ, JJJJ, JJJJ, JJJJ,     JJJJ, JJJJ, JJJJ, JJJJ, white, 
00058     /* 10 */
00059     JJJJ, JJJJ, JJJJ, JJJJ, JJJJ,     JJJJ, JJJJ, JJJJ, JJJJ, JJJJ, 
00060     /* 20 */
00061     JJJJ, JJJJ, JJJJ, JJJJ, JJJJ,     JJJJ, JJJJ, JJJJ, JJJJ, JJJJ, 
00062     /* 30 */
00063     JJJJ, JJJJ, white, JJJJ, JJJJ,    JJJJ, JJJJ, JJJJ, JJJJ, JJJJ, 
00064     /* 40 */
00065     JJJJ, JJJJ, JJJJ, sign, JJJJ,     sign, JJJJ, JJJJ, zero, one, 
00066     /* 50 */
00067     two , three, four, five, six,     seven, eight, nine, JJJJ, JJJJ,
00068     /* 60 */
00069     JJJJ, JJJJ, JJJJ, JJJJ, JJJJ,     ten, eleven, twelve, thirteen, fourteen, 
00070     /* 70 */
00071     fifteen, JJJJ, JJJJ, JJJJ, JJJJ,  JJJJ, JJJJ, JJJJ, JJJJ, JJJJ, 
00072     /* 80 */
00073     JJJJ, JJJJ, JJJJ, JJJJ, JJJJ,     JJJJ, JJJJ, JJJJ, exx, JJJJ, 
00074     /* 90 */
00075     JJJJ, JJJJ, JJJJ, JJJJ, JJJJ,     JJJJ, JJJJ, ten, eleven, twelve, 
00076     /* 100 */
00077     thirteen, fourteen, fifteen, JJJJ, JJJJ,   JJJJ, JJJJ, JJJJ, JJJJ, JJJJ, 
00078     /* 110 */
00079     JJJJ, JJJJ, JJJJ, JJJJ, JJJJ,     JJJJ, JJJJ, JJJJ, JJJJ, JJJJ, 
00080     /* 120 */
00081     exx, JJJJ, JJJJ, JJJJ, JJJJ,      JJJJ, JJJJ
00082 };
00083 
00084 typedef enum states XTABLE[no_charclass][no_state];
00085 static enum states table_unknown[no_charclass][no_state] =
00086 {
00087     /*  start, sgned,  leadz,  new_hex,new_oct,new_dec,is_hex, is_oct, is_dec, end */
00088 /* zero */
00089     {  leadz, leadz,   leadz,  is_hex, is_oct, is_dec, is_hex, is_oct, is_dec, error },
00090 /* c1_7 */
00091     {  new_dec,new_dec,new_oct,is_hex, is_oct, is_dec, is_hex, is_oct, is_dec, error},
00092     {  new_dec,new_dec,new_oct,is_hex, is_oct, is_dec, is_hex, is_oct, is_dec, error},
00093     {  new_dec,new_dec,new_oct,is_hex, is_oct, is_dec, is_hex, is_oct, is_dec, error},
00094     {  new_dec,new_dec,new_oct,is_hex, is_oct, is_dec, is_hex, is_oct, is_dec, error},
00095     {  new_dec,new_dec,new_oct,is_hex, is_oct, is_dec, is_hex, is_oct, is_dec, error},
00096     {  new_dec,new_dec,new_oct,is_hex, is_oct, is_dec, is_hex, is_oct, is_dec, error},
00097     {  new_dec,new_dec,new_oct,is_hex, is_oct, is_dec, is_hex, is_oct, is_dec, error},
00098 /* c8_9 */
00099     {  new_dec,new_dec,new_dec,is_hex, end,    is_dec, is_hex, is_oct, is_dec,error },
00100     {  new_dec,new_dec,new_dec,is_hex, end,    is_dec, is_hex, is_oct, is_dec,error },
00101 /* ca-f */
00102     {  error,error,new_hex,is_hex, end,    end,    is_hex, end,    end,   error },
00103     {  error,error,new_hex,is_hex, end,    end,    is_hex, end,    end,   error },
00104     {  error,error,new_hex,is_hex, end,    end,    is_hex, end,    end,   error },
00105     {  error,error,new_hex,is_hex, end,    end,    is_hex, end,    end,   error },
00106     {  error,error,new_hex,is_hex, end,    end,    is_hex, end,    end,   error },
00107     {  error,error,new_hex,is_hex, end,    end,    is_hex, end,    end,   error },
00108 /* exx */
00109     {  error,  error,  new_hex,end,    end,    end,    end,    end,    end,   error },
00110 /* JJJJ */
00111     {  error,  error,  end,    no_hex, end,    end,    end,    end,    end,   error },
00112 /* EOF, eofile */
00113     {  error,  error,  end,    no_hex, end,    end,    end,    end,    end,   error },
00114 /* white */
00115     {  start,  error,  end,    end,    end,    end,    end,    end,    end,   error },
00116 /* sign */
00117     {  sgned,  error,  end,    no_hex, end,    end,    end,    end,    end,   error }, 
00118 };
00119 
00120 static enum states table_base16[no_charclass][no_state] =
00121 {
00122     /*  start, sgned,  leadz, new_hex,new_oct,new_dec,is_hex, is_oct, is_dec, end */
00123 /* zero */
00124     {  leadz, leadz,   leadz,  is_hex, error, error, is_hex, error, error, error },
00125 /* c1_7 */
00126     {  is_hex,is_hex, is_hex, is_hex, error, error, is_hex, error, error,  error },
00127     {  is_hex,is_hex, is_hex, is_hex, error, error, is_hex, error, error,  error },
00128     {  is_hex,is_hex, is_hex, is_hex, error, error, is_hex, error, error,  error },
00129     {  is_hex,is_hex, is_hex, is_hex, error, error, is_hex, error, error,  error },
00130     {  is_hex,is_hex, is_hex, is_hex, error, error, is_hex, error, error,  error },
00131     {  is_hex,is_hex, is_hex, is_hex, error, error, is_hex, error, error,  error },
00132     {  is_hex,is_hex, is_hex, is_hex, error, error, is_hex, error, error,  error },
00133 /* c8_9 */
00134     {  is_hex, is_hex, is_hex, is_hex, error,error, is_hex, error, error,  error },
00135     {  is_hex, is_hex, is_hex, is_hex, error,error, is_hex, error, error,  error },
00136 /* ca-f */
00137     {  is_hex, is_hex, is_hex, is_hex, error,error, is_hex, error, error, error },
00138     {  is_hex, is_hex, is_hex, is_hex, error,error, is_hex, error, error, error },
00139     {  is_hex, is_hex, is_hex, is_hex, error,error, is_hex, error, error, error },
00140     {  is_hex, is_hex, is_hex, is_hex, error,error, is_hex, error, error, error },
00141     {  is_hex,    is_hex, is_hex, is_hex, error,error,is_hex, error, error, error },
00142     {  is_hex,    is_hex, is_hex, is_hex, error,error,is_hex, error, error, error },
00143 /* exx */
00144     {  error,  error, new_hex, end,    error,error,  end,   error, error, error },
00145 /* JJJJ */
00146     {  error,  error,  end,    no_hex, error,error,  end,   error, error, error }, 
00147 /* EOF, eofile */
00148     {  error,  error,  end,    no_hex, error,error,  end,   error, error, error }, 
00149 /* white */
00150     {  start,  error,  end,    no_hex, error,error,  end,   error, error, error }, 
00151 /* sign */
00152     {  sgned,  error,  end,    no_hex, error,error,  end,   error, error, error }, 
00153 };
00154 
00155 static enum states table_base8[no_charclass][no_state] =
00156 {
00157     /* start, sgned,  leadz,  new_hex, new_oct,new_dec, is_hex, is_oct,is_dec, end */
00158 /* zero */
00159     {  leadz, leadz,  leadz,  error, error, error, error, is_oct, error, error },
00160 /* c1_7 */
00161     {  is_oct,is_oct, is_oct, error, error, error, error, is_oct, error,error },
00162     {  is_oct,is_oct, is_oct, error, error, error, error, is_oct, error,error },
00163     {  is_oct,is_oct, is_oct, error, error, error, error, is_oct, error,error },
00164     {  is_oct,is_oct, is_oct, error, error, error, error, is_oct, error,error },
00165     {  is_oct,is_oct, is_oct, error, error, error, error, is_oct, error,error },
00166     {  is_oct,is_oct, is_oct, error, error, error, error, is_oct, error,error },
00167     {  is_oct,is_oct, is_oct, error, error, error, error, is_oct, error,error },
00168 /* c8_9 */
00169     {  end,   error,  end,    error, error, error, error, end,   error,    error },
00170     {  end,   error,  end,    error, error, error, error, end,   error,    error },
00171 /* ca-f */
00172     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00173     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00174     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00175     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00176     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00177     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00178 /* exx */
00179     {  error, error,  new_hex,end,   error,error,  end,   error, error, error },
00180 /* JJJJ */
00181     {  error, error, end,     error, error,error,  error, end,      error, error }, 
00182 /* EOF, eofile */
00183     {  error, error, end,     error, error,error,  error, end,      error, error }, 
00184 /* white */
00185     {  start, error, end,     error, error,error,  error, end,      error, error }, 
00186 /* sign */
00187     {  sgned, error, end,     error, error,error,  error, end,      error, error }, 
00188 };
00189 
00190 static enum states table_base10[no_charclass][no_state] =
00191 {
00192     /* start, sgned,  leadz,  new_hex,
00193                      new_oct,new_dec,
00194                           is_hex, is_oct,is_dec, end */
00195 /* zero */
00196     {  leadz, leadz,  leadz,  error, error, error, error, is_oct, is_dec, error },
00197 /* c1_7 */
00198     {  is_dec,is_dec, is_dec, error, error, error, error, error, is_dec,error },
00199     {  is_dec,is_dec, is_dec, error, error, error, error, error, is_dec,error },
00200     {  is_dec,is_dec, is_dec, error, error, error, error, error, is_dec,error },
00201     {  is_dec,is_dec, is_dec, error, error, error, error, error, is_dec,error },
00202     {  is_dec,is_dec, is_dec, error, error, error, error, error, is_dec,error },
00203     {  is_dec,is_dec, is_dec, error, error, error, error, error, is_dec,error },
00204     {  is_dec,is_dec, is_dec, error, error, error, error, error, is_dec,error },
00205 /* c8_9 */
00206     {  is_dec,is_dec, end,    error, error, error, error, end,   is_dec,error },
00207     {  is_dec,is_dec, end,    error, error, error, error, end,   is_dec,error },
00208 /* ca-f */
00209     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00210     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00211     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00212     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00213     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00214     {  end,   error,  end,    error, error,error,  error, end,   error, error },
00215 /* exx */
00216     {  error, error, new_hex, end,   error,error,  end,   error, error, error },
00217 /* JJJJ */
00218     {  error, error, end,     error, error,error,  error, error, end,   error }, 
00219 /* EOF, eofile */
00220     {  error, error, end,     error, error,error,  error, error, end,   error }, 
00221 /* white */
00222     {  start, error, end,     error, error,error,  error, error, end,   error }, 
00223 /* sign */
00224     {  sgned, error, end,     error, error,error,  error, error, end,   error }, 
00225 };
00226 
00227 
00228 /* Seek breaks on non-seekable streams, but putback will always?
00229    work.  However NT will actually try to putback characters into
00230    a read-only string, which can cause problems. */
00231 #ifdef __GNUG__
00232 #define    IOS_BACK(stream,ch)    (void) stream.unget()
00233 #else
00234 #define    IOS_BACK(stream,ch)    (void) stream.seekg(-1, ios::cur)
00235 #endif
00236 
00237 #if defined( __GNUG__) 
00238 #define    IOS_FAIL(stream)    stream.setstate(ios::failbit)
00239 #else
00240 #define    IOS_FAIL(stream)    stream.setstate(ios_base::failbit)
00241 #endif
00242 
00243 /* XXX shouldn't replicate this from somewhere else */
00244 typedef ios::fmtflags  ios_fmtflags;
00245 
00246 /*
00247  *  expect string [+-][0[x]][0-9a-fA-F]+
00248  */
00249 #    define LONGLONGCONSTANT(i) i##LL
00250 #    define ULONGLONGCONSTANT(i) i##ULL
00251 
00252 /* These are masks */
00253 
00254 w_base_t::uint8_t    thresh_hex_unsigned =  
00255     ULONGLONGCONSTANT(0xf000000000000000);
00256 w_base_t::uint8_t    thresh_hex_signed =  
00257      LONGLONGCONSTANT(0xf800000000000000);
00258 w_base_t::uint8_t    thresh_dec_unsigned =  
00259     ULONGLONGCONSTANT(1844674407370955161) ;
00260 w_base_t::uint8_t    thresh_dec_signed =  
00261      LONGLONGCONSTANT(922337203685477580);
00262 w_base_t::uint8_t    thresh2_dec_unsigned =  
00263     ULONGLONGCONSTANT(18446744073709551610) ;
00264 w_base_t::uint8_t    thresh2_dec_signed =  
00265      LONGLONGCONSTANT(9223372036854775800);
00266 w_base_t::uint8_t    thresh_oct_unsigned =  
00267     ULONGLONGCONSTANT(0xe000000000000000);
00268 w_base_t::uint8_t    thresh_oct_signed =  
00269      LONGLONGCONSTANT(0xf000000000000000);
00270 
00271 /*
00272  * This is *way* slower than strtoull and strtoll, as it is written.
00273  */
00274 
00275 istream &
00276 w_base_t::_scan_uint8(
00277     istream& i, 
00278     w_base_t::uint8_t &u8, 
00279     bool chew_white, // true if coming from istream operator
00280     bool is_signed, // if true, we have to return an error for overflow
00281     bool&    range_err // set to true if range error occurred  
00282 ) 
00283 {
00284     w_base_t::uint8_t    thresh=0, 
00285     thresh2=0 /* thresh2, thresh3, thresh4 for decimal only */, 
00286         thresh3=0, thresh4=0;
00287     w_base_t::uint8_t     value = 0;
00288 
00289     bool     negate = false;
00290     int        e=0;
00291     int        base=0;
00292     bool     skip_white = true;
00293     states     s = start;
00294     streampos   tell_start = i.tellg();
00295     int        chewamt = chew_white? 1 : 0; 
00296     XTABLE     *table=0;
00297 
00298     range_err = false;
00299     {
00300     // Get the base from the stream
00301     ios_fmtflags old = i.flags();
00302     skip_white = ((old & ios::skipws) != 0);
00303     switch(old & ios::basefield) {
00304         case 0:
00305         base = 0;
00306         table = &table_unknown;
00307         break;
00308 
00309         case ios::hex:
00310         base = 4; // shift by this
00311         table = &table_base16;
00312         thresh = is_signed?  thresh_hex_signed : thresh_hex_unsigned;
00313         break;
00314 
00315         case ios::oct:
00316         base = 3; // shift by this
00317         table = &table_base8;
00318         thresh = is_signed?  thresh_oct_signed : thresh_oct_unsigned;
00319         break;
00320 
00321         case ios::dec:
00322         base = 10; // multiply by this
00323         table = &table_base10;
00324         thresh = is_signed?  thresh_dec_signed : thresh_dec_unsigned;
00325         thresh2 = is_signed?  thresh2_dec_signed : thresh2_dec_unsigned;
00326         thresh3 = is_signed?  (negate? 8: 7) : 5;
00327         thresh4 = is_signed? thresh_hex_signed : thresh_hex_unsigned;
00328         break;
00329         default:
00330         W_FATAL(fcINTERNAL);
00331         break;
00332     }
00333     }
00334 
00335     int ich;
00336     char ch;
00337     while (s < end) {
00338     ch = 0;
00339     // if (i) {
00340         ich = i.get();
00341         if (ich != EOF) {
00342            ch = char(ich);
00343            /* By using isspace() we get locale-dependent behavior */
00344            if(isspace(ch)) {
00345            e = white;
00346            } else {
00347            e = equiv[unsigned(ch)];
00348         }
00349         }
00350         else
00351            e = eofile;
00352     // } else {
00353         // e = eofile;
00354     // }
00355 
00356     /* transition table */
00357     s = (*table)[e][s];
00358 
00359     switch(s) {
00360         case start:
00361         /* Have seen leading white space */
00362         if(!skip_white) {
00363             s = end;
00364         }
00365         tell_start += chewamt; 
00366         break;
00367 
00368         case sgned:
00369         if(ch == '-') {
00370             negate = true;
00371             if(thresh3!=0) thresh3 = is_signed?  (negate? 8: 7) : 5;
00372         }
00373         break;
00374 
00375         case leadz:
00376         /* Have seen 1 or more leading zeroes 
00377          * if base is 0 (unstated), 0 or 0x will
00378          * determine the base.
00379          */
00380         break;
00381 
00382         case new_hex:
00383         /* State means we've seen [0][a-f] or 0[xX] */
00384         if(base && (base != 4)) {
00385             /* consider this the end of the string */
00386             IOS_BACK(i, ch);
00387             s = end;
00388             break;
00389         }
00390         w_assert9(base == 0 || base == 4);
00391         if((base == 0) && (e != exx)) {
00392             /* consider this the end of the string */
00393             IOS_BACK(i, ch);
00394             s = end;
00395             break;
00396         }
00397             /* at this point, in the 0[xX] case, 
00398          * we WILL make a conversion,
00399          * if nothing else, it will be to 0. In event
00400          * of error (the char after the [Xx] is not
00401          * a legit hex digit) we have to be able to 
00402          * seek back to where the [Xx] was, rather than
00403          * leave the endptr at the offending digit.
00404          */
00405         base = 4; // 2 ** base, i.e., shift amt
00406         if(e != exx) {
00407            IOS_BACK(i, ch);
00408         } else {
00409             /* XXX used to be tellg()-1, but no streampos
00410                arith allowed that way. */
00411             tell_start = i.tellg();
00412             tell_start -= 1;    // for possible error-handling
00413         }
00414         thresh = is_signed?  thresh_hex_signed : thresh_hex_unsigned;
00415         break;
00416 
00417         case new_oct:
00418         /* State means we've seen 0 followed by [1-7] */
00419         if(base==0 || base == 3) {
00420             /* treat as oct # */
00421             base = 3; // shift amt
00422             thresh = is_signed?  thresh_oct_signed : thresh_oct_unsigned;
00423         } else if(base == 10) {
00424             s = new_dec;
00425             thresh = is_signed? thresh_dec_signed : thresh_dec_unsigned;
00426             thresh2= is_signed?thresh2_dec_signed : thresh2_dec_unsigned;
00427             thresh3 = is_signed?  (negate? 8: 7) : 5;
00428             thresh4 = is_signed? thresh_hex_signed : thresh_hex_unsigned;
00429         } else {
00430             w_assert9(base == 4);
00431             s = new_hex;
00432             thresh = is_signed?  thresh_hex_signed : thresh_hex_unsigned;
00433         }
00434         IOS_BACK(i, ch);
00435         break;
00436 
00437         case new_dec:
00438         /* State means we've seen [1-9] in start/sgned state 
00439         *  or 0 followed by [8-9]
00440         */
00441         if(e == eight || e == nine) {
00442             if(base && base != 10) {
00443             /* consider this the end of the string */
00444             IOS_BACK(i, ch);
00445             s = end;
00446             break;
00447             }
00448         }
00449         if(base==0 || base == 10) {
00450             /* treat as dec # */
00451             base = 10; // multiply amt
00452             thresh = is_signed?  thresh_dec_signed : thresh_dec_unsigned;
00453             thresh2= is_signed?thresh2_dec_signed : thresh2_dec_unsigned;
00454             thresh3 = is_signed?  (negate? 8: 7) : 5;
00455             thresh4 = is_signed? thresh_hex_signed : thresh_hex_unsigned;
00456         } else if(base == 3) {
00457             s = new_oct;
00458             thresh = is_signed?  thresh_oct_signed : thresh_oct_unsigned;
00459         } else {
00460             w_assert9(base == 4);
00461             thresh = is_signed?  thresh_hex_signed : thresh_hex_unsigned;
00462             s = new_hex;
00463         }
00464         IOS_BACK(i, ch);
00465         break;
00466 
00467         case is_hex:
00468         w_assert9(base == 4);
00469         /* drop down */
00470 
00471         case is_oct:
00472         if(value & thresh) {
00473            range_err = true;
00474            // keep parsing
00475            // s = end;
00476            break;
00477         }
00478         /* shift */
00479         value <<= base;
00480         value += int(e);
00481         break;
00482 
00483         case is_dec:
00484         w_assert9(base == 10);
00485         if(value & thresh4) {
00486             if(value > thresh2) {
00487                /* will overflow on multiply */
00488                range_err = true;
00489                // keep parsing
00490                // s = end;
00491                break;
00492             } 
00493             value *= base;
00494             if((value - thresh2) + unsigned(e) > thresh3) {
00495             /* overflow adding in e */
00496                range_err = true;
00497                // keep parsing
00498                // s = end;
00499                break;
00500             }
00501         } else {
00502             /* multiply */
00503             value *= base;
00504         }
00505         value += unsigned(e);
00506         break;
00507 
00508         case error:
00509         IOS_FAIL(i);
00510         i.seekg(tell_start);
00511         s = end;
00512         break;
00513 
00514         case no_hex:
00515         i.seekg(tell_start);
00516         s = end;
00517         break;
00518 
00519         case end:
00520             IOS_BACK(i, ch);
00521         break;
00522 
00523         case no_state:
00524         W_FATAL(fcINTERNAL);
00525         break;
00526     }
00527     }
00528     if(range_err) {
00529        // don't seek to start
00530         u8 = negate ? 
00531        ( is_signed? w_base_t::int8_min : w_base_t::uint8_max) :
00532        ( is_signed? w_base_t::int8_max : w_base_t::uint8_max);
00533        IOS_FAIL(i);
00534     } else { 
00535     u8 = negate ?  (0 - value) : value;
00536     }
00537 
00538     return i;
00539 }
00540 
00541 /**\endcond skip */

Generated on Wed Jul 7 17:22:32 2010 for Shore Storage Manager by  doxygen 1.4.7