Re: [AD] Patch to add constructor stuff to load_bitmap, save_bitmap |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 14 Jun 2001, Laurence Withers <lwithers@xxxxxxxxxx> wrote:
> Here is a patch which wraps src/readbmp.c (load_bitmap(), save_bitmap()
> et al.) in a constructor:
...
> /* for module linking system; see comment in allegro.c */
> diff -ru alleg.original/src/allegro.c allegro/src/allegro.c
> --- alleg.original/src/allegro.c Sun Jun 10 20:14:40 2001
> +++ allegro/src/allegro.c Thu Jun 14 22:11:26 2001
> @@ -273,6 +273,7 @@
> _initialize_datafile_types();
> _midi_constructor();
> _mouse_constructor();
> + _register_bitmap_file_type_init();
> #endif
>
> if (errno_ptr)
> @@ -353,9 +354,6 @@
> atexit(allegro_exit);
> }
>
> - /* register the standard bitmap file types */
> - register_bitmap_file_type_init();
> -
`_register_bitmap_file_type_init' adds an exit function so that all
the file types get removed after a call to `allegro_exit'. With
your patch, even if you `allegro_init' again, the list is gone (if
you have constructors).
Fix please :)
--
TOASTATE (TOHS tayt), v. To impatiently pop toast up and down in the
toaster, thus increasing the likelihood of burning it.
-- Rich Hall, "Sniglets"