Changeset 1203
- Timestamp:
- 2000-06-12T14:49:06+12:00 (24 years ago)
- Location:
- trunk/gsdl/src/w32server
- Files:
-
- 8 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 -
trunk/gsdl/src/w32server/fnord.cpp
r1156 r1203 18 18 The author can be contacted via Email at [email protected] 19 19 */ 20 #include "text_t.h" 20 21 #include <windows.h> 21 22 #include <stdlib.h> … … 165 166 if (coltitledc == NULL) { 166 167 coltitledc = CreateCompatibleDC(pdc); 167 defcoltitlebitmap = SelectObject (coltitledc, coltitlebitmap);168 defcoltitlebitmap = (HBITMAP)SelectObject (coltitledc, coltitlebitmap); 168 169 } 169 170 170 171 if (logodc == NULL) { 171 172 logodc = CreateCompatibleDC(pdc); 172 deflogobitmap = SelectObject (logodc, logobitmap);173 deflogobitmap = (HBITMAP)SelectObject (logodc, logobitmap); 173 174 } 174 175 … … 219 220 statusRect.right = STATUSX+STATUSWIDTH; 220 221 statusRect.bottom = STATUSY+STATUSHEIGHT; 221 FillRect(pdc, &statusRect, GetStockObject(WHITE_BRUSH));222 FillRect(pdc, &statusRect, (HBRUSH)GetStockObject(WHITE_BRUSH)); 222 223 223 224 int cury = STATUSY; … … 259 260 infoRect.right = INFOX+INFOWIDTH; 260 261 infoRect.bottom = INFOY+INFOHEIGHT; 261 FillRect(pdc, &infoRect, GetStockObject(WHITE_BRUSH));262 FillRect(pdc, &infoRect, (HBRUSH)GetStockObject(WHITE_BRUSH)); 262 263 DrawText(pdc, infostring, -1, &infoRect, DT_CENTER); 263 264 } … … 558 559 // finally, get the host name (no error value 559 560 // is returned from this function) 560 GetLocalName( Instance);561 GetLocalName((HINSTANCE)Instance); 561 562 562 563 } else { … … 596 597 startbrowserdir[0] = '\0'; 597 598 netscapeneeded = 0; 598 int err = tryinitnetwork (Instance, MsgWindow, NULL);599 //int err = 1;599 // int err = tryinitnetwork (Instance, MsgWindow, NULL); 600 int err = 1; 600 601 601 602 // if an error occurred, try again with billsock … … 802 803 803 804 804 int __stdcall WinMain(H ANDLE Instance, HANDLE /*PrevInstance*/, LPSTR CmdLineStr, int /*CmdShow*/) {805 int __stdcall WinMain(HINSTANCE Instance, HINSTANCE /*PrevInstance*/, LPSTR CmdLineStr, int /*CmdShow*/) { 805 806 HWND MainWindow; MSG Message; WNDCLASS MainClass; 806 807 … … 813 814 MainClass.hIcon = LoadIcon(Instance, MAKEINTRESOURCE(TRAY_ICON)); 814 815 MainClass.hCursor = LoadCursor(NULL, IDC_ARROW); 815 MainClass.hbrBackground = GetStockObject(WHITE_BRUSH);816 MainClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); 816 817 MainClass.lpszMenuName = MAKEINTRESOURCE(Main_Menu); 817 818 MainClass.lpszClassName = "Greenstone Digital Library Software"; -
trunk/gsdl/src/w32server/httpreq.cpp
r611 r1203 18 18 The author can be contacted via Email at [email protected] 19 19 */ 20 #include "text_t.h" 20 21 #include <windows.h> 21 22 #include <stdlib.h> -
trunk/gsdl/src/w32server/httpsrv.cpp
r902 r1203 18 18 The author can be contacted via Email at [email protected] 19 19 */ 20 #include "text_t.h" 20 21 #include <windows.h> 21 22 #include <stdlib.h> … … 29 30 #include "httpsrv.h" 30 31 #include "locate.h" 31 #include "settings.h"32 32 33 33 //Private Functions -
trunk/gsdl/src/w32server/locate.cpp
r1011 r1203 1 #include "text_t.h" 1 2 #include <windows.h> 2 3 #include <stdio.h> … … 115 116 scroll.bottom = text_rect.bottom; 116 117 ScrollDC(dc,0,-nbits,&scroll,&clip,NULL,&update); 117 FillRect(dc,&update, GetStockObject(WHITE_BRUSH));118 FillRect(dc,&update, (HBRUSH)GetStockObject(WHITE_BRUSH)); 118 119 } 119 120 -
trunk/gsdl/src/w32server/netio.cpp
r611 r1203 103 103 } 104 104 105 char *GetLocalName(H ANDLE hInstance) {105 char *GetLocalName(HINSTANCE hInstance) { 106 106 // static in case it is written to after the function has finished 107 107 // (I did not error checking on WSACancelAsyncRequest) -
trunk/gsdl/src/w32server/netio.h
r611 r1203 84 84 Returns: A string containing the local address 85 85 */ 86 char *GetLocalName(H ANDLE hInstance);86 char *GetLocalName(HINSTANCE hInstance); 87 87 88 88 // returns 0 on success, and a WSA error message on failure. -
trunk/gsdl/src/w32server/settings.cpp
r902 r1203 1 #include "text_t.h" 2 1 3 #if defined(GSDL_USE_OBJECTSPACE) 2 4 # include <ospace\std\fstream> … … 367 369 text_t key, value, section; 368 370 char *cstr_value; 371 #if defined (GSDL_USE_IOS_H) 369 372 ifstream conf (conffile, ios::nocreate); 373 #else 374 ifstream conf (conffile); 375 #endif 370 376 if (conf) { 371 377 while (read_ini_line(conf, key, value) >= 0) {
Note:
See TracChangeset
for help on using the changeset viewer.