[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: g_hook.c



  User: cnieves 
  Date: 06/12/23 15:00:07

  Modified:    .        g_hook.c
  Log:
  * src/g_hook.c (g_add_component): Return if scm_comp_name is 
  
    an empty list (guile's NULL), or the scheme's boolean false.
  
    This was suggested by Peter TB Brett and Steve Tell.
  
  
  
  
  Revision  Changes    Path
  1.18      +9 -0      eda/geda/gaf/gschem/src/g_hook.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_hook.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_hook.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- g_hook.c	23 Dec 2006 15:54:49 -0000	1.17
  +++ g_hook.c	23 Dec 2006 20:00:06 -0000	1.18
  @@ -612,6 +612,9 @@
    *  \param [in] angle Angle of rotation of the symbol. 
    *  \param [in] selectable True if the symbol is selectable, false otherwise.
    *  \param [in] mirror True if the symbol is mirrored, false otherwise.
  + *  If scm_comp_name is a scheme empty list, SCM_BOOL_F, or an empty 
  + *  string (""), then g_add_component returns SCM_BOOL_F without writing 
  + *  to the log.
    *  \return TRUE if the component was added, FALSE otherwise.
    *
    */
  @@ -626,6 +629,12 @@
     GSList *clibs = NULL;
     OBJECT *new_object;
   
  +  /* Return if scm_comp_name is NULL (an empty list) or scheme's FALSE */
  +  if (SCM_NULLP(scm_comp_name) || 
  +      (SCM_BOOLP(scm_comp_name) && !(SCM_NFALSEP(scm_comp_name))) ) {
  +    return SCM_BOOL_F;
  +  }
  +
     /* Get w_current and the page */
     SCM_ASSERT (g_get_data_from_page_smob (page_smob, &w_current, &page),
   	      page_smob, SCM_ARG1, "add-component-at-xy");
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs