Fossil

Check-in [b9877667]
Login

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

Overview
Comment:Add fossil_strndup() function to duplicate a string that is not necessarily NUL-terminated
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | andygoth-timeline-ms
Files: files | file ages | folders
SHA1: b98776679e613d1a85dd2150e4b991f4ab654c7d
User & Date: andygoth 2016-11-05 05:45:31
Context
2016-11-05
05:51
Check regular expressions for errors. Add error reporting mechanism. Leave bad patterns out of filter. Add showid and showsql to timeline help text. check-in: 5703ccb2 user: andygoth tags: andygoth-timeline-ms
05:45
Add fossil_strndup() function to duplicate a string that is not necessarily NUL-terminated check-in: b9877667 user: andygoth tags: andygoth-timeline-ms
05:18
Add timeline rel query string and change r=TAG to be an alias for t=TAG&rel so that related can be a checkbox and the tag filter text entry can work whether or not related is checked. This addresses issues (2) and (3). check-in: 90057326 user: andygoth tags: andygoth-timeline-ms
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/import.c.

74
75
76
77
78
79
80
81
82
83


84



85
86
87
88



89
90
91
92
93
94
95
  int hasLinks;               /* True if git repository contains symlinks */
  int tagCommit;              /* True if the commit adds a tag */
} gg;

/*
** Duplicate a string.
*/
char *fossil_strdup(const char *zOrig){
  char *z = 0;
  if( zOrig ){


    int n = strlen(zOrig);



    z = fossil_malloc( n+1 );
    memcpy(z, zOrig, n+1);
  }
  return z;



}

/*
** A no-op "xFinish" method
*/
static void finish_noop(void){}








|


>
>
|
>
>
>




>
>
>







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
  int hasLinks;               /* True if git repository contains symlinks */
  int tagCommit;              /* True if the commit adds a tag */
} gg;

/*
** Duplicate a string.
*/
char *fossil_strndup(const char *zOrig, int len){
  char *z = 0;
  if( zOrig ){
    int n;
    if( len<0 ){
      n = strlen(zOrig);
    }else{
      for( n=0; zOrig[n] && n<len; ++n );
    }
    z = fossil_malloc( n+1 );
    memcpy(z, zOrig, n+1);
  }
  return z;
}
char *fossil_strdup(const char *zOrig){
  return fossil_strndup(zOrig, -1);
}

/*
** A no-op "xFinish" method
*/
static void finish_noop(void){}