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
25ecb6f6
Kaydet (Commit)
25ecb6f6
authored
Mar 22, 2017
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char)
Change-Id: I18f9a2ad4506edc76b74dde229f2fd296bffed88
üst
73a644f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
sunversion.cxx
jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+10
-5
No files found.
jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
Dosyayı görüntüle @
25ecb6f6
...
...
@@ -23,6 +23,7 @@
#include "osl/thread.h"
#include "osl/process.h"
#include "osl/security.hxx"
#include <rtl/character.hxx>
#include <string.h>
#include <ctype.h>
#include "diagnostics.h"
...
...
@@ -77,7 +78,7 @@ bool SunVersion::init(const char *szVersion)
//char must me a number 0 - 999 and no leading
while
(
true
)
{
if
(
pCur
<
pEnd
&&
isdigit
(
*
pCur
))
if
(
pCur
<
pEnd
&&
rtl
::
isAsciiDigit
(
static_cast
<
unsigned
char
>
(
*
pCur
)
))
{
if
(
pCur
<
pEnd
)
pCur
++
;
...
...
@@ -94,7 +95,8 @@ bool SunVersion::init(const char *szVersion)
(
nPart
<
2
&&
*
pCur
==
'.'
)
)
&&
(
//prevent 1.4.0. 1.4.0-
pCur
+
1
!=
pEnd
||
isdigit
(
*
(
pCur
)))
)
pCur
+
1
!=
pEnd
||
rtl
::
isAsciiDigit
(
static_cast
<
unsigned
char
>
(
*
pCur
)))
)
{
int
len
=
pCur
-
pLast
;
if
(
len
>=
127
)
...
...
@@ -113,7 +115,9 @@ bool SunVersion::init(const char *szVersion)
//check next character
if
(
!
(
(
pCur
<
pEnd
)
&&
(
(
nPart
<
3
)
&&
isdigit
(
*
pCur
))))
&&
(
(
nPart
<
3
)
&&
rtl
::
isAsciiDigit
(
static_cast
<
unsigned
char
>
(
*
pCur
)))))
return
false
;
}
else
...
...
@@ -133,7 +137,7 @@ bool SunVersion::init(const char *szVersion)
{
if
(
pCur
<=
pEnd
)
{
if
(
!
isdigit
(
*
pCur
))
if
(
!
rtl
::
isAsciiDigit
(
static_cast
<
unsigned
char
>
(
*
pCur
)
))
{
//1.8.0_102-, 1.8.0_01a,
size_t
len
=
pCur
-
pLast
;
...
...
@@ -184,7 +188,8 @@ bool SunVersion::init(const char *szVersion)
if
(
m_preRelease
==
Rel_FreeBSD
)
{
pCur
++
;
//eliminate 'p'
if
(
pCur
<
pEnd
&&
isdigit
(
*
pCur
))
if
(
pCur
<
pEnd
&&
rtl
::
isAsciiDigit
(
static_cast
<
unsigned
char
>
(
*
pCur
)))
pCur
++
;
int
len
=
pCur
-
pLast
-
1
;
//eliminate 'p'
if
(
len
>=
127
)
...
...
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