[Bf-blender-cvs] [9d1de621e2a] master: Cleanup: move undo opcodes out of public header

Campbell Barton noreply at git.blender.org
Sat Mar 24 12:46:42 CET 2018


Commit: 9d1de621e2a7505ef7260df8a34b670e99f94a67
Author: Campbell Barton
Date:   Sat Mar 24 12:46:25 2018 +0100
Branches: master
https://developer.blender.org/rB9d1de621e2a7505ef7260df8a34b670e99f94a67

Cleanup: move undo opcodes out of public header

===================================================================

M	source/blender/blenkernel/BKE_text.h
M	source/blender/blenkernel/intern/text.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h
index 14d3318e059..b3b1ad23b32 100644
--- a/source/blender/blenkernel/BKE_text.h
+++ b/source/blender/blenkernel/BKE_text.h
@@ -135,47 +135,6 @@ enum {
 	TXT_MOVE_LINE_DOWN =  1
 };
 
-
-/* Undo opcodes */
-
-/* Complex editing */
-/* 1 - opcode is followed by 1 byte for ascii character and opcode (repeat)) */
-/* 2 - opcode is followed by 2 bytes for utf-8 character and opcode (repeat)) */
-/* 3 - opcode is followed by 3 bytes for utf-8 character and opcode (repeat)) */
-/* 4 - opcode is followed by 4 bytes for unicode character and opcode (repeat)) */
-#define UNDO_INSERT_1   013
-#define UNDO_INSERT_2   014
-#define UNDO_INSERT_3   015
-#define UNDO_INSERT_4   016
-
-#define UNDO_BS_1       017
-#define UNDO_BS_2       020
-#define UNDO_BS_3       021
-#define UNDO_BS_4       022
-
-#define UNDO_DEL_1      023
-#define UNDO_DEL_2      024
-#define UNDO_DEL_3      025
-#define UNDO_DEL_4      026
-
-/* Text block (opcode is followed
- * by 4 character length ID + the text
- * block itself + the 4 character length
- * ID (repeat) and opcode (repeat)) */
-#define UNDO_DBLOCK     027 /* Delete block */
-#define UNDO_IBLOCK     030 /* Insert block */
-
-/* Misc */
-#define UNDO_INDENT     032
-#define UNDO_UNINDENT   033
-#define UNDO_COMMENT    034
-#define UNDO_UNCOMMENT  035
-
-#define UNDO_MOVE_LINES_UP      036
-#define UNDO_MOVE_LINES_DOWN    037
-
-#define UNDO_DUPLICATE  040
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 7c4aa81ee46..db1bbeb0a88 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -121,6 +121,49 @@
  *
  */
 
+
+/* Undo opcodes */
+
+enum {
+	/* Complex editing */
+	/* 1 - opcode is followed by 1 byte for ascii character and opcode (repeat)) */
+	/* 2 - opcode is followed by 2 bytes for utf-8 character and opcode (repeat)) */
+	/* 3 - opcode is followed by 3 bytes for utf-8 character and opcode (repeat)) */
+	/* 4 - opcode is followed by 4 bytes for unicode character and opcode (repeat)) */
+	UNDO_INSERT_1   = 013,
+	UNDO_INSERT_2   = 014,
+	UNDO_INSERT_3   = 015,
+	UNDO_INSERT_4   = 016,
+
+	UNDO_BS_1       = 017,
+	UNDO_BS_2       = 020,
+	UNDO_BS_3       = 021,
+	UNDO_BS_4       = 022,
+
+	UNDO_DEL_1      = 023,
+	UNDO_DEL_2      = 024,
+	UNDO_DEL_3      = 025,
+	UNDO_DEL_4      = 026,
+
+	/* Text block (opcode is followed
+	 * by 4 character length ID + the text
+	 * block itself + the 4 character length
+	 * ID (repeat) and opcode (repeat)) */
+	UNDO_DBLOCK     = 027, /* Delete block */
+	UNDO_IBLOCK     = 030, /* Insert block */
+
+	/* Misc */
+	UNDO_INDENT     = 032,
+	UNDO_UNINDENT   = 033,
+	UNDO_COMMENT    = 034,
+	UNDO_UNCOMMENT  = 035,
+
+	UNDO_MOVE_LINES_UP      = 036,
+	UNDO_MOVE_LINES_DOWN    = 037,
+
+	UNDO_DUPLICATE  = 040,
+};
+
 /***/
 
 static void txt_pop_first(Text *text);



More information about the Bf-blender-cvs mailing list