[parrot/parrot] 479e42: [str] Implement partial string scan

noreply at github.com noreply at github.com
Mon Dec 20 20:43:30 UTC 2010


Branch: refs/heads/nwellnhof/unicode_io
Home:   https://github.com/parrot/parrot

Commit: 479e4281beaaac293f5a16075dfa3a7fd2026a10
    https://github.com/parrot/parrot/commit/479e4281beaaac293f5a16075dfa3a7fd2026a10
Author: Nick Wellnhofer <wellnhofer at aevum.de>
Date:   2010-12-20 (Mon, 20 Dec 2010)

Changed paths:
  M include/parrot/string.h
  M src/io/api.c
  M src/string/api.c
  M src/string/encoding/ascii.c
  M src/string/encoding/binary.c
  M src/string/encoding/latin1.c
  M src/string/encoding/null.c
  M src/string/encoding/shared.c
  M src/string/encoding/ucs2.c
  M src/string/encoding/ucs4.c
  M src/string/encoding/utf16.c
  M src/string/encoding/utf8.c

Log Message:
-----------
[str] Implement partial string scan

Add a new function partial_scan to the string vtable:

INTVAL partial_scan(INTERP, STRING *src, INTVAL count, INTVAL delim);

Scans up to src->bufused bytes in src and sets src->bufused and
src->strlen to match the maximum number of complete characters found.

For variable length encodings it is possible that the buffer isn't consumed
completely. In that case, partial_scan returns the number of additional
bytes needed to decode the next incomplete characters. Otherwise returns 0.
This assumes that the initial buffer length in src->bufused is aligned
to the unit size of the string encoding.

Scans only up to count characters. Set count to -1 to disable this check.

Stops after decoding a character with code delim. Set delim to -1 to
disable this check.


Commit: 4207774d20f642fa3af2273884d64967af6e3f15
    https://github.com/parrot/parrot/commit/4207774d20f642fa3af2273884d64967af6e3f15
Author: Nick Wellnhofer <wellnhofer at aevum.de>
Date:   2010-12-20 (Mon, 20 Dec 2010)

Changed paths:
  M MANIFEST
  M config/gen/makefiles/root.in
  M include/parrot/io.h
  M include/parrot/string.h
  M src/io/api.c
  M src/io/io_private.h
  R src/io/utf8.c
  M src/string/encoding/ascii.c
  M src/string/encoding/binary.c
  M src/string/encoding/latin1.c
  M src/string/encoding/null.c
  M src/string/encoding/ucs2.c
  M src/string/encoding/ucs4.c
  M src/string/encoding/utf16.c
  M src/string/encoding/utf8.c
  M t/pmc/io.t

Log Message:
-----------
[io] Implement Unicode string IO with partial_scan

And get rid of the kludge in src/io/utf8.c


Commit: 33be1f5c939917e274a07f3135a30428275ddbde
    https://github.com/parrot/parrot/commit/33be1f5c939917e274a07f3135a30428275ddbde
Author: Nick Wellnhofer <wellnhofer at aevum.de>
Date:   2010-12-20 (Mon, 20 Dec 2010)

Changed paths:
  M src/io/api.c
  M src/io/buffer.c
  M src/string/encoding/ascii.c
  M src/string/encoding/binary.c
  M src/string/encoding/latin1.c
  M src/string/encoding/ucs2.c
  M src/string/encoding/ucs4.c
  M src/string/encoding/utf16.c
  M src/string/encoding/utf8.c
  M t/pmc/io.t

Log Message:
-----------
[io] Implement readline for Unicode


Commit: e3a5f2586338a8040cc1bbdaca6893053e7dc6b7
    https://github.com/parrot/parrot/commit/e3a5f2586338a8040cc1bbdaca6893053e7dc6b7
Author: Nick Wellnhofer <wellnhofer at aevum.de>
Date:   2010-12-20 (Mon, 20 Dec 2010)

Changed paths:
  M src/io/api.c
  M src/io/buffer.c
  M src/pmc/filehandle.pmc

Log Message:
-----------
[io] Don't use linebuf flag for reading


Commit: 4ab2f48a12917d6877d1f94255bd9e449e2c667a
    https://github.com/parrot/parrot/commit/4ab2f48a12917d6877d1f94255bd9e449e2c667a
Author: Nick Wellnhofer <wellnhofer at aevum.de>
Date:   2010-12-20 (Mon, 20 Dec 2010)

Changed paths:
  M src/io/buffer.c
  M src/string/encoding/ucs2.c
  M src/string/encoding/ucs4.c

Log Message:
-----------
codingstd fixes




More information about the parrot-commits mailing list