source: branches/libc-0.6/src/emx/include/dyn-string.h@ 2511

Last change on this file since 2511 was 1506, checked in by bird, 21 years ago

@unixroot. header reviews. ++

  • Property cvs2svn:cvs-rev set to 1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 4.4 KB
Line 
1/* dyn-string.h,v 1.2 2004/09/14 22:27:32 bird Exp */
2/** @file
3 * GNU, -liberty.
4 */
5
6/* An abstract string datatype.
7 Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
8 Contributed by Mark Mitchell ([email protected]).
9
10This file is part of GCC.
11
12GCC is free software; you can redistribute it and/or modify
13it under the terms of the GNU General Public License as published by
14the Free Software Foundation; either version 2, or (at your option)
15any later version.
16
17GCC is distributed in the hope that it will be useful,
18but WITHOUT ANY WARRANTY; without even the implied warranty of
19MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20GNU General Public License for more details.
21
22You should have received a copy of the GNU General Public License
23along with GCC; see the file COPYING. If not, write to
24the Free Software Foundation, 59 Temple Place - Suite 330,
25Boston, MA 02111-1307, USA. */
26
27
28typedef struct dyn_string
29{
30 int allocated; /* The amount of space allocated for the string. */
31 int length; /* The actual length of the string. */
32 char *s; /* The string itself, NUL-terminated. */
33}* dyn_string_t;
34
35/* The length STR, in bytes, not including the terminating NUL. */
36#define dyn_string_length(STR) \
37 ((STR)->length)
38
39/* The NTBS in which the contents of STR are stored. */
40#define dyn_string_buf(STR) \
41 ((STR)->s)