Commit 8693b578 authored by Daniel Salzman's avatar Daniel Salzman

Includes cleanup + removed comments

parent c42851e7
......@@ -39,11 +39,11 @@ src/common-knot/strlcat.c
src/common-knot/strlcat.h
src/common-knot/strtonum.h
src/common-knot/trim.h
src/dnstap/Makefile.am
src/dnstap/convert.c
src/dnstap/convert.h
src/dnstap/dnstap.c
src/dnstap/dnstap.h
src/dnstap/Makefile.am
src/dnstap/message.c
src/dnstap/message.h
src/dnstap/reader.c
......@@ -166,8 +166,31 @@ src/knot/zone/zonedb.c
src/knot/zone/zonedb.h
src/knot/zone/zonefile.c
src/knot/zone/zonefile.h
src/knot/knot.h
src/knot/main.c
src/libknot/binary.c
src/libknot/binary.h
src/libknot/consts.c
src/libknot/consts.h
src/libknot/descriptor.c
src/libknot/descriptor.h
src/libknot/dname.c
src/libknot/dname.h
src/libknot/dnssec/bitmap.h
src/libknot/dnssec/config.h
src/libknot/dnssec/crypto.c
src/libknot/dnssec/crypto.h
src/libknot/dnssec/key.c
src/libknot/dnssec/key.h
src/libknot/dnssec/policy.c
src/libknot/dnssec/policy.h
src/libknot/dnssec/random.h
src/libknot/dnssec/rrset-sign.c
src/libknot/dnssec/rrset-sign.h
src/libknot/dnssec/sig0.c
src/libknot/dnssec/sig0.h
src/libknot/dnssec/sign.c
src/libknot/dnssec/sign.h
src/libknot/errcode.c
src/libknot/errcode.h
src/libknot/internal/array-sort.h
src/libknot/internal/base32hex.c
src/libknot/internal/base32hex.h
......@@ -208,29 +231,12 @@ src/libknot/internal/strlcpy.c
src/libknot/internal/strlcpy.h
src/libknot/internal/tolower.c
src/libknot/internal/tolower.h
src/libknot/internal/utils.c
src/libknot/internal/utils.h
src/libknot/internal/trie/hat-trie.c
src/libknot/internal/trie/hat-trie.h
src/libknot/internal/trie/murmurhash3.c
src/libknot/internal/trie/murmurhash3.h
src/libknot/dnssec/bitmap.h
src/libknot/dnssec/config.h
src/libknot/dnssec/crypto.c
src/libknot/dnssec/crypto.h
src/libknot/dnssec/key.c
src/libknot/dnssec/key.h
src/libknot/dnssec/policy.c
src/libknot/dnssec/policy.h
src/libknot/dnssec/random.h
src/libknot/dnssec/rrset-sign.c
src/libknot/dnssec/rrset-sign.h
src/libknot/dnssec/sig0.c
src/libknot/dnssec/sig0.h
src/libknot/dnssec/sign.c
src/libknot/dnssec/sign.h
src/libknot/errcode.c
src/libknot/errcode.h
src/libknot/internal/utils.c
src/libknot/internal/utils.h
src/libknot/libknot.h
src/libknot/packet/compr.c
src/libknot/packet/compr.h
......@@ -268,25 +274,6 @@ src/libknot/rrtype/rrsig.h
src/libknot/rrtype/soa.h
src/libknot/rrtype/tsig.c
src/libknot/rrtype/tsig.h
src/libknot/binary.c
src/libknot/binary.h
src/libknot/consts.c
src/libknot/consts.h
src/libknot/descriptor.c
src/libknot/descriptor.h
src/libknot/dname.c
src/libknot/dname.h
src/libknot/errcode.c
src/libknot/errcode.h
src/libknot/libknot.h
src/libknot/rdata.c
src/libknot/rdata.h
src/libknot/rdataset.c
src/libknot/rdataset.h
src/libknot/rrset-dump.c
src/libknot/rrset-dump.h
src/libknot/rrset.c
src/libknot/rrset.h
src/libknot/tsig-op.c
src/libknot/tsig-op.h
src/utils/common/exec.c
......
......@@ -14,29 +14,26 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h> // free
#include <stdbool.h> // bool
#include <string.h> // memcpy
#include <time.h> // strftime
#include <ctype.h> // isprint
#include <math.h> // pow
#include <inttypes.h> // PRIu64
#include <sys/types.h> // (OpenBSD)
#include <sys/socket.h> // AF_INET (BSD)
#include <netinet/in.h> // in_addr (BSD)
#include <arpa/inet.h> // ntohs
#include <arpa/inet.h>
#include <ctype.h>
#include <inttypes.h>
#include <math.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include "libknot/rrset-dump.h"
#include "libknot/internal/base64.h" // base64
#include "libknot/internal/base32hex.h" // base32hex
#include "libknot/consts.h"
#include "libknot/descriptor.h"
#include "libknot/dnssec/key.h"
#include "libknot/errcode.h"
#include "libknot/internal/base64.h"
#include "libknot/internal/base32hex.h"
#include "libknot/internal/macros.h"
#include "libknot/internal/utils.h" // wire_read_u16
#include "libknot/errcode.h" // KNOT_EOK
#include "libknot/descriptor.h" // KNOT_RRTYPE
#include "libknot/dnssec/key.h" // knot_keytag
#include "libknot/consts.h" // knot_rcode_names
#include "libknot/internal/utils.h"
#define TAB_WIDTH 8
#define BLOCK_WIDTH 40
......
......@@ -26,7 +26,7 @@
#pragma once
#include <stdbool.h> // bool
#include <stdbool.h>
#include "libknot/rrset.h"
......
......@@ -14,22 +14,21 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/common/exec.h"
#include <stdlib.h> // free
#include <time.h> // localtime_r
#include <arpa/inet.h> // inet_ntop
#include <arpa/inet.h>
#include <stdlib.h>
#include <time.h>
#include "utils/common/exec.h"
#include "utils/common/msg.h"
#include "utils/common/netio.h"
#include "utils/common/params.h"
#include "common-knot/strlcat.h"
#include "libknot/libknot.h"
#include "libknot/internal/lists.h" // list
#include "libknot/internal/sockaddr.h" // IPV4_PREFIXLEN
#include "libknot/internal/print.h" // txt_print
#include "common-knot/strlcat.h" // strlcat
#include "utils/common/msg.h" // WARN
#include "utils/common/params.h" // params_t
#include "utils/common/netio.h" // send_msg
#include "libknot/dnssec/sig0.h"
#include "libknot/internal/lists.h"
#include "libknot/internal/print.h"
#include "libknot/internal/sockaddr.h"
#include "libknot/dnssec/random.h"
#include "libknot/dnssec/sig0.h"
static lookup_table_t rtypes[] = {
{ KNOT_RRTYPE_A, "has IPv4 address" },
......
......@@ -26,8 +26,8 @@
#pragma once
#include "utils/common/netio.h" // net_t
#include "utils/common/params.h" // style_t
#include "utils/common/netio.h"
#include "utils/common/params.h"
#include "libknot/libknot.h"
#include "libknot/dnssec/key.h"
#include "libknot/dnssec/sign.h"
......@@ -74,7 +74,7 @@ void print_data_xfr(const knot_pkt_t *packet, const style_t *style);
* \param rr_count Total number of answer records.
* \param net Connection information.
* \param elapsed Total elapsed time.
* \param exec_time Time of the packet creation.
* \param exec_time Time of the packet creation.
* \param style Style of the otput.
*/
void print_footer_xfr(const size_t total_len,
......@@ -92,7 +92,7 @@ void print_footer_xfr(const size_t total_len,
* \param net Connection information.
* \param size Original packet wire size.
* \param elapsed Total elapsed time.
* \param exec_time Time of the packet creation.
* \param exec_time Time of the packet creation.
* \param incoming Indicates if the packet is input.
* \param style Style of the otput.
*/
......
......@@ -14,9 +14,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "utils/common/msg.h"
......
......@@ -26,7 +26,7 @@
#pragma once
#include <stdio.h> // printf
#include <stdio.h>
#define ERROR_ "; Error: "
#define INFO_ "; Info: "
......
......@@ -14,24 +14,23 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/common/netio.h"
#include <stdlib.h> // free
#include <netdb.h> // addrinfo
#include <poll.h> // poll
#include <fcntl.h> // fcntl
#include <sys/socket.h> // AF_INET (BSD)
#include <netinet/in.h> // ntohl (BSD)
#include <arpa/inet.h> // inet_ntop
#include <unistd.h> // close
#ifdef HAVE_SYS_UIO_H // struct iovec (OpenBSD)
#include <arpa/inet.h>
#include <fcntl.h>
#include <netdb.h>
#include <poll.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif // HAVE_SYS_UIO_H
#endif
#include "utils/common/msg.h" // WARN
#include "libknot/descriptor.h" // KNOT_CLASS_IN
#include "libknot/errcode.h" // KNOT_E
#include "libknot/internal/sockaddr.h" // sockaddr_tostr, sockaddr_portnum
#include "utils/common/netio.h"
#include "utils/common/msg.h"
#include "libknot/descriptor.h"
#include "libknot/errcode.h"
#include "libknot/internal/sockaddr.h"
srv_info_t* srv_info_create(const char *name, const char *service)
{
......
......@@ -26,12 +26,12 @@
#pragma once
#include <stdint.h> // uint_t
#include <netdb.h> // addrinfo
#include <sys/socket.h> // sockaddr_storage (BSD)
#include <netdb.h>
#include <stdint.h>
#include <sys/socket.h>
#include "libknot/internal/lists.h" // node
#include "utils/common/params.h" // params_t
#include "utils/common/params.h"
#include "libknot/internal/lists.h"
/*! \brief Structure containing server information. */
typedef struct {
......
......@@ -14,26 +14,25 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/common/params.h"
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h> // free
#include <netinet/in.h> // in_addr
#include <arpa/inet.h> // inet_pton
#include <sys/socket.h> // AF_INET (BSD)
#include <stdlib.h>
#include <netinet/in.h>
#include <sys/socket.h>
#ifdef LIBIDN
#include <idna.h>
#endif
#include "utils/common/params.h"
#include "utils/common/msg.h"
#include "utils/common/resolv.h"
#include "utils/common/token.h"
#include "libknot/libknot.h"
#include "libknot/errcode.h" // KNOT_EOK
#include "libknot/internal/mempattern.h" // strcdup
#include "libknot/descriptor.h" // KNOT_RRTYPE_
#include "libknot/internal/strlcpy.h" // strlcpy
#include "utils/common/msg.h" // WARN
#include "utils/common/resolv.h" // parse_nameserver
#include "utils/common/token.h" // token
#include "libknot/descriptor.h"
#include "libknot/errcode.h"
#include "libknot/internal/mempattern.h"
#include "libknot/internal/strlcpy.h"
#define IPV4_REVERSE_DOMAIN "in-addr.arpa."
#define IPV6_REVERSE_DOMAIN "ip6.arpa."
......
......@@ -26,12 +26,12 @@
#pragma once
#include <stdint.h> // uint16_t
#include <limits.h> // INT_MAX
#include <stdbool.h> // bool
#include <limits.h>
#include <stdint.h>
#include <stdbool.h>
#include "libknot/libknot.h"
#include "libknot/internal/lists.h" // list
#include "libknot/internal/lists.h"
#define DEFAULT_IPV4_NAME "127.0.0.1"
#define DEFAULT_IPV6_NAME "::1"
......
......@@ -14,15 +14,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/common/resolv.h"
#include <stdio.h> // fopen
#include <stdlib.h> // free
#include <stdio.h>
#include <stdlib.h>
#include "libknot/internal/lists.h" // list
#include "libknot/errcode.h" // KNOT_ENOENT
#include "utils/common/msg.h" // DBG_NULL
#include "utils/common/params.h" // DEFAULT_IPV6_NAME
#include "utils/common/resolv.h"
#include "utils/common/msg.h"
#include "utils/common/params.h"
#include "libknot/errcode.h"
#include "libknot/internal/lists.h"
#define RESOLV_FILE "/etc/resolv.conf"
......
......@@ -26,8 +26,8 @@
#pragma once
#include "libknot/internal/lists.h" // list
#include "utils/common/netio.h" // server_t
#include "utils/common/netio.h"
#include "libknot/internal/lists.h"
srv_info_t* parse_nameserver(const char *str, const char *def_port);
......
......@@ -14,16 +14,15 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/common/token.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h> // free
#include <ctype.h> // isspace
#include <string.h> // memcmp
#include <stdlib.h>
#include <string.h>
#include "libknot/errcode.h" // KNOT_EOK
#include "libknot/internal/getline.h" // knot_getline
#include "utils/common/msg.h" // ERR
#include "utils/common/token.h"
#include "utils/common/msg.h"
#include "libknot/errcode.h"
#include "libknot/internal/getline.h"
int tok_scan(const char* lp, const char **tbl, int *lpm)
{
......
......@@ -14,22 +14,21 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/dig/dig_exec.h"
#include <stdlib.h> // free
#include <sys/time.h> // gettimeofday
#include <sys/socket.h> // AF_INET
#include <netinet/in.h> // sockaddr_in (BSD)
#include <stdlib.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/time.h>
#include "utils/dig/dig_exec.h"
#include "utils/common/exec.h"
#include "utils/common/msg.h"
#include "utils/common/netio.h"
#include "libknot/libknot.h"
#include "libknot/internal/lists.h" // list
#include "libknot/internal/print.h" // time_diff
#include "libknot/errcode.h" // KNOT_EOK
#include "libknot/descriptor.h" // KNOT_RRTYPE_
#include "libknot/internal/sockaddr.h" // sockaddr_set_raw
#include "utils/common/msg.h" // WARN
#include "utils/common/netio.h" // get_socktype
#include "utils/common/exec.h" // print_packet
#include "libknot/descriptor.h"
#include "libknot/errcode.h"
#include "libknot/internal/lists.h"
#include "libknot/internal/print.h"
#include "libknot/internal/sockaddr.h"
#if USE_DNSTAP
# include "dnstap/convert.h"
......
......@@ -26,8 +26,8 @@
#pragma once
#include "utils/common/params.h" // params_t
#include "utils/dig/dig_params.h" // query_t
#include "utils/common/params.h"
#include "utils/dig/dig_params.h"
int dig_exec(const dig_params_t *params);
......
......@@ -14,11 +14,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h> // EXIT_FAILURE
#include <stdlib.h>
#include "libknot/errcode.h" // KNOT_EOK
#include "utils/dig/dig_params.h" // dig_parse
#include "utils/dig/dig_exec.h" // dig_exec
#include "utils/dig/dig_params.h"
#include "utils/dig/dig_exec.h"
#include "libknot/errcode.h"
int main(int argc, char *argv[])
{
......
......@@ -14,22 +14,21 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/dig/dig_params.h"
#include <arpa/inet.h>
#include <getopt.h>
#include <locale.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string.h> // strncmp
#include <stdio.h> // printf
#include <getopt.h> // getopt
#include <stdlib.h> // free
#include <locale.h> // setlocale
#include <arpa/inet.h> // inet_pton
#include "libknot/internal/lists.h" // list
#include "libknot/errcode.h" // KNOT_EOK
#include "libknot/descriptor.h" // KNOT_CLASS_IN
#include "libknot/internal/sockaddr.h" // IPV4_PREFIXLEN
#include "utils/common/msg.h" // WARN
#include "utils/common/params.h" // parse_class
#include "utils/common/resolv.h" // get_nameservers
#include "utils/dig/dig_params.h"
#include "utils/common/msg.h"
#include "utils/common/params.h"
#include "utils/common/resolv.h"
#include "libknot/descriptor.h"
#include "libknot/errcode.h"
#include "libknot/internal/lists.h"
#include "libknot/internal/sockaddr.h"
#define DEFAULT_RETRIES_DIG 2
#define DEFAULT_TIMEOUT_DIG 5
......
......@@ -26,12 +26,12 @@
#pragma once
#include <stdbool.h> // bool
#include <stdbool.h>
#include "libknot/libknot.h" // knot_addr_family_t
#include "libknot/internal/sockaddr.h" // IPV6_PREFIXLEN
#include "utils/common/params.h" // protocol_t
#include "utils/common/exec.h" // sign_context_t
#include "utils/common/params.h"
#include "utils/common/exec.h"
#include "libknot/libknot.h"
#include "libknot/internal/sockaddr.h"
#if USE_DNSTAP
# include "dnstap/reader.h"
......
......@@ -14,11 +14,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h> // EXIT_FAILURE
#include <stdlib.h>
#include "libknot/errcode.h" // KNOT_EOK
#include "utils/host/host_params.h" // host_parse
#include "utils/dig/dig_exec.h" // dig_exec
#include "utils/host/host_params.h"
#include "utils/dig/dig_exec.h"
#include "libknot/errcode.h"
int main(int argc, char *argv[])
{
......
......@@ -14,21 +14,20 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/host/host_params.h"
#include <getopt.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string.h> // strncmp
#include <stdio.h> // printf
#include <getopt.h> // getopt
#include <stdlib.h> // free
#include <locale.h> // setlocale
#include "libknot/internal/lists.h" // list
#include "libknot/errcode.h" // KNOT_EOK
#include "libknot/descriptor.h" // KNOT_CLASS_IN
#include "utils/common/msg.h" // WARN
#include "utils/common/params.h" // name_to_idn
#include "utils/dig/dig_params.h" // dig_params_t
#include "utils/common/resolv.h" // get_nameservers
#include "utils/host/host_params.h"
#include "utils/common/msg.h"
#include "utils/common/params.h"
#include "utils/common/resolv.h"
#include "utils/dig/dig_params.h"
#include "libknot/internal/lists.h"
#include "libknot/descriptor.h"
#include "libknot/errcode.h"
#define DEFAULT_RETRIES_HOST 1
#define DEFAULT_TIMEOUT_HOST 2
......
......@@ -26,7 +26,7 @@
#pragma once
#include "utils/dig/dig_params.h" // dig_params_t
#include "utils/dig/dig_params.h"
#define KHOST_VERSION "khost, version " PACKAGE_VERSION "\n"
......
......@@ -16,17 +16,17 @@
#include <assert.h>
#include <getopt.h>
#include <locale.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <locale.h>
#include "utils/common/params.h"
#include "libknot/internal/base32hex.h"
#include "libknot/dnssec/crypto.h"
#include "libknot/errcode.h"
#include "common-knot/hex.h"
#include "common-knot/strtonum.h"
#include "libknot/dnssec/crypto.h"
#define PROGRAM_NAME "knsec3hash"
......
......@@ -14,27 +14,27 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <unistd.h>
#include "utils/nsupdate/nsupdate_exec.h"
#include "utils/common/params.h"
#include "utils/common/msg.h"
#include "utils/common/exec.h"
#include "utils/common/msg.h"
#include "utils/common/netio.h"
#include "utils/common/params.h"
#include "utils/common/token.h"
#include "libknot/internal/mem.h"
#include "libknot/errcode.h"
#include "libknot/descriptor.h"
#include "libknot/internal/strlcpy.h"
#include "libknot/internal/macros.h"
#include "libknot/libknot.h"
#include "libknot/descriptor.h"
#include "libknot/dnssec/random.h"
#include "libknot/errcode.h"
#include "libknot/internal/macros.h"
#include "libknot/internal/mem.h"
#include "libknot/internal/strlcpy.h"
/* Declarations of cmd parse functions. */
typedef int (*cmd_handle_f)(const char *lp, nsupdate_params_t *params);
......
......@@ -26,7 +26,7 @@
#pragma once
#include "utils/nsupdate/nsupdate_params.h" // nsupdate_params_t
#include "utils/nsupdate/nsupdate_params.h"
int nsupdate_exec(nsupdate_params_t *params);
......
......@@ -14,12 +14,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h> // EXIT_FAILURE
#include <stdlib.h>
#include "libknot/errcode.h" // KNOT_EOK
#include "utils/nsupdate/nsupdate_params.h" // params_t
#include "utils/nsupdate/nsupdate_exec.h" // host_exec
#include "libknot/dnssec/crypto.h" // knot_crypto_cleanup
#include "utils/nsupdate/nsupdate_exec.h"
#include "utils/nsupdate/nsupdate_params.h"
#include "libknot/dnssec/crypto.h"
#include "libknot/errcode.h"
int main(int argc, char *argv[])
{
......
......@@ -14,20 +14,20 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include <stdio.h>
#include <getopt.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils/nsupdate/nsupdate_params.h"
#include "utils/common/msg.h"
#include "utils/common/netio.h"
#include "libknot/errcode.h"
#include "libknot/libknot.h"
#include "libknot/descriptor.h"
#include "libknot/errcode.h"
#include "libknot/internal/mempattern.h"
#include "libknot/internal/mempool.h"
#include "libknot/libknot.h"
#define DEFAULT_RETRIES_NSUPDATE 3
#define DEFAULT_TIMEOUT_NSUPDATE 12
......
......@@ -28,12 +28,12 @@
#include <stdint.h>
#include "utils/common/netio.h"
#include "utils/common/params.h"
#include "libknot/libknot.h"
#include "libknot/internal/lists.h" // list
#include "zscanner/scanner.h" // zs_scanner_t
#include "utils/common/netio.h" // server_t
#include "utils/common/params.h" // protocol_t
#include "libknot/dnssec/key.h" // knot_key_params_t
#include "libknot/dnssec/key.h"
#include "libknot/internal/lists.h"
#include "zscanner/scanner.h"
#define KNSUPDATE_VERSION "knsupdate, version " PACKAGE_VERSION "\n"
......
......@@ -14,7 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h> // NULL
#include <stdlib.h>
#include "zscanner/error.h"
......
......@@ -17,9 +17,8 @@
#include <stdint.h>
#include <stdlib.h>
#include "zscanner/functions.h"
#include "zscanner/error.h"
#include "zscanner/scanner.h" // ASCII_0
#include "zscanner/functions.h"
const uint8_t digit_to_num[] = {
['0'] = 0, ['1'] = 1, ['2'] = 2, ['3'] = 3, ['4'] = 4,
......@@ -793,9 +792,9 @@ void wire_dname_to_str(const uint8_t *data,
// Just in case use \123 notation.
text[text_len++] = '\\';
text[text_len++] = (data[i] / 100) + ASCII_0;
text[text_len++] = (data[i] / 10) % 10 + ASCII_0;