-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstandard_input_stream.spc
37 lines (32 loc) · 1.8 KB
/
standard_input_stream.spc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--------------------------------------------------------------------------
-- ASnip Source Code Decorator
-- Copyright (C) 2006, Georg Bauhaus
--
-- 1. Permission is hereby granted to use, copy, modify and/or distribute
-- this package, provided that:
-- * copyright notices are retained unchanged,
-- * any distribution of this package, whether modified or not,
-- includes this license text.
-- 2. Permission is hereby also granted to distribute binary programs which
-- depend on this package. If the binary program depends on a modified
-- version of this package, you are encouraged to publicly release the
-- modified version of this package.
--
-- THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT WARRANTY. ANY EXPRESS OR
-- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-- DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR
-- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THIS PACKAGE.
--------------------------------------------------------------------------
-- eMail: bauhaus@arcor.de
with ASnip.IO; use ASnip.IO;
function standard_input_stream return STREAM_ACCESS;
-- standard input, opened as a stream
-- Yes, possibly not `Text_Streams`. Plain streams appear to be about
-- twice as fast. Also, at least one implementation adds characters not
-- requested when creating a file using text streams.
-- A buffered stream is a possible enhancement, I think. It would be
-- wrapping system I/O, to make the program run a lot faster. The
-- slowness of standard streams is most noticeable with larger input
-- snippets, the size of larger package body files.