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
e5f0aceb
Kaydet (Commit)
e5f0aceb
authored
Kas 19, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
readwrite_helper.h -> readwrite_helper.hxx
Change-Id: If0d71f0660d60e3bcea4db3906ffe600e00f69f2
üst
93d550d9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
24 deletions
+15
-24
file_misc.cxx
sal/osl/unx/file_misc.cxx
+1
-1
process.cxx
sal/osl/unx/process.cxx
+1
-1
profile.cxx
sal/osl/unx/profile.cxx
+1
-1
readwrite_helper.cxx
sal/osl/unx/readwrite_helper.cxx
+8
-8
readwrite_helper.hxx
sal/osl/unx/readwrite_helper.hxx
+4
-13
No files found.
sal/osl/unx/file_misc.cxx
Dosyayı görüntüle @
e5f0aceb
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
#include "file_path_helper.hxx"
#include "file_path_helper.hxx"
#include "file_url.hxx"
#include "file_url.hxx"
#include "uunxapi.hxx"
#include "uunxapi.hxx"
#include "readwrite_helper.h"
#include "readwrite_helper.h
xx
"
#include <sys/types.h>
#include <sys/types.h>
#include <errno.h>
#include <errno.h>
...
...
sal/osl/unx/process.cxx
Dosyayı görüntüle @
e5f0aceb
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
#include "createfilehandlefromfd.hxx"
#include "createfilehandlefromfd.hxx"
#include "file_url.hxx"
#include "file_url.hxx"
#include "readwrite_helper.h"
#include "readwrite_helper.h
xx
"
#include "sockimpl.h"
#include "sockimpl.h"
#include "secimpl.h"
#include "secimpl.h"
...
...
sal/osl/unx/profile.cxx
Dosyayı görüntüle @
e5f0aceb
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
*/
*/
#include "system.h"
#include "system.h"
#include "readwrite_helper.h"
#include "readwrite_helper.h
xx
"
#include "file_url.hxx"
#include "file_url.hxx"
#include <osl/diagnose.h>
#include <osl/diagnose.h>
...
...
sal/osl/unx/readwrite_helper.cxx
Dosyayı görüntüle @
e5f0aceb
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
*/
#include "readwrite_helper.h"
#include "readwrite_helper.h
xx
"
#include <osl/diagnose.h>
#include <osl/diagnose.h>
#include <system.h>
#include <system.h>
sal_B
ool
safeWrite
(
int
fd
,
void
*
data
,
sal_uInt32
dataSize
)
b
ool
safeWrite
(
int
fd
,
void
*
data
,
sal_uInt32
dataSize
)
{
{
sal_Int32
nToWrite
=
dataSize
;
sal_Int32
nToWrite
=
dataSize
;
unsigned
char
*
dataToWrite
=
static_cast
<
unsigned
char
*>
(
data
);
unsigned
char
*
dataToWrite
=
static_cast
<
unsigned
char
*>
(
data
);
...
@@ -25,7 +25,7 @@ sal_Bool safeWrite(int fd, void* data, sal_uInt32 dataSize)
...
@@ -25,7 +25,7 @@ sal_Bool safeWrite(int fd, void* data, sal_uInt32 dataSize)
if
(
errno
==
EINTR
)
if
(
errno
==
EINTR
)
continue
;
continue
;
return
sal_F
alse
;
return
f
alse
;
}
}
...
@@ -34,10 +34,10 @@ sal_Bool safeWrite(int fd, void* data, sal_uInt32 dataSize)
...
@@ -34,10 +34,10 @@ sal_Bool safeWrite(int fd, void* data, sal_uInt32 dataSize)
dataToWrite
+=
nWritten
;
dataToWrite
+=
nWritten
;
}
}
return
sal_T
rue
;
return
t
rue
;
}
}
sal_B
ool
safeRead
(
int
fd
,
void
*
buffer
,
sal_uInt32
count
)
b
ool
safeRead
(
int
fd
,
void
*
buffer
,
sal_uInt32
count
)
{
{
sal_Int32
nToRead
=
count
;
sal_Int32
nToRead
=
count
;
unsigned
char
*
bufferForReading
=
static_cast
<
unsigned
char
*>
(
buffer
);
unsigned
char
*
bufferForReading
=
static_cast
<
unsigned
char
*>
(
buffer
);
...
@@ -51,19 +51,19 @@ sal_Bool safeRead( int fd, void* buffer, sal_uInt32 count )
...
@@ -51,19 +51,19 @@ sal_Bool safeRead( int fd, void* buffer, sal_uInt32 count )
if
(
errno
==
EINTR
)
if
(
errno
==
EINTR
)
continue
;
continue
;
return
sal_F
alse
;
return
f
alse
;
}
}
// If we reach the EOF, we consider this a partial transfer and thus
// If we reach the EOF, we consider this a partial transfer and thus
// an error.
// an error.
if
(
nRead
==
0
)
if
(
nRead
==
0
)
return
sal_F
alse
;
return
f
alse
;
nToRead
-=
nRead
;
nToRead
-=
nRead
;
bufferForReading
+=
nRead
;
bufferForReading
+=
nRead
;
}
}
return
sal_T
rue
;
return
t
rue
;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal/osl/unx/readwrite_helper.h
→
sal/osl/unx/readwrite_helper.h
xx
Dosyayı görüntüle @
e5f0aceb
...
@@ -7,26 +7,17 @@
...
@@ -7,26 +7,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
*/
#ifndef INCLUDED_SAL_OSL_UNX_READWRITE_HELPER_H
#ifndef INCLUDED_SAL_OSL_UNX_READWRITE_HELPER_H
XX
#define INCLUDED_SAL_OSL_UNX_READWRITE_HELPER_H
#define INCLUDED_SAL_OSL_UNX_READWRITE_HELPER_H
XX
#include <sal/types.h>
#include <sal/types.h>
#ifdef __cplusplus
bool
safeWrite
(
int
fd
,
void
*
data
,
sal_uInt32
dataSize
);
extern
"C"
{
#endif
sal_Bool
safeWrite
(
int
fd
,
void
*
data
,
sal_uInt32
dataSize
);
// This function *will* read |count| bytes from |fd|, busy looping
// This function *will* read |count| bytes from |fd|, busy looping
// if needed. Don't use it when you don't know if you can request enough
// if needed. Don't use it when you don't know if you can request enough
// data. It will return sal_False for any partial transfer or error.
// data. It will return sal_False for any partial transfer or error.
sal_Bool
safeRead
(
int
fd
,
void
*
buffer
,
sal_uInt32
count
);
bool
safeRead
(
int
fd
,
void
*
buffer
,
sal_uInt32
count
);
#ifdef __cplusplus
}
#endif
#endif
#endif
...
...
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