summaryrefslogtreecommitdiff
path: root/src/alloc.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-09 22:28:33 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-09 22:28:33 +0100
commit28fb79db6b52d1154e8dc63d227673648c2fce15 (patch)
tree4a1a10e264249d9851ffb9b7396ade0fc808fec6 /src/alloc.h
parent44132a10aeb45c957959cafb4ac39d3f478be98c (diff)
downloadvim-git-28fb79db6b52d1154e8dc63d227673648c2fce15.tar.gz
patch 7.4.1073v7.4.1073
Problem: Alloc_id depends on numbers, may use the same one twice. It's not clear from the number what it's for. Solution: Use an enum. Add a function to lookup the enum value from the name.
Diffstat (limited to 'src/alloc.h')
-rw-r--r--src/alloc.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/alloc.h b/src/alloc.h
new file mode 100644
index 000000000..c237ef348
--- /dev/null
+++ b/src/alloc.h
@@ -0,0 +1,20 @@
+/* vi:set ts=8 sts=4 sw=4:
+ *
+ * VIM - Vi IMproved by Bram Moolenaar
+ *
+ * Do ":help uganda" in Vim to read copying and usage conditions.
+ * Do ":help credits" in Vim to see a list of people who contributed.
+ */
+
+/*
+ * alloc.h: enumeration of alloc IDs.
+ * Each entry must be on exactly one line, GetAllocId() depends on that.
+ */
+typedef enum {
+ aid_none = 0,
+ aid_qf_dirname_start,
+ aid_qf_dirname_now,
+ aid_qf_namebuf,
+ aid_qf_errmsg,
+ aid_qf_pattern,
+} alloc_id_T;