-
Notifications
You must be signed in to change notification settings - Fork 4
/
allchang
226 lines (179 loc) · 11.5 KB
/
allchang
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
These are the changes I've made to Gulam. The version I started with was
dated 890111. The items below are classified as "bug" or "nonbug." Most
include the file and function names affected. There are also items which
are "bug for TT" meaning Gulam didn't work on a TT until we did these
things, and one "sort-of bug" concerning "ls" on very old files. At the
end is a section called "kbad remarks" containing interpretations of the
comments found with "grep kbad *.c" ... atari!kbad can elaborate on these,
maybe. I put some of the most important bugs first in the list. The bugs
are fixed in my version unless otherwise mentioned.
Most of my changes have "AKP" in a comment nearby. I don't promise that
ALL my changes are so marked. Kbad's aren't, except in cryptic remarks at
the tops of files. If you still have 890111, a diff against that would be
best. A file which doesn't have an RCS-like header (it's not really RCS,
though) is probably unchanged by us, except kb.c, pregrep.c, and util.c.
----------------------------------------------------------------------------
bug: the command line arguments for an external commands are processed
based on the b->type value for the builtin which is lexically after the
command name (e.g. you get OWNWAY if the command is 'ab' because 'alias' is
the next builtin alphabetically). I made it a '1' meaning external
commands invalidate cached directories. This is in docmd().
bug: mv and cp would delete an existing destination file before checking
for the existence of the source file (in copyfio()).
bug: mv would delete the source file even if the copy was unsuccessful
(copyfio()).
bug: read errors and write errors are not detected in copyfio(): if the
error is something other than a full disk, there is no indication that
anything was wrong. Or, only some errors were detected here. It is a bad
idea to compare return codes against a select few values: use (code < 0) to
decide there WAS an error, then get more specific if you want to.
bug: you can't say "..\foo.g" to run a batch file which is in the parent of
the current directory. This is because run() in do.c calls index() to see
if there is a 'g' immediately after the first '.' in the file name. I
changed this to use rindex() so you see if there's a 'g' after the LAST '.'
in the name.
bug: the first byte of the command tail passed to Pexec is the command line
length modulo 256, and for command lines >126 chars long this is the wrong
value. I changed it so it's always 0xff if env_style == mw, and so it's at
most 0xfe if env_style != mw. This is in mkcmdenv() in do.c.
bug: the mem command uses illegal knowledge of GEMDOS data structures.
I put in one which doesn't. This is in gmcatari.c.
nonbug: I changed the userfeedback level of the message "(Read xx bytes
in yy lines)" to 2. At verbosity 1, they won't appear, which is what
I want: I want to be able to run at verbosity 1 and still not see that
message for each .g file I run. In cs.c and also fio.c, where I changed
the userveedback level for the (Reading...) and (Read xx bytes in yy lines)
messages.
nonbug: I added -f to rm() so it can remove read-only files: if the Fdelete
fails, it calls Fattrib to clear the read-only bit and tries again. I also
added -r to rm(), to remove files and directories recursively. (meta-bug:
"rm -r ." causes bombs in GEMDOS; I didn't research why. It could be a
GEMDOS bug or it could be a bad parameter to a GEMDOS call.)
nonbug: I added -f to cp and mv (that is, copyfio): if negopts['f'] and
creating the dest file fails, rm() is called (which also sees -f) to try
harder to remove it. This is in fop.c.
nonbug: kbad here wanted userfeedback on mv as well as cp. This just
involved moving the userfeedback call so it's before the mv check.
nonbug: I added -a to copyfio(), which means "preserve the original
file's attribute byte in the copy."
bug: since error codes are ADDED to valu in copyfio(), multiple errors
would result in nonsense values for valu. I changed this so valu "locks"
at the first nonzero error code it gets.
bug: you only get one error message even if errors occur for multiple
files, and that you can't tell which file a given error message relates to.
I haven't fixed this; it goes deep into Gulam's error-reporting code, which
ties in with the ability to run in a ue window.
nonbug: I added a variable "rz_command" which holds the name of a command
to execute when 'te' sees the Zmodem introduction sequence (a CR or LF
followed by "**^XB00").
bug on TT: the code which allocates a screen for 'te' assumes that 32K is
enough. On TT's screens can be up to 150K. I added code to compute the
required screen size from line-A variables. This still doesn't work on
non-motherboard displays (i.e. a Moniterm monitor on a Mega ST); see
no_te_scr.
nonbug: I added a variable, no_te_scr, which, when set to a nonzero value,
causes 'te' not to allocate a screen or do page flipping.
nonbug: I started to add support for Bconmap()... For instance, I added but
#ifdef'd out code to use Rsconf to send break, instead of using the
hardware address for the MFP register. This is more friendly. However,
ioctl() under MiNT is better still, if/when it's fully implemented
for serial ports.
nonbug: I added a -f flag to tch() which says "create the file if it
doesn't exist." This way you can "touch" a file into existence.
bug: setdsk() puts Dsetdrv's return code in valu, which is wrong if Dsetdrv
doesn't return a negative number: when it succeeds, Dsetdrv returns the
same thing Drvbits() returns. This explains why "cd" to a nonexistent
drive returns a wierd error code.
bug: cd() calls Dsetpath even if setdsk() was called and failed. Say your
current directory is the root of D: and there's a subdirectory called FOO
there. If you say "cd z:\foo" the Dsetdrv() will fail but the Dsetpath
will be called anyway and succeed, which is not what you wanted.
(gfstatari.c)
nonbug: I added a time-saving shortcut: gfgetcwd() stores the current
directory in a buffer called mastercwd, so when it gets called again it can
return that pointer right away. cd() frees and zeros this pointer so
gfgetcwd will really compute the current directory when it gets called
after a cd. (gfsatari.c)
nonbug: I added a variable, char Mdmport[] = "mdmport"; when you set it
Gulam calls Bconmap. This is far from bulletproof, but it works reasonably
well if you call teexit first. (gioatari.c, also some other places
like tv.c)
bug: I added a call to output Scrninit before changing fonts, because this
disables the cursor, and changing fonts with the cursor enabled is
dangerous: it can leave blobs on the screen or cause bombs. Somebody
downstream (vtinit?) enables it again.
bug: I haven't been able to track this down very well, but the first time
you use 'ue' after a font change, it doesn't always get the right number of
lines on the screen. If you leave it and enter it again, it's always fine.
nonbug: I added a variable "font" which you can set to 8, 10, or 16 to
select that 8x8, 8x10, or 8x16 font. "set nrows 50" doesn't make sense on
a TT, where the 8x8 font can give 60 lines (in TT MED) or 120 lines (in TT
HIGH). So you select the font SIZE you want and Gulam figures out how many
lines that gives you.
bug for TT: I added TT resolutions to "drawshadedrect" called by the "gem"
prefix. This is not perfect since it still doesn't work for non-native
video modes.
nonbug: I changed df's output from showing free space/total space to
showing free / used / total. (gmcatari.c)
bug: the shell_p handler has a lot of bugs, in that it doesn't save &
restore enough state. callgulam() needs to save the DTA, change it, and
restore it when you return; save & restore the fda[] array; and call
keyreset() before you return (because if you call "te" or "ue" from shell_p
then, when it exits, your keyboard is gu-mapped).
bug: I don't remember how I fixed this, but it is also the case that if you
start a program with no redirection, then use callgulam() with
redirection, the redirection isn't undone until you leave the calling
program. This might be fixed by saving and restoring fda[] but it might
have been a separate fix.
sort-of bug: "ls" displays a file's date and time, but not the year, even
if the file is years old. I made it display the year instead of the time
if the file is >8mos old. Calling Tgetdate() for each file is too slow, so
I cache the date each time Tgetdate() is called for any reason, and compare
against that date when deciding if a file is "too old." This keeps things
reasonably current. The date is displayed if the file's date is in the
future, too, so you can see when you have files with bogus dates.
bug: if you type a command name, hit return, and immediately start typing,
this typeahead is gobbled by Gulam before the program launches. I don't
really know why. I tried to fix this by arranging for useraborted() to be
called at most once per processcmd() call, but I don't know if I did this
right.
nonbug: my version of MWC generated incorrect code for tbldelete() when it
had register variables. I didn't research this further, I just ripped
out the register declarations.
bug for TT: the check for stack overflow had to be removed, because it's
possible to call Gulam via shell_p at a time when the user stack pointer is
actually BELOW Gulam's original stack pointer. This is also possible on an
ST with severe memory fragmentation problems, but it's EASY on a TT: put
Gulam in TT RAM and call it from a program which is in ST RAM.
bug: blank lines in Gulam output messages don't appear. I fixed this by
taking the test out of outstr().
bug: 'cat' strips blank lines from the input, because of a check in
eachline(). I didn't fix this, because I didn't know if any other
functions that use eachline() rely on this aspect of it.
nonbug: I added some functions and changed some default bindings so, by
default, you don't go back to the previous history line when you move the
cursor left from the beginning of the command line, and you don't go
forward when you move the cursor right from the end of the line. I created
these functions: lforwchar for ^F, lforwdel for ^D, lbackdel for ^H, and
lbackchar for ^B. I chose slots in the table that had #defines for them
but were actually no-ops in the dispatch table.
bug?: I can't use ^S/^Q during "cat," but I can use ^C to abort it. It may
be that this is caused by my attempts to make useraborted() eat less in the
way of typeahead.
wish: we'd like to be able to "hide" a builtin, so an alias or external
command will be seen instead. For instance, what if I want to use my own
"more" command?
kbad remarks that prout() would cause an extra header to print (without
formfeed) after the last page of a document.
kbad remarks that he fixed the "silent desination failure" on copy/move.
This might mean that 890111 didn't originally produce an error message when
cp/mv couldn't create the destination file.
kbad remarks something about using shifted key bindings in kb.c.
I didn't understand it.
kbad remarks that he made error messages reverse video. This may mean that
890111 didn't originally call onreversevideo / offreversevideo around
outstr(emsg) in outemsg(). Reverse-video error messages are such A Good
Thing I have forgotten that Gulam didn't always have this.
kbad remarks that he made aborting things a lot easier by checking inside
eachline. This may mean that he added a call to useraborted() there. It's
possible that my hacking on useraborted() defeated this.