home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / utils / source / devsrv / for2bak.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-19  |  266 b   |  18 lines

  1. #include <stdio.h>
  2. /*
  3.  * For2bak:  Converts a string's fore slashes to back slashes.  MSS
  4.  */
  5.  
  6. void for2bak(char * str) 
  7. {
  8.     char *ptr;
  9.  
  10.     while (*str) {
  11.         if (ptr = strchr(str, ":"))
  12.             str = ptr+1;
  13.         if(*str == '/')
  14.             *str = '\\';
  15.         str++;
  16.     }            
  17. }
  18.