.section ".text",#alloc,#execinstr .align 8 .skip 16 ! block 0 .global __1cMPrintMatrix36FnHMatrix3__v_ .type __1cMPrintMatrix36FnHMatrix3__v_,#function __1cMPrintMatrix36FnHMatrix3__v_: save %sp,-112,%sp ! block 1 .L1: st %i0,[%fp+68] ! block 2 .L2: ! File operator02.C: ! 1 #include ! 2 ! 3 class Matrix3 ! 4 { ! 5 public: ! 6 float A[3][3]; ! 7 }; ! 8 ! 9 void PrintMatrix3(Matrix3 M) ! 10 { ! 11 int i, j; ! 13 for (i = 0; i < 3; i=i+1) mov %g0,%i5 ! block 3 .L4: cmp %i5,3 bge .L6 nop ! block 4 .L5: ! 14 { ! 15 for (j = 0; j < 3; j=j+1) mov %g0,%i4 ! block 5 .L7: mov %i4,%l5 cmp %l5,3 bge .L9 nop ! block 6 .L8: ! 16 cout << M.A[i][j] << "\t"; sethi %hi(__1cDstdEcout_),%o0 or %o0,%lo(__1cDstdEcout_),%o0 ld [%fp+68],%l3 sll %i5,2,%l2 sll %i5,3,%l1 add %l2,%l1,%l1 add %l3,%l1,%l0 sll %l5,2,%l1 ld [%l0+%l1],%f4 st %f4,[%sp+72] call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6Mf_r1_ ld [%sp+72],%o1 sethi %hi(.LI194),%o1 or %o1,%lo(.LI194),%o1 call __1cDstd2l6Frn0ANbasic_ostream4Ccn0ALchar_traits4Cc____pkc_2_ nop ! block 7 .L10: .L11: ba .L7 add %i4,1,%i4 ! block 8 .L9: .L12: ! 17 cout << endl; sethi %hi(__1cDstdEcout_),%o0 or %o0,%lo(__1cDstdEcout_),%o0 sethi %hi(__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_),%o1 or %o1,%lo(__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_),%o1 call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6MpFr1_2_2_ nop ! block 9 .L13: .L14: ba .L4 add %i5,1,%i5 ! block 10 .L6: .L15: ! 18 } ! 19 } .L3: jmp %i7+8 restore .size __1cMPrintMatrix36FnHMatrix3__v_,(.-__1cMPrintMatrix36FnHMatrix3__v_) .align 8 .align 8 .skip 16 ! block 0 .global __1c2p6FrnHMatrix3_1_1_ .type __1c2p6FrnHMatrix3_1_1_,#function __1c2p6FrnHMatrix3_1_1_: save %sp,-112,%sp ! block 1 .L16: st %i0,[%fp+68] st %i1,[%fp+72] ! block 2 .L17: ! File operator02.C: ! 21 Matrix3 & operator*(Matrix3 & M1, Matrix3 & M2) ! 22 { ! 23 static Matrix3 r; ! 25 int i, j, k; ! 27 for (i = 0; i < 3; i=i+1) mov %g0,%i5 ! block 3 .L19: cmp %i5,3 bge .L21 nop ! block 4 .L20: ! 28 for (j = 0; j < 3; j=j+1) mov %g0,%i4 ! block 5 .L22: mov %i4,%o3 cmp %o3,3 bge .L24 nop ! block 6 .L23: ! 29 r.A[i][j] = 0; sethi %hi(.L_cseg0),%o0 ld [%o0+%lo(.L_cseg0)],%f4 sethi %hi(.LI195),%o2 or %o2,%lo(.LI195),%o2 sll %i5,2,%o1 sll %i5,3,%o0 add %o1,%o0,%o0 add %o2,%o0,%o1 sll %o3,2,%o0 st %f4,[%o1+%o0] ! block 7 .L25: .L26: ba .L22 add %o3,1,%i4 ! block 8 .L24: .L27: .L28: .L29: ba .L19 add %i5,1,%i5 ! block 9 .L21: .L30: ! 31 for (i = 0; i < 3; i=i+1) mov %g0,%i5 ! block 10 .L31: cmp %i5,3 bge .L33 nop ! block 11 .L32: ! 32 for (j = 0; j < 3; j=j+1) mov %g0,%i4 ! block 12 .L34: cmp %i4,3 bge .L36 nop ! block 13 .L35: ! 33 for (k = 0; k < 3; k=k+1) mov %g0,%i3 ! block 14 .L37: mov %i3,%l0 cmp %l0,3 bge .L39 nop ! block 15 .L38: ! 34 r.A[i][j] = r.A[i][j] + M1.A[i][k]*M2.A[k][j]; sethi %hi(.LI195),%o2 or %o2,%lo(.LI195),%o2 sll %i5,2,%o1 sll %i5,3,%o0 add %o1,%o0,%o3 add %o2,%o3,%o1 sll %i4,2,%o4 add %o1,%o4,%o5 ld [%o5+0],%f6 ld [%fp+68],%o0 add %o0,%o3,%o0 sll %l0,2,%o1 ld [%o0+%o1],%f5 ld [%fp+72],%o2 sll %l0,3,%o0 add %o1,%o0,%o0 add %o2,%o0,%o0 ld [%o0+%o4],%f4 fmuls %f5,%f4,%f4 fadds %f6,%f4,%f4 st %f4,[%o5+0] ! block 16 .L40: .L41: ba .L37 add %l0,1,%i3 ! block 17 .L39: .L42: .L43: .L44: ba .L34 add %i4,1,%i4 ! block 18 .L36: .L45: .L46: .L47: ba .L31 add %i5,1,%i5 ! block 19 .L33: .L48: ! 36 return r; sethi %hi(.LI195),%o0 or %o0,%lo(.LI195),%o0 st %o0,[%fp-4] mov %o0,%i0 jmp %i7+8 restore ! block 20 ! 37 } .L18: mov %o0,%i0 jmp %i7+8 restore .size __1c2p6FrnHMatrix3_1_1_,(.-__1c2p6FrnHMatrix3_1_1_) .align 8 .align 8 .skip 16 ! block 0 .global main .type main,#function main: save %sp,-336,%sp ! block 1 .L49: st %i0,[%fp+68] st %i1,[%fp+72] ! block 2 .L50: ! File operator02.C: ! 39 int main(int argc, char *argv[]) ! 40 { ! 41 int i, j; ! 42 Matrix3 M1, M2, M3; ! 44 for (i = 0; i < 3; i=i+1) st %g0,[%fp-8] ! block 3 .L52: ld [%fp-8],%l0 cmp %l0,3 bge .L54 nop ! block 4 .L53: ! 45 for (j = 0; j < 3; j=j+1) st %g0,[%fp-12] ! block 5 .L55: ld [%fp-12],%l3 cmp %l3,3 bge .L57 nop ! block 6 .L56: ! 46 M1.A[i][j] = i + j; ld [%fp-8],%l1 add %l1,%l3,%l0 st %l0,[%fp-240] ld [%fp-240],%f4 fitos %f4,%f4 add %fp,-48,%l2 sll %l1,2,%l0 sll %l1,3,%l1 add %l0,%l1,%l1 add %l2,%l1,%l0 sll %l3,2,%l1 st %f4,[%l0+%l1] ! block 7 .L58: .L59: ld [%fp-12],%l0 add %l0,1,%l0 ba .L55 st %l0,[%fp-12] ! block 8 .L57: .L60: .L61: .L62: ld [%fp-8],%l0 add %l0,1,%l0 ba .L52 st %l0,[%fp-8] ! block 9 .L54: .L63: ! 47 PrintMatrix3(M1); cout << endl; add %fp,-48,%l0 add %fp,-156,%o0 or %g0,36,%g1 1: subcc %g1,4,%g1 .L_y0: ld [%l0+%g1],%l2 bg 1b st %l2,[%o0+%g1] call __1cMPrintMatrix36FnHMatrix3__v_ nop sethi %hi(__1cDstdEcout_),%o0 or %o0,%lo(__1cDstdEcout_),%o0 sethi %hi(__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_),%o1 or %o1,%lo(__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_),%o1 call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6MpFr1_2_2_ nop ! 49 for (i = 0; i < 3; i=i+1) st %g0,[%fp-8] ! block 10 .L64: ld [%fp-8],%l0 cmp %l0,3 bge .L66 nop ! block 11 .L65: ! 50 for (j = 0; j < 3; j=j+1) st %g0,[%fp-12] ! block 12 .L67: ld [%fp-12],%l3 cmp %l3,3 bge .L69 nop ! block 13 .L68: ! 51 M2.A[i][j] = i + j + 1; ld [%fp-8],%l1 add %l1,%l3,%l0 add %l0,1,%l0 st %l0,[%fp-240] ld [%fp-240],%f4 fitos %f4,%f4 add %fp,-84,%l2 sll %l1,2,%l0 sll %l1,3,%l1 add %l0,%l1,%l1 add %l2,%l1,%l0 sll %l3,2,%l1 st %f4,[%l0+%l1] ! block 14 .L70: .L71: ld [%fp-12],%l0 add %l0,1,%l0 ba .L67 st %l0,[%fp-12] ! block 15 .L69: .L72: .L73: .L74: ld [%fp-8],%l0 add %l0,1,%l0 ba .L64 st %l0,[%fp-8] ! block 16 .L66: .L75: ! 52 PrintMatrix3(M2); cout << endl; add %fp,-84,%l1 add %fp,-192,%o0 or %g0,36,%g1 1: subcc %g1,4,%g1 .L_y1: ld [%l1+%g1],%l2 bg 1b st %l2,[%o0+%g1] call __1cMPrintMatrix36FnHMatrix3__v_ nop sethi %hi(__1cDstdEcout_),%l3 or %l3,%lo(__1cDstdEcout_),%l3 sethi %hi(__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_),%l4 or %l4,%lo(__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_),%l4 mov %l3,%o0 call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6MpFr1_2_2_ mov %l4,%o1 ! 54 M3 = M1 * M2; add %fp,-48,%o0 call __1c2p6FrnHMatrix3_1_1_ mov %l1,%o1 st %o0,[%fp-236] add %fp,-120,%l0 or %g0,36,%g1 1: subcc %g1,4,%g1 .L_y2: ld [%o0+%g1],%l2 bg 1b st %l2,[%l0+%g1] st %l0,[%fp-232] ! 55 PrintMatrix3(M3); cout << endl; add %fp,-228,%o0 or %g0,36,%g1 1: subcc %g1,4,%g1 .L_y3: ld [%l0+%g1],%l2 bg 1b st %l2,[%o0+%g1] call __1cMPrintMatrix36FnHMatrix3__v_ nop mov %l3,%o0 call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6MpFr1_2_2_ mov %l4,%o1 ! 56 } st %g0,[%fp-4] mov %g0,%i0 jmp %i7+8 restore ! block 17 .L51: mov %g0,%i0 jmp %i7+8 restore .size main,(.-main) .align 8 .group __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_,".text%__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_",#comdat .section ".text%__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_",#alloc,#execinstr .align 8 .skip 16 ! block 0 .global __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_ .type __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_,#function __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_: save %sp,-104,%sp ! block 1 .L76: st %i0,[%fp+68] ! block 2 .L77: ! File /development/WS9.0/SUNWspro/prod/include/CC/Cstd/./ostream: ! 1 // -*- C++ -*- ! 2 #ifndef __STD_OSTREAM__ ! 3 #define __STD_OSTREAM__ ! 4 ! 5 /*************************************************************************** ! 6 * ! 7 * ostream - Declarations for the Standard Library ostream classes ! 8 * ! 9 *************************************************************************** ! 10 * ! 11 * Copyright (c) 1994-1999 Rogue Wave Software, Inc. All Rights Reserved. ! 12 * ! 13 * This computer software is owned by Rogue Wave Software, Inc. and is ! 14 * protected by U.S. copyright laws and other laws and by international ! 15 * treaties. This computer software is furnished by Rogue Wave Software, ! 16 * Inc. pursuant to a written license agreement and may be used, copied, ! 17 * transmitted, and stored only in accordance with the terms of such ! 18 * license and with the inclusion of the above copyright notice. This ! 19 * computer software or any other copies thereof may not be provided or ! 20 * otherwise made available to any other person. ! 21 * ! 22 * U.S. Government Restricted Rights. This computer software is provided ! 23 * with Restricted Rights. Use, duplication, or disclosure by the ! 24 * Government is subject to restrictions as set forth in subparagraph (c) ! 25 * (1) (ii) of The Rights in Technical Data and Computer Software clause ! 26 * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of the ! 27 * Commercial Computer Software – Restricted Rights at 48 CFR 52.227-19, ! 28 * as applicable. Manufacturer is Rogue Wave Software, Inc., 5500 ! 29 * Flatiron Parkway, Boulder, Colorado 80301 USA. ! 30 * ! 31 **************************************************************************/ ! 32 ! 33 #ifndef __STD_RWCOMPILER_H__ ! 34 #include ! 35 #endif ! 36 ! 37 #ifdef _RW_STD_IOSTREAM ! 38 ! 39 #include ! 40 #include ! 41 ! 42 #pragma disable_warn ! 43 ! 44 #ifndef _RWSTD_NO_NAMESPACE ! 45 namespace std { ! 46 #endif ! 47 ! 48 extern ostream _RWSTDExport cout; ! 49 extern ostream _RWSTDExport cerr; ! 50 ! 51 #ifndef _RWSTD_NO_WIDE_CHAR ! 52 extern wostream _RWSTDExport wcout; ! 53 extern wostream _RWSTDExport wcerr; ! 54 #endif ! 55 ! 56 template ! 57 inline bool __rw_is_out(basic_ostream* s); ! 58 inline bool __rw_is_out(basic_ostream >* s); ! 59 #ifndef _RWSTD_NO_WIDE_CHAR ! 60 inline bool __rw_is_out(basic_ostream >* s); ! 61 #endif ! 62 template ! 63 inline bool __rw_is_err(basic_ostream* s); ! 64 inline bool __rw_is_err(basic_ostream >* s); ! 65 #ifndef _RWSTD_NO_WIDE_CHAR ! 66 inline bool __rw_is_err(basic_ostream >* s); ! 67 #endif ! 68 ! 69 /* ! 70 * Class basic_ostream ! 71 */ ! 72 ! 73 template ! 74 class _RWSTDExportTemplate basic_ostream : virtual public basic_ios ! 75 { ! 76 ! 77 public: ! 78 // ! 79 // Types: ! 80 // ! 81 typedef charT char_type; ! 82 typedef _TYPENAME traits::int_type int_type; ! 83 typedef _TYPENAME traits::pos_type pos_type; ! 84 typedef _TYPENAME traits::off_type off_type; ! 85 typedef traits traits_type; ! 86 ! 87 typedef basic_ostream ostream_type; ! 88 typedef basic_ios ios_type; ! 89 ! 90 _EXPLICIT basic_ostream(basic_streambuf *sb); ! 91 _EXPLICIT basic_ostream(EmptyCtor) : basic_ios(1) {} ! 92 virtual ~basic_ostream(); ! 93 ! 94 class sentry { ! 95 public: ! 96 inline _EXPLICIT ! 97 sentry(basic_ostream& stream) ! 98 : __stream(stream) ! 99 { ! 100 ! 101 streambuf_type* sb = stream.rdbuf(); ! 102 if ( sb ) { ! 103 stream.rdbuf()->buffer_mutex_.acquire(); ! 104 } ! 105 try { ! 106 ostream_type* ost = stream.tie(); ! 107 if (ost && ost->rdbuf() != sb) ! 108 ost->flush(); ! 109 ! 110 if ( stream.is_synch() ) ! 111 { ! 112 if ( __rw_is_out(&stream) ) ! 113 { ! 114 fflush(stdout); ! 115 } ! 116 if ( __rw_is_err(&stream) ) ! 117 { ! 118 fflush(stderr); ! 119 } ! 120 } ! 121 ! 122 if ( stream.rdbuf() ) ! 123 { ! 124 if ( stream.rdbuf()->which_open_mode( ) & ios_base::app ) ! 125 stream.rdbuf()->pubseekoff(0,ios_base::end,ios_base::out); ! 126 } ! 127 ! 128 if ( ! (ok_ = stream.good()) ) ! 129 stream.setstate(ios_base::badbit); ! 130 ! 131 #if defined (_RWSTD_MULTI_THREAD) && !defined (_RWSTD_NO_EXCEPTIONS) ! 132 } catch(...) ! 133 { ! 134 if ( __stream.rdbuf() ) ! 135 #ifdef _USE_RWSTDGuard_IN_SENTRY ! 136 delete __guard; ! 137 #else ! 138 __stream.rdbuf()->buffer_mutex_.release(); ! 139 #endif ! 140 throw; ! 141 } ! 142 #endif // _RWSTD_MULTI_THREAD etc. ! 143 ! 144 } ! 145 ! 146 ~sentry() { ! 147 if( __stream.flags() & ios_base::unitbuf) ! 148 { ! 149 if ( __stream.rdbuf()->pubsync() == -1 ) ! 150 __stream.setstate(ios_base::badbit); ! 151 } ! 152 ! 153 if ( __stream.is_synch() ) ! 154 { ! 155 ! 156 if ( __rw_is_out(&__stream) || __rw_is_err(&__stream) ) ! 157 { ! 158 if ( __stream.rdbuf()->pubsync() == -1 ) ! 159 __stream.setstate(ios_base::badbit); ! 160 } ! 161 } ! 162 ! 163 #ifdef _RWSTD_MULTI_THREAD ! 164 if ( __stream.rdbuf() ) { ! 165 #ifdef _USE_RWSTDGuard_IN_SENTRY ! 166 delete __guard; ! 167 #else ! 168 __stream.rdbuf()->buffer_mutex_.release(); ! 169 #endif ! 170 } ! 171 #endif // _RWSTD_MULTI_THREAD ! 172 } ! 173 operator bool () const { return ok_; } ! 174 ! 175 private: ! 176 sentry(const sentry&); // not defined ! 177 sentry& operator=(const sentry&); // not defined ! 178 basic_ostream& __stream; ! 179 bool ok_; ! 180 #ifdef _RWSTD_MULTI_THREAD ! 181 #ifdef _USE_RWSTDGuard_IN_SENTRY ! 182 _RWSTDGuard* __guard; ! 183 #else ! 184 _RWSTDGuard* __guard_not_used; ! 185 #endif ! 186 #endif ! 187 }; ! 188 ! 189 ostream_type& operator<<(ostream_type& (*pf)(ostream_type&)); ! 190 ostream_type& operator<<(ios_base& (*pf)(ios_base&)); ! 191 ostream_type& operator<<(ios_type& (*pf)(ios_type&)); ! 192 ! 193 #ifndef _RWSTD_NO_BOOL ! 194 ostream_type& operator<<(bool n); ! 195 #endif ! 196 ostream_type& operator<<(short n); ! 197 ostream_type& operator<<(unsigned short n); ! 198 ostream_type& operator<<(int n); ! 199 ostream_type& operator<<(unsigned int n); ! 200 ostream_type& operator<<(long n); ! 201 ostream_type& operator<<(unsigned long n); ! 202 ostream_type& operator<<(float f); ! 203 ostream_type& operator<<(double f); ! 204 ostream_type& operator<<(long double f); ! 205 #ifdef _RWSTD_LONG_LONG ! 206 ostream_type& operator<<(unsigned _RWSTD_LONG_LONG n); ! 207 ostream_type& operator<<(_RWSTD_LONG_LONG n); ! 208 #endif ! 209 ostream_type& operator<<(const void *p); ! 210 ! 211 ostream_type& operator<<(basic_streambuf& sb) ! 212 { ! 213 ios_base::iostate err = 0; ! 214 ! 215 #ifndef _RWSTD_NO_EXCEPTIONS ! 216 try { ! 217 #endif ! 218 if ( !(sb.which_open_mode() & ios_base::in) ) ! 219 err = ios_base::failbit; ! 220 else ! 221 { ! 222 _TYPENAME basic_ostream::sentry opfx(*this); ! 223 ! 224 if(opfx) ! 225 { ! 226 if ( traits::eq_int_type(sb.sgetc(),traits::eof())) ! 227 err = ios_base::failbit; ! 228 else { ! 229 int_type c; ! 230 while( !traits::eq_int_type( (c = sb.sbumpc()),traits::eof()) ) ! 231 { ! 232 if( traits::eq_int_type(this->rdbuf()->sputc(c),traits::eof()) ) ! 233 { ! 234 err = ios_base::failbit; ! 235 break; ! 236 } ! 237 } ! 238 } ! 239 } ! 240 } ! 241 ! 242 #ifndef _RWSTD_NO_EXCEPTIONS ! 243 } ! 244 #endif ! 245 ! 246 #ifndef _RWSTD_NO_EXCEPTIONS ! 247 catch(...) ! 248 { ! 249 bool flag = false; ! 250 try { ! 251 this->setstate(ios_base::badbit); ! 252 } ! 253 catch( ios_base::failure ) { flag= true; } ! 254 if ( flag ) throw; ! 255 } ! 256 #endif ! 257 if ( err ) this->setstate(err); ! 258 return *this; ! 259 } ! 260 ! 261 ostream_type& operator<<(basic_streambuf *sb) ! 262 { ! 263 ios_base::iostate err = 0; ! 264 ! 265 #ifndef _RWSTD_NO_EXCEPTIONS ! 266 try { ! 267 #endif ! 268 if (sb) ! 269 { ! 270 if ( !(sb->which_open_mode() & ios_base::in) ) ! 271 err = ios_base::failbit; ! 272 else ! 273 { ! 274 _TYPENAME basic_ostream::sentry opfx(*this); ! 275 ! 276 if(opfx) ! 277 { ! 278 if ( traits::eq_int_type(sb->sgetc(),traits::eof())) ! 279 err = ios_base::failbit; ! 280 else { ! 281 int_type c; ! 282 while( !traits::eq_int_type( (c = sb->sbumpc()),traits::eof())) ! 283 { ! 284 if( traits::eq_int_type(this->rdbuf()->sputc(c),traits::eof())) ! 285 { ! 286 err = ios_base::failbit; ! 287 break; ! 288 } ! 289 } ! 290 } ! 291 } ! 292 } ! 293 } ! 294 else ! 295 err = ios_base::badbit; ! 296 ! 297 #ifndef _RWSTD_NO_EXCEPTIONS ! 298 } ! 299 #endif ! 300 ! 301 #ifndef _RWSTD_NO_EXCEPTIONS ! 302 catch(...) ! 303 { ! 304 bool flag = false; ! 305 try { ! 306 this->setstate(ios_base::badbit); ! 307 } ! 308 catch( ios_base::failure ) { flag= true; } ! 309 if ( flag ) throw; ! 310 } ! 311 #endif ! 312 if ( err ) this->setstate(err); ! 313 return *this; ! 314 } ! 315 ! 316 ostream_type& put(char_type c); ! 317 ostream_type& write(const char_type *s, streamsize n); ! 318 ostream_type& flush(); ! 319 ! 320 ostream_type& seekp(pos_type pos) ! 321 { ! 322 #ifdef _RWSTD_MULTI_THREAD ! 323 if ( this->rdbuf() ) { ! 324 # ifndef __TURBOC__ ! 325 _RWSTDGuard guard(this->rdbuf()->buffer_mutex_); ! 326 # else ! 327 STDGUARD(this->rdbuf()->buffer_mutex_); ! 328 # endif // __TURBOC__ ! 329 #endif // _RWSTD_MULTI_THREAD ! 330 ! 331 if ( this->fail() ) return *this; ! 332 ! 333 this->rdbuf()->pubseekpos(pos, ios_base::out); ! 334 #ifdef _RWSTD_MULTI_THREAD ! 335 } ! 336 #endif // _RWSTD_MULTI_THREAD ! 337 ! 338 return *this; ! 339 } ! 340 ! 341 ostream_type& seekp(off_type , ios_base::seekdir ); ! 342 pos_type tellp(); ! 343 ! 344 #ifdef _RWSTD_MULTI_THREAD ! 345 _RWSTDGuard *ostream_sentry_guard; ! 346 #endif ! 347 protected: ! 348 basic_ostream(); ! 349 #ifdef _RWSTD_PROTECTED_OSTREAM_COPY_CONSTRUCTOR ! 350 basic_ostream(const basic_ostream&); ! 351 #endif ! 352 }; ! 353 ! 356 inline bool __rw_is_out(basic_ostream >* s) ! 357 { return (void*)s == (void*)&cout; } ! 358 #ifndef _RWSTD_NO_WIDE_CHAR ! 359 inline bool __rw_is_out(basic_ostream >* s) ! 360 { return (void*)s == (void*)&wcout; } ! 361 #endif ! 362 ! 363 inline bool __rw_is_err(basic_ostream >* s) ! 364 { return (void*)s == (void*)&cerr; } ! 365 #ifndef _RWSTD_NO_WIDE_CHAR ! 366 inline bool __rw_is_err(basic_ostream >* s) ! 367 { return (void*)s == (void*)&wcerr; } ! 368 #endif ! 369 ! 370 template ! 371 inline bool __rw_is_out(basic_ostream* s) ! 372 { return false; } ! 373 ! 374 template ! 375 inline bool __rw_is_err(basic_ostream* s) ! 376 { return false; } ! 377 ! 379 // ! 380 // Class ostream_iterator ! 381 // ! 382 ! 383 #ifndef _MSC_VER ! 384 template ! 385 #else ! 386 template > ! 387 #endif ! 388 class _RWSTDExportTemplate ostream_iterator ! 389 : public iterator ! 390 { ! 391 protected: ! 392 ! 393 basic_ostream* __stream; ! 394 const charT* __str; ! 395 ! 396 public: ! 397 // ! 398 //Types: ! 399 // ! 400 typedef T value_type; ! 401 typedef charT char_type; ! 402 typedef traits traits_type; ! 403 typedef basic_ostream ostream_type; ! 404 ! 405 ostream_iterator (basic_ostream& s) ! 406 : __stream(&s),__str(0) ! 407 { ; } ! 408 ostream_iterator (basic_ostream& s,const charT* c) ! 409 : __stream(&s), __str((charT *)c) ! 410 { ; } ! 411 ostream_iterator ( const ostream_iterator& x ) ! 412 : __stream(x.__stream) , __str(x.__str) ! 413 { ; } ! 414 ostream_iterator& operator= (const T& value) ! 415 { ! 416 *__stream << (T)value; ! 417 if (__str) *__stream << __str; ! 418 return *this; ! 419 } ! 420 ostream_iterator& operator* () { return *this; } ! 421 ostream_iterator& operator++ () { return *this; } ! 422 ostream_iterator& operator++ (int) { return *this; } ! 423 }; ! 424 ! 426 #ifndef _RWSTD_NO_COMPLEX_DEFAULT_TEMPLATES ! 427 typedef basic_ostream ostream; ! 428 #else ! 429 typedef basic_ostream > ostream; ! 430 #endif ! 431 ! 432 #ifndef _RWSTD_NO_WIDE_CHAR ! 433 #ifndef _RWSTD_NO_COMPLEX_DEFAULT_TEMPLATES ! 434 typedef basic_ostream wostream; ! 435 #else ! 436 typedef basic_ostream > wostream; ! 437 #endif ! 438 #endif ! 439 ! 440 // charT and charT* insertors ! 441 ! 442 template ! 443 basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostream&, ! 444 charT ); ! 445 ! 446 #ifndef _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION ! 447 ! 448 template ! 449 basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostream&, ! 450 char ); ! 451 ! 452 #ifndef _RWSTD_NO_FUNC_PARTIAL_SPEC ! 453 template ! 454 basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostream&, ! 455 char ); ! 456 #else ! 457 ostream& _RWSTDExport operator<< ( ostream&, char ); ! 458 #endif // _RWSTD_NO_FUNC_PARTIAL_SPEC ! 459 #endif // _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION ! 460 ! 462 template ! 463 basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostream&, ! 464 const charT* ); ! 465 ! 466 #ifndef _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION ! 467 ! 468 template ! 469 basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostream&, ! 470 const char* ); ! 471 ! 472 #ifndef _RWSTD_NO_FUNC_PARTIAL_SPEC ! 473 template ! 474 basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostream&, ! 475 const char* ); ! 476 #else ! 477 ostream& _RWSTDExport operator<< ( ostream&, const char* ); ! 478 #endif // _RWSTD_NO_FUNC_PARTIAL_SPEC ! 479 #endif // _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION ! 480 ! 481 /* ! 482 * signed and unsigned insertors ! 483 */ ! 484 ! 485 #ifndef _RWSTD_NO_SIGNED_CHAR_IN_STREAMS ! 486 template ! 487 basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostream&, ! 488 unsigned char ); ! 489 ! 490 template ! 491 basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostream&, ! 492 signed char ); ! 493 ! 494 template ! 495 basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostream&, ! 496 const unsigned char* ); ! 497 ! 498 template ! 499 basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostream&, ! 500 const signed char* ); ! 501 #endif // _RWSTD_NO_SIGNED_CHAR_IN_STREAMS ! 502 ! 503 /* ! 504 * String insertor ! 505 */ ! 506 template ! 507 inline basic_ostream& ! 508 operator<< (basic_ostream& os, ! 509 const basic_string& s) ! 510 { ! 511 ios_base::iostate err = 0; ! 512 ! 513 #ifndef _RWSTD_NO_EXCEPTIONS ! 514 try { ! 515 #endif ! 516 ! 517 _TYPENAME basic_ostream::sentry opfx(os); ! 518 if (opfx) ! 519 { ! 520 int dlen = (int)s.length(); ! 521 int pad = (int)os.width() - dlen; ! 522 ! 523 // place right padding ! 524 if( !(os.flags() & ios_base::adjustfield) || os.flags() & ios_base::right ) ! 525 { ! 526 while(--pad >= 0) ! 527 { ! 528 if( traits::eq_int_type(os.rdbuf()->sputc(os.fill()),traits::eof())) { ! 529 err = ios_base::badbit; ! 530 break; ! 531 } ! 532 } ! 533 } ! 534 ! 535 // output internal padding ! 536 if(os.good() && (os.flags() & ios_base::internal)) ! 537 { ! 538 while(--pad >= 0) ! 539 { ! 540 if( traits::eq_int_type(os.rdbuf()->sputc(os.fill()),traits::eof())) ! 541 { ! 542 err = ios_base::badbit; ! 543 break; ! 544 } ! 545 } ! 546 } ! 547 ! 548 if(os.good() && dlen) { ! 549 if(os.rdbuf() && (os.rdbuf()->sputn(s.c_str(), dlen) != dlen)) ! 550 err = ios_base::badbit; ! 551 } ! 552 ! 553 // output left padding. ! 554 if(os.good() && (os.flags() & ios_base::left)) ! 555 { ! 556 while(--pad >= 0) ! 557 { ! 558 if( traits::eq_int_type(os.rdbuf()->sputc(os.fill()),traits::eof())) ! 559 { ! 560 err = ios_base::badbit; ! 561 break; ! 562 } ! 563 } ! 564 } ! 565 ! 566 os.width(0); ! 567 } ! 568 ! 569 #ifndef _RWSTD_NO_EXCEPTIONS ! 570 } ! 571 #endif ! 572 ! 573 #ifndef _RWSTD_NO_EXCEPTIONS ! 574 catch(...) ! 575 { ! 576 bool flag = false; ! 577 try { ! 578 os.setstate(ios_base::badbit); ! 579 } ! 580 catch( ios_base::failure ) { flag= true; } ! 581 if ( flag ) throw; ! 582 } ! 583 #endif ! 584 ! 585 if ( err ) os.setstate(err); ! 586 ! 587 return os; ! 588 } ! 589 ! 592 extern ostream _RWSTDExport cout; ! 593 extern ostream _RWSTDExport cerr; ! 594 extern ostream _RWSTDExport clog; ! 595 ! 596 /* ! 597 * declare a couple of standard manipulators ! 598 * global functions ! 599 */ ! 600 ! 601 template ! 602 inline basic_ostream& ! 603 endl(basic_ostream& os) ! 604 { ! 605 os.put( charT('\n') ); ld [%fp+68],%o0 call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___Dput6Mc_r1_ mov 10,%o1 ! 606 os.flush(); call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___Fflush6M_r1_ ld [%fp+68],%o0 ! 607 return os; ld [%fp+68],%i5 ! block 3 ! 608 } .L78: mov %i5,%i0 jmp %i7+8 restore .size __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_,(.-__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_) .align 8 .section ".rodata",#alloc .LI194: .ascii "\t\000" .type .LI194,#object .size .LI194,2 .section ".bss",#alloc,#write .align 4 .LI195: .skip 36 .type .LI195,#object .size .LI195,36 .section ".rodata",#alloc .align 4 .L_cseg0: .skip 4 .type .L_cseg0,#object .size .L_cseg0,4 .file "operator02.C" .ident "@(#)feature_tests.h 1.18 99/07/26 SMI" .ident "@(#)isa_defs.h 1.20 99/05/04 SMI" .ident "@(#)stddef.h 1.16 99/08/10 SMI" .ident "@(#)stddef_iso.h 1.1 99/08/09 SMI" .ident "@(#)stdarg.h 1.45 99/08/10 SMI" .ident "@(#)stdarg_iso.h 1.1 99/08/09 SMI" .ident "@(#)va_list.h 1.13 01/02/08 SMI" .ident "@(#)string.h 1.24 99/08/10 SMI" .ident "@(#)string_iso.h 1.2 99/11/09 SMI" .ident "@(#)ctype.h 1.33 99/08/10 SMI" .ident "@(#)ctype_iso.h 1.1 99/08/09 SMI" .ident "@(#)wchar.h 1.35 01/10/17 SMI" .ident "@(#)wchar_iso.h 1.2 99/11/10 SMI" .ident "@(#)stdio_tag.h 1.3 98/04/20 SMI" .ident "@(#)wchar_impl.h 1.3 99/07/26 SMI" .ident "@(#)time_iso.h 1.1 99/08/09 SMI" .ident "@(#)wctype.h 1.18 99/08/10 SMI" .ident "@(#)wctype_iso.h 1.1 99/08/09 SMI" .ident "@(#)stdlib.h 1.48 00/04/13 SMI" .ident "@(#)stdlib_iso.h 1.3 01/03/09 SMI" .ident "@(#)limits.h 1.53 03/08/07 SMI" .ident "@(#)limits_iso.h 1.1 99/08/09 SMI" .ident "@(#)int_limits.h 1.6 99/08/06 SMI" .ident "@(#)synch.h 1.52 01/11/10 SMI" .ident "@(#)machlock.h 1.22 01/10/31 SMI" .ident "@(#)types.h 1.75 04/01/06 SMI" .ident "@(#)machtypes.h 1.13 99/05/04 SMI" .ident "@(#)int_types.h 1.6 97/08/20 SMI" .ident "@(#)select.h 1.17 01/08/15 SMI" .ident "@(#)time.h 2.71 03/08/07 SMI" .ident "@(#)time.h 1.39 99/08/10 SMI" .ident "@(#)time_impl.h 1.7 01/09/06 SMI" .ident "@(#)privregs.h 1.5 99/06/05 SMI" .ident "@(#)psr.h 1.3 96/09/12 SMI" .ident "@(#)fsr.h 1.3 97/02/11 SMI" .ident "@(#)synch.h 1.39 01/06/12 SMI" .ident "@(#)thread.h 1.47 98/08/14 SMI" .ident "@(#)signal.h 1.56 01/05/28 SMI" .ident "@(#)signal_iso.h 1.2 01/04/05 SMI" .ident "@(#)unistd.h 1.39 01/07/29 SMI" .ident "@(#)siginfo.h 1.55 01/04/05 SMI" .ident "@(#)machsig.h 1.15 99/08/15 SMI" .ident "@(#)stdio.h 1.79 01/04/16 SMI" .ident "@(#)stdio_iso.h 1.2 99/10/25 SMI" .ident "@(#)stdio_impl.h 1.13 01/11/16 SMI" .ident "@(#)math.h 2.11 00/09/07 SMI" .ident "@(#)math_iso.h 1.3 03/04/08 SMI" .ident "@(#)float.h 1.18 99/05/04 SMI" .global __fsr_init_value __fsr_init_value = 0x0 .xstabs ".stab.index","V=9.0;DBG_GEN=4.14.28;dm;cd;backend;ptf;ptx;ptk;s;;R=5.6<>;A=2",60,0,0,0 .xstabs ".stab.index","/home/cheung/teaching/web/561/Syllabus/3-C/Progs/; /development/WS9.0/SUNWspro/prod/bin/CC -S -xs operator02.C -Qoption ccfe -prefix -Qoption ccfe \\$XAIYJjqI9LJCWvE.",52,0,0,0 .xstabs ".stab.index","main",42,0,0,0