Fossil

Check-in [9e602271f4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix preprocessor check for Win32/Cygwin in file_simplify_name().
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9e602271f42b248632c984b9d231640ebbb1330d
User & Date: mistachkin 2013-02-26 20:50:11.089
Context
2013-02-27
08:49
A few more places where Cygwin should do the same as win32. check-in: 8cc71be05f user: jan.nijtmans tags: trunk
2013-02-26
20:50
Fix preprocessor check for Win32/Cygwin in file_simplify_name(). check-in: 9e602271f4 user: mistachkin tags: trunk
20:48
Fix typo in wiki page. check-in: b72ef38d1b user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/file.c.
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
** is retained.
*/
int file_simplify_name(char *z, int n, int slash){
  int i, j;
  if( n<0 ) n = strlen(z);

  /* On windows and cygwin convert all \ characters to / */
#if defined(_WIN32) && defined(__CYGWIN__)
  for(i=0; i<n; i++){
    if( z[i]=='\\' ) z[i] = '/';
  }
#endif

  /* Removing trailing "/" characters */
  if( !slash ){







|







592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
** is retained.
*/
int file_simplify_name(char *z, int n, int slash){
  int i, j;
  if( n<0 ) n = strlen(z);

  /* On windows and cygwin convert all \ characters to / */
#if defined(_WIN32) || defined(__CYGWIN__)
  for(i=0; i<n; i++){
    if( z[i]=='\\' ) z[i] = '/';
  }
#endif

  /* Removing trailing "/" characters */
  if( !slash ){