1 /* 2 * Copyright (C) 1992,1993 NEC Corporation. 3 * $Id: macro.h,v 2.6 1994/04/19 10:16:49 uchida Exp $ (NEC) 4 */ 5 #define MAX_MACRO_LEN 320 6 #define MACRO_MAXARG 10 7 8 #define M_DOC_BEGIN 0 9 #define M_DOC_END 1 10 #define M_PLAIN_BEGIN 2 11 #define M_PLAIN_END 3 12 #define M_EXAM_BEGIN 4 13 #define M_EXAM_END 5 14 #define M_JEXAM_BEGIN 6 /* Inserted by Nide */ 15 #define M_JEXAM_END 7 /* Inserted by Nide */ 16 #define M_SET_SEC 8 17 #define M_APPENDIX 9 18 #define M_APDX_BEGIN 10 19 #define M_BLANK 11 20 #define M_PAGE 12 21 #define M_NEWLINE 13 22 #define M_CENTER_BEGIN 14 23 #define M_CENTER_END 15 24 #define M_RIGHT_BEGIN 16 25 #define M_RIGHT_END 17 26 #define M_INDENT 18 27 #define M_INDENT0 19 28 #define M_TITLE 20 29 #define M_FOOTN_BEGIN 21 30 #define M_FOOTN_END 22 31 #define M_REFER_BEGIN 23 32 #define M_REFER_END 24 33 #define M_BOLD_BEGIN 25 34 #define M_BOLD_END 26 35 #define M_INDEX_BEGIN 27 36 #define M_INDEX_END 28 37 #define M_SECTION_END 29 38 #define M_SECTION_1 30 39 #define M_SECTION_2 (M_SECTION_1 + 1) 40 #define M_SECTION_3 (M_SECTION_1 + 2) 41 #define M_SECTION_4 (M_SECTION_1 + 3) 42 #define M_SECTION_5 (M_SECTION_1 + 4) 43 #define M_SECTION (M_SECTION_1 + 5) 44 #define M_SETSEC_1 (M_SECTION + 1) 45 #define M_SETSEC_2 (M_SETSEC_1 + 1) 46 #define M_SETSEC_3 (M_SETSEC_1 + 2) 47 #define M_SETSEC_4 (M_SETSEC_1 + 3) 48 #define M_SETSEC_5 (M_SETSEC_1 + 4) 49 #define M_SETSEC (M_SETSEC_1 + 5) 50 51 #define M_MAXNUM (M_SETSEC + 1) 52 53 /* 54 * Definitions for Macfro Name, ID Number, Number of Arguments 55 */ 56 struct macNames { 57 char *mname_name; 58 int mname_number; 59 char *mname_argattr; 60 }; 61 62 /* 63 * Compiled Macros 64 */ 65 struct cmpMac { 66 struct cmpMac *cmac_next; 67 int cmac_argnum; 68 union { 69 char mic_argtype; 70 char *mic_str; 71 } cmac_content; 72 #define cmac_argtype cmac_content.mic_argtype 73 #define cmac_str cmac_content.mic_str 74 }; 75 76 struct macDefs { 77 int mdef_number; 78 char mdef_def[MAX_MACRO_LEN]; 79 }; 80