X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;ds=sidebyside;f=form%2Ffrm_driver.c;h=0a39d322c7bd16eeb1a268cea984a83f96866d2c;hb=32f1c9b1a0fdad8ac997c7a8ac9cb92c610b4336;hp=5aac0060551ba656b6dfa54ec8ee152195e53673;hpb=b6d0d9ad9e372e856f01a4c283cf784a15993903;p=ncurses.git diff --git a/form/frm_driver.c b/form/frm_driver.c index 5aac0060..0a39d322 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. * + * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_driver.c,v 1.101 2012/06/10 00:28:04 tom Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.103 2013/03/09 22:48:47 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -1211,7 +1211,7 @@ Synchronize_Linked_Fields(FIELD *field) return (E_SYSTEM_ERROR); for (linked_field = field->link; - linked_field != field; + (linked_field != field) && (linked_field != 0); linked_field = linked_field->link) { if (((syncres = Synchronize_Field(linked_field)) != E_OK) && @@ -4229,7 +4229,10 @@ form_driver(FORM *form, int c) if ((c >= MIN_FORM_COMMAND && c <= MAX_FORM_COMMAND) && ((bindings[c - MIN_FORM_COMMAND].keycode & Key_Mask) == c)) - BI = &(bindings[c - MIN_FORM_COMMAND]); + { + TR(TRACE_CALLS, ("form_request %s", form_request_name(c))); + BI = &(bindings[c - MIN_FORM_COMMAND]); + } if (BI) { @@ -4256,9 +4259,13 @@ form_driver(FORM *form, int c) Generic_Method fct = Generic_Methods[method]; if (fct) - res = fct(BI->cmd, form); + { + res = fct(BI->cmd, form); + } else - res = (BI->cmd) (form); + { + res = (BI->cmd) (form); + } } } #ifdef NCURSES_MOUSE_VERSION