I need help with the mod.sources terminfo/curses

Brandon S. Allbery allbery at ncoast.UUCP
Sat Jan 25 09:08:22 AEST 1986


Ncoast just recently got a tape of the terminfo compiler from somebody's
mod.sources archive (whose I don't know, I'm just the programmer).  I have
ported it to Plexus sys3 (AT&T system III with some Berkeley extensions), but
apparently I've missed something important:  compile always dumps core.
The information below is a typescript of the output of compile -v9 on the
``test'' file xx.ti in the terminfo distribution.  I see some interesting
problems with it (I think), but I don't see why it gets the null string and
dumps core trying to strlen() it (adb output below).  I tried this on a Model
16 running Xenix when it was first posted, and it did the same thing.  Does it
depend on some special Berkeleyisms, or am I missing something important, or
???

Please MAIL (DO NOT POST) me answers at ..decvax!cwruecmp!ncoast!allbery or
ncoast!allbery at Case.csnet -- and send flames about inappropriate newsgroups,
porting 4.2 software to AT&T Unices, etc. to /dev/null.  I have little choice
but to port this -- sys3 has been discontinued in favor of sys5 (which ncoast
is not planning to upgrade to) and sys3 curses is badly broken (printw()
prints %-sequences wrong, overlay() and overwrite() slap their results against
the left side of the destination window, refresh() sometmes messes up, and so
on).

Thanks in advance,
--Brandon


Script started on Fri Jan 24 17:49:58 1986
# cat xx.ti
xaa-a|foobar a,
	cud1=ctrlK, cub1=ctrlH, cuf1=esc[C, cuu1=esc[A,
	use=ansi+local,
	clear=esc[Hesc[J$<156>, el=esc[K$<5>, ed=esc[J,
xaa-b,
	is1=esc[7mesc7esc[Hesc9esc8,
xaa-c|foobar c,
	is2=\r\nesc[Aesc7esc[60;1;0;30pesc8, lines#29,
	use=xaa-a,
xaa-d|foobar d,
	use=xaa-b, use=xaa-c,
xaa-e|foobar e,
	smcup=esc[30;1Hesc[Kesc[30;1;0;30p,
	use=xaa-d,
xaa-f,
	cup=esc[%i%p1%d;%p2%dH, home=esc[H, bold=esc[1m,
# compile -v9 xx.ti
81
30
141
192
23
188
293
347
40
139
295
189
86
232
113
146
38
52
138
153
37
257
37
355
41
296
98
50
190
221
196
91
17
171
237
272
345
39
137
241
177
6
272
61
161
190
267
303
87
215
144
110
291
64
129
171
244
55
88
1
104
71
18
171
41
269
237
170
273
72
54
180
103
70
170
169
272
350
36
173
133
30
287
39
69
134
89
128
268
164
357
211
276
312
301
180
284
137
34
130
291
188
85
342
239
136
33
290
252
56
121
158
179
281
75
106
62
230
162
1
66
67
138
35
131
292
189
86
343
240
137
34
291
340
341
183
341
71
136
68
76
265
141
274
222
289
117
359
52
286
88
36
293
135
142
39
296
48
357
191
358
75
99
84
71
74
36
187
0
293
145
189
343
343
343
137
277
31
258
338
Hash table complete
42 collisions out of 180 entries
Token: Names; value='xaa-a|foobar a'
Made initial string table allocation.  Size is 1024
Saved string 'xaa-a|foobar a' at location 0
Starting 'xaa-a|foobar a'
Token: String; name='cud1', value='ctrlK'
Saved string 'ctrlK' at location 15
Token: String; name='cub1', value='ctrlH'
Saved string 'ctrlH' at location 21
Token: String; name='cuf1', value='esc[C'
Saved string 'esc[C' at location 27
Token: String; name='cuu1', value='esc[A'
Saved string 'esc[A' at location 33
Token: String; name='use', value='ansi+local'
Forward USE to ansi+local (enqueued)
Token: String; name='clear', value='esc[Hesc[J$<156>'
Token: String; name='el', value='esc[K$<5>'
Token: String; name='ed', value='esc[J'
Token: Names; value='xaa-b'
Saved string 'xaa-b' at location 0
Starting 'xaa-b'
Token: String; name='is1', value='esc[7mesc7esc[Hesc9esc8'
Saved string 'esc[7mesc7esc[Hesc9esc8' at location 6
Token: Names; value='xaa-c|foobar c'
Name list = 'xaa-b'
First name = 'xaa-b'
Other names = ''
Created x/xaa-b
Saved string 'xaa-c|foobar c' at location 0
Starting 'xaa-c|foobar c'
Token: String; name='is2', value='
esc[Aesc7esc[60;1;0;30pesc8'
Saved string '
esc[Aesc7esc[60;1;0;30pesc8' at location 15
Token: Number; name='lines', value=29
Token: String; name='use', value='xaa-a'
Forward USE to xaa-a (enqueued)
Token: Names; value='xaa-d|foobar d'
Saved string 'xaa-d|foobar d' at location 0
Starting 'xaa-d|foobar d'
Token: String; name='use', value='xaa-b'
Backward USE to xaa-b
Saved string '' at location 15
compile: Segmentation violation -- Core dumped
# adb compile /etc/term/core
$c
_save_st+0xD6:	_strlen	(0x16BA6)
0x21AC:		_save_st(0x16BA6)
_do_entr+0xBC:	_handle_(0x0, 0xF4, 0x1FFA27, 0x1FFA10,	0x1FF8E8)
_compile+0x2E:	_do_entr(0x0)
0x17E:		_compile()
start+0x26:	_main	(0x3, 0x1FFE88,	0x1FFE98)
$q
# 
script done on Fri Jan 24 17:51:24 1986



More information about the Comp.sources.bugs mailing list