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

gEDA-cvs: CVS update: gnetlist.c



  User: ahvezda 
  Date: 05/03/06 21:11:29

  Modified:    .        gnetlist.c
  Log:
  Fixed bug that didn't allow absolute path specification on all libgeda
  
  applications.  Moved old schematic into test directory.  Updated some golden
  
  netlist files.
  
  
  
  
  Revision  Changes    Path
  1.49      +15 -6     eda/geda/devel/gnetlist/src/gnetlist.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gnetlist.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gnetlist/src/gnetlist.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -b -r1.48 -r1.49
  --- gnetlist.c	22 Feb 2005 19:53:21 -0000	1.48
  +++ gnetlist.c	7 Mar 2005 02:11:28 -0000	1.49
  @@ -145,17 +145,26 @@
       i = argv_index;
       while (argv[i] != NULL) {
         PAGE *page;
  -      gchar *filename = g_build_path (G_DIR_SEPARATOR_S,
  -                                      cwd,
  -                                      argv[i],
  -                                      NULL);
  +      gchar *filename; 
  +
  +#ifdef __MINGW32__
  +      if (argv[i][1] == ':' && (argv[i][2] == G_DIR_SEPARATOR ||
  +                                argv[i][2] == OTHER_PATH_SEPARATER_CHAR)) 
  +#else
  +      if (argv[i][0] == G_DIR_SEPARATOR) 
  +#endif
  +      {
  +        /* Path is already absolute so no need to do any concat of cwd */
  +        filename = g_strdup (argv[i]);
  +      } else {
  +        filename = g_build_path (G_DIR_SEPARATOR_S, cwd, argv[i], NULL);
  +      }
   
         if (!quiet_mode) {
           printf ("Loading schematic [%s]\n", filename);
         }
   
  -      s_page_goto (pr_current,
  -                   s_page_new (pr_current, filename));
  +      s_page_goto (pr_current, s_page_new (pr_current, filename));
         
         if (!f_open (pr_current, filename)) {
           fprintf (stderr, "Couldn't load schematic [%s]\n", filename);