bringing SDL 1.2.14 from vendor into the main branch
[AROS-Contrib.git] / regina / strings.h
blobe69916fbffae0c2886de075b4c695b3f0e23ba5a
1 /*
2 * The Regina Rexx Interpreter
3 * Copyright (C) 1992-1994 Anders Christensen <anders@pvv.unit.no>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * $Id$
25 #ifndef _STRINGS_ALREADY_DEFINED_
26 #define _STRINGS_ALREADY_DEFINED_
28 typedef struct strengtype {
29 int len, max ;
30 #ifdef CHECK_MEMORY /* FGC: Test */
31 char *value;
32 #else
33 char value[4] ;
34 #endif
35 } streng ;
36 #define STRENG_TYPEDEFED 1
38 #ifndef CHECK_MEMORY
39 typedef struct streng8type {
40 int len, max ;
41 char value[8] ;
42 } streng8 ;
43 #else
44 #define streng8 streng
45 #endif
47 #define Str_len(a) ((a)->len)
48 #define Str_max(a) ((a)->max)
49 #define Str_in(a,b) (Str_len(a)>(b))
50 #define Str_end(a) ((a)->value+Str_len(a))
51 #define Str_zero(a) ((Str_len(a)<Str_max(a)) && ((a)->value[(a)->len]==0x00))
54 #define STRHEAD (1+(sizeof(int)<<1))
57 typedef struct num_descr_type
59 char *num ; /* pointer to matissa of presicion + 1 */
60 int negative ; /* boolean, true if negative number */
61 int exp ; /* value of exponent */
62 int size ; /* how much of num is actually used */
63 int max ; /* how much can num actually take */
64 } num_descr ;
67 #endif /* _STRINGS_ALREADY_INCLUDED_ */