File: string_buffer.h

package info (click to toggle)
dnssec-trigger 0.17%2Brepack-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,896 kB
  • sloc: ansic: 18,697; sh: 977; makefile: 494; xml: 444; objc: 421; cpp: 18
file content (25 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "config.h"

#if !defined STRING_BUFFER_H && defined FWD_ZONES_SUPPORT
#define STRING_BUFFER_H

#include <stdlib.h>

/**
 * Just a fat pointer wrapping char pointer
 */
struct string_buffer {
    /** String itself */
    char* string;
    /** Length of the string buffer */
    size_t length;
};

#define string_builder(STR)  \
{                            \
    .string = (STR),         \
    .length = sizeof((STR)), \
}

#endif /* STRING_BUFFER_H */