diff options
author | L Peter Deutsch <lpd@ghostscript.com> | 2002-06-16 03:20:39 +0000 |
---|---|---|
committer | L Peter Deutsch <lpd@ghostscript.com> | 2002-06-16 03:20:39 +0000 |
commit | 59a8bb19f9db5d6e5003a1c5e657c50114a6ae7e (patch) | |
tree | 8e8c198fd898d4534a843b2eccb9a6a23487f565 /gs | |
parent | 570e3731f28b72bda6752ba3c45849d20fc34600 (diff) | |
download | ghostpdl-59a8bb19f9db5d6e5003a1c5e657c50114a6ae7e.tar.gz |
Documents the fact that exceptional stream conditions remain set until a
client clears them.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@2736 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs')
-rw-r--r-- | gs/src/scommon.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gs/src/scommon.h b/gs/src/scommon.h index 3017c0767..ffa647d1e 100644 --- a/gs/src/scommon.h +++ b/gs/src/scommon.h @@ -35,8 +35,8 @@ #ifndef stream_DEFINED # define stream_DEFINED typedef struct stream_s stream; - #endif + /* * A stream_state records the state specific to a given variety of stream. * The buffer processing function of a stream maintains this state. @@ -60,6 +60,14 @@ typedef struct stream_template_s stream_template; * we use negative values to indicate exceptional conditions. * (We cast these values to int explicitly, because some compilers * don't do this if the other arm of a conditional is a byte.) + * + * Note that when a stream reaches an exceptional condition, that condition + * remains set until the client does something explicit to reset it. + * (There should be a 'sclearerr' procedure to do that, but there isn't.) + * In particular, if a read stream encounters an exceptional condition, + * it delivers the data it has in its buffer, and then all subsequent + * calls to read data (sgetc, sgets, etc.) will return the exceptional + * condition without reading any more actual data. */ /* End of data */ #define EOFC ((int)(-1)) |