MGEMLIB and GEMLIB merge operation.

You'll find hereafter an analysis of the the file « gemlib.todo » (which contains notes written while working on this lib). The first column contains the gemlib file impacted (one file per function). The 2nd columns contains notes relative to gemlib 0.42.2 for this binding. The 3rd columns contains notes relative to mgemlib 41 for this binding. The last columns contains notes common to both gemlib 0.42.2 and mgemlib 41 (for example a bug fixe or an evolution of the binding for both libs).

For example, if you apply all notes found in the GEMLIB column, plus all notes found in the last column, to gemlib 0.42.2, you'll get the next gemlib release.

Now, a view words about the color used in gemlib and mgemlib columns:

A light grey/blue background says that the binding in the lib is the same as the binding in the next gemlib release. Some words in the cell can point out some optimisations or modifications done in the next gemlib release, but this remain comaptible.

A orange/red background says that the binding in the lib has bug, or has changed in next gemlib release.



File/function

GEMLIB

MGEMLIB

Additional modification done on the binding.

a_appl_bvset.c




a_appl_control.c




a_appl_exit.c




a_appl_find.c


add "const" keyword


a_appl_getinfo.c

do not call the trap if the AES doesn't have this function available to avoid system crash under some OS that doesn't support this function. (see a_appl_xgetinfo)



a_appl_init.c



use of bzero to clear the arrays [gemlib] or use of a for() loop [mgemlib] (because some libc doesn't have bzero()). What's the best one ??? I've choosen bzero() if __MINT__ is defined (mintlib have bzero), and the for()-loop in other cases. BTW, why must we zero-ed local array ??? Seems stupid !

a_appl_read.c




a_appl_search.c




a_appl_tplay.c




a_appl_trecord.c




a_appl_write.c




a_appl_xgetinfo.c

removed (it's the same as the new merged a_appl_getinfo)



a_appl_yield.c




a_evnt_button.c




a_evnt_dclick.c




a_evnt_keybd.c




a_evnt_mesag.c




a_evnt_mouse.c




a_evnt_multi.c




a_evnt_multi_fast.c




a_evnt_timer.c




a_form_alert.c


add "const" keyword


a_form_button.c


use 'OBJECT' type instead of 'void'


a_form_center.c


use 'OBJECT' type instead of 'void'


a_form_dial.c




a_form_do.c


use 'OBJECT' type instead of 'void'


a_form_error.c




a_form_keybd.c


use 'OBJECT' type instead of 'void'


a_fsel_exinput.c

little speed optimisation; redirect call to fsel_input if TOS < 1.4

add "const" keyword for title


a_fsel_input.c




a_graf_dragbox.c




a_graf_growbox.c




a_graf_handle.c




a_graf_mbox.c




a_graf_mkstate.c




a_graf_mouse.c


use 'const MFORM' instead of 'void'


a_graf_rubbox.c

the mt_graf_rubberbox() is the actuall implementation renamed from graf_rubbbox() Althouth the file is a_graf_rubbox.c (only double 'b')



a_graf_shrinkbox.c




a_graf_slidebox.c


use 'OBJECT' type instead of 'void'


a_graf_watchbox.c




a_menu_attach.c




a_menu_bar.c



replace "void*" by "OBJECT*" for 'tree' parameter.

a_menu_click.c




a_menu_icheck.c



replace "void*" by "OBJECT*" for 'tree' parameter.

a_menu_ienable.c



replace "void*" by "OBJECT*" for 'tree' parameter.

a_menu_istart.c




a_menu_popup.c




a_menu_register.c




a_menu_settings.c




a_menu_text.c



replace "void*" by "OBJECT*" for 'tree' parameter.

a_menu_tnormal.c



replace "void*" by "OBJECT*" for 'tree' parameter

a_menu_unregister.c




a_objc_add.c


use 'OBJECT' type instead of 'void'


a_objc_change.c


use 'OBJECT' type instead of 'void'


a_objc_delete.c


use 'OBJECT' type instead of 'void'


a_objc_draw.c


use 'OBJECT' type instead of 'void'


a_objc_edit.c


use 'OBJECT' type instead of 'void'


a_objc_find.c


use 'OBJECT' type instead of 'void'


a_objc_offset.c


use 'OBJECT' type instead of 'void'


a_objc_order.c


use 'OBJECT' type instead of 'void'


a_objc_sysvar.c




a_rsrc_free.c




a_rsrc_gaddr.c




a_rsrc_load.c


add "const" keyword


a_rsrc_obfix.c


use 'OBJECT' type instead of 'void'


a_rsrc_rcfix.c -- idem




a_rsrc_saddr.c -- idem




a_scrp_clear.c




a_scrp_read.c




a_scrp_write.c


add "const" keyword


a_shel_envrn.c


add "const" keyword


a_shel_find.c




a_shel_get.c




a_shel_help.c


add "const" keyword


a_shel_put.c


add "const" keyword


a_shel_rdef.c




a_shel_read.c




a_shel_wdef.c


add "const" keyword


a_shel_write.c




a_wind_calc.c

add optimisations to set intin array, and to get values from intout array



a_wind_calc_grect.c


add optimisation to set intin array, and to get values from intout array for GRECT structure


a_wind_close.c




a_wind_create.c

add optimisations to set intin array



a_wind_create_grect.c


add optimisation to set intin array for GRECT structure


a_wind_delete.c




a_wind_find.c




a_wind_get.c

aes_control[1] is set to 3 for WF_DCOLOR and WF_COLOR, and to 2 otherwise. Not always 2.

set aes_intout[3,4] to zero before the trap, to get returned Width and Height = 0 if the WF_FIRSTXYWH or WF_NEXTXYWH call returned "nok"

add optimisations to get values from intout array



a_wind_get_grect.c

add optimisations to get values from intout array



a_wind_new.c

return int in place of void (like the Atari official documentation)



a_wind_open.c

add optimisations to set intin array



a_wind_open_grect.c


add optimisation to set intin array for GRECT structure, and add "const" keyword for param In


a_wind_set.c

add optimisations to set intin array

remove distinctions between int32 and int16 compilers


a_wind_set_grect.c


add optimisation to set intin array for GRECT structure


a_wind_set_str.c


add optimisation to set intin array for "char*" pointer, and add the "const" keyword for char* param


a_wind_update.c




globals.c



Remove all AES and VDI global variables (all but aes_global[])

n_v_bez.c


add optimisations

add vdi_intin and vdi_ptsin as parameters of _v_bez() because vdi_intin and vdi_ptsin are no more global varibales.

n_v_bez_fill.c

only in gemlib (empty file)



n_v_bez_off.c




n_v_bez_on.c

bug fix: control[1]=0 (no ptsin entry)


modification: init vdi_intout[0] = 0, as suggested in NVDI dev doc.

n_v_bez_qual.c




n_v_clsbm.c




n_v_color2nearest.c




n_v_color2value.c




n_v_create_ctab.c




n_v_create_itab.c




n_v_ctab_idx2value.c




n_v_ctab_idx2vdi.c




n_v_ctab_vdi2idx.c




n_v_delete_ctab.c




n_v_delete_itab.c




n_v_ftext.c




n_v_ftext16.c


prototype differs : mgemlib has a 5th parameters "wstrlen" which contains the string len. This is "near" the v_ftext16n function of gemlib.


n_v_ftext16n.c



only in gemlib

n_v_ftext_offset.c


add optimisations (move.l instead of move.w)

mgemlib has a bug: vdi_control[1] is always 1, and vdi_control[3] is always 0 (because here, at for() loop exit, "i" value is 0) !


n_v_ftext_offset16.c


prototype differs : mgemlib has a 5th parameters "wstrlen" (before the parameter "offset") which contains the string len.


n_v_get_ctab_id.c




n_v_get_outline.c




n_v_getbitmap_info.c




n_v_getoutline.c




n_v_open_bm.c




n_v_opnbm.c


mgemlib have twice the line "*((MFDB **)(&vdi_control[7])) = bitmap;"


n_v_opnprn.c

fix little bug in gemlib (add ";" after the for() instruction)



n_v_resize_bm.c




n_v_setrgb.c




n_v_value2color.c




n_vq_ctab.c




n_vq_ctab_entry.c




n_vq_ctab_id.c




n_vq_devinfo.c


this function is named "vqt_devinfo" in mgemlib.

fix bug: add a null byte so that device_name is a C-string


n_vq_dflt_ctab.c




n_vq_ext_devinfo.c




n_vq_hilite_color.c




n_vq_margins.c




n_vq_max_color.c




n_vq_min_color.c




n_vq_prn_scaling.c




n_vq_px_format.c




n_vq_scrninfo.c




n_vq_weight_color.c




n_vqf_bg_color.c




n_vqf_fg_color.c




n_vql_bg_color.c




n_vql_fg_color.c




n_vqm_bg_color.c




n_vqm_fg_color.c




n_vqr_bg_color.c




n_vqr_fg_color.c




n_vqt_advance.c


mgemlib binding has bug. the mgemlib binding says the following:

advx = vdi_ptsout[0,1]

advy = vdi_ptsout[1,2]

xrem = vdi_ptsout[2,3]

etc...

BTW, return values (advx...) are "short" value,they are not "long" value.

i kept the gemlib binding


n_vqt_advance32.c




n_vqt_bg_color.c




n_vqt_char_index.c




n_vqt_ext_name.c



new: check control[4] to set flag and other stuffs, as describe in nvdi dev doc.

n_vqt_f_extent.c


add optimisation


n_vqt_f_extent16.c


prototype differs : this mgemlib function is named "vqt_f_extent16n" in gemlib... and mgemlib doesn't have any function named "vqt_f_extent16n".


n_vqt_f_extent16n.c



only in gemlib... (see n_vqt_f_extent16 notes)

n_vqt_fg_color.c




n_vqt_fontheader.c




n_vqt_name_and_id.c



fix bug: result string is in vdi_intout[1+], and not in vdi_intin[0+] !

fix bug: font_name was copied to vdi_intin[0+] instead of vdi_intin[1+]

n_vqt_pairkern.c



fix bug: results are in vdi_intout[], there's nothing to read in vdi_ptsout[] !

n_vqt_real_extent.c


gemlib binding says that control[5]=4200 mgemlib binding says that control[5]=0 ==> gemlib is right (from nvdi dev doc point of view)

add optimisation


n_vqt_trackkern.c



fix bug: results are in vdi_intout[], there's nothing to read in vdi_ptsout[] !

n_vqt_xfntinfo.c




n_vr_transfer_bits.c




n_vs_ctab.c




n_vs_ctab_entry.c




n_vs_dflt_ctab.c




n_vs_document_info.c




n_vs_hilite_color.c

gemlib have extra vdi_control[] init (redundant with VDI_TRAP macro).



n_vs_max_color.c




n_vs_min_color.c




n_vs_weight_color.c




n_vsf_bg_color.c




n_vsf_fg_color.c




n_vsl_bg_color.c




n_vsl_fg_color.c




n_vsm_bg_color.c




n_vsm_fg_color.c




n_vsr_bg_color.c




n_vsr_fg_color.c




n_vst_arbpt.c




n_vst_arbpt32.c




n_vst_bg_color.c




n_vst_charmap.c


prototype differs: gemlib says it's a void function, mgemlib return vdi_intout[0]. nvdi dev doc says it's a void function, so i kept gemlib binding (void).


n_vst_fg_color.c




n_vst_kern.c




n_vst_map_mode.c



only in gemlib

n_vst_name.c -- mgemlib: vdi_control[3] = vdi_str2array(...)


mgemlib: vdi_control[3] = vdi_str2array(...)

gemlib: vdi_control[3] = 1 + vdi_str2array(...)

==> gemlib seems to be right.

fix bug: ret_name is in vdi_intout[1..ctrl4-1] (both gemlib and mgemlib get ret_name in vdi_intout[0..ctrl4]

n_vst_setsize.c




n_vst_setsize32.c




n_vst_skew.c




n_vst_track_offset.c




n_vst_width.c


mgemlib have init the unused "vdi_ptsin[1] = 0;"

Is there a good reason for that ?


pdlg_add_printers.c




pdlg_add_sub_dlgs.c




pdlg_close.c




pdlg_create.c




pdlg_delete.c




pdlg_dflt_sett.c




pdlg_do.c




pdlg_evnt.c




pdlg_free_sett.c




pdlg_get_setsize.c




pdlg_new_sett.c




pdlg_open.c




pdlg_rmv_printers.c




pdlg_rmv_sub_dlgs.c




pdlg_save_dflt_sett.c




pdlg_update.c




pdlg_use_sett.c




pdlg_validate_sett.c




rc_array_to_grect.c


add optimisation


rc_copy.c




rc_equal.c


add optimisation


rc_grect_to_array.c


add optimisation


rc_intersect.c




v_alpha_text.c




v_arc.c


mgemlib optimisation has bug: "*(ptr++)=*(ptr++)=0;" have to be replace by "*(ptr++)=0; *(ptr++)=0;"


v_bar.c




v_bit_image.c




v_cellarray.c


add optimisation


v_circle.c


mgemlib optimisation has bug: "*(ptr++)=*(ptr++)=0;" have to be replace by "*(ptr++)=0; *(ptr++)=0;"


v_clear_disp_list.c




v_clrwk.c




v_clsvwk.c




v_clswk.c




v_contourfill.c




v_copies.c



now, this function return 1 if the driver doesn't support this function.

v_curdown.c




v_curhome.c




v_curleft.c




v_curright.c




v_curtext.c




v_curup.c




v_dspcur.c




v_eeol.c




v_eeos.c




v_ellarc.c




v_ellipse.c




v_ellpie.c




v_enter_cur.c




v_escape2000.c




v_exit_cur.c




v_fillarea.c




v_flushcache.c




v_form_adv.c




v_get_pixel.c




v_gtext.c




v_gtext16.c


prototype differs : mgemlib has a 5th parameters "wstrlen" which contains the string len. This is "near" the v_get16n function of gemlib.


v_gtext16n.c



only in gemlib.

v_hardcopy.c




v_hide_c.c




v_justified.c




v_loadcache.c




v_meta_extents.c




v_opnvwk.c

initialise some default VDI wokstation parameter



v_opnwk.c




v_orient.c



now, this function return 1 if the driver doesn't support this function.

v_output_window.c




v_page_size.c



now, this function return 0 if the driver doesn't support this function.

v_pieslice.c

add little speed optimisation



v_pline.c




v_pmarker.c




v_rbox.c




v_rfbox.c




v_rmcur.c




v_rvoff.c




v_rvon.c




v_savecache.c




v_set_app_buff.c



gemlib binding : vdi_intin[2] = size;

mgemlib binding: vdi_intin[3] = size;

----> who's right ????

v_show_c.c




v_trays.c



now, this function set set_input and set_output to 0 if the driver doesn't support this function.

v_updwk.c




v_write_meta.c




vdi_array2str.c




vdi_str2array.c




vdi_wstrlen.c



only in gemlib

vex_butv.c




vex_curv.c




vex_motv.c




vex_timv.c




vm_coords.c




vm_filename.c




vm_pagesize.c




vq_calibrate.c


little optimisation (set intout=color)


vq_cellarray.c




vq_chcells.c




vq_color.c




vq_curaddress.c




vq_extnd.c




vq_key_s.c




vq_mouse.c




vq_page_name.c



now, this function return -1 if the driver doesn't support this function.

vq_scan.c




vq_tabstatus.c




vq_tdimensions.c




vq_tray_names.c



now, this function set input and output to 0, and set tray names to '\0' if the driver doesn't support this function.

vqf_attributes.c



gemlib gets attrib[] in vdi_intout[0..3] (8 bytes)

mgemlib gets attrib[] in vdi_intout[0..4] (10 bytes)

who's right ???

maybe we'd better set vdi_params.vdi_intout=attrib before the trap?

==> done. BTW, attrib[] is 5 short wide. mgemlib was right.

vqin_mode.c




vql_attributes.c

little speed optimisation



vqm_attributes.c


gemlib gets attrib[] from vdi_intout[0..2] and vdi_ptsout[0..1]

mgemlib gets attrib[] from vdi_intout[0..4] and vdi_ptsout[0..1]

who's right ???

==> from my docs point of view, gemlib was right.


vqt_attributes.c




vqt_cachesize.c




vqt_extent.c


add optimisation (set vdi_params.ptsout = extent)


vqt_extent16.c



only in gemlib

vqt_extent16n.c



only in gemlib

vqt_fontinfo.c




vqt_get_table.c




vqt_name.c




vqt_width.c




vr_recfl.c




vr_trnfm.c




vro_cpyfm.c




vrq_choice.c




vrq_locator.c




vrq_string.c


little speed optimisation


vrq_valuator.c




vrt_cpyfm.c




vs_calibrate.c




vs_clip.c




vs_clip_off.c



only in gemlib

vs_clip_pxy.c



only in gemlib

vs_color.c

add little speed optimisation



vs_curaddress.c




vs_palette.c




vsc_expose.c




vsc_form.c




vsf_color.c




vsf_interior.c




vsf_perimeter.c




vsf_style.c




vsf_udpat.c



(gemlib use "*16" and mgemlib use "<<4", i kept gemlib version).

vsin_mode.c




vsl_color.c




vsl_ends.c




vsl_type.c




vsl_udsty.c




vsl_width.c




vsm_choice.c




vsm_color.c




vsm_height.c



bug fixe: the return value is in ptsout[1], vdi_intout[0] doesn't contain anything here. BTW, ptsout[0] gives the "width" or the marker... maybe we should find a way to return this value.

vsm_locator.c




vsm_string.c


add little speed optimisation


vsm_type.c




vsm_valuator.c




vsp_film.c




vst_alignment.c




vst_color.c




vst_effects.c




vst_error.c




vst_font.c




vst_height.c

add little speed optimisation

GEM/VDI and NVDI says that this is a void function, but gemlib says it's a "short" function with a returned value in intout[0]... ==> modify to "void" function.



vst_load_fonts.c




vst_point.c

add little speed optimisation



vst_rotation.c




vst_scratch.c




vst_unload_fonts.c




vswr_mode.c




vt_alignment.c




vt_axis.c




vt_origin.c




vt_resolution.c




x_edit_close.c




x_edit_create.c

function return (XEDITINFO*) intead of (void*)



x_edit_cursor.c




x_edit_delete.c

use (XEDITINFO*) intead of (void*)



x_edit_evnt.c




x_edit_get_buf.c




x_edit_get_colour.c




x_edit_get_cursor.c




x_edit_get_dirty.c




x_edit_get_font.c




x_edit_get_format.c




x_edit_get_pos.c




x_edit_get_scrollinfo.c




x_edit_get_sel.c




x_edit_open.c




x_edit_resized.c




x_edit_scroll.c




x_edit_set_buf.c




x_edit_set_colour.c




x_edit_set_cursor.c




x_edit_set_dirty.c




x_edit_set_font.c




x_edit_set_format.c




x_edit_set_pos.c




x_fnts_add.c




x_fnts_close.c




x_fnts_create.c




x_fnts_delete.c




x_fnts_do.c




x_fnts_evnt.c




x_fnts_get_info.c




x_fnts_get_name.c




x_fnts_get_no_styles.c




x_fnts_get_style.c




x_fnts_open.c




x_fnts_remove.c




x_fnts_update.c




x_form_popup.c




x_form_wbutton.c




x_form_wkeybd.c




x_form_xdial.c




x_form_xdo.c




x_form_xerr.c




x_fslx_close.c




x_fslx_do.c




x_fslx_evnt.c




x_fslx_getnxtfile.c




x_fslx_open.c




x_fslx_set_flags.c




x_lbox_ascroll_to.c




x_lbox_bscroll_to.c




x_lbox_cnt_items.c




x_lbox_create.c




x_lbox_delete.c




x_lbox_do.c




x_lbox_free_items.c




x_lbox_free_list.c




x_lbox_get_afirst.c




x_lbox_get_bentries.c




x_lbox_get_bfirst.c




x_lbox_get_bvis.c




x_lbox_get_idx.c




x_lbox_get_item.c




x_lbox_get_items.c




x_lbox_get_slct_idx.c




x_lbox_get_slct_item.c




x_lbox_get_tree.c




x_lbox_get_udata.c




x_lbox_get_visible.c



fix both gemlib and mgemlib (the first 'l' was missing in the function name)

x_lbox_set_asldr.c




x_lbox_set_bentries.c




x_lbox_set_bsldr.c




x_lbox_set_items.c




x_lbox_update.c




x_objc_wchange.c




x_objc_wdraw.c




x_objc_wedit.c




x_objc_xedit.c




x_wdlg_close.c




x_wdlg_create.c




x_wdlg_delete.c




x_wdlg_evnt.c




x_wdlg_get_edit.c



change binding (init aes_intout[1]=-1 for old WDIALOG version, as specified in WDIALOG.TXT)

x_wdlg_get_handle.c




x_wdlg_get_tree.c




x_wdlg_get_udata.c




x_wdlg_open.c




x_wdlg_redraw.c




x_wdlg_set_edit.c




x_wdlg_set_iconify.c




x_wdlg_set_size.c




x_wdlg_set_tree.c




x_wdlg_set_uniconify.c