replace pseudo UTF-8 with real wide character support
[smdp.git] / include / cstack.h
index fd6c60d..230fcdd 100644 (file)
 #include "common.h"
 
 typedef struct _cstack_t {
-    char *content;
+    wchar_t *content;
     size_t alloc;
     size_t size;
     int head;
-    void (*push)(struct _cstack_t *self, char c);
-    char (*pop)(struct _cstack_t *self);
-    bool (*top)(struct _cstack_t *self, char c);
+    void (*push)(struct _cstack_t *self, wchar_t c);
+    wchar_t (*pop)(struct _cstack_t *self);
+    bool (*top)(struct _cstack_t *self, wchar_t c);
     bool (*empty)(struct _cstack_t *self);
     void (*delete)(struct _cstack_t *self);
 } cstack_t;
 
 cstack_t *cstack_init();
-void cstack_push(cstack_t *self, char c);
-char cstack_pop(cstack_t *self);
-bool cstack_top(cstack_t *self, char c);
+void cstack_push(cstack_t *self, wchar_t c);
+wchar_t cstack_pop(cstack_t *self);
+bool cstack_top(cstack_t *self, wchar_t c);
 bool cstack_empty(cstack_t *self);
 void cstack_delete(cstack_t *self);