Fossil

Check-in [a050cd09]
Login

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

Overview
Comment:Move variable declarations for MSVC.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a050cd09e6763f6ca41aa5100e56f03227458a53
User & Date: joel 2014-04-26 01:20:35
Context
2014-04-26
01:54
Remove an unused variable. check-in: f1ed720a user: drh tags: trunk
01:20
Move variable declarations for MSVC. check-in: a050cd09 user: joel tags: trunk
2014-04-25
21:56
Add a web-page for viewing the status of the web cache. Accessible as a submenu off of the stat page. check-in: 05477b2e user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/cache.c.

104
105
106
107
108
109
110

111
112
113
114
115
116
117
118
119
120
*/
static void cache_sizename(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  char zBuf[30];

  assert( argc==1 );
  double v = sqlite3_value_double(argv[0]);
  double x = v<0.0 ? -v : v;
  if( x>=1e9 ){
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%.1fGB", v/1e9);
  }else if( x>=1e6 ){
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%.1fMB", v/1e6);
  }else if( x>=1e3 ){
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%.1fKB", v/1e3);
  }else{







>

|
|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
*/
static void cache_sizename(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  char zBuf[30];
  double v, x;
  assert( argc==1 );
  v = sqlite3_value_double(argv[0]);
  x = v<0.0 ? -v : v;
  if( x>=1e9 ){
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%.1fGB", v/1e9);
  }else if( x>=1e6 ){
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%.1fMB", v/1e6);
  }else if( x>=1e3 ){
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%.1fKB", v/1e3);
  }else{