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 .
24 #include <rsctools.hxx>
31 /****************** T Y P E S ********************************************/
33 #define MAX_INPUTFILES 100
34 #define MAX_SYMBOLS 10
35 #define MAX_INCLUDES 10
37 /****************** R s c C m d L i n e **********************************/
44 RscStrList aInputList
; // Liste der Quelldateien
45 rtl::OString aPath
; // Liste der Pfade
46 RSCBYTEORDER_TYPE nByteOrder
;
47 unsigned short nCommands
; // Steuerbits
48 rtl::OString aOutputLst
; // Name der List-Ausgabedatei
49 rtl::OString aOutputSrs
; // Name der Srs-Ausgabedatei
50 rtl::OString aOutputSrc
; // Name der Src-Ausgabedatei
51 rtl::OString aOutputRcCtor
; // Name der Ctor-Ausgabedatei
52 rtl::OString aOutputCxx
; // Name der Cxx-Ausgabedatei
53 rtl::OString aOutputHxx
; // Name der Hxx-Ausgabedatei
54 rtl::OString aTouchFile
; // create this file when done in rsc2
59 rtl::OString aLangName
; // language name
60 rtl::OString aOutputRc
; // target file
61 rtl::OString aLangSearchPath
; // language specific search path
62 ::std::list
< rtl::OString
> aSysSearchDirs
; // paths to search for images
67 std::list
<OutputFile
> m_aOutputFiles
;
68 std::list
< std::pair
< rtl::OString
, rtl::OString
> > m_aReplacements
;
70 RscCmdLine( int argc
, char ** argv
, RscError
* pEH
);
73 ::rtl::OString
substitutePaths( const ::rtl::OString
& rIn
);
75 /****************** R s c ************************************************/
77 struct WriteRcContext
;
82 rtl::OString aTmpOutputHxx
; // Name der TempHxx-Ausgabedatei
83 rtl::OString aTmpOutputCxx
; // Name der TempCxx-Ausgabedatei
84 rtl::OString aTmpOutputRcCtor
; // Name der Temp Ctor-Ausgabedatei
85 rtl::OString aTmpOutputSrc
; // Name der TempSrc-Ausgabedatei
87 void CreateResFile( const char * pRc
);
88 void Append( const rtl::OString
& rOutputSrs
, const rtl::OString
& rTmpFile
);
90 bool GetImageFilePath( const RscCmdLine::OutputFile
& rOutputFile
,
91 const WriteRcContext
& rContext
,
92 const rtl::OString
& rBaseFileName
,
93 rtl::OString
& rImagePath
,
95 void PreprocessSrsFile( const RscCmdLine::OutputFile
& rOutputFile
,
96 const WriteRcContext
& rContext
,
97 const DirEntry
& rSrsInPath
,
98 const DirEntry
& rSrsOutPath
);
101 RscTypCont
* pTC
; // String und Id-Verwalter
102 RscCmdLine
* pCL
; // Kommandozeile
103 FILE * fListing
; // Ausgabedatei fuer Listings
104 FILE * fExitFile
; // bei Abbruch muss diese Datei geschlossen werden
106 RscCompiler( RscCmdLine
*, RscTypCont
* );
111 // Include Statements lesen
112 ERRTYPE
IncludeParser( sal_uLong lFileKey
);
113 ERRTYPE
ParseOneFile( sal_uLong lFileKey
, const RscCmdLine::OutputFile
* pOutputFile
, const WriteRcContext
* pContext
);
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */