-
Notifications
You must be signed in to change notification settings - Fork 1
/
listctrl.h
150 lines (127 loc) · 5.29 KB
/
listctrl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
listctrl.h - Part of macxx, a cross assembler family for various micro-processors
Copyright (C) 2008 David Shepperd
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/******************************************************************************
Change Log
05-03-2024 - Added support for TOC (Table of contents) file - TRG
01/24/2022 - Changed - Added support for HLLxxF - Tim Giddens
******************************************************************************/
#ifndef _LISTCTRL_H_
#define _LISTCTRL_H_ 1
#include "lstcnsts.h"
typedef struct
{
int srcPosition; /* listing line location for source code */
int srcPositionQued; /* queued listing line location for source code */
int reqNewLine; /* Request a new listing line */
unsigned char optTextBuf[OPT_TXT_BUF_SIZE]; /* Buffer for text storage - 1 location + 16 characters + null */
} LIST_Source_t;
typedef struct
{
char listBuffer[LLIST_MAXSRC+2]; /* Holds line to be printed */
/* char *line_end; * Points to end of above line */
unsigned long line_no; /* line number of source */
int include_level; /* depth of .include */
int list_ptr; /* Index into listBuffer between 0 and LLIST_SIZE (left of source string) */
int pc_flag; /* flag indicating to print program counter */
unsigned long pc; /* value of program counter to print */
unsigned long expected_pc; /* value of program counter to print */
struct seg_struct *expected_seg; /* pointer to current section */
int f1_flag; /* flag to print pf_value at field 1 listBuffer[LLIST_PF1] */
int f2_flag; /* flag to print pf_value at field 2 listBuffer[LLIST_PF2] */
unsigned long pf_value; /* value of field */
int getting_stuff; /* flag indicating accumulating stuff to print */
int has_stuff; /* flag indicating has some stuff to print */
} LIST_stat_t;
extern unsigned long list_toc_page_no; /* page number of TOC listing - By TRG 20240503 */
extern unsigned long list_toc_line_no; /* line number of TOC listing - By TRG 20240503 */
extern int list_toc_hd; /* header flag for TOC listing - By TRG 20240503 */
extern LIST_Source_t list_source;
extern LIST_stat_t list_stats;
extern LIST_stat_t meb_stats;
extern int list_radix;
extern char hexdig[];
extern int list_mask;
extern int list_level;
extern int list_save;
extern int list_que;
extern unsigned long record_count;
extern FILE *save_lisfp;
extern int show_line;
extern void (*reset_list_params)(int onoff);
extern void display_line(LIST_stat_t *lstat);
extern void clear_list(LIST_stat_t *lstat);
extern int fixup_overflow(LIST_stat_t *lstat);
extern int limitSrcPosition(int value);
typedef struct list_bits
{
unsigned int lm_bin:1;
unsigned int lm_bex:1;
unsigned int lm_cnd:1;
unsigned int lm_cod:1;
unsigned int lm_com:1;
unsigned int lm_ld:1;
unsigned int lm_loc:1;
unsigned int lm_mc:1;
unsigned int lm_md:1;
unsigned int lm_me:1;
unsigned int lm_meb:1;
unsigned int lm_mes:1;
unsigned int lm_seq:1;
unsigned int lm_src:1;
unsigned int lm_sym:1;
unsigned int lm_toc:1;
} LIST_bits;
typedef union list_mask
{
unsigned short list_mask;
struct list_bits list_bits;
} LIST_mask;
extern LIST_mask lm_bits,saved_lm_bits,qued_lm_bits;
#define list_bin lm_bits.list_bits.lm_bin
#define list_bex lm_bits.list_bits.lm_bex
#define list_cnd lm_bits.list_bits.lm_cnd
#define list_cod lm_bits.list_bits.lm_cod
#define list_com lm_bits.list_bits.lm_com
#define list_ld lm_bits.list_bits.lm_ld
#define list_loc lm_bits.list_bits.lm_loc
#define list_mc lm_bits.list_bits.lm_mc
#define list_md lm_bits.list_bits.lm_md
#define list_me lm_bits.list_bits.lm_me
#define list_meb lm_bits.list_bits.lm_meb
#define list_mes lm_bits.list_bits.lm_mes
#define list_seq lm_bits.list_bits.lm_seq
#define list_src lm_bits.list_bits.lm_src
#define list_sym lm_bits.list_bits.lm_sym
#define list_toc lm_bits.list_bits.lm_toc
/**************************************************tg*/
/* 01-24-2022 Added for HLLxxF support by TG
*/
typedef enum
{
/* Indicies into list_arg[] array */
ListArg_ID, /* Format ID */
ListArg_Dst, /* destination of message (index to field) */
ListArg_Len, /* Field length */
ListArg_Que=ListArg_Len, /* Flag for queue on SRC option */
ListArg_Radix, /* radix to convert */
ListArg_LZ, /* flag, if not-zero, include leading 0's */
ListArg_Sign, /* flag, if not-zero, prefix a sign */
ListArg_NewLine, /* flag, if not-zero, request new line */
ListArg_MAX /* Number of arguments */
} ListArg_t;
extern int list_args(int arg[ListArg_MAX], int maxArgs, int cnt, unsigned char *optTextBuf, size_t optTextBufSize);
/* extern char listing_temp[]; */
/*************************************************etg*/
#endif /* _LISTCTRL_H_ */