This commit is contained in:
2026-10-07 03:45:29 +02:00
parent 208a3e9738
commit 4351a40bd2
9 changed files with 1171 additions and 18 deletions
+7 -6
View File
@@ -1,12 +1,13 @@
#ifndef ESCPOS_H
#define ESCPOS_H
#include <stdint.h>
#include <stddef.h>
const char *escpos_version(void);
typedef struct escpos_buffer escpos_buffer;
/*
/*
* Crea un buffer vacío. Devuelve un puntero al buffer, o NULL si no hay
* memoria.
* El que llama es el dueño y debe liberarlo con escpos_buffer_free.
@@ -15,7 +16,7 @@
escpos_buffer *escpos_buffer_new(void);
/*
* Libera el buffer y toda su memoria. Si recibe NULL no hace nada.
* Libera el buffer y toda su memoria. Si recibe NULL no hace nada.
* Propiedad: después de llamarla, el puntero ya no es válido.
*/
void escpos_buffer_free(escpos_buffer *buffer);
@@ -31,7 +32,7 @@
/*
* Añade los bytes al final del buffer
*/
int escpos_buffer_append(escpos_buffer *buffer, uint8_t byte[]);
int escpos_buffer_append(escpos_buffer *buffer, uint8_t byte[], size_t size);
#endif