C reading (from stdin) stops at 0x1a character

前端 未结 5 539
名媛妹妹
名媛妹妹 2020-12-06 15:39

currently I\'m implementing the Burrows-Wheeler transform (and inverse transform) for raw data (like jpg etc.). When testing on normal data like textfiles no problems occur.

5条回答
  •  我在风中等你
    2020-12-06 16:23

    You cannot do this without an OS dependency. The C language specification says (7.19.3)

    At program startup, three text streams are predefined...

    stdin is a text stream. Depending on your OS, there may be ways to change the mode of an existing stream or access the low-level stream data, but you claim that you do not want any OS-specific code.

提交回复
热议问题