Fossil

Check-in [6ce6b5e6]
Login

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

Overview
Comment:fossil_warning() is now a no-op in JSON mode, to avoid corrupting the output.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | json
Files: files | file ages | folders
SHA1:6ce6b5e63ff041a757db81bd587dec5032bc0769
User & Date: stephan 2011-09-20 16:58:08
Context
2011-09-20
22:42
Started adding /json/timeline support, but this is gonna be a doozie. Breaking it down into separate calls for ci/wiki/ticket, e.g. /json/timeline/ci because the structures will be different for each. check-in: eff3f7d9 user: stephan tags: json
16:58
fossil_warning() is now a no-op in JSON mode, to avoid corrupting the output. check-in: 6ce6b5e6 user: stephan tags: json
16:48
merged trunk [1f498a6ef2]. check-in: c2b1bc68 user: stephan tags: json
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

492
493
494
495
496
497
498






499
500
501
502
503
504
505
}


/* Print a warning message */
void fossil_warning(const char *zFormat, ...){
  char *z;
  va_list ap;






  va_start(ap, zFormat);
  z = vmprintf(zFormat, ap);
  va_end(ap);
  if( g.cgiOutput ){
    cgi_printf("<p class=\"generalError\">%h</p>", z);
  }else{
    char *zOut = mprintf("\r%s: %s\n", fossil_nameofexe(), z);







>
>
>
>
>
>







492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
}


/* Print a warning message */
void fossil_warning(const char *zFormat, ...){
  char *z;
  va_list ap;
  if( g.json.isJsonMode ){
      /* The JSON API has no way of dealing with warnings and
         outputing them here will corrupt the output.
      */
      return;
  }
  va_start(ap, zFormat);
  z = vmprintf(zFormat, ap);
  va_end(ap);
  if( g.cgiOutput ){
    cgi_printf("<p class=\"generalError\">%h</p>", z);
  }else{
    char *zOut = mprintf("\r%s: %s\n", fossil_nameofexe(), z);