[9fans] libbio questions - Plan9

This is a discussion on [9fans] libbio questions - Plan9 ; -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello. Why do we have something like vlong Boffset(Biobufhdr *r); instead of vlong Boffset(Biobuf *r); and long Bgetrune(Biobuf *r); instead of Rune Bgetrune(Biobuf *r); Thanks. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkkSacAACgkQuv7AVNQDs+xMIACeNsbjeH+E3d AUcPSc76kzzjuy ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [9fans] libbio questions

  1. [9fans] libbio questions

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Hello. Why do we have something like

    vlong Boffset(Biobufhdr *r);

    instead of

    vlong Boffset(Biobuf *r);

    and

    long Bgetrune(Biobuf *r);

    instead of

    Rune Bgetrune(Biobuf *r);

    Thanks.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.8 (Darwin)

    iEYEARECAAYFAkkSacAACgkQuv7AVNQDs+xMIACeNsbjeH+E3d AUcPSc76kzzjuy
    Q+oAnArcDCCVkxwVSuy2p4fwYRhVgBLG
    =bsZB
    -----END PGP SIGNATURE-----


  2. Re: [9fans] libbio questions

    > Hello. Why do we have something like
    >
    > vlong Boffset(Biobufhdr *r);
    >
    > instead of
    >
    > vlong Boffset(Biobuf *r);


    Because there is an anonymous Biobufhdr
    in the Biobuf, so it doesn't matter. At one point,
    it was possible to declare your own buffered
    i/o by just embedding a Biobufhdr and filling
    it in correctly.

    > long Bgetrune(Biobuf *r);
    >
    > instead of
    >
    > Rune Bgetrune(Biobuf *r);


    Because Bgetrune needs to be able to return -1 on EOF.

    Russ


  3. Re: [9fans] libbio questions

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On Nov 5, 2008, at 11:21 PM, Russ Cox wrote:

    > At one point, it was possible to declare your own buffered
    > i/o by just embedding a Biobufhdr and filling it in correctly.


    Is that still possible/useful?

    Thanks for the rest of the info.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.8 (Darwin)

    iEYEARECAAYFAkkScpwACgkQuv7AVNQDs+yOFwCfYKCg+Bv7De v+gbOwz3bE/8id
    ccYAoIGxVrw9M6L6qi23eXdFw3SDQK9Z
    =gW3h
    -----END PGP SIGNATURE-----


+ Reply to Thread