[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/14] ddb/db_macro.c: move struct definition to a header file
From: |
Marin Ramesa |
Subject: |
[PATCH 04/14] ddb/db_macro.c: move struct definition to a header file |
Date: |
Mon, 2 Dec 2013 22:54:42 +0100 |
* ddb/db_macro.c (db_user_macro): Move struct definition to ddb/db_macro.h.
---
ddb/db_macro.c | 6 ------
ddb/db_macro.h | 8 ++++++++
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/ddb/db_macro.c b/ddb/db_macro.c
index 9d14b12..6c1bff3 100644
--- a/ddb/db_macro.c
+++ b/ddb/db_macro.c
@@ -45,14 +45,8 @@
#define DB_MACRO_LEVEL 5 /* max macro nesting */
#define DB_NARGS 10 /* max args */
-#define DB_NUSER_MACRO 10 /* max user macros */
int db_macro_free = DB_NUSER_MACRO;
-struct db_user_macro {
- char m_name[TOK_STRING_SIZE];
- char m_lbuf[DB_LEX_LINE_SIZE];
- int m_size;
-} db_user_macro[DB_NUSER_MACRO];
int db_macro_level = 0;
db_expr_t db_macro_args[DB_MACRO_LEVEL][DB_NARGS];
diff --git a/ddb/db_macro.h b/ddb/db_macro.h
index 525eead..ea21bca 100644
--- a/ddb/db_macro.h
+++ b/ddb/db_macro.h
@@ -24,6 +24,14 @@
#include <sys/types.h>
#include <ddb/db_variables.h>
+#define DB_NUSER_MACRO 10 /* max user macros */
+
+struct db_user_macro {
+ char m_name[TOK_STRING_SIZE];
+ char m_lbuf[DB_LEX_LINE_SIZE];
+ int m_size;
+} db_user_macro[DB_NUSER_MACRO];
+
extern void db_def_macro_cmd (void);
extern void db_del_macro_cmd (void);
--
1.8.1.4
- [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC), Marin Ramesa, 2013/12/02
- [PATCH 04/14] ddb/db_macro.c: move struct definition to a header file,
Marin Ramesa <=
- [PATCH 05/14] i386/i386/idt.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 06/14] i386/intel/pmap.c: move struct definitions to a header file, Marin Ramesa, 2013/12/02
- [PATCH 07/14] ipc/ipc_hash.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 08/14] ipc/ipc_marequest.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 09/14] ipc/ipc_port.c: trivial stylistic fix for consistency, Marin Ramesa, 2013/12/02