Fossil

Check-in [80bfcee8]
Login

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

Overview
Comment:Fix several MSVC compiler warnings, including a couple C99-isms.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:80bfcee892392ad1c25961403d126d22b1e6565c
User & Date: mistachkin 2012-06-19 13:04:42
Context
2012-06-20
10:57
Add a comment that contains multi-byte unicode characters. This will be used for testing diff logic. check-in: d1fc2f4a user: drh tags: trunk
2012-06-19
13:04
Fix several MSVC compiler warnings, including a couple C99-isms. check-in: 80bfcee8 user: mistachkin tags: trunk
2012-06-14
13:00
Remove temporary pqueue_insert renaming hack from the various Makefiles. check-in: 4006ee4f user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
  zComment = find_option("comment","m",1);
  forceFlag = find_option("force", "f", 0)!=0;
  zBranch = find_option("branch","b",1);
  zColor = find_option("bgcolor",0,1);
  zBrClr = find_option("branchcolor",0,1);
  while( (zTag = find_option("tag",0,1))!=0 ){
    if( zTag[0]==0 ) continue;
    azTag = fossil_realloc(azTag, sizeof(char*)*(nTag+2));
    azTag[nTag++] = zTag;
    azTag[nTag] = 0;
  }
  zComFile = find_option("message-file", "M", 1);
  if( find_option("private",0,0) ){
    g.markPrivate = 1;
    if( zBranch==0 ) zBranch = "private";







|







980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
  zComment = find_option("comment","m",1);
  forceFlag = find_option("force", "f", 0)!=0;
  zBranch = find_option("branch","b",1);
  zColor = find_option("bgcolor",0,1);
  zBrClr = find_option("branchcolor",0,1);
  while( (zTag = find_option("tag",0,1))!=0 ){
    if( zTag[0]==0 ) continue;
    azTag = fossil_realloc((void *)azTag, sizeof(char*)*(nTag+2));
    azTag[nTag++] = zTag;
    azTag[nTag] = 0;
  }
  zComFile = find_option("message-file", "M", 1);
  if( find_option("private",0,0) ){
    g.markPrivate = 1;
    if( zBranch==0 ) zBranch = "private";

Changes to src/json.c.

1663
1664
1665
1666
1667
1668
1669

1670
1671
1672
1673
1674
1675
1676
1677
1678
  assert( (code>=1000) && (code<=9999) );
  free(g.zErrMsg);
  g.json.resultCode = code;
  if(!fmt || !*fmt){
    g.zErrMsg = mprintf("%s", json_err_cstr(code));
  }else{
    va_list vargs;

    va_start(vargs,fmt);
    char * msg = vmprintf(fmt, vargs);
    va_end(vargs);
    g.zErrMsg = msg;
  }
  return code;
}

/*







>

|







1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
  assert( (code>=1000) && (code<=9999) );
  free(g.zErrMsg);
  g.json.resultCode = code;
  if(!fmt || !*fmt){
    g.zErrMsg = mprintf("%s", json_err_cstr(code));
  }else{
    va_list vargs;
    char * msg;
    va_start(vargs,fmt);
    msg = vmprintf(fmt, vargs);
    va_end(vargs);
    g.zErrMsg = msg;
  }
  return code;
}

/*

Changes to src/json_tag.c.

111
112
113
114
115
116
117

118
119
120
121
122
123
124
125
126
  cson_object_set(pay, "value", (zValue&&*zValue)
                  ? json_new_string(zValue)
                  : cson_value_null());
  cson_object_set(pay, "propagate", cson_value_new_bool(fPropagate));
  cson_object_set(pay, "raw", cson_value_new_bool(fRaw));
  {
    Blob uu = empty_blob;

    blob_append(&uu, zName, -1);
    int const rc = name_to_uuid(&uu, 9, "*");
    if(0!=rc){
      json_set_err(FSL_JSON_E_UNKNOWN,"Could not convert name back to UUID!");
      blob_reset(&uu);
      goto error;
    }
    cson_object_set(pay, "appliedTo", json_new_string(blob_buffer(&uu)));
    blob_reset(&uu);







>

|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  cson_object_set(pay, "value", (zValue&&*zValue)
                  ? json_new_string(zValue)
                  : cson_value_null());
  cson_object_set(pay, "propagate", cson_value_new_bool(fPropagate));
  cson_object_set(pay, "raw", cson_value_new_bool(fRaw));
  {
    Blob uu = empty_blob;
    int rc;
    blob_append(&uu, zName, -1);
    rc = name_to_uuid(&uu, 9, "*");
    if(0!=rc){
      json_set_err(FSL_JSON_E_UNKNOWN,"Could not convert name back to UUID!");
      blob_reset(&uu);
      goto error;
    }
    cson_object_set(pay, "appliedTo", json_new_string(blob_buffer(&uu)));
    blob_reset(&uu);

Changes to src/json_wiki.c.

105
106
107
108
109
110
111
112
113
114

115
116
117
118
119
120
121
    cson_object_set(pay,FossilJsonKeys.timestamp,
                    json_julian_to_timestamp(pWiki->rDate));
    if(0 == contentFormat){
      cson_object_set(pay,"size",
                      json_new_int((cson_int_t)(zBody?strlen(zBody):0)));
    }else{
      if( contentFormat>0 ){/*HTML-ize it*/
        zFormat = "html";
        Blob content = empty_blob;
        Blob raw = empty_blob;

        if(zBody && *zBody){
          blob_append(&raw,zBody,-1);
          wiki_convert(&raw,&content,0);
          len = (unsigned int)blob_size(&content);
        }
        cson_object_set(pay,"size",json_new_int((cson_int_t)len));
        cson_object_set(pay,"content",







<


>







105
106
107
108
109
110
111

112
113
114
115
116
117
118
119
120
121
    cson_object_set(pay,FossilJsonKeys.timestamp,
                    json_julian_to_timestamp(pWiki->rDate));
    if(0 == contentFormat){
      cson_object_set(pay,"size",
                      json_new_int((cson_int_t)(zBody?strlen(zBody):0)));
    }else{
      if( contentFormat>0 ){/*HTML-ize it*/

        Blob content = empty_blob;
        Blob raw = empty_blob;
        zFormat = "html";
        if(zBody && *zBody){
          blob_append(&raw,zBody,-1);
          wiki_convert(&raw,&content,0);
          len = (unsigned int)blob_size(&content);
        }
        cson_object_set(pay,"size",json_new_int((cson_int_t)len));
        cson_object_set(pay,"content",