shutdown_dialog man page
shutdown_dialog — Destroys a dialog player returned by init_dialog(). Allegro game programming library.
int shutdown_dialog(DIALOG_PLAYER *player);
Destroys a dialog player object returned by init_dialog(), returning the object that caused it to exit (this is the same as the return value from do_dialog()).