comp.lang.ada
 help / color / mirror / Atom feed
* Line-Terminator-Independent Text I/O (Mostly)
@ 2016-02-08  4:50 PragmAda Software Engineering
  2016-02-14 17:39 ` comicfanzine
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: PragmAda Software Engineering @ 2016-02-08  4:50 UTC (permalink / raw)


The version of the PragmAda Reusable Components for ISO/IEC 8652:2007 
now contains PragmARC.Text_IO, a simple text I/O package that can read 
files with DOS/Windows (CR-LF), Mac (CR), and Unix (LF) line 
terminators. It can also write files with any of those line terminators.

The PragmARCs are available from the PragmAda website at

https://pragmada.x10hosting.com/pragmarc.htm

or from the GitHub repository at

https://github.com/jrcarter/PragmARC.git

-- 
Jeffrey R. Carter, President
PragmAda Software Engineering
pragmada.x10hosting.com


--- news://freenews.netfront.net/ - complaints: news@netfront.net ---

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Line-Terminator-Independent Text I/O (Mostly)
  2016-02-08  4:50 Line-Terminator-Independent Text I/O (Mostly) PragmAda Software Engineering
@ 2016-02-14 17:39 ` comicfanzine
  2016-02-14 18:20   ` Jeffrey R. Carter
  2016-02-14 21:14   ` PragmAda Software Engineering
  2016-02-14 19:41 ` comicfanzine
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 9+ messages in thread
From: comicfanzine @ 2016-02-14 17:39 UTC (permalink / raw)


Hi ,

There is a End_Error problem with this package , that i don't understand :

dead-code@machine:~/Bureau/PragmARC-Ada-07$ "./main"

Execution terminated by unhandled exception
Exception name: ADA.IO_EXCEPTIONS.END_ERROR
Message: s-stratt.adb:194
Call stack traceback locations:
0x8069483 0x804c5e9 0x804bdfc 0x804c8d0 0x804a04f 0xb75664d1 0x8049a9f
dead-code@machine:~/Bureau/PragmARC-Ada-07$ 


dead-code@machine:~/Bureau/PragmARC-Ada-07$ addr2line --exe=main 0x8069483 0x804c5e9 0x804bdfc 0x804c8d0 0x804a04f 0xb75664d1 0x8049a9f
??:0
/home/dead-code/Bureau/PragmARC-Ada-07/pragmarc-text_io.adb:210
/home/dead-code/Bureau/PragmARC-Ada-07/pragmarc-text_io.adb:93
/home/dead-code/Bureau/PragmARC-Ada-07/main.adb:22
/home/dead-code/Bureau/PragmARC-Ada-07/b~main.adb:293
??:0
??:0
dead-code@machine:~/Bureau/PragmARC-Ada-07$ 

Code : http://pastebin.com/DZuEYC01

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Line-Terminator-Independent Text I/O (Mostly)
  2016-02-14 17:39 ` comicfanzine
@ 2016-02-14 18:20   ` Jeffrey R. Carter
  2016-02-14 21:14   ` PragmAda Software Engineering
  1 sibling, 0 replies; 9+ messages in thread
From: Jeffrey R. Carter @ 2016-02-14 18:20 UTC (permalink / raw)


On 02/14/2016 10:39 AM, comicfanzine@gmail.com wrote:
> 
> There is a End_Error problem with this package , that i don't understand :
> 
> dead-code@machine:~/Bureau/PragmARC-Ada-07$ "./main"
> 
> Execution terminated by unhandled exception
> Exception name: ADA.IO_EXCEPTIONS.END_ERROR
> Message: s-stratt.adb:194
> Call stack traceback locations:
> 0x8069483 0x804c5e9 0x804bdfc 0x804c8d0 0x804a04f 0xb75664d1 0x8049a9f
> dead-code@machine:~/Bureau/PragmARC-Ada-07$ 
> 
> 
> dead-code@machine:~/Bureau/PragmARC-Ada-07$ addr2line --exe=main 0x8069483 0x804c5e9 0x804bdfc 0x804c8d0 0x804a04f 0xb75664d1 0x8049a9f
> ??:0
> /home/dead-code/Bureau/PragmARC-Ada-07/pragmarc-text_io.adb:210
> /home/dead-code/Bureau/PragmARC-Ada-07/pragmarc-text_io.adb:93
> /home/dead-code/Bureau/PragmARC-Ada-07/main.adb:22
> /home/dead-code/Bureau/PragmARC-Ada-07/b~main.adb:293

Interesting. I was unable to reproduce the problem. Could you send the file used
as input to pragmada@pragmada.x10hosting.com ?

-- 
Jeff Carter
"Unix and C are the ultimate computer viruses."
Richard Gabriel
99


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Line-Terminator-Independent Text I/O (Mostly)
  2016-02-08  4:50 Line-Terminator-Independent Text I/O (Mostly) PragmAda Software Engineering
  2016-02-14 17:39 ` comicfanzine
@ 2016-02-14 19:41 ` comicfanzine
  2016-02-15  7:52 ` comicfanzine
  2016-02-15 22:24 ` comicfanzine
  3 siblings, 0 replies; 9+ messages in thread
From: comicfanzine @ 2016-02-14 19:41 UTC (permalink / raw)


Done , i sent the executable .

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Line-Terminator-Independent Text I/O (Mostly)
  2016-02-14 17:39 ` comicfanzine
  2016-02-14 18:20   ` Jeffrey R. Carter
@ 2016-02-14 21:14   ` PragmAda Software Engineering
  1 sibling, 0 replies; 9+ messages in thread
From: PragmAda Software Engineering @ 2016-02-14 21:14 UTC (permalink / raw)


On 02/14/2016 10:39 AM, comicfanzine@gmail.com wrote:
>
> dead-code@machine:~/Bureau/PragmARC-Ada-07$ "./main"
>
> Execution terminated by unhandled exception
> Exception name: ADA.IO_EXCEPTIONS.END_ERROR
> Message: s-stratt.adb:194
> Call stack traceback locations:
> 0x8069483 0x804c5e9 0x804bdfc 0x804c8d0 0x804a04f 0xb75664d1 0x8049a9f
> dead-code@machine:~/Bureau/PragmARC-Ada-07$
>
>
> dead-code@machine:~/Bureau/PragmARC-Ada-07$ addr2line --exe=main 0x8069483 0x804c5e9 0x804bdfc 0x804c8d0 0x804a04f 0xb75664d1 0x8049a9f
> ??:0
> /home/dead-code/Bureau/PragmARC-Ada-07/pragmarc-text_io.adb:210
> /home/dead-code/Bureau/PragmARC-Ada-07/pragmarc-text_io.adb:93
> /home/dead-code/Bureau/PragmARC-Ada-07/main.adb:22
> /home/dead-code/Bureau/PragmARC-Ada-07/b~main.adb:293
> ??:0
> ??:0

This was caused by the input having a final line that was not terminated 
by a line terminator. This is now corrected in the version available 
from the PragmAda web site, or from

https://github.com/jrcarter/PragmARC

-- 
Jeffrey R. Carter, President
PragmAda Software Engineering
pragmada.x10hosting.com


--- news://freenews.netfront.net/ - complaints: news@netfront.net ---


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Line-Terminator-Independent Text I/O (Mostly)
  2016-02-08  4:50 Line-Terminator-Independent Text I/O (Mostly) PragmAda Software Engineering
  2016-02-14 17:39 ` comicfanzine
  2016-02-14 19:41 ` comicfanzine
@ 2016-02-15  7:52 ` comicfanzine
  2016-02-15 16:48   ` Jeffrey R. Carter
  2016-02-15 22:24 ` comicfanzine
  3 siblings, 1 reply; 9+ messages in thread
From: comicfanzine @ 2016-02-15  7:52 UTC (permalink / raw)


So , it would work with this procedure ? :

     PragmARC.Text_IO.Set_Line_Terminator( PragmARC.Text_IO.Unix_EOL );

I tried with it , but there is still the same problem .

Or maybe ,  it wasn't in the right place ?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Line-Terminator-Independent Text I/O (Mostly)
  2016-02-15  7:52 ` comicfanzine
@ 2016-02-15 16:48   ` Jeffrey R. Carter
  0 siblings, 0 replies; 9+ messages in thread
From: Jeffrey R. Carter @ 2016-02-15 16:48 UTC (permalink / raw)


On 02/15/2016 12:52 AM, comicfanzine@gmail.com wrote:
> So , it would work with this procedure ? :
> 
>      PragmARC.Text_IO.Set_Line_Terminator( PragmARC.Text_IO.Unix_EOL );

Set_Line_Terminator determines the line terminator used for output. It has no
effect on input.

The new version of the pkg recognizes EOF as a line terminator for Skip_Line and
Get_Line.

-- 
Jeff Carter
"I don't know why I ever come in here. The
flies get the best of everything."
Never Give a Sucker an Even Break
102


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Line-Terminator-Independent Text I/O (Mostly)
  2016-02-08  4:50 Line-Terminator-Independent Text I/O (Mostly) PragmAda Software Engineering
                   ` (2 preceding siblings ...)
  2016-02-15  7:52 ` comicfanzine
@ 2016-02-15 22:24 ` comicfanzine
  2016-02-16 17:45   ` Jeffrey R. Carter
  3 siblings, 1 reply; 9+ messages in thread
From: comicfanzine @ 2016-02-15 22:24 UTC (permalink / raw)


Yes , no more runtime error .
But , there is 2 lines in excess at the end of the final file ...
Worst than Ada.text_io's package .

57|End Main;
58|
59|


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Line-Terminator-Independent Text I/O (Mostly)
  2016-02-15 22:24 ` comicfanzine
@ 2016-02-16 17:45   ` Jeffrey R. Carter
  0 siblings, 0 replies; 9+ messages in thread
From: Jeffrey R. Carter @ 2016-02-16 17:45 UTC (permalink / raw)


On 02/15/2016 03:24 PM, comicfanzine@gmail.com wrote:
> Yes , no more runtime error .
> But , there is 2 lines in excess at the end of the final file ...
> Worst than Ada.text_io's package .
> 
> 57|End Main;
> 58|
> 59|

What are the last few lines output by hd on that file?

-- 
Jeff Carter
"I don't know why I ever come in here. The
flies get the best of everything."
Never Give a Sucker an Even Break
102

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-02-16 17:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08  4:50 Line-Terminator-Independent Text I/O (Mostly) PragmAda Software Engineering
2016-02-14 17:39 ` comicfanzine
2016-02-14 18:20   ` Jeffrey R. Carter
2016-02-14 21:14   ` PragmAda Software Engineering
2016-02-14 19:41 ` comicfanzine
2016-02-15  7:52 ` comicfanzine
2016-02-15 16:48   ` Jeffrey R. Carter
2016-02-15 22:24 ` comicfanzine
2016-02-16 17:45   ` Jeffrey R. Carter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox