chore: remove vendored deps/asprintf
vasprintf/asprintf are provided by devkitpro newlib (<stdio.h>). deps/asprintf was never compiled by CMake (GLOB_RECURSE covers src/ only). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vendored
-37
@@ -1,37 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "asprintf.h"
|
|
||||||
|
|
||||||
int vasprintf(char **strp, const char *fmt, va_list ap) {
|
|
||||||
int size, res;
|
|
||||||
|
|
||||||
va_list cp;
|
|
||||||
va_copy(cp, ap);
|
|
||||||
size = vsnprintf(NULL, 0, fmt, cp);
|
|
||||||
va_end(cp);
|
|
||||||
if (size < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
*strp = (char *)malloc(size + 1);
|
|
||||||
if (*strp == NULL)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
res = vsnprintf(*strp, size + 1, fmt, ap);
|
|
||||||
if (res < 0) {
|
|
||||||
free(*strp);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
int asprintf(char **s, const char *fmt, ...) {
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
va_list ap;
|
|
||||||
va_start(ap, fmt);
|
|
||||||
ret = vasprintf(s, fmt, ap);
|
|
||||||
va_end(ap);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
Vendored
-10
@@ -1,10 +0,0 @@
|
|||||||
#ifndef HAVE_ASPRINTF
|
|
||||||
#define HAVE_ASPRINTF 1
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
int vasprintf(char **strp, const char *fmt, va_list ap);
|
|
||||||
|
|
||||||
int asprintf(char **s, const char *fmt, ...);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Vendored
-9
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "asprintf",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"repo": "Neved4/asprintf",
|
|
||||||
"description": "asprintf, vasprintf - print to allocated string",
|
|
||||||
"license": "MIT",
|
|
||||||
"keywords": ["asprintf", "sprintf", "alloc", "string"],
|
|
||||||
"src": ["asprintf.c", "asprintf.h"]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user