This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

dir separator patch for toplev.c


Hello,
I noticed that toplev.c wasn't using IS_DIR_SEPARATOR like it ought to.

2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>

	* toplev.c (output_file_directive): Use IS_DIR_SEPARATOR.
	  (main): Likewise.

Index: gcc/gcc/toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.330
diff -c -3 -p -r1.330 toplev.c
*** toplev.c	2000/05/02 20:43:23	1.330
--- toplev.c	2000/05/03 23:43:03
*************** output_file_directive (asm_file, input_n
*** 1663,1674 ****
    /* NA gets INPUT_NAME sans directory names.  */
    while (na > input_name)
      {
!       if (na[-1] == '/')
! 	break;
! #ifdef DIR_SEPARATOR
!       if (na[-1] == DIR_SEPARATOR)
! 	break;
! #endif
        na--;
      }
  
--- 1663,1670 ----
    /* NA gets INPUT_NAME sans directory names.  */
    while (na > input_name)
      {
!       if (IS_DIR_SEPARATOR (na[-1]))
!         break;
        na--;
      }
  
*************** main (argc, argv)
*** 4342,4352 ****
    save_argv = argv;
  
    p = argv[0] + strlen (argv[0]);
!   while (p != argv[0] && p[-1] != '/'
! #ifdef DIR_SEPARATOR
! 	 && p[-1] != DIR_SEPARATOR
! #endif
! 	 )
      --p;
    progname = p;
  
--- 4338,4344 ----
    save_argv = argv;
  
    p = argv[0] + strlen (argv[0]);
!   while (p != argv[0] && !IS_DIR_SEPARATOR (p[-1]))
      --p;
    progname = p;
  



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]