Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
a0649246
Kaydet (Commit)
a0649246
authored
Ara 06, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ditch some ByteStrings
üst
66a8b58a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
24 deletions
+23
-24
cppdep.cxx
tools/bootstrp/cppdep.cxx
+9
-9
cppdep.hxx
tools/bootstrp/cppdep.hxx
+2
-2
mkunroll.cxx
tools/bootstrp/mkunroll/mkunroll.cxx
+9
-9
rscdep.cxx
tools/bootstrp/rscdep.cxx
+3
-4
No files found.
tools/bootstrp/cppdep.cxx
Dosyayı görüntüle @
a0649246
...
@@ -67,17 +67,17 @@ sal_Bool CppDep::AddSource( const char* pSource )
...
@@ -67,17 +67,17 @@ sal_Bool CppDep::AddSource( const char* pSource )
return
sal_False
;
return
sal_False
;
}
}
sal_Bool
CppDep
::
Search
(
ByteString
aFileName
)
sal_Bool
CppDep
::
Search
(
const
rtl
::
OString
&
rFileName
)
{
{
#ifdef DEBUG_VERBOSE
#ifdef DEBUG_VERBOSE
fprintf
(
stderr
,
"SEARCH : %s
\n
"
,
aFileName
.
GetBuffe
r
());
fprintf
(
stderr
,
"SEARCH : %s
\n
"
,
rFileName
.
getSt
r
());
#endif
#endif
sal_Bool
bRet
=
sal_False
;
sal_Bool
bRet
=
sal_False
;
SvFileStream
aFile
;
SvFileStream
aFile
;
rtl
::
OString
aReadLine
;
rtl
::
OString
aReadLine
;
UniString
suFileName
(
aFileName
,
osl_getThreadTextEncoding
(
));
UniString
suFileName
(
rtl
::
OStringToOUString
(
rFileName
,
osl_getThreadTextEncoding
()
));
aFile
.
Open
(
suFileName
,
STREAM_READ
);
aFile
.
Open
(
suFileName
,
STREAM_READ
);
while
(
aFile
.
ReadLine
(
aReadLine
))
while
(
aFile
.
ReadLine
(
aReadLine
))
...
@@ -90,13 +90,13 @@ sal_Bool CppDep::Search( ByteString aFileName )
...
@@ -90,13 +90,13 @@ sal_Bool CppDep::Search( ByteString aFileName )
#ifdef DEBUG_VERBOSE
#ifdef DEBUG_VERBOSE
fprintf
(
stderr
,
"found : %d %s
\n
"
,
nPos
,
aReadLine
.
getStr
()
);
fprintf
(
stderr
,
"found : %d %s
\n
"
,
nPos
,
aReadLine
.
getStr
()
);
#endif
#endif
Byte
String
aResult
=
IsIncludeStatement
(
aReadLine
);
rtl
::
O
String
aResult
=
IsIncludeStatement
(
aReadLine
);
#ifdef DEBUG_VERBOSE
#ifdef DEBUG_VERBOSE
fprintf
(
stderr
,
"Result : %s
\n
"
,
aResult
.
GetBuffe
r
()
);
fprintf
(
stderr
,
"Result : %s
\n
"
,
aResult
.
getSt
r
()
);
#endif
#endif
rtl
::
OString
aNewFile
;
rtl
::
OString
aNewFile
;
if
(
aResult
!=
""
)
if
(
!
aResult
.
isEmpty
()
)
if
(
(
aNewFile
=
Exists
(
aResult
)).
getLength
()
)
if
(
(
aNewFile
=
Exists
(
aResult
)).
getLength
()
)
{
{
sal_Bool
bFound
=
sal_False
;
sal_Bool
bFound
=
sal_False
;
...
@@ -126,12 +126,12 @@ sal_Bool CppDep::Search( ByteString aFileName )
...
@@ -126,12 +126,12 @@ sal_Bool CppDep::Search( ByteString aFileName )
return
bRet
;
return
bRet
;
}
}
rtl
::
OString
CppDep
::
Exists
(
rtl
::
OString
aFileName
)
rtl
::
OString
CppDep
::
Exists
(
const
rtl
::
OString
&
rFileName
)
{
{
char
pFullName
[
1023
];
char
pFullName
[
1023
];
#ifdef DEBUG_VERBOSE
#ifdef DEBUG_VERBOSE
fprintf
(
stderr
,
"Searching %s
\n
"
,
a
FileName
.
getStr
()
);
fprintf
(
stderr
,
"Searching %s
\n
"
,
r
FileName
.
getStr
()
);
#endif
#endif
size_t
nCount
=
m_aSearchPath
.
size
();
size_t
nCount
=
m_aSearchPath
.
size
();
...
@@ -142,7 +142,7 @@ rtl::OString CppDep::Exists( rtl::OString aFileName )
...
@@ -142,7 +142,7 @@ rtl::OString CppDep::Exists( rtl::OString aFileName )
strcpy
(
pFullName
,
rPathName
.
getStr
());
strcpy
(
pFullName
,
rPathName
.
getStr
());
strcat
(
pFullName
,
DIR_SEP
);
strcat
(
pFullName
,
DIR_SEP
);
strcat
(
pFullName
,
a
FileName
.
getStr
());
strcat
(
pFullName
,
r
FileName
.
getStr
());
#ifdef DEBUG_VERBOSE
#ifdef DEBUG_VERBOSE
fprintf
(
stderr
,
"looking for %s
\t
"
,
pFullName
);
fprintf
(
stderr
,
"looking for %s
\t
"
,
pFullName
);
...
...
tools/bootstrp/cppdep.hxx
Dosyayı görüntüle @
a0649246
...
@@ -39,8 +39,8 @@ protected:
...
@@ -39,8 +39,8 @@ protected:
std
::
vector
<
rtl
::
OString
>
m_aFileList
;
std
::
vector
<
rtl
::
OString
>
m_aFileList
;
std
::
vector
<
rtl
::
OString
>
m_aSources
;
std
::
vector
<
rtl
::
OString
>
m_aSources
;
sal_Bool
Search
(
ByteString
aFileName
);
sal_Bool
Search
(
const
rtl
::
OString
&
rFileName
);
rtl
::
OString
Exists
(
rtl
::
OString
aFileName
);
rtl
::
OString
Exists
(
const
rtl
::
OString
&
rFileName
);
rtl
::
OString
IsIncludeStatement
(
rtl
::
OString
aLine
);
rtl
::
OString
IsIncludeStatement
(
rtl
::
OString
aLine
);
public
:
public
:
...
...
tools/bootstrp/mkunroll/mkunroll.cxx
Dosyayı görüntüle @
a0649246
...
@@ -38,26 +38,26 @@ protected:
...
@@ -38,26 +38,26 @@ protected:
FILE
*
pIn
,
*
pOut
;
FILE
*
pIn
,
*
pOut
;
virtual
void
Filter
();
virtual
void
Filter
();
public
:
public
:
TextFilter
(
Byte
String
aInFile
=
"stdin"
,
TextFilter
(
rtl
::
O
String
aInFile
=
"stdin"
,
Byte
String
aOutFile
=
"stdout"
);
rtl
::
O
String
aOutFile
=
"stdout"
);
virtual
~
TextFilter
();
virtual
~
TextFilter
();
virtual
void
Execute
();
virtual
void
Execute
();
};
};
TextFilter
::
TextFilter
(
ByteString
aInFile
,
Byte
String
aOutFile
)
TextFilter
::
TextFilter
(
rtl
::
OString
aInFile
,
rtl
::
O
String
aOutFile
)
{
{
if
(
aInFile
==
"stdin"
)
if
(
aInFile
==
"stdin"
)
pIn
=
stdin
;
pIn
=
stdin
;
else
else
if
((
pIn
=
fopen
(
aInFile
.
GetBuffe
r
(),
"r"
))
==
NULL
)
if
((
pIn
=
fopen
(
aInFile
.
getSt
r
(),
"r"
))
==
NULL
)
printf
(
"Can't read %s
\n
"
,
aInFile
.
GetBuffe
r
()
);
printf
(
"Can't read %s
\n
"
,
aInFile
.
getSt
r
()
);
if
(
aOutFile
==
"stdout"
)
if
(
aOutFile
==
"stdout"
)
pOut
=
stdout
;
pOut
=
stdout
;
else
else
if
((
pOut
=
fopen
(
aOutFile
.
GetBuffe
r
(),
"w"
))
==
NULL
)
if
((
pOut
=
fopen
(
aOutFile
.
getSt
r
(),
"w"
))
==
NULL
)
printf
(
"Can't write %s
\n
"
,
aOutFile
.
GetBuffe
r
()
);
printf
(
"Can't write %s
\n
"
,
aOutFile
.
getSt
r
()
);
}
}
TextFilter
::~
TextFilter
()
TextFilter
::~
TextFilter
()
...
@@ -110,11 +110,11 @@ class MkFilter : public TextFilter
...
@@ -110,11 +110,11 @@ class MkFilter : public TextFilter
protected
:
protected
:
virtual
void
Filter
();
virtual
void
Filter
();
public
:
public
:
MkFilter
(
ByteString
aInFile
=
"stdin"
,
Byte
String
aOutFile
=
"stdout"
);
MkFilter
(
rtl
::
OString
aInFile
=
"stdin"
,
rtl
::
O
String
aOutFile
=
"stdout"
);
~
MkFilter
();
~
MkFilter
();
};
};
MkFilter
::
MkFilter
(
ByteString
aInFile
,
Byte
String
aOutFile
)
:
MkFilter
::
MkFilter
(
rtl
::
OString
aInFile
,
rtl
::
O
String
aOutFile
)
:
TextFilter
(
aInFile
,
aOutFile
)
TextFilter
(
aInFile
,
aOutFile
)
{
{
pLst
=
new
ByteStringList
;
pLst
=
new
ByteStringList
;
...
...
tools/bootstrp/rscdep.cxx
Dosyayı görüntüle @
a0649246
...
@@ -85,7 +85,7 @@ int main( int argc, char** argv )
...
@@ -85,7 +85,7 @@ int main( int argc, char** argv )
char
pSrsFileName
[
255
];
char
pSrsFileName
[
255
];
String
aSrsBaseName
;
String
aSrsBaseName
;
sal_Bool
bSource
=
sal_False
;
sal_Bool
bSource
=
sal_False
;
ByteString
aRespArg
;
rtl
::
OStringBuffer
aRespArg
;
// who needs anything but '/' ?
// who needs anything but '/' ?
sal_Char
cDelim
=
'/'
;
sal_Char
cDelim
=
'/'
;
...
@@ -155,8 +155,7 @@ int main( int argc, char** argv )
...
@@ -155,8 +155,7 @@ int main( int argc, char** argv )
if
((
aBuf2
[
0
]
!=
'-'
)
&&
(
aBuf2
[
0
]
!=
'@'
))
if
((
aBuf2
[
0
]
!=
'-'
)
&&
(
aBuf2
[
0
]
!=
'@'
))
{
{
pDep
->
AddSource
(
&
aBuf2
[
0
]
);
pDep
->
AddSource
(
&
aBuf2
[
0
]
);
aRespArg
+=
" "
;
aRespArg
.
append
(
' '
).
append
(
&
aBuf2
[
0
]);
aRespArg
+=
&
aBuf2
[
0
];
bSource
=
sal_True
;
bSource
=
sal_True
;
}
}
}
}
...
@@ -239,7 +238,7 @@ int main( int argc, char** argv )
...
@@ -239,7 +238,7 @@ int main( int argc, char** argv )
}
}
}
}
}
}
aString
.
append
(
aRespArg
);
aString
.
append
(
aRespArg
.
makeStringAndClear
()
);
pDep
->
Execute
();
pDep
->
Execute
();
std
::
vector
<
rtl
::
OString
>&
rLst
=
pDep
->
GetDepList
();
std
::
vector
<
rtl
::
OString
>&
rLst
=
pDep
->
GetDepList
();
size_t
nCount
=
rLst
.
size
();
size_t
nCount
=
rLst
.
size
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment