--nextPart2411931.BP9ZTDuYB6
Content-Type: multipart/alternative;
boundary="Boundary-01=_EgFoJ8QnobADKZz"
Content-Transfer-Encoding: 7bit
--Boundary-01=_EgFoJ8QnobADKZz
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
On Saturday 21 February 2009, David Faure wrote:
> On Saturday 21 February 2009, Michael Pyne wrote:
> > =A0I'm not really happy about manually moving
> > bytes around (especially as v1 in my testing today had an infinite loop)
> > but I don't trust readAll()/write() for library code. =A0Please look at
> > this to make sure I've done it right.
>
> I don't understand, what's wrong with readAll? kdecore sure uses it in
> quite a few places. And it's not like any .desktop file is going to be 100
> MB in size...
I guess I just don't trust the idea of "read a effective random number of=20
bytes". I know that .desktop are going to be small but I guess I'm just=20
worrying to much about someone leaving a large .desktop file to see what=20
happens. I'll change it back to readAll/write though just to make it more=
=20
clear what's happening I guess since at least it won't be worse than the re=
st=20
of kdecore. ;)
> > + // A mere half-write isn't a failure mode I care to code about
>
> It would be easy though
> if (saveFile.write(shebang) !=3D shebang.size()) {
> ...
> }
Well ironically I ended up writing the code for that case like not 5 lines=
=20
later anyways. :-/ I'll fix that too.
> BTW: can you reindent to 4 spaces? kdelibs coding style, even if the rest
> of krun.cpp might not use it yet, but we'll get there eventually.
I will as I much prefer it but I'd like to do all of krun.{h,cpp} in one sw=
ell=20
foop then (it would be a whitespace-only commit).
Regards,
- Michael Pyne
--Boundary-01=_EgFoJ8QnobADKZz
Content-Type: text/html;
charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
p, li { white-space: pre-wrap; }On Saturday 21 February 2009, David Faure wrote:
> On Saturday 21 February 2009, Michael Pyne wrote:
> > =A0I'm not really happy about manually moving
> > bytes around (especially as v1 in my testing today had an infinit=
e loop)
> > but I don't trust readAll()/write() for library code. =A0Please l=
ook at
> > this to make sure I've done it right.
>
> I don't understand, what's wrong with readAll? kdecore sure uses it in=
> quite a few places. And it's not like any .desktop file is going to be=
100
> MB in size...
I guess I just don't trust the idea of "read a effect=
ive random number of bytes". I know that .desktop are going to be small bu=
t I guess I'm just worrying to much about someone leaving a large .desktop =
file to see what happens. I'll change it back to readAll/write though just=
to make it more clear what's happening I guess since at least it won't be =
worse than the rest of kdecore. ;)
> > + // A mere half-write isn't a failure=
mode I care to code about
>
> It would be easy though
> if (saveFile.write(shebang) !=3D shebang.size()) {
> ...
> }
Well ironically I ended up writing the code for that =
case like not 5 lines later anyways. :-/ I'll fix that too.
> BTW: can you reindent to 4 spaces? kdelibs codin=
g style, even if the rest
> of krun.cpp might not use it yet, but we'll get there eventually.
I will as I much prefer it but I'd like to do all of =
krun.{h,cpp} in one swell foop then (it would be a whitespace-only commit).=
Regards,
- Michael Pyne
--Boundary-01=_EgFoJ8QnobADKZz--
--nextPart2411931.BP9ZTDuYB6
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
iEYEABECAAYFAkmgWAQACgkQqjQYp5Omm0rZkQCeN3gh2fk3/9AF8dBJ0S8a+YgF
uHAAn0fh1yyVYr0YOwt6Era0SMoeeJtN
=wFI+
-----END PGP SIGNATURE-----
--nextPart2411931.BP9ZTDuYB6--