home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ST-Computer Leser 2002 January
/
STC_CD_01_2002.iso
/
SYSTEM
/
XAAES936
/
DOCS
/
HISTORY8.TXT
< prev
next >
Wrap
Text File
|
2000-09-24
|
53KB
|
1,420 lines
Development Log for XaAES v0.8
==============================
First a little remark.
K&R made many bad mistakes while inventing C.
We have to live with that.
We certainly do not have to live with the mistakes they made in their
writing style.
My brains are *not* trained to recognize indentation, because my brains
know that indentation doesnt run in computers.
Braces do though!
So only if I can see matching braces in a single glance
I can understand the text.
Vertically aligned braces give me that possibility.
Only then the indentation makes sense, and thats also
the reason why braces must not be part of the indentation.
∙ 18 november 1999
Henk Robbers Mailto:H.Robbers@cable.A2000.nl
http://people.A2000.nl/hrobbers
Took over further development.
∙ 25 nov 99
Ported to Pure C, fixes: grep (or run AHCX) FIX_PC
∙ 28 nov
It runs as it is.
Informed Johan. He encouraged me :-)
I'll try to mark all my amendments /* HR */
∙ 29 nov
Got a lot of the mono stuff look quite a lot better.
This is the first thing I'll do. I work on a TTM194 and I'll have to
look at it for the coming months. ;-)
replaced some identical code by XA_3D_pushbutton (sliders)
Fixes on behalf of the fact that vsf_perimeter only works as expected
in XOR writing mode. function p_bar().
∙ 30 nov
wrote a general failsafe calculation at the end of calc_work_area()
Later I will revise the whole stuff, there are still misplaced widgets
in uncommon combinations.
I understand what Craig? was trying to do: keeping the code free of
interpretation. But alas, in vain, it does not work good.
∙ 1 dec
wrote cramped_name()
constructs things like 'c:\s...ng\foo.bar'
wrote clipped_name() for info_bar
∙ 2 dec
In monochrome selected objects were selected twice, fixed.
∙ 4 dec
Start implementing the desk menu.
Some acc's will not start (xcontrol & hoelaat)
I think I must check the Pure C bindings, or use what comes with the mintlib.
∙ 7 dec
Implemented IPFF; (Input Package for Free Format data)
Needed it for more sophisticated debugging.
Embraced pathnames.
Any number of white space.
(Also got rid of scanf :-) and stream io.
∙ 10 dec
Removed pixel corrections on w & h in wind_calc
(This was already wrong in the original 7b version)
When using wind_calc to go from inside to outside, the outside became
1 line to large, but wind_get WF_work delivered the correct workarea,
leaving a line shaped hole in the workarea.
∙ 11 dec
Desk menu now in a usable state.
Hoelaat & Xcontrol still dont start. ST-Guide does.
Actually, they start, but lock up after XA_new_client.
∙ 14 dec
Made sure that global[0] was zero before calling appl_getinfo() :-)
Started static pid array along with dynamic client pool.
∙ 16 dec
Problems with locking I suppose. The basic routines work.
#if'd the dynamic pool, but kept the separate pid array.
I want to be able to work on more than 1 topic concurrently.
∙ 18 dec
Got the locking right. Dynamic client pool now works.
Pid2Client is now a function. It *must* lock/unlock the client pool.
maximum pid is now 999, as it should be. maximum no of clients 32;
Saves a lot of BSS.
Note: The client pool is in the bss! no malloc's needed.
What is this stupid looking pid numbering for?
Is there a need for a kernel session unique pid? Then why the cobol like
maximum of 999? Or is MiNT just emulating the primitivities of Unix?
∙ 24 dec
Trying to run TERADESK as desktop program. Its small & for free and
multitasking capable.
shell_find: strlen(cwd) changed to sizeof(cwd). :-)
This could be the cause of XaAES not finding its resource when not in a
root dir.
The PATH env could be simply absent. shell_find fixed
Also checked for filename that starts with p.e. C: (a full hierarchic name)
It seems that LATTICE's printf prints "(null)" for %s if a zero pointer is
passed.
Pure C's printf doesnt do that. (So you can notice programming errors!)
Several fixes.
rsrc_gaddr(R_STRING) : It seems that this is really exactly the same as
R_FSTR except for the return value, which seems to be
a single in stead of a double ref.
Fixed ResourceString() accordingly.
This could be right, because TERADESK now runs as expected. ;-)
∙ 25 dec (Merry Christmas)
Fixed a bad bug in shell_write handling the (PASCAL) string 'tail'.
Found the reason why some acc's wouldnt wake up:
AC_OPEN must supply the menu_register() reply in msgbuf[4].
In our case this is the pid. fixed.
There are still many pixel errors of the kind: x,y,x+w,y+h left.
I will now replace x,y,w,h by RECT{short x,y,w,h} where possible
and use wrapper functions or macros for pxy stuff where possible.
So in a single streak I can correct this for good.
functions: rtopxy(coords,RECT *r);
RECT to a pxy array.
ritopxy(coords,x,y,w,h);
RECT values presented as int's to a pxy array.
∙ 26 dec
Fixed for b/w: highlight_col --> WHITE.
drag_hslide: call to display_vslide --> display_hslide. :-)
drag_hslide is obviously a modified copy of drag_vslide.
Boxes that have 3d flags (indicater or background) but have no
border, are not anymore written by XA_3D_pushbutton.
(Example: MagiC) Have to test the colour though.
∙ 27 dec
The single character was missing in mono icons. fixed.
Mono icon text is now centered in the (white) box defined in
RECT iconblk->tx.
Colour icons were not affected by this changes. They were already displayed
correct.
Are ch & text part of the colour icon pixel data ?
Or does THING write colour icons himself ?
Anyhow, if not, just insert the call to 'icon_characters'.
Wrote a simple amd nice routine for finding cnf & rsc using a table
of various (standard) paths.
(The rsc was not found when not in c:\)
∙ 28 dec (very early in the morning ;-)
*********************************************************
Found missing paremthesis' in MOUSE_CL.C threaded rectangle checking.
Among innumerate spurious pairs :-(
Certainly the reason why the whole stuff doesnt work.
Not yet tried though.
I will now check ALL use of & in if's
*********************************************************
The afternoon.
Well, :-) mouse rectangle events now simply work.
There is 1 big disadvantage: The pid number is enormously boosted up.
∙ The fourth of january of the year 2000 and all's well!!
I didnt like Pid2Client to issue 2 Psemaphore call's.
It is only needed the very first call after the client is started.
So I moved the call's to around the Pid2Client call in Handler.C.
For a non debugging XaAES, Pid2Client is now a simple macro (as it was).
sliderbars now have a minimum length of ICON_H resp ICON_W.
∙ 6 jan
All icons: fixed|inserted monochrome parts.
Increased in the rsc file the height of the listbox of the fileselecter
from 8 to 14.
It worked immediately, without needing any modifications in the text.
Thanx folks! :-) Excellent behaviour.
Now it must be easy to adapt the height dynamically to the actual
screen height. Later!
Most AES's allow null text pointers in menu's.
Put a check in d_g_string(), d_g_title() & d_g_button accordingly.
Pixel corrections as well for string & title.
Draw_objects: implemented odc_p->x,y.
The additions parent_x/y + ob_x/y were already done once in the caller.
So why not pass them.
ODC_PARM structure extended with short x,y which receive the result of the
additions;
Saves about a Kb room for new features.
Size matters!! Not only in the computer, but certainly outside it as well.
Lots of ritopxy() as well.
∙ 7 jan
objc_change:
Must write the whole tree.
But clipped by the area the objects takes on top of the supplied clipping
rectangle. Otherwise transparent objects go wrong.
Preliminary fix. New function: object_area(RECT *c, OBJECT *ob, int item)
Not yet complete.
New function: short thickness(OBJECT *ob)
outlined & shadowed remain to do.
ob_spec macro: moved the #if to the macro definition.
Clears up the text considerably. :-)
next_app_menu()
If there is a deskprogram, root window menu_bar owner will be
the desktop, not the AES.
Not yet complete though. This is intimately related to the kb focus
question.
Sampled some code duplication in functiom swap_menu()
∙ 8 jan
Use clear_clip() in stead of vs_clip(h,0,NULL).
simplifies FIX_PC corrections.
Destilled function: change_object() from XA_objc_change().
This is now used in the menu selection stuff (click_menu_widget()).
The less duplication, the easier a program is to maintain.
∙ 9 jan
constructed function: display_def_widgets()
replaces 8 exactly the same individual display functions.
New member 'src_index' in XA_WIDGET structure.
XA_new_client:
Really try to isolate the file name proper to use as proc name.
∙ 10 - 19 jan
Struggling with the mouse rectangle events.
Got the threading working, but way way too slow.
So threading is out.
Found a simple and effective solution:
Mouse movement is sampled in the moose.
In the VBI the sample is compared to the sample of the last VBI and when
the mouse position has changed a mouse_movement packet is queued for
XaAES. The latter can detect this packet in the normal way via Fselect
and Fread on the moose device.
The actual checking of the rectangles is done in XaAES in interruptable
user mode. Changes in MOUSE_CL.C accordingly.
Fixes in the moose:
The position of x & y in the lina_a struct are updated by the VDI
AFTER!! the IKBD vector is processed.
So I had to add the x & y increments locally to the line_a x & y.
∙ 20 jan
Tried to use the Mintlib Getcookie, for Ssystem.
(Didnt work though, look at that later)
Removed massive code duplication in XA_form.handle_form_key
& XA_objc_edit
(They should have been the same, but were different.)
∙ 23 jan
moose: some optimizations and fixes
Assembler programmers: Please, always jump forward. (Except of course
when a piece of code has to be repeated. ;-)
Check for movement only 1 in 4 VBI's.
It looks that mouse rectangle events now work rather well.
Only 1 or 2 button clicks get lost after heavy MU_M.. event processing
in the APP. (I think). This may of course be a bug still in the moose,
so I do not yet consider it finished, but at least it is good enough to
let it sink for a while and go to other important stuff.
For instance finding out why ENTER/RETURN inputs do not reach the APP's
in dialogues.
∙ 24 jan
XA_form_keybd & handle_form_keybd:
Fixes to be able to handle default button by <RETURN|ENTER>
in case there are no editable fields at all.
new functions:
bool has_default(OBJECT *form);
short find_flag(OBJECT *form, short flag);
Because alerts return a number which is not a object index, a new
keypress handler is added for alerts: key_alert_widget(.......)
∙ 25 jan
Many places:
looping for all objects in a tree: check LASTOB before incrementing object
index.
The only place where this was done correctly was in resource load itself. :-)
I made the same mistake once in AHCX which doesnt use form_keybd
nor objc_edit.
Wrote a nice routine: find_cancel_button(), to be called for <UNDO>.
There is a new config keyword 'cancel' which is used to introduce known
cancel button texts dynamically to XaAES.
Regained good humour. ;-)
∙ 26 jan
Preparations for correct positioning of curser in nonleft aligned text.
Moved everything that is common to all text objects to set_text().
I need the stuff there anyhow, so I can calculate the cursor position
correctly. After that I can try to position correctly in prop fonts.
Replaced the use of vst_alignment by vqt_extent in combination with
own coded centering.
Balanced vst_alignment, vst_point & vst_font call's in such a way that
procs using a non standard call, revert themselves back to standard,
avoiding spurious call's.
Although I add more & more code to XaAES, it is still considerably
smaller than the original. :-P
Cursor is now correctly placed in nonleft aligned text.
Published 'progression report'.
-------------------------------
∙ 28 jan
kernal: handling active_function: added missing parentheses in if statement:
(evnt_count & 0xff == 1) --> ((evnt_count & 0xff) == 1)
Several patches to let the client bomb out in stead of XaAES.
New config keyword for monochrome
toppage x
x = bold: top window title displayed in bold, others normal
x = faint: top window title displayed normal, others faint
∙ 29 jan
replaced printf(..), it now calls sprintf(...) & Cconws().
I noticed that redirection of debug output was performed by calling
Fforce (The GEMDOS one), which was always working fine and still is.
Now got rid of ALL stream IO. We no more suffer from particularities of
a multitude of libraries supplied with compilers.
IPFF is a nice stream IO of it's own.
∙ 30 jan
Investigating the keyboard focus question:
moved the (heavily #if'd) text out of do_keyboard to a function)
Little global struct FOCUS focus.
Really new:
When no window is open or on top, focus pid will be taken from the current
menu bar.
∙ 31 jan
new function top_next_window(void)
tops the first window that is open and not already on top.
close_window: Some generalization.
disabled (heavily #if'd) code.
Instead call swap_menu() & top_next_window()
This makes XaAES behave more like the other AES's.
It was APITA, but very therapeutic ;-)
∙ 1 feb
Finally found what was really missing in the original.
I managed to confuse myself a little.
Indeed the call to top_next_window was necessary: in stead of
nullify focus.window, a window of another app is topped (if there).
Or I may be completely wrong.
Removed yet another massive code duplication:
new functions: bottom_window(w) & top_window(w)
Next target: drag_..slide. (needs quite a trick)
display_window: moved v_hide/show_c to the edges.
Made quite a lot of pairs elsewhere spurious. Removed them.
Saved another half Kb for new features. :-)
∙ 2 feb
removed code dupication in evnt_mult & evnt_mesag:
new function pending_msgs()
dynamic window handles.
Use a bit array to record handle's in use,
if a bit is 0, handle is free and can be reused.
This is rather important! It makes very long up times possible.
new functions:
new_wind_handle, free_wind_handle, btst, bclr, bset
Corrected the values for appl_getinfo.
Enum values were used, instead of bit mask values.
After repairing, Thing suddenly displayed the iconify widget.
Which was nice, because that gave me the opportunity to detect
some inconsistencies in handling the iconify stuff.
∙ 3 feb
Completely off topic. ;-) published TT-Digger 6.1
∙ 4 feb
Menu titles can be DISABLED.
Fixed that. Disabled titles are now ignored.
Contrl[0] was checked after accessing Kcall_direct[contrl[0]].
Reversed that.
∙ 5 & 6 feb
World championship speed skating. :-)
∙ 7 feb
Removed all casts from and to void *.
Pre ANSI or non proper ANSI compilers are out for ages.
These casts confuse and make lines long.
Started analysis of the calc_work_area() plus related widget
location mechanisms.
I'll try to put complete generalization into the stuff.
There are connections that use knowledge that shouldnt be used.
I do not want to break the system by doing it simple.
(Although I may be forced to do that as a temporary solution when it
holds up other important developments).
∙ 8 feb
Already generalized the code for all the arrows. Saved another Kb.
I have idees to generalize the code for both sliders as well.
Repaired a funny error in WF_(UN)ICONIFY.
The status was changed after, in stead of before, drawing.
rubber_box: extra parameters dx, dy, used for resizing.
Maintain the distance between the mouse and the lower right corner of the
window, just as WINX and MagiC.
If you dont move the mouse because you change your mind, the window
does not change.
∙ 9 feb
NEW_SLIDE
Greatly cleaned up the drag_..slide code, now arrows are unified elsewhere
and are vanished from the slider code.
It is now almost comprehensible.
Next step is: Grand Unification of all the slider code.
The idee is to make a slider true 2 dimensional.
That means a slider can move freely in all directions, combining
x and y movement. Vertical sliders are horizontally always full size,
Horizontal sliders are vertically always full sized. If I optimize
the full size detection, this hardly slow things down, but greatly
reduces the amount of code because that is only slightly different
for each type of slider.
But it is just an idee. :-)
Draw of the slider background moved from update_v/hslde to
display_..slide. They are now always drawn correctly transparent.
∙ 11 feb
Finished standard_widgets() for ALL combinations of widgets.
Replaced the existing calc_work_area() completely.
The old one couldnt work: the information in the loc structure is not
adaquate enough, and the specific widget types were used anyhow.
Replaced by a dedicated version that is at least completely correct.
Summarizing:
in standard_widgets() relative x & y of all widgets is adapted once.
in calc_work_area() w & h of variable size widgets is adapted dynamically.
The whole thing confused me for a long time, until I discoverd that
misplaceent of widgets in uncommon combinations was not the fault
of calc_work_area(), but the fault of standard_widgets().
Standard_widgets() was always completely type dedicated. Which is now
the case for calc_work_area() as well.
If generalized widgets will ever be reality, the whole stuff must be
completely redesigned.
My recommandation is to design a completely freestanding window manager
including interface protocol.
But beware: XaAES will get slower and slower, just like MS Windows!
(or X). Protocols slow down exponentially to the number of protocols.
Adaptations in display_..slide to keep the slider within it's enclosure
independant of arithmatic rounding. (or errors :-)
Optimization in drag_..slide:
If slidersize = 1000 nothing is attempted,
in display_v/hslide:
nothing is calculated or drawn,
apart from back_ground.
NEW_SLIDE not yet completely correct: reversed.
Look at that later.
create_window():
If only one of corresponding arrows is specified, both are set.
This is nice for internal consistency as well.
∙ 13 feb
Greatly improved XA_3D_pushbutton, which now includes DEFAULT & EXIT as well.
The x,y,w,h are now related to GEM rectangle's in a controlled and
flexible way.
Widget state now same as ob_state.
new functions (using GEM x,y,w,h as base)
tl_line, top left line
br_line bottom right line
∙ 15 feb
NEW_SLIDE:
As usual, I didnt remove enough code.
Now it is running perfectly in 1/3th the original code size.
∙ 24 feb
NEW_SLIDE: Well, I must have made a silly mistake somewhere:
In case of sliders only, no arrows, strange things happen.
Perhaps 'nested widgets' are really needed.
un#if'd the lot. It consumes too much time for now. I want to improve the
file selector. Both functionality and quality of the code; too much use
of small constant values.
∙ 25 feb
I thought I'd seen everything in my die hard 32 years experience as a
programmer. ;-)
do_form_alert() corrupts the user's alert string for extremely opportunistic
reasons, making it impossible for a application to do a certain alert more
than once.
Partly rewritten by using the decent and beautifull little parser IPFF.
Changed such, that a alert is always displayed, whether format error or not.
Otherwise the app is suspended and the screen & keyb are locked, but there
is nothing to click on and you can do nothing but a reset. :-(
To close at least the log_file properly:
When GENERATE_DIAGS=1, you can press CNTRL|ALT|LSHIFT whenever you
like, to brutally quit XaAES. (That is if the kernel is still looping).
∙ 4 mar
I couldnt find the place where STORE_BACK background were restored, and
I believe that this not done, so until that is sorted out, I #if 0'd that
code. XaAES seems to be able to do without.
(Mainly because app's either store the background themselves, or use
form_dial, which is OK)
Nevertheless wrote the functions form_save, form_restore & form_copy.
I need the 1st 2 for menu's. (both pop & pull).
∙ 6 mar
Tool_bar widgets: when a toolbar window was moved, find_object didnt
find anymore; the OBJECT's x & y were not updated.
I have put a little hack in rp_2_ap().
(Better should be to send a WM_MOVED message to XaAES self, but that is another
thing on the todo list).
∙ 7 mar
Started generalization of 'active_function' concept intruducing Tab structure:
Task administration block. (Internal multitasking within a process).
I need this in the new code for menu's.
∙ 10 mar
Moved all static variables from click_menu_widget to Tab active_menu.task_data
Use mouse rectangle event for pulling menu's (The GEM way).
New config keyword 'menu'
You can set menu to pull, push (the old XaAES way) or leave.
leave implies pull; in stead of clicking on the desktop to cancel a menu
action, just leave the pull down menu.
I very much like the 'leave' myself, so there is at least 1 happy user. :-)
∙ 13 mar
Found a third place where the menu_bar was swapped.
I already amalgamated 2, creating the function swap_menu().
This third one, check_menu_desktop(), was wrong.
If the target app had no menu_bar it pointed to the system menu, then the
menu_bar owner was incorrectly set to the app, so this system menu couldnt
be used. So I replaced that code by swap_menu().
I hope I now have catched ALL places where the menu bar is swapped. 8-|
∙ 15,16 mar
Continued working on menu handling.
Selecting titles and dropping and pulling menu's now work, as well as clicking
on a menu entry.
Before I do the menu entry selection, first I'll do menu_popup.
∙ 17 mar
I wanted the popup menu's implemented, to be able to use SELECTRIC.
S bombs out when clicking on a popup (Of course, it thinks its AES 4? :-)
The following happened:
The alert pipe is activated (by MiNT I suppose, kernel 1.15.7b), but
Finstat returns 0, which resulted in a loop on Fselect, resulting in
quite a few alerts per second. I dont know why this happens and if I do
something wrong, but if it happens I just close & reopen the alert pipe.
This is under GENERATE_DIAGS.
The bombing of SELECTRIC was due to wind_get(..,WF_SCREEN...) not present.
Implemented WF_SCREEN; return a very small area in the hope that app's
then decide to allocate space themselves. Which is the case for SELECTRIC.
Reactivated pull_wind_to_top() in XA_form_do; This was necessary to get the
focus correct. click_object_widget() uses wind_find(), which needs the
correct window at the front of the window list.
Deactivated display_windows_below() in exit_form() for dialogues not
guarded by form_dial pairs.
For this kind of dialogues XaAES has no control at all.
Many app's do a lot of form_do's without the need for repeating the drawing
of the object tree. (TOUCH_EXIT mechanisms).
SELECTRIC is now working, but apparently does it's own popup's.
Now I know that I must look for another software to test popup's :-(
(Hey, maybe I put a popup in XaAES's fsel, but that wouldnt be a proper
independant test of course).
Although a lot of work is spent on XaAES's fsel, I fear that it is simply
not good enough to prevent people from using replacements. This can of course
be changed in the future.
∙ 20 mar
Replaced constant 'c_max_h+10', to define the toolbar relative location,
by 'dialogue_window->wa.y - dialogue_window->r.y'.
In analogy to WINX, wind_get(0,'XA') returns 'XA'.
∙ 21 mar
Finally completed the desk menu with a entry to XaAES itself.
Now you can switch the menu to reach the task manager and the system log. :-)
∙ 23 mar
Popups now seem to work. I had to make several small changes in fix_menu()
and set_menu_widget() to make them more general.
Also reduced the number of fixes in fix_menu(); it may have been good for
some programs, but it was not good for some good programs. :-)
Popups run in a window that have a menu widget set. (Which is nice :-)
#if'd out the window of the popup. As a cross check.
Save windowing for future sophistications.
Used a popup in AHCX, for testing. It runs OK under MagiC, so I may suppose
that the calling is compatible and correct.
It seems that Thing does it's own popup's, although appl_getinfo() gives
the rquired replies.
∙ 26 mar
Abandoned the idee of a 'focus' as a globally available state.
Updating that state is tedious, it must be done in very many places.
The difference between 'focus window' and 'top window' leads to ambiguities
and loose ends in the code.
Simplified top_window() & bottom_window() accordingly.
Small simplifications elsewhere.
New function find_focus().
It is called when a key is pressed, so only when it is actually needed.
The function uses the primary information present, not something derived.
Now you can actually implement 'point to type' dynamically.
New cfg keyword 'focus', operand 'point'. (#if POINT_TO_TYPE)
Not used though; Somebody ever wanted to 'point to type'?
∙ 27 mar
evnt_button: should return the number of clicks, not the state.
Reversed return of clicks & state in intout.
∙ 28 mar
Calling prog defs:
Suddenly ST-Guide started to bomb out.
Pure C puts local variables in registers. This behaviour cannot be influenced
by the programmer.
Wrote a wrapper function that saves and restores register variables.
ST-Guide now runs again.
Calling prog defs in supermode is now a config option: 'superprogdef'
format_dialog_text():
In case a template ends with '_' and the text is completely filled,
the real cursor position remained uninitialized. Fixed that.
While doing this I discovered that the te_tmplen field is used for the
cursorposition. To my knowledge this is wrong! The field is supplied and
owned by the app. It specifies the room available for the template.
Marked the relevant places. This wont be an easy fix.
I think the XA_WIDGET_TREE pointer must be passed to draw_object_tree() and
all its sub routines.
∙ 29 mar
The desk menu I implemented very early, used the Multitos approach,
which was rather tedious because I had to switch between the original menu
tree and a enhanced copy of the desk menu.
So I changed that. The approach is now rather simple, straightforward and nice.
In fix_menu() the desk menu is shortened.
The entry 'Desk accessory 1' is changed to 'Clients'.
The rest is hidden and disabled. When you hit the 'Clients' entry a popup
(which I just happened to have implemented :-) is built and showm, listing
all the clients.
Later this can be changed into a sub menu, but then it will technically
remain to be a popup.
∙ 4 april
Did some experimenting with popup's in window with vertical scroll bar.
Start implementing sub menu's.
Replaced simple OBJECT *std_menu to XA_WIDGET_TREE *std_menu.
I need room for a table of attachments per client per menu_bar.
So this XA_WIDGET_TREE structure is a nice place for that.
∙ 5 april
Spend some time understanding the match_pattern() in ENTRIES.C ;-)
Fixed 2 omissions:
1: a missing pointer advance after [..]
2: expand the while to be able to match *.C* c.q *.[CH]* with N.C
Didnt fancy to rewrite the lot.
In short: "empty matches *" now at end as well.
Sorting the fileselector entries is now case insensitive.
When you switch often between TOS & MiNT (like me :-) it is more convenient
to have 8+3 names in uppercase in the fileselector.
Simply put the word 'tosucase' in the cnf file.
∙ 6 april
Published 'progression report'
------------------------------
∙ 7 - 14 april
Steadily working on the menu stuff implementing sub menu's.
It is a complete rewrite.
I want it to be as flexible and general as can be.
popups and menu pull downs are the same. In principle it should be possible
to attach submenu's to popup's.
∙ 15 april
Got submenu's working such, that the desk menu now uses a submenu for the
clients popup.
∙ 16 april
shadow_object: The shadow was written as a full black box beforehand.
This is not good for I-boxes.
Replaced by a simple classic loop around br_line().
Maxinized the border thickness to 4. (I have seen strange things on the
screen in the past with corrupted OBJECT tree's :-)
Heavily cleaned up display_object().
Parts were duplicated in the individual display routines.
Parts that should have been moved to individual routines were not moved.
All individual routines that do not handle states return these now.
So states that are very generic can still be handled in display_object() but
now in a controlled way.
Maximize use of RECT. Smaller and faster interfaces.
Some usefull small functions for primitive drawing based on combination
of RECT plus a enlargement value.
Saved another 1.5 Kb for new features.
∙ 17 april
The idee that objc_change should write the whole tree while clipping on
the item is of course good. :-)
Unfortunately current AES's do not do that. Apparently they handle
transparent objects individually.
Wrote a quick temporary hack to handle G_STRING, G_TITLE and G_SHORTCUT.
This should cater for 98% of the cases (I hope ;-).
New function: i = get_parent(root,item)
The menu now looks normal and behaves smooth. No white flimmering anymore.
∙ 20 april
Trying to get LUNA running, not bad.
Lunna's progdef 3D buttons were all black.
Looked in the wrong directions for ages.
Implemented objc_sysvar. Which cured it. Amazing.
Spent a few days finding out why Luna doesnt find it's config file.
It does under TOS & MagiC. Alas not under MiNT/XaAES.
Didnt find the reason.
∙ 23 april
Compliled XaAES completely without file selector AND without Mintlib.
Works with Selectric.
Boxkite MUST be run before MiNT. So I put a little adaptation in Handler.C
such that if XaAES is compiled without fsel and fsel is called by a app
the AES call is returned to Handler.s which then jumps through the
old vector.
Alas: Thing calls scrap_write() and bombs out. :-(
Inserted initializer for scrap_path. In case clipboard is not set via
XaAES's cnf.
scrap_read returns 0 if *scrap_path == 0.
Thing keeps bombing though.
∙ 24 april
Now that calc_work_area() is perfect ;-), I decided that I want to be
able to draw windows without a border at all.
For the root_window and windowed listboxes in dialogues.
New parameter to create_window(): short frame_size.
generalization of window frame.
Removed the bordersize from the XA_WIDGET_LOCATION's.
The border size is now handled dynamically in rp_2_ap().
∙ 26 april
Not completely off topic: bought myself a used Milan040. :-)
Spent a week playing around.
∙ 6 may
Finished submenu's for applications such, that they are guaranteed to work at
least 1 level deep.
They are designed to work on levels only restricted by the memory that is
granted to the system. I will spent test time on that later.
∙ 8 may
Start implementation of full fledged windowing for the listbox.
(I want to slide!)
∙ 10 may
Listboxes are now windows.
The fileselector uses the new list box code. (As do automagically task
manager and sysalert list)
Didnt add to the functionality, but the code
needed has already become easier to understand, smaller and cleaner.
∙ 14 may
Super bonus: you can page and slide through the list boxes.
∙ 16 may
Revitalized menu's in windows for use in the file selector.
The menu bar in a window has the same status as the title bar and the
info bar. Besides 'NAME' and 'INFO' there is now 'XaMENU'.
The menu bar is now a standard widget. set_menu_widget is still needed
to submit the resource tree.
∙ 17 may
Incorporated a window menu bar in the fileselector.
For drive and pattern switching.
New config keyword 'filters'.
The pattern switching menu works.
For the drive switching menu I have to get rid of the mintlib stuff first.
I'll save the sexy parts for last. :-)
To my surprise (I didnt notice until now. ;-) find_object() actually
did find hidden objects. (I checked the original, it wasnt there either)
Fixed.
∙ 18 may
A form can be a single editable (box)text.
Fixed form_cur() accordingly.
Earlier I had to pass a key_press handler for dialogues that have a DEFAULT
button.
I forgot that checking for EDITABLE had to be done anyhow, but at a later stage.
Fixed form_cur() accordingly. This is now a fine safe guard as well.
Cursor keys are now devoured even when there are NO editable fields.
As a byproduct reduced the text to a A4 page by changing all
for statements to while statements.
∙ 20 may
Flag field now in SCROLL_ENTRY as well. Removed a weird and very
dangerous use of pointer - 1 below structure start.
Fileselector now fully working. Very much like Selectric, except for
the desktoplike functions of course.
Moved match_pattern() to it's own file MATCH_PAT.C
(It doesnt even need a include file :-)
∙ 23 may
If you dont want clogware in your system, declare POSIX_ENTRIES=0 in your
project or make file.
The POSIX_ENTRIES=0 new fileselector doesnt need the mintlib anymore.
Only the Gemdos bindings, which most compilers have nowadays.
∙ Spent most of the time switching all my stuff over to the Milan
and playing around.
∙ 4 june
Forgot to move the moose to the Milan mint folder :-)
Scared the hell out of me.
∙ 5 june
XaAES runs on the Milan! Hurray!!!
wind_get(WF_SCREEN) problem! PS_CONTR.ACC doesnt use the length value
and overwrites the small default. changed the value WHATS_SMALL to
something large. Yak :-P
PS_CONTR now works.
∙ 6&7 june
Try multistrip. Kills everything when loading rsc.
Investigating the color icon stuff in rsrc_load.
The clumsiness of the code inhibited me to realize that masks
are always the size of the mono icon.
Simplified the code to make it easy to read & understand.
∙ 8 june
bug: icon word width not always rounded up. fixed.
bug??
Icon text can be more than 12 butes.
Did an educated guess which worked. The text is handled the same as for
all other objects when > 12.
bug??
You can have color icons having no color icons :-), only the mono icon.
Fixed by delaying the setting of cib->main_list.
multistrip now at least loads.
∙ 9 june
Official implementation of screen buffer for WF_SCREEN.
planes < 8 ? quarter : half.
Needless to say that the use of this buffer is totally obscure to the
AES. Applications that use this must lock the screen. They are able to
know how much there is, and when they use more they bring the system down.
∙ 10 june
When transforming color icons, wrong size was used, resulting in
garbage on screen. fixed.
∙ 13 june
Still trying multistrip. It loads and runs, but will not show the bar.
appl_find:
When looking for 0x0000, 0xffff or 0xfffe, the lower part of
addr_in[0] was taken, not the upper part.
appl_search:
The maximum pid number was overrun by 1.
I think APP_FIRST means the first app, not the current.
Simplified and made fail safe.
Made N.Aes compatible.
appl_write:
Default reply 0 was mistakenly put in intout[1]
If the destination is not a AES client, no action is taken.
Especially no messages are queued that will never arrive anywhere.
∙ 15 june
The mouse data were not filled out for evnt_multi replies on MU_TIMER
and MU_MESAG. The reason why multistrip wouldnt show it's bar.
(got rubbish x&y on it's 1 second timer interrupts)
menu_settings(inquire,...)
Pass sensible values. Although XaAES is not using these, multistrip does.
Multistrip now functions. Only 2 exceptions:
The 'leiste' tab page in MSCONFIG bombs.
The popup from the bar doesnt show as should, the submenu's do.
Note: multistrip does *not* call menu_popup nor menu_attach.
probably because it wants to animate them.
(I have tested menu_popup myself in a test app).
Next targets: Jo Evens Taskbar and Christians Toswin2.
Published 'progression report'
------------------------------
∙ 18 june
Since quite some time there are problems leaving app's cleanly:
ps_contrl & multistrip showed that AES clients wont leave the computer
after XA_client_exit() was called. This could be caused by the dynamic
client pool. So I returned back to the static array.
Then use the static array to get the new XaAES behave the same as the old.
Then I discovered that the old version kicked out the app's via SIGCHILD.
causing XA_client_exit() to be called twice.
Now I wonder if the old version was actually correct at this point.
But well.... at least the new version now does the same. :-) or :-( ??
This explains why some old Atari programs didnt run: These programs call
appl_init/exit pairs twice. (LINES.APP & GEM_TEST.PRG)
∙ 19 june
Still analyzing the exit stuff in both versions.
There is of course a important and fundamental difference between the 2
methods: In the dynamic pool a freed client structure is completely gone,
where as in the static pool, traces of it still lurk around, remain accessable
and can be used for cleaning up.
And that could well be the cause of my problems.
Needs more analysis of the code.
In the mean time improved debugging considerably.
When you combine 'debug all' with debugpoints, the meaning of the latter
is reversed, leading to 'debug all except .......'.
(In fact 'except' can be typed in stead of 'debugpoint'. :-)
∙ 20 june
wind_set(WF_NEWDESK, nil) remove a client desktop.
root_window->owner not changed back to AESpid. Leading to a pid hangin'round
in the system of a client that in most cases wasnt there anymore.
Very nasty bug in move_window() solved.
Failed to see it, because I forgot that the window_list is NOT cyclic.
But the real reason was that somewhere the root_window was pulled to top.
Put a safeguard there. It has all to do with the SIGCHILD stuff.
Need some analysis!
∙ 22 june
As long as TOSRUN isnt evaluated, run TOS programs immediate.
(So I can use my little program to switch between Tos's).
∙ 23 june
Solved the app exit problems.
Static client pool now back again.
Replaced the very confusing names 'clnt_pipe_rd' and 'clnt_pipe_wr'
by 'client_end' and 'kernel_end' respectively.
The exit procedures for the dynamic client pool will be solved in the
near future. A good working XaAES is more important.
Did some preparations for going back to dynamic pool.
Moved finishing the kernel_end to XA_client_exit() such that the client
structure isnt needed anymore.
I think that XA_client_exit() now isnt called twice anymore.
∙ 25 june
rsrc_gaddr(6,n) 'get image':
Changed #if 0 to #if 1
Seems to be confusion about name and/or meaning of the field in RSHDR.
Multistrip configure (MSCONFIG) doesnt bomb anymore.
And the animated popup in multistrip is displayed correctly.
∙ 27 june
boxchar, boxtext & fboxtext:
When 3d flags, text always written transparent, despite opaque setting.
∙ Spent a week finding a amazingly stupid beginners bug.
So stupid, my psyche refused to recognize the buggy statement completely. :-)
∙ Spent another week to get the system adapted to the fact that a client
structure is *not* always any time accessable for any possible pid number.
(I should have done this earlier)
All final cleanup for a client is now postponed to the very terminating
of the client process at the SIGCHILD signal.
App's that do multiple appl_init/exit pairs now work again.
I think they worked in v7b rather by accident.
∙ Several smallbugs found & fixed.
v0.8
∙ 20 july ====
I think XaAES is now good enough to be published for beta testing.
Basically I improved the AES/GUI side. Nothing more.
It is not finished and will definitely remain beta.
Especially the MiNT side needs one or more experts.
Another good reason is SUMMER! While leaving the stuff at rest myself
I'll give others the opportunity to have a look at it.
∙ 15 august
Fixed a small bug in the pattern separation of the file selector.
Implemented a remember string for the launcher: launch_path
Small bug fixes calling file_selectorin launcher.
CH_EXIT bit in appl_init()
root window displayed again.
∙ 21 august
Call Pdomain(1) in bootup.
inq_xfs() always sets fs_slash to back_slash.
The fsel now correctly works with minix partitions using
back slashes. (Just like Thing, no problems)
∙ 23 august
Cleaned the code of all mintlib related stuff.
There really is no need to go back.
If there is still something to fix it's much easier to do in the XaAES
code proper.
∙ 25 august
Killed a strange bug in cnf parser. (zombie v0.7 code)
Added some error messages & a hit key (if errors).
Increased solidity of the parser.
∙ 30 august
SIGNAL.C Pwait3 --> Pwaitpid(-1...)
Loop while pid > 0. (ENOENT)
Cleanup of the Psemaphore call's.
Some lower level functions try to raise a already raised semaphore.
Published a binary distribution on my homepage.
Notified the mailing list. v0.801
======
∙ 31 august
New config keyword: 'launcher'.
Specify initial path and filter for launcher
wind_get(WF_BOTTOM..)
XaAES hides unopen windows behind root.
Fixed a bug that found the last in the chain, instead of the last before
root. When no windows are berfore root, root is returned.
Salert_pipe: buf+4 was passed to the SYS_ALERT list, which meant that
the malloc'd buf could never be freed. Pass buf.
Removed comparison to dummy_cmd_line to determine if a command line must be
freed.
This is very unreliable, what if another constant has been assigned?
In stead use now a boolean that tells whether the string has been
malloc'd.
Same for cmd_tail.
shell_read: The compendium must be rubbish.
Pass the caller's commandline, NOT the commandline of the caller's parent.
Now TW_CALL starts up and spawns TOSWIN2.
(Nvertheless: TW_CALL crashed when confronted with 'XaAES' as command line.
A weakness of TW_CALL. Programs must deny wrong input, NOT crash.)
∙ 3 september
KERNAL.C
Removed silly inner loop around input_channels, which caused a Fread to
non existing handle 32 at each AES call. Definately inherited from v0.7
Amalgamated the 3 Fread's on the command pipe to a single one.
If the Fselect bug in mint still exists: the reply is checked anyhow.
Noticable increase in speed!!!
∙ 4 september
wind_calc: the temporary window created for the calculation is kept outside
the window_list; saves semaphore call's and other overhead.
The -fvideo argument wasnt working due to lack of a Pure C binding for
VsetScreen. Fixed that.
Extended syntax for video mode: octal 'o', hex 'x' or binary 'b' followed
by a appropriaty number denotation.
exemple: o32 x1a b11010 or just 26
Actualized DOCS\USRGUIDE.TXT
∙ 5 september
Installed version 2.5 of TosWin2
The older version bombed out at a form_center on a strange tree pointer
(Not on the Milan + N.AES though, so there is definetely something still
wrong)
WARNING!!!
This version (and I think all version before) have a nasty bug which
I am still trying to find. It is a non random memory corruption.
Very difficult to locate.
Strategy:
1: Stumble on a stably reproducable occurence that corrupts a traceble
location within XaAES itself.
2: Use the variable trace facility of the debugger to pinpoint the corruption
between 2 call's of the debugger. :-)
So please, before you start betatesting, backup!!!!
TosWin2.5 move's a window before it is opened by wind_open.
Wrong or not, XaAES was not prepared for that and bombed.
Fixed that.
Now TW2.5 runs my little autofolder switch program.
(You see? I am very carefull in my statements.)
XaAES's shell_write doesnt yet use the TOSRUN,
but if TW2 has a console open, the output of ttp.s will pop up in there.
∙ 6 september
Moved open_about to BOOTUP.C, so they have always the same __DATE__
When sizing a window, width & height are checked against sizes given
by wind_create, position remains free. (at least needed for toswin2)
Fixed a small bug that prevented XaAES to find its resource when it was
not in one of the standard paths.
fixed a bug in the fsel comcerning a typed name not in the list.
There is a bug left though, which I didnt find yet.
∙ 7 september
Published a binary distribution on my homepage.
Notified the mailing list. v0.802
======
∙ 7 september
The tree pointer array in the resource was not fixed up.
This array is pointed to by the global array.
(I checked TOS 3.06 to see if this was correct, they were fixed up by TOS)
Pointer arrays to free strings and free images were dynamically fixed
up by their rsrc_gaddr call's.
All fixing up is now done permanent when loading.
(So if programs that think they are clever access the resource directly,
they will find the true addresses in these arrays)
All detecting now performed by Ssystem, That is MiNT + version
and all cookies.
Implemented XA_alloc(), XA_free() & XA_free_all().
Used in rsrc_load & XA_client_exit.
Malloc's in rsrc_load got orphane, as well as subidiary call's to
rsrc_load.
The allocated area's go into a list, based in the client structure.
This list is completely freed in XA_client_exit.
rsrc_free() frees the last read resource.
For instance:
rsrc_load(aaaa)
all! rsrc_gaddr for aaaa
rsrc_load(bbbb)
all! rsrc_gaddr for bbbb
....
rsrc_free() will free bbbb and put back aaaa in global
rsrc_free() will free aaaa
This behaviour is made acceptable and behave as expected.
No more memory leaks.
∙ 8 september
XaAES didnt free its own resources, better do that.
Removed the Syield from cleanup(), it constantly bombs.
∙ 9 september
Simple bool client->init to guard appl_init/exit pairing,
cient_end no longer used for this purpose.
∙ 11 september
Silly me!!
Discovered that I didnt use mintbind.s & mintbind.o
containing all correct extra bindings.
Alert_pipe problem solved, wrong Finstat, and Syield bombing solved. :-)
Prenice works again!
The keyboard much better, although not perfect yet.
Fixed a typo in objc_sysvar.
Boxkite is now OK. You must run boxkite from xaaes.cnf.
Published a binary distribution on my homepage.
Notified the mailing list. v0.803
======
∙ 12 september
Implemented horizontal sliders/arrows in the listbox object.
This was needed for the system alert list dialogue.
Minor adaptations to the users of the listbox software: fsel, task manager
and system alerts log, so that the widgets are indeed activated.
∙ 13 september
MENUWIDG.C, TASK popup
Found a bug in the menu handler.
The mouse device can report entering a rectangle, but the mouse can
move so fast that at the time the event arrives in the menu handler
the mouse may already have left the rectangle again.
So find_object can report -1.
Check for that and resume for TASK where_are_we.
The -1 resulted in changing titles or entries tree[-1] which is not very
good.
Unfortunately this didnt fix the bus error on form_center within a older
TosWin2 that runs OK on N.Aes
∙ 14 september
Separate resource file for the window gadgets.
(And a demonstration of multiple resource usage. :-)
!!!!! Managed to get rid of 4 semaphore calls for each AES call. !!!!!
The ROOT_SEMAPHORE wasnt needed anymore since I moved the command
structure that it was meant for to local name space.
The semaphore around the Pid2Client() in HANDLER.C (the trap handler)
is only needed for appl_init amd the internal code XA_NEW_CLIENT,
which of course are only issued occasionally.
∙ 15 september
The persisting spurious semaphore calls started to annoy me.
So I began revising the whole topic.
Basic idee: every function that raises a remaphore gets a bitmask
passed in a parameter containing the current locks that are set.
Functions check this mask before semaphoring, if already raised leave it.
The passed semaphores bit is together with the new bits forwarded to every
function that does a semaphore, or sits in the chain of action leading
to a function that can raise a semaphore.
In paractice the chain is started in either the kernel or the trap handler,
that is under the AES pid and the client pid respectively,
or some direct subsidiaries.
This approach makes it reliable, easy to use, easy to maintain, and
THREAD SAFE. The lock parameter in all these function is a constant reminder.
It is very difficult to do it wrong.
∙ 16 september
Finished the above.
No spurious semaphore calls. (MiNT: curproc already owns ......)
As a reward:
Found some that were apparently missing.
∙ 17 september
Use calloc() for allocating window structures. Fixes a redraw error in
the title when dragging non topped windows.
Possibly increases stability, who knows?
Environment strings implemented in xaaes.cnf. You can use
'string', 'export' or 'setenv' as keyword. A separating '=' is optional.
The new variables are used.
Wrote private getenv() to cater for requests of the form 'NAME='
New system menu entry 'environment'. When chosen, the environment variables
are listed to the system(alert) window.
Implemented new internal function calc_window() together with center_form()
wherever sizing of a dialogue window is needed.
calc_window() leaves the temporary window outside the window_list.
No locking is needed, and it is much faster.
∙ 18 september
empty_scroll_list(): the texts were not freed; fixed that. See also 31/8.
Introduction of FLAG_MAL flag in scroll entry structure.
Removed local declarations of SCROLL_ENTRY; pass its values in the call to
add_scroll_entr(). Gives tighter control ove the content.
Embedded windows like a listbox within a windowed dialogue were left behind
when moving the parent window.
Called the wrong function in the chain of events.
New function: display_toolbar(wind, item)
∙ 21 september
Streamlining of window topping.
Sometimes UNTOPPED was not sent.
sometimes the unropped window wasnt redrawn (to give different widget looks).
New function; after_top(lock, untop)
The new function replaces duplicate code from many places.
DUPLICATION OF CODE!!! Main cause of inconsistent behaviour!!!!
The about window could be opened many times on top of itself. :-)
Applied the same mechanism to prevent this as for the system(alert) window.
Getting the chains of structures involving the listboxes behaving
completely correct when moving, is souping up too much time, so I leave
that for later. Disabled moveability for these windows.
They are: file selector, task manager and system(alerts) window.
Fixed a small bug in scrl_cur() which prevented the OK button working
after typing a new name in the file selector.
Vertical sliders in task manager and system(alert) now work.
∙ 23 september
The button up events were not reported by the moose.
Not vary many programs I use actually need it. TeraDesk does.
So I stumbled on this error only now because I didnt try TeraDesk for
a long time.
For some reason mooses code to convert KBD buttons to AES buttons does not
work. I failed to see why (programmers streak of blindness, or just impatience)
Anyhow; I thought the AES can do such a thing pretty well himself.
So I moved this code to XA_button_event. As a benefit a few instructions less
performed in interrupt time.
∙ 24 september
Apart from not sending button up events by the moose, the handling in evnt_multi
was so bad, that I had to remove the above changes.
This will be done later.
Found a BIG BUG in P_HANDLR.S: the very trap #14 code.
Before calling C, d2 wasnt saved. Pure C code destroyes d2.
Many bindings rely on the fact that only a0,a1,d0,d1 are destroyed by the
AES. These programs will now run again.
∙
∙