Changeset 3012 for trunk/gsdl
- Timestamp:
- 2002-02-27T12:01:31+13:00 (22 years ago)
- Location:
- trunk/gsdl/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/lib/display.cpp
r2965 r3012 28 28 /* 29 29 $Log$ 30 Revision 1.26 2002/02/26 23:01:31 jrm21 31 istream.get(char&) caused funny problems with gcc3 so they've been replaced 32 with char=istream.get() instead. 33 30 34 Revision 1.25 2002/02/12 22:46:47 jrm21 31 35 Allow nested _If_ macros. We now count '(' and ')' characters, so you can now … … 690 694 // bigendian should be set to 1 691 695 // 0 will be returned when the end of the file has been found 692 unsigned short my_uni_get ( unistream &fin, int &line,696 unsigned short my_uni_get (/*unistream*/ifstream &fin, int &line, 693 697 int &isunicode, int &bigendian) { 694 698 unsigned short c = 0; … … 699 703 unsigned char c1 = 0, c2 = 0; 700 704 701 if (!fin.eof()) fin.get(c1);702 if (!fin.eof()) fin.get(c2);705 if (!fin.eof()) c1=fin.get(); 706 if (!fin.eof()) c2=fin.get(); 703 707 else c1 = 0; 704 708 … … 718 722 unsigned char c1 = 0, c2 = 0, c3 = 0; 719 723 while (!fin.eof()) { 720 fin.get(c1);724 c1=fin.get(); 721 725 if (c1 == 0xfe || c1 == 0xff) { 722 726 // switch to unicode 723 727 isunicode = 1; 724 if (!fin.eof()) fin.get(c2);728 if (!fin.eof()) c2=fin.get(); 725 729 726 730 if (c1 == 0xff && c2 == 0xfe) bigendian = 0; … … 737 741 } else if (c1 >= 0xc0 && c1 <= 0xdf) { 738 742 // two byte character 739 if (!fin.eof()) fin.get(c2);743 if (!fin.eof()) c2=fin.get(); 740 744 c = ((c1 & 0x1f) << 6) + (c2 & 0x3f); 741 745 break; … … 743 747 } else if (c1 >= 0xe0 && c1 <= 0xef) { 744 748 // three byte character 745 if (!fin.eof()) fin.get(c2);746 if (!fin.eof()) fin.get(c3);749 if (!fin.eof()) c2=fin.get(); 750 if (!fin.eof()) c3=fin.get(); 747 751 c = ((c1 & 0xf) << 12) + ((c2 & 0x3f) << 6) + (c3 & 0x3f); 748 752 break; … … 773 777 774 778 // open the file 775 unistream fin (filenamestr); 779 // unistream fin (filenamestr); 780 ifstream fin (filenamestr); 776 781 777 782 if (fin.fail()) return -1; // read failed -
trunk/gsdl/lib/display.h
r1310 r3012 64 64 65 65 #define unistream ifstream 66 67 66 #else 68 67 # include <iostream>
Note:
See TracChangeset
for help on using the changeset viewer.