0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-06 00:51:53 +00:00
bird/lib/string.h
2015-11-02 16:49:06 +01:00

34 lines
822 B
C

/*
* BIRD Library -- String Functions
*
* (c) 1998 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#ifndef _BIRD_STRING_H_
#define _BIRD_STRING_H_
#include <stdarg.h>
#include <string.h>
#include <strings.h>
int bsprintf(char *str, const char *fmt, ...);
int bvsprintf(char *str, const char *fmt, va_list args);
int bsnprintf(char *str, int size, const char *fmt, ...);
int bvsnprintf(char *str, int size, const char *fmt, va_list args);
int buffer_vprint(buffer *buf, const char *fmt, va_list args);
int buffer_print(buffer *buf, const char *fmt, ...);
void buffer_puts(buffer *buf, const char *str);
int patmatch(byte *pat, byte *str);
#ifdef HAVE_LIBBSD
#include <bsd/string.h>
#else
size_t strlcpy(char *dst, const char *src, size_t size);
#endif
#endif