Fossil

Check-in [ad32c20f]
Login

Check-in [ad32c20f]

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

Overview
Comment:Make Notepad the default editor on Cygwin, just as win32, if no other editor is specified.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ad32c20f8e28ebcdf6f5a15a989c749e386ec2b3
User & Date: jan.nijtmans 2013-08-27 08:31:31
Context
2013-08-27
08:57
Protect Q-card from having the same UUID as the parent. Example: "fossil merge --cherrypick trunk" followed by "fossil commit --allow-empty" ... (check-in: d5649979 user: jan.nijtmans tags: trunk)
08:31
Make Notepad the default editor on Cygwin, just as win32, if no other editor is specified. ... (check-in: ad32c20f user: jan.nijtmans tags: trunk)
2013-08-26
20:42
If an event/attachment comment ends with spaces, strip them from the C-card ... (check-in: ff87296f user: jan.nijtmans tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/blob.c.

985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
    blob_reset(&b1);
    blob_reset(&b2);
    blob_reset(&b3);
  }
  fossil_print("ok\n");
}

#if defined(_WIN32)
/*
** Convert every \n character in the given blob into \r\n.
*/
void blob_add_cr(Blob *p){
  char *z = p->aData;
  int j   = p->nUsed;
  int i, n;







|







985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
    blob_reset(&b1);
    blob_reset(&b2);
    blob_reset(&b3);
  }
  fossil_print("ok\n");
}

#if defined(_WIN32) || defined(__CYGWIN__)
/*
** Convert every \n character in the given blob into \r\n.
*/
void blob_add_cr(Blob *p){
  char *z = p->aData;
  int j   = p->nUsed;
  int i, n;

Changes to src/checkin.c.

621
622
623
624
625
626
627
628
629
630




631
632
633
634
635
636
637
  zEditor = db_get("editor", 0);
  if( zEditor==0 ){
    zEditor = fossil_getenv("VISUAL");
  }
  if( zEditor==0 ){
    zEditor = fossil_getenv("EDITOR");
  }
#ifdef _WIN32
  if( zEditor==0 ){
    zEditor = mprintf("%s\\notepad.exe", fossil_getenv("SystemRoot"));




  }
#endif
  if( zEditor==0 ){
    blob_append(pPrompt,
       "#\n"
       "# Since no default text editor is set using EDITOR or VISUAL\n"
       "# environment variables or the \"fossil set editor\" command,\n"







|

|
>
>
>
>







621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
  zEditor = db_get("editor", 0);
  if( zEditor==0 ){
    zEditor = fossil_getenv("VISUAL");
  }
  if( zEditor==0 ){
    zEditor = fossil_getenv("EDITOR");
  }
#if defined(_WIN32) || defined(__CYGWIN__)
  if( zEditor==0 ){
    zEditor = mprintf("%s\\notepad.exe", fossil_getenv("SYSTEMROOT"));
#if defined(__CYGWIN__)
    zEditor = fossil_utf8_to_filename(zEditor);
    blob_add_cr(pPrompt);
#endif
  }
#endif
  if( zEditor==0 ){
    blob_append(pPrompt,
       "#\n"
       "# Since no default text editor is set using EDITOR or VISUAL\n"
       "# environment variables or the \"fossil set editor\" command,\n"