Replaced GLib allocation helpers in history management with standard free/strdup to reduce unnecessary GLib coupling.

Updated the network helper API to use uint32_t and standard allocation/duplication routines, dropping the GLib include from the implementation and adding <stdint.h> to the header.
This commit is contained in:
2026-01-25 23:37:09 -07:00
parent d4134c94b3
commit c8ee118f00
3 changed files with 13 additions and 12 deletions

View File

@@ -18,14 +18,13 @@
#include <string.h>
#include <stdlib.h>
#include <glib.h>
#include "history.h"
void
history_add (struct history *his, char *text)
{
g_free (his->lines[his->realpos]);
his->lines[his->realpos] = g_strdup (text);
free (his->lines[his->realpos]);
his->lines[his->realpos] = strdup (text);
his->realpos++;
if (his->realpos == HISTORY_SIZE)
his->realpos = 0;
@@ -40,7 +39,7 @@ history_free (struct history *his)
{
if (his->lines[i])
{
g_free (his->lines[i]);
free (his->lines[i]);
his->lines[i] = 0;
}
}