1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_RSC_INC_RSCPAR_HXX
20 #define INCLUDED_RSC_INC_RSCPAR_HXX
22 #include <rsctools.hxx>
24 #include <tools/solar.h>
28 #define READBUFFER_MAX 256
32 ERRTYPE aFirstError
;// Erster Fehler
33 sal_uInt32 nErrorLine
; // Zeile des ersten Fehlers
34 sal_uInt32 nErrorPos
; // Position des ersten Fehlers
35 sal_uInt32 nLineNo
; // Zeile in der Eingabedatei
36 sal_uLong lFileIndex
; // Index auf Eingabedatei
37 sal_uLong lSrcIndex
; // Index auf Basisdatei
38 FILE * fInputFile
; // Eingabedatei
39 char * pInput
; // Lesepuffer
40 sal_uInt32 nInputBufLen
; // Laenge des Lesepuffers
41 sal_uInt32 nInputPos
; // Position im Lesepuffer
42 sal_uInt32 nInputEndPos
;// Ende im Lesepuffer
43 char * pLine
; // Zeile
44 sal_uInt32 nLineBufLen
;//Lange des Zeilenpuffres
45 sal_uInt32 nScanPos
; // Position in der Zeile
50 RscTypCont
* pTypCont
;
51 void Init(); // ctor initialisieren
52 RscFileInst( RscTypCont
* pTC
, sal_uLong lIndexSrc
,
53 sal_uLong lFileIndex
, FILE * fFile
);
55 bool IsEof() const { return bEof
; }
56 void SetFileIndex( sal_uLong lFIndex
) { lFileIndex
= lFIndex
; }
57 sal_uLong
GetFileIndex() { return lFileIndex
; }
58 sal_uLong
GetSrcIndex() { return lSrcIndex
; }
59 void SetLineNo( sal_uInt32 nLine
) { nLineNo
= nLine
; }
60 sal_uInt32
GetLineNo() { return nLineNo
; }
61 sal_uInt32
GetScanPos() { return nScanPos
; }
62 char * GetLine() { return pLine
; }
66 return pLine
[ nScanPos
] ?
67 pLine
[ nScanPos
++ ] : GetChar();
71 void SetError( ERRTYPE aError
);
72 ERRTYPE
GetError() { return aFirstError
; }
73 sal_uInt32
GetErrorLine() { return nErrorLine
; }
74 sal_uInt32
GetErrorPos() { return nErrorPos
; }
77 void IncludeParser( RscFileInst
* pFileInst
);
78 ERRTYPE
parser( RscFileInst
* pFileInst
);
80 #endif // INCLUDED_RSC_INC_RSCPAR_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */