meta: replace bluelib with fx
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include <blue/core/queue.h>
|
||||
#include <blue/core/stringstream.h>
|
||||
#include <blue/ds/string.h>
|
||||
#include <fx/core/queue.h>
|
||||
#include <fx/core/stringstream.h>
|
||||
#include <fx/ds/string.h>
|
||||
#include <ivy/ident.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -20,12 +20,12 @@ struct ivy_ident *ivy_ident_create(void)
|
||||
|
||||
void ivy_ident_destroy(struct ivy_ident *ident)
|
||||
{
|
||||
b_queue_entry *entry = b_queue_first(&ident->id_parts);
|
||||
fx_queue_entry *entry = fx_queue_first(&ident->id_parts);
|
||||
while (entry) {
|
||||
struct ivy_ident_part *part
|
||||
= b_unbox(struct ivy_ident_part, entry, p_entry);
|
||||
b_queue_entry *next = b_queue_next(entry);
|
||||
b_queue_delete(&ident->id_parts, entry);
|
||||
= fx_unbox(struct ivy_ident_part, entry, p_entry);
|
||||
fx_queue_entry *next = fx_queue_next(entry);
|
||||
fx_queue_delete(&ident->id_parts, entry);
|
||||
|
||||
free(part->p_str);
|
||||
free(part);
|
||||
@@ -45,25 +45,25 @@ void ivy_ident_add_part(struct ivy_ident *ident, const char *s)
|
||||
|
||||
memset(part, 0x0, sizeof *part);
|
||||
|
||||
part->p_str = b_strdup(s);
|
||||
part->p_str = fx_strdup(s);
|
||||
|
||||
b_queue_push_back(&ident->id_parts, &part->p_entry);
|
||||
fx_queue_push_back(&ident->id_parts, &part->p_entry);
|
||||
}
|
||||
|
||||
size_t ivy_ident_to_string(const struct ivy_ident *ident, char *out, size_t max)
|
||||
{
|
||||
b_stringstream *strv = b_stringstream_create_with_buffer(out, max);
|
||||
fx_stringstream *strv = fx_stringstream_create_with_buffer(out, max);
|
||||
|
||||
int i = 0;
|
||||
b_queue_entry *entry = b_queue_first(&ident->id_parts);
|
||||
fx_queue_entry *entry = fx_queue_first(&ident->id_parts);
|
||||
while (entry) {
|
||||
if (i > 0) {
|
||||
b_stream_write_char(strv, '.');
|
||||
fx_stream_write_char(strv, '.');
|
||||
}
|
||||
|
||||
struct ivy_ident_part *part
|
||||
= b_unbox(struct ivy_ident_part, entry, p_entry);
|
||||
b_stream_write_string(strv, part->p_str, NULL);
|
||||
= fx_unbox(struct ivy_ident_part, entry, p_entry);
|
||||
fx_stream_write_string(strv, part->p_str, NULL);
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user