~sircmpwn/public-inbox

scdoc: remove useless re-declarations of standard functions v1 APPLIED

~eschwartz: 2
 remove useless re-declarations of standard functions
 get rid of some unused includes

 4 files changed, 1 insertions(+), 6 deletions(-)
#953911 .build.yml success
scdoc/patches/.build.yml: SUCCESS in 26s

[remove useless re-declarations of standard functions][0] from [~eschwartz][1]

[0]: https://lists.sr.ht/~sircmpwn/public-inbox/patches/39563
[1]: mailto:eschwartz@archlinux.org

✓ #953911 SUCCESS scdoc/patches/.build.yml https://builds.sr.ht/~sircmpwn/job/953911
Thanks!

To git@git.sr.ht:~sircmpwn/scdoc
   1923fb6..afeda24  master -> master
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/public-inbox/patches/39563/mbox | git am -3
Learn more about email & git

[PATCH scdoc 1/2] remove useless re-declarations of standard functions Export this patch

From: Eli Schwartz <eschwartz93@gmail.com>

Historically, scdoc has used a project-local string.h, which overrode
and masked <string.h> and caused issues.

For example, strstr and strerror were impossible to obtain definitions
for. Instead of fixing the clashing names, the definitions were locally
copied into main.c

In commit 309ff4672b7f5cba9bca1ce8657f767b51f32220 this was fixed
properly (by renaming string.h to str.h) as part of adding printf usage
to the file as well. But the old hacks were never cleaned up.
---
 src/main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/main.c b/src/main.c
index 46b4aa8..676e2cb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -13,9 +13,6 @@
#include "unicode.h"
#include "util.h"

char *strstr(const char *haystack, const char *needle);
char *strerror(int errnum);

static struct str *parse_section(struct parser *p) {
	struct str *section = str_create();
	uint32_t ch;
-- 
2.34.7

[PATCH scdoc 2/2] get rid of some unused includes Export this patch

From: Eli Schwartz <eschwartz93@gmail.com>

In main.c, unistd.h is a fairly big stick to use just to get stdint
types, so downgrade that header.
---
 include/util.h    | 1 -
 src/main.c        | 2 +-
 src/utf8_decode.c | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/util.h b/include/util.h
index 018bbe6..94c9f25 100644
--- a/include/util.h
+++ b/include/util.h
@@ -1,6 +1,5 @@
#ifndef _SCDOC_PARSER_H
#define _SCDOC_PARSER_H
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>

diff --git a/src/main.c b/src/main.c
index 676e2cb..ca7db55 100644
--- a/src/main.c
+++ b/src/main.c
@@ -4,11 +4,11 @@
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "str.h"
#include "unicode.h"
#include "util.h"
diff --git a/src/utf8_decode.c b/src/utf8_decode.c
index fcbbb5e..607f1ea 100644
--- a/src/utf8_decode.c
+++ b/src/utf8_decode.c
@@ -1,5 +1,4 @@
#include <stdint.h>
#include <stddef.h>
#include "unicode.h"

uint8_t masks[] = {
-- 
2.34.7
scdoc/patches/.build.yml: SUCCESS in 26s

[remove useless re-declarations of standard functions][0] from [~eschwartz][1]

[0]: https://lists.sr.ht/~sircmpwn/public-inbox/patches/39563
[1]: mailto:eschwartz@archlinux.org

✓ #953911 SUCCESS scdoc/patches/.build.yml https://builds.sr.ht/~sircmpwn/job/953911
Thanks!

To git@git.sr.ht:~sircmpwn/scdoc
   1923fb6..afeda24  master -> master