mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Move binpac code into the main Zeek repository
This is based on commit 48f75b5f6415fe9d597e3e991cec635b1bc400dc from the binpac repository.
This commit is contained in:
parent
a2680d5eca
commit
ff26835976
112 changed files with 14586 additions and 8 deletions
15
tools/binpac/lib/binpac_bytestring.cc
Normal file
15
tools/binpac/lib/binpac_bytestring.cc
Normal file
|
@ -0,0 +1,15 @@
|
|||
#define binpac_regex_h
|
||||
|
||||
#include "binpac_bytestring.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace binpac {
|
||||
|
||||
std::string std_string(bytestring const* s) { return std::string((const char*)s->begin(), (const char*)s->end()); }
|
||||
|
||||
int bytestring_to_int(bytestring const* s) { return atoi((const char*)s->begin()); }
|
||||
|
||||
double bytestring_to_double(bytestring const* s) { return atof((const char*)s->begin()); }
|
||||
|
||||
} // namespace binpac
|
Loading…
Add table
Add a link
Reference in a new issue