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

gEDA-cvs: CVS update: s_conn.nw



  User: ahvezda 
  Date: 05/11/06 21:43:31

  Modified:    .        s_conn.nw
  Log:
  A bunch of changes, most having to do with tweaks to the "L" net drawing 
  
  
  
  
  Revision  Changes    Path
  1.9       +35 -0     eda/geda/devel/libgeda/noweb/s_conn.nw
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_conn.nw
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/noweb/s_conn.nw,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- s_conn.nw	4 Feb 2005 04:39:29 -0000	1.8
  +++ s_conn.nw	7 Nov 2005 02:43:30 -0000	1.9
  @@ -20,6 +20,7 @@
   <<s_conn.c : s_conn_update_object()>>
   <<s_conn.c : s_conn_update_complex()>>
   <<s_conn.c : s_conn_print()>>
  +<<s_conn.c : s_conn_net_search()>>
   <<s_conn.c : s_conn_return_others()>>
   <<s_conn.c : s_conn_return_complex_others()>>
   
  @@ -823,6 +824,40 @@
   @ %def s_conn_print
   
   
  +@defun s_conn_net_search conn_list
  +This method searches the connection list for the first matching connection with
  +the given x, y, and whichone endpoint.  Returns TRUE if one is found, else 
  +FALSE.
  +@end defun
  +
  +<<s_conn.c : s_conn_net_search()>>=
  +int
  +s_conn_net_search(OBJECT* new_net, int whichone, GList * conn_list)
  +{
  +  CONN *conn;
  +  GList *cl_current;
  +
  +  cl_current = conn_list;
  +  while (cl_current != NULL) {
  +
  +    conn = (CONN *) cl_current->data;
  +    if (conn != NULL && conn->whichone == whichone && 
  +        conn->x == new_net->line->x[whichone] &&
  +	conn->y == new_net->line->y[whichone])
  +    {
  +       return TRUE;
  +    }
  +
  +    cl_current = cl_current->next;
  +  }
  + 
  +  return FALSE;
  +}
  +
  +
  +@ %def s_conn_net_search
  +
  +
   @section Function @code{s_conn_return_others()}
   
   @defun s_conn_return_others input_list object