rename from xmllib to xemil

This commit is contained in:
Nishi 2025-12-23 02:05:29 +09:00
commit 25cc3877b2
Signed by: nishi
GPG key ID: 27EF69B208EB9343
8 changed files with 30 additions and 30 deletions

View file

@ -1,4 +1,4 @@
#include <xmllib.h>
#include <xemil.h>
void xl_array_push(int** array, int value) {
if((*array) == NULL) {

View file

@ -1,7 +1,7 @@
#include <xmllib.h>
#include <xemil.h>
xmllib_t* xl_open(xl_driver_t* driver, void* arg) {
xmllib_t* handle = malloc(sizeof(*handle));
xemil_t* xl_open(xl_driver_t* driver, void* arg) {
xemil_t* handle = malloc(sizeof(*handle));
memset(handle, 0, sizeof(*handle));
handle->driver = driver;
@ -132,7 +132,7 @@ static xl_attribute_t* xl_parse_attribute(const char* str) {
return first;
}
int xl_parse(xmllib_t* handle) {
int xl_parse(xemil_t* handle) {
jmp_buf err;
int* state = NULL;
char* node = NULL;
@ -416,7 +416,7 @@ void recursive_free(xl_node_t* node) {
free(node);
}
void xl_close(xmllib_t* handle) {
void xl_close(xemil_t* handle) {
if(handle->root != NULL) recursive_free(handle->root);
handle->driver->close(handle);

View file

@ -1,16 +1,16 @@
#include <xmllib.h>
#include <xemil.h>
static int xl_driver_file_open(xmllib_t* handle) {
static int xl_driver_file_open(xemil_t* handle) {
if((handle->drv_opaque = fopen(handle->drv_arg, "rb")) == NULL) return 0;
return 1;
}
static int xl_driver_file_read(xmllib_t* handle, void* data, int size) {
static int xl_driver_file_read(xemil_t* handle, void* data, int size) {
return fread(data, 1, size, handle->drv_opaque);
}
static void xl_driver_file_close(xmllib_t* handle) {
static void xl_driver_file_close(xemil_t* handle) {
fclose(handle->drv_opaque);
}
@ -21,6 +21,6 @@ xl_driver_t xl_driver_file_rec = {
};
xl_driver_t* xl_driver_file = &xl_driver_file_rec;
xmllib_t* xl_open_file(const char* filename) {
xemil_t* xl_open_file(const char* filename) {
return xl_open(xl_driver_file, (void*)filename);
}

View file

@ -1,4 +1,4 @@
#include <xmllib.h>
#include <xemil.h>
#define CAST_I32(x) ((int)(x))

View file

@ -1,4 +1,4 @@
#include <xmllib.h>
#include <xemil.h>
char* xl_util_trim(const char* str) {
char* s = malloc(strlen(str) + 1);