aboutsummaryrefslogtreecommitdiff
path: root/arm9/source/types/pathbuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm9/source/types/pathbuf.h')
-rw-r--r--arm9/source/types/pathbuf.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/arm9/source/types/pathbuf.h b/arm9/source/types/pathbuf.h
index 7fd7251..a926262 100644
--- a/arm9/source/types/pathbuf.h
+++ b/arm9/source/types/pathbuf.h
@@ -1,18 +1,22 @@
-#include <nds.h>
-
#ifndef PATHBUF_H_
#define PATHBUF_H_
+ #include "../bang.h"
+
+
+ // A 255-byte path buffer.
typedef struct {
- u8 mem[255];
+ u8 mem[256];
u8 p;
} PathBuf;
- u8 pb_read(PathBuf *buf);
- void pb_clear(PathBuf *buf);
- void pb_reset(PathBuf *buf, bool to_name);
- bool pb_push_byte(PathBuf *buf, u8 byte);
- bool pb_is_terminated(PathBuf *buf);
- void pb_populate(PathBuf *buf, u8 *path);
-
+ // Methods.
+ u8 pathbuf_read(PathBuf *buf);
+ void pathbuf_clear(PathBuf *buf);
+ void pathbuf_set_pointer(PathBuf *buf, bool to_final_component);
+ void pathbuf_populate(PathBuf *buf, u8 *path);
+ bool pathbuf_push(PathBuf *buf, u8 byte);
+ bool pathbuf_is_empty(PathBuf *buf);
+ bool pathbuf_is_root(PathBuf *buf);
+ bool pathbuf_is_valid(PathBuf *buf);
#endif