Lines Matching +full:- +full:s

100     *len = out - buffer;  in decode_base64_generic()
107 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64()
108 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64()
109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, in decode_base64()
110 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, in decode_base64()
111 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, in decode_base64()
112 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, in decode_base64()
113 -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, in decode_base64()
114 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, in decode_base64()
115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64()
116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64()
117 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64()
118 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64()
119 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64()
120 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64()
121 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64()
122 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 in decode_base64()
130 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64url()
131 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64url()
132 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, in decode_base64url()
133 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, in decode_base64url()
134 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, in decode_base64url()
135 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63, in decode_base64url()
136 -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, in decode_base64url()
137 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, in decode_base64url()
138 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64url()
139 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64url()
140 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64url()
141 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64url()
142 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64url()
143 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64url()
144 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64url()
145 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 in decode_base64url()
161 buffer[i] = (c - '0') << 4; in decode_base16()
163 buffer[i] = ((c | 0x20) - 'a' + 10) << 4; in decode_base16()
171 buffer[i] |= (c - '0'); in decode_base16()
173 buffer[i] |= ((c | 0x20) - 'a' + 10); in decode_base16()
186 unsigned s = 0; in get_cjson_size_limited() local
188 for (item = container->child; item; item = item->next) { in get_cjson_size_limited()
189 if (++s > 255) in get_cjson_size_limited()
192 return s; in get_cjson_size_limited()
200 if (asprintf(&metadatakey, "%s%s", item->string, meta_data_marker) < 0 || metadatakey == NULL) in get_meta_data()
210 if (md == NULL || md->type != cJSON_Object) in parse_meta_data()
213 for (md = md->child; md; md = md->next) { in parse_meta_data()
214 if (strcmp(md->string, "tag") == 0) { in parse_meta_data()
215 if (md->type != cJSON_String || sscanf(md->valuestring, "%" PRIu64, &result.tag) < 0) in parse_meta_data()
216 fprintf(stderr, "json2cbor: could not parse tag: %s\n", md->valuestring); in parse_meta_data()
219 } else if (strcmp(md->string, "t") == 0) { in parse_meta_data()
220 result.t = md->valueint; in parse_meta_data()
221 } else if (strcmp(md->string, "v") == 0) { in parse_meta_data()
222 if (md->type == cJSON_Number) in parse_meta_data()
223 result.simpleType = md->valueint; in parse_meta_data()
225 result.v = md->valuestring; in parse_meta_data()
240 fprintf(stderr, "json2cbor: could not parse number: %s\n", md.v); in decode_json_with_metadata()
250 data = decode_base64(item->valuestring, &len); in decode_json_with_metadata()
252 data = decode_base16(item->valuestring, &len); in decode_json_with_metadata()
254 data = decode_base64url(item->valuestring + 1, &len); in decode_json_with_metadata()
256 data = decode_base64url(item->valuestring, &len); in decode_json_with_metadata()
263 fprintf(stderr, "json2cbor: could not decode encoded byte string: %s\n", item->valuestring); in decode_json_with_metadata()
279 v = item->valuedouble; in decode_json_with_metadata()
282 } else if (strcmp(md.v, "-inf") == 0) { in decode_json_with_metadata()
283 v = -INFINITY; in decode_json_with_metadata()
287 fprintf(stderr, "json2cbor: invalid floating-point value: %s\n", md.v); in decode_json_with_metadata()
313 switch (json->type) { in decode_json()
316 return cbor_encode_boolean(encoder, json->type == cJSON_True); in decode_json()
322 if ((double)json->valueint == json->valuedouble) in decode_json()
323 return cbor_encode_int(encoder, json->valueint); in decode_json()
327 err = cbor_encode_double(encoder, json->valuedouble); in decode_json()
336 encoder->data.ptr = newbuffer + (container.data.ptr - buffer); in decode_json()
337 encoder->end = newbuffer + buffersize; in decode_json()
344 return cbor_encode_text_stringz(encoder, json->valuestring); in decode_json()
353 for (item = json->child; item; item = item->next) { in decode_json()
366 for (item = json->child ; item; item = item->next) { in decode_json()
367 if (usingMetaData && strlen(item->string) > strlen(meta_data_marker) in decode_json()
368 && strcmp(item->string + strlen(item->string) - 5, meta_data_marker) == 0) in decode_json()
371 err = cbor_encode_text_stringz(&container, item->string); in decode_json()
399 while ((c = getopt(argc, argv, "M")) != -1) { in main()
406 fprintf(stderr, "Unknown option -%c.\n", optopt); in main()
413 " -M Interpret metadata added by cbordump tool\n" in main()
421 if (fname && strcmp(fname, "-") != 0) { in main()
429 fname = "-"; in main()
469 fprintf(stderr, "json2cbor: %s: could not parse.\n", fname); in main()
482 fprintf(stderr, "json2cbor: %s: error encoding to CBOR: %s\n", fname, in main()
487 fwrite(buffer, 1, cb.ptr - buffer, stdout); in main()