From 3faecf9a00512dcbc8712c4bca9adae72fb64410 Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Sat, 12 May 2012 14:01:52 -0400 Subject: Give in and copy bjam into cdec source code --- jam-files/engine/strings.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 jam-files/engine/strings.h (limited to 'jam-files/engine/strings.h') diff --git a/jam-files/engine/strings.h b/jam-files/engine/strings.h new file mode 100644 index 00000000..33c77bd7 --- /dev/null +++ b/jam-files/engine/strings.h @@ -0,0 +1,34 @@ +#ifndef STRINGS_DWA20011024_H +# define STRINGS_DWA20011024_H + +/* Copyright David Abrahams 2004. Distributed under the Boost */ +/* Software License, Version 1.0. (See accompanying */ +/* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ + +# include + +typedef struct string +{ + char* value; + unsigned long size; + unsigned long capacity; + char opt[32]; +#ifndef NDEBUG + char magic[4]; +#endif +} string; + +void string_new( string* ); +void string_copy( string*, char const* ); +void string_free( string* ); +void string_append( string*, char const* ); +void string_append_range( string*, char const*, char const* ); +void string_push_back( string* s, char x ); +void string_reserve( string*, size_t ); +void string_truncate( string*, size_t ); +void string_pop_back( string* ); +char string_back( string* ); +void string_unit_test(); + +#endif + -- cgit v1.2.3