97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
#define etHTTPIZE 18 /* Make text safe for HTTP. "/" encoded as %2f */
#define etURLIZE 19 /* Make text safe for HTTP. "/" not encoded */
#define etFOSSILIZE 20 /* The fossil header encoding format. */
#define etPATH 21 /* Path type */
#define etWIKISTR 22 /* Timeline comment text rendered from a char*: %W */
#define etSTRINGID 23 /* String with length limit for a UUID prefix: %S */
#define etROOT 24 /* String value of g.zTop: %R */
#define etJSONSTR 25 /* String encoded as a JSON string literal: %j */
/*
** An "etByte" is an 8-bit unsigned value.
*/
typedef unsigned char etByte;
|
|
>
|
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
#define etHTTPIZE 18 /* Make text safe for HTTP. "/" encoded as %2f */
#define etURLIZE 19 /* Make text safe for HTTP. "/" not encoded */
#define etFOSSILIZE 20 /* The fossil header encoding format. */
#define etPATH 21 /* Path type */
#define etWIKISTR 22 /* Timeline comment text rendered from a char*: %W */
#define etSTRINGID 23 /* String with length limit for a UUID prefix: %S */
#define etROOT 24 /* String value of g.zTop: %R */
#define etJSONSTR 25 /* String encoded as a JSON string literal: %j
Use %!j to include double-quotes around it. */
/*
** An "etByte" is an 8-bit unsigned value.
*/
typedef unsigned char etByte;
|
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
|
char *zMem = va_arg(ap,char*);
if( limit!=0 ){
/* Ignore the limit flag, if set, for JSON string
** output. This block exists to squelch the associated
** "unused variable" compiler warning. */
}
if( zMem==0 ) zMem = "";
zExtra = bufpt = encode_json_string_literal(zMem, &length);
if( precision>=0 && precision<length ) length = precision;
break;
}
case etWIKISTR: {
int limit = flag_alternateform ? va_arg(ap,int) : -1;
char *zWiki = va_arg(ap, char*);
Blob wiki;
|
|
>
|
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
|
char *zMem = va_arg(ap,char*);
if( limit!=0 ){
/* Ignore the limit flag, if set, for JSON string
** output. This block exists to squelch the associated
** "unused variable" compiler warning. */
}
if( zMem==0 ) zMem = "";
zExtra = bufpt =
encode_json_string_literal(zMem, flag_altform2, &length);
if( precision>=0 && precision<length ) length = precision;
break;
}
case etWIKISTR: {
int limit = flag_alternateform ? va_arg(ap,int) : -1;
char *zWiki = va_arg(ap, char*);
Blob wiki;
|