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

gEDA-cvs: CVS update: g_hook.c



  User: cnieves 
  Date: 06/12/14 14:00:16

  Modified:    .        g_hook.c
  Log:
  * src/g_hook.c (g_add_component): Don't log message if a component 
  
    name "" is passed to this function.
  
    Changed the function name in the error messages from 
  
    add-component to add-component-at-xy.
  
    The scheme name of the function was changed on 2006-10-03, but
  
    not the error messages.
  
  
  
  
  Revision  Changes    Path
  1.13      +13 -6     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.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- g_hook.c	13 Dec 2006 21:45:57 -0000	1.12
  +++ g_hook.c	14 Dec 2006 19:00:16 -0000	1.13
  @@ -609,13 +609,13 @@
     SCM_ASSERT ( SCM_INUMP(scm_x), scm_x, 
                  SCM_ARG3, "add-component");
     SCM_ASSERT ( SCM_INUMP(scm_y), scm_y, 
  -               SCM_ARG4, "add-component");
  +               SCM_ARG4, "add-component-at-xy");
     SCM_ASSERT ( SCM_INUMP(scm_angle), scm_angle, 
  -               SCM_ARG5, "add-component");
  +               SCM_ARG5, "add-component-at-xy");
     SCM_ASSERT ( scm_boolean_p(scm_selectable), scm_selectable,
  -	       SCM_ARG6, "add-component");
  +	       SCM_ARG6, "add-component-at-xy");
     SCM_ASSERT ( scm_boolean_p(scm_mirror), scm_mirror,
  -	       SCM_ARG7, "add-component");
  +	       SCM_ARG7, "add-component-at-xy");
   
     /* Get the parameters */
     comp_name = SCM_STRING_CHARS(scm_comp_name);
  @@ -625,15 +625,22 @@
     selectable = SCM_NFALSEP(scm_selectable);
     mirror = SCM_NFALSEP(scm_mirror);
   
  +  SCM_ASSERT (comp_name, scm_comp_name,
  +	      SCM_ARG2, "add-component-at-xy");
  +  
  +  if (strcmp(comp_name, "") == 0) {
  +    return SCM_BOOL_F;
  +  }
  +
     clibs = (GSList *) s_clib_search_basename (comp_name);
     if (clibs == NULL) {
       /* Component not found */
  -    s_log_message ("add-component: Component with name [%s] not found.\n",
  +    s_log_message ("add-component-at-xy: Component with name [%s] not found.\n",
   		   comp_name);
       return SCM_BOOL_F;    
     } else {
       if (g_slist_next (clibs)) {
  -      s_log_message ("add-component: More than one component found with name [%s]\n",
  +      s_log_message ("add-component-at-xy: More than one component found with name [%s]\n",
   		     comp_name);
         /* PB: for now, use the first directory in clibs */
         /* PB: maybe open a dialog to select the right one? */
  
  
  


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