Changeset 1203 for trunk/gsdl/src/w32server/cgiwrapper.cpp
- Timestamp:
- 2000-06-12T14:49:06+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/w32server/cgiwrapper.cpp
r1193 r1203 1 #include "text_t.h" 2 1 3 #include <windows.h> 2 4 #include <string.h> … … 77 79 RequestInfoT *RInfo; 78 80 ostream *casostr; 81 #if !defined (GSDL_USE_IOS_H) 82 char buffer[256]; 83 #endif 79 84 }; 80 85 81 86 textstreambuf::textstreambuf() { 82 87 tsbreset(); 88 #if !defined (GSDL_USE_IOS_H) 89 setp (&buffer[0], &buffer[255]); 90 #else 83 91 if (base() == ebuf()) allocate(); 84 92 setp (base(), ebuf()); 93 #endif 85 94 }; 86 95 87 96 int textstreambuf::sync () { 88 97 if ((RInfo != NULL) && 89 (Send_String_N(pbase(), out_waiting(), RInfo) < 0)) {98 (Send_String_N(pbase(), pptr()-pbase(), RInfo) < 0)) { 90 99 RInfo = NULL; 91 100 } … … 93 102 if (casostr != NULL) { 94 103 char *thepbase=pbase(); 95 for (int i=0;i<out_waiting();i++) (*casostr).put(thepbase[i]);104 for (int i=0;i<(pptr()-pbase());i++) (*casostr).put(thepbase[i]); 96 105 } 97 106 … … 117 126 int overflow (int ch); 118 127 int underflow () {return EOF;} 128 129 #if !defined (GSDL_USE_IOS_H) 130 private: 131 char buffer[256]; 132 #endif 119 133 }; 120 134 121 135 logstreambuf::logstreambuf () { 136 #if !defined (GSDL_USE_IOS_H) 137 setp (&buffer[0], &buffer[255]); 138 #else 122 139 if (base() == ebuf()) allocate(); 123 140 setp (base(), ebuf()); 141 #endif 124 142 } 125 143 … … 127 145 if (gsdl_keep_log || gsdl_show_console) { 128 146 log_message ("LOCAL LIB MESSAGE: "); 129 log_message_N (pbase(), out_waiting());147 log_message_N (pbase(), pptr()-pbase()); 130 148 } 131 149 … … 304 322 // returns 1 if successful, 0 if unsuccessful 305 323 int gsdl_init () { 306 cerr = &logstream;307 cout = &textstream;324 cerr.rdbuf(&logstream); 325 cout.rdbuf(&textstream); 308 326 309 327 // collection should be set to "" unless in
Note:
See TracChangeset
for help on using the changeset viewer.