1

Topic: To receive byte/symbol from a file without extraction from a flow

Greetings! There is some parcer character-by-character reading a file. It is necessary to return the very often read character reversely in a flow that strongly affects productivity. Storage of this byte - not strongly helps with the code, since permanently it is necessary to check this byte. Whether the subject (let and ) is possible? Interests linux/windows. Thanks.

2

Re: To receive byte/symbol from a file without extraction from a flow

Hello, niXman, you wrote: X> there is some parcer character-by-character reading a file. It is necessary to return the very often read character reversely in a flow that strongly affects productivity. X> storage of this byte - not strongly helps with the code, since permanently it is necessary to check this byte. Whether X> the subject (let and ) is possible? Interests linux/windows. X> thanks. std:: istream:: peek does not help?

3

Re: To receive byte/symbol from a file without extraction from a flow

Hello, niXman, you wrote: X> greetings! X> there is some parcer character-by-character reading a file. It is necessary to return the very often read character reversely in a flow that strongly affects productivity. X> storage of this byte - not strongly helps with the code, since permanently it is necessary to check this byte. Whether X> the subject (let and ) is possible? Interests linux/windows. Whether  you about peek that, or?

4

Re: To receive byte/symbol from a file without extraction from a flow

Hello, night beast, you wrote: NB> std:: istream:: peek does not help? Forgot to specify, but is not present, for two reasons: 1) standard flows in the project are not used (at least in that its part from which I work), 2) standard flows terribly .

5

Re: To receive byte/symbol from a file without extraction from a flow

Hello, niXman, you wrote: NB>> std:: istream:: peek does not help? X> forgot to specify, but is not present, for two reasons: 1) standard flows in the project are not used (at least in that its part from which I work), 2) standard flows terribly . Then it is not absolutely clear, what answer you expect to hear look on ungetch...

6

Re: To receive byte/symbol from a file without extraction from a flow

Hello, niXman, you wrote: X> Hello, night beast, you wrote: NB>> std:: istream:: peek does not help? X> forgot to specify, but is not present, for two reasons: 1) standard flows in the project are not used (at least in that its part from which I work, 2) standard flows terribly . And  flows then mean?

7

Re: To receive byte/symbol from a file without extraction from a flow

Now I esteemed determination  FILE and made  in the form of dereferencing  _IO_read_ptr. Productivity grew rather not bad, but this method is intolerable, almost in any way... Still a variant - to display a file in storage... But it is necessary ...

8

Re: To receive byte/symbol from a file without extraction from a flow

Hello, night beast, you wrote: NB> then it is not absolutely clear, what answer you expect to hear a sentence in a type what-thread artful POSIX API or WIN API NB> look on ungetch... .

9

Re: To receive byte/symbol from a file without extraction from a flow

Hello, bnk, you wrote: bnk> And  flows then mean? , too forgot to specify: stdio generally, it is not so important, therefore as I have possibility to implement IO at own discretion if only productivity was good...

10

Re: To receive byte/symbol from a file without extraction from a flow

Hello, niXman, you wrote: NB>> look on ungetch... X> . The correction, ungetc

11

Re: To receive byte/symbol from a file without extraction from a flow

Hello, niXman, you wrote: character-by-character to read files somehow it is not accepted. X> still a variant - to display a file in storage... But it is necessary ...  it is better.

12

Re: To receive byte/symbol from a file without extraction from a flow

Hello, niXman, you wrote: X> now I esteemed determination  FILE and made  in the form of dereferencing  _IO_read_ptr. Productivity grew rather not bad, but this method is intolerable, almost in any way... Or is banal to read a file in storage...

13

Re: To receive byte/symbol from a file without extraction from a flow

Hello, niXman, you wrote: whether X> the subject (let and ) is possible? Interests linux/windows. It is possible, it is finite (if the flow is a disk file, instead of stdout other program). But writing of parcers to which does not need to view the second time already read is possible also.