commit 1e8af9b0f5ab685d5a7c02967d7493a41965c45a
parent 5ad52b67b8dd5e0d485771d345b5b92cdb948b41
Author: Amitai Schleier <schmonz-web-git@schmonz.com>
Date: Thu, 17 Dec 2020 10:39:02 +0100
Document and deprecate substdio_bget().
Diffstat:
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/substdi.c b/substdi.c
@@ -43,6 +43,8 @@ ssize_t substdio_feed(substdio *s)
return r;
}
+#ifdef DEPRECATED_FUNCTIONS_AVAILABLE
+// might read fewer bytes than _get(); otherwise identical
ssize_t substdio_bget(substdio *s, char *buf, size_t len)
{
ssize_t r;
@@ -53,6 +55,7 @@ ssize_t substdio_bget(substdio *s, char *buf, size_t len)
if (r == 0 || r == -1) return r;
return getthis(s,buf,len);
}
+#endif
ssize_t substdio_get(substdio *s, char *buf, size_t len)
{
diff --git a/substdio.h b/substdio.h
@@ -3,6 +3,8 @@
#include <sys/types.h>
+#include "deprecated.h"
+
typedef struct substdio {
char *x;
int p;
@@ -24,7 +26,9 @@ extern int substdio_bputs();
extern int substdio_putsflush();
extern ssize_t substdio_get(substdio *s, char *buf, size_t len);
+#ifdef DEPRECATED_FUNCTIONS_AVAILABLE
extern ssize_t substdio_bget(substdio *s, char *buf, size_t len);
+#endif
extern ssize_t substdio_feed(substdio *s);
extern char *substdio_peek();