Changeset 1217
- Timestamp:
- 2000-06-19T10:56:55+12:00 (24 years ago)
- Location:
- trunk/gsdl/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/lib/display.cpp
r1170 r1217 28 28 /* 29 29 $Log$ 30 Revision 1.21 2000/06/18 22:56:55 sjboddie 31 fixed a bug that I'd introduced earlier when attempting to get things 32 compiling on VC++ 6.0 - the gsdl-2.22 release (and possibly 2.21) was 33 affected and wouldn't have displayed chinese and Arabic characters 34 correctly 35 30 36 Revision 1.20 2000/05/12 03:09:23 sjboddie 31 37 minor modifications to get web library compiling under VC++ 6.0 … … 687 693 // bigendian should be set to 1 688 694 // 0 will be returned when the end of the file has been found 689 unsigned short my_uni_get ( istream &fin, int &line,695 unsigned short my_uni_get (unistream &fin, int &line, 690 696 int &isunicode, int &bigendian) { 691 697 unsigned short c = 0; … … 694 700 // unicode text 695 701 // get the next two characters 696 char c1 = 0, c2 = 0; 702 unsigned char c1 = 0, c2 = 0; 703 697 704 if (!fin.eof()) fin.get(c1); 698 705 if (!fin.eof()) fin.get(c2); … … 712 719 // utf-8 text 713 720 // how many characters we get depends on what we find 714 char c1 = 0, c2 = 0, c3 = 0;721 unsigned char c1 = 0, c2 = 0, c3 = 0; 715 722 while (!fin.eof()) { 716 723 fin.get(c1); … … 769 776 770 777 // open the file 771 ifstream fin(filenamestr); 778 unistream fin (filenamestr); 779 772 780 if (fin.fail()) return -1; // read failed 773 781 -
trunk/gsdl/lib/display.h
r1076 r1217 64 64 # include <iostream.h> 65 65 # include <fstream.h> 66 67 #define unistream ifstream 68 66 69 #else 67 70 # include <iostream> 68 71 # include <fstream> 72 73 typedef std::basic_ifstream<unsigned char> unistream; 74 69 75 #endif 70 76 … … 82 88 // cyclic macros (a includes b and b includes a) 83 89 #define MAXRECURSIONDEPTH 30 84 85 90 86 91 // class prototypes
Note:
See TracChangeset
for help on using the changeset viewer.