summaryrefslogtreecommitdiff
path: root/editors/openoffice.org-2.0-devel/files/patch-psprint+source+fontmanager+parseAFM.cxx
blob: 65073f215e7bd0cba3b03425d6fedc4b03f691c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Issuetracker : #i60097#
CWS          : N/A
Author       : <maho@openoffice.org> (JCA)
Description  : getc and ungetc are defined at stdio.h

Index: psprint/source/fontmanager/parseAFM.cxx
===================================================================
RCS file: /cvs/gsl/psprint/source/fontmanager/parseAFM.cxx,v
retrieving revision 1.6
diff -u -r1.6 parseAFM.cxx
--- psprint/source/fontmanager/parseAFM.cxx	28 Dec 2005 17:08:38 -0000	1.6
+++ psprint/source/fontmanager/parseAFM.cxx	5 Jan 2006 22:05:26 -0000
@@ -113,8 +113,8 @@
     FileInputStream( const char* pFilename );
     ~FileInputStream();
     
-    int getc() { return (m_nPos < m_nLen) ? int(m_pMemory[m_nPos++]) : -1; }
-    void ungetc()
+    int getChar() { return (m_nPos < m_nLen) ? int(m_pMemory[m_nPos++]) : -1; }
+    void ungetChar()
     {
         if( m_nPos > 0 )
             m_nPos--;
@@ -278,18 +278,18 @@
 
     /* skip over white space */
     // relies on EOF = -1
-    while( is_white_Array[ (ch = stream->getc()) & 255 ] )
+    while( is_white_Array[ (ch = stream->getChar()) & 255 ] )
         ;
     
     idx = 0;
     while( ch != -1 && ! is_delimiter_Array[ ch & 255 ] )
     {
         ident[idx++] = ch;
-        ch = stream->getc();
+        ch = stream->getChar();
     }
 
     if (ch == -1 && idx < 1) return ((char *)NULL);
-    if (idx >= 1 && ch != ':' ) stream->ungetc();
+    if (idx >= 1 && ch != ':' ) stream->ungetChar();
     if (idx < 1 ) ident[idx++] = ch;    /* single-character token */
     ident[idx] = 0;
     rLen = idx;
@@ -311,16 +311,16 @@
     static char ident[MAX_NAME]; /* storage buffer for keywords */
     int ch, idx;
 
-    while ((ch = stream->getc()) == ' ' || ch == '\t' ); 
+    while ((ch = stream->getChar()) == ' ' || ch == '\t' ); 
     
     idx = 0;
     while (ch != -1 && ch != lineterm && ch != '\r') 
     {
         ident[idx++] = ch;
-        ch = stream->getc();
+        ch = stream->getChar();
     } /* while */
     
-    stream->ungetc();
+    stream->ungetChar();
     ident[idx] = 0;
 
     return(ident);  /* returns pointer to the token */