~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to src/c/predicate.d

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2006-06-21 09:21:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060621092121-txz1f21lj0wh0f67
Tags: 0.9h-20060617-1
* New upstream version
* Updated standards version without real changes. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
        @(return (CHARACTERP(x) ? Ct : Cnil))
107
107
}
108
108
 
 
109
#ifdef ECL_UNICODE
 
110
cl_object
 
111
si_base_char_p(cl_object x)
 
112
{
 
113
        @(return (BASE_CHAR_P(x) ? Ct : Cnil))
 
114
}
 
115
#endif
 
116
 
109
117
cl_object
110
118
cl_stringp(cl_object x)
111
119
{
112
 
        @(return ((type_of(x) == t_string) ? Ct : Cnil))
 
120
#ifdef ECL_UNICODE
 
121
        cl_type t = type_of(x);
 
122
        @(return (((t == t_base_string) || (t == t_string)) ? Ct : Cnil))
 
123
#else
 
124
        @(return ((type_of(x) == t_base_string) ? Ct : Cnil))
 
125
#endif
113
126
}
114
127
 
115
128
cl_object
122
135
cl_vectorp(cl_object x)
123
136
{
124
137
        cl_type t = type_of(x);
125
 
        @(return ((t == t_vector || t == t_string || t == t_bitvector) ? Ct : Cnil))
 
138
#ifdef ECL_UNICODE
 
139
        @(return ((t == t_vector || t == t_string || t == t_base_string || t == t_bitvector) ? Ct : Cnil))
 
140
#else
 
141
        @(return ((t == t_vector || t == t_base_string || t == t_bitvector) ? Ct : Cnil))
 
142
#endif
126
143
}
127
144
 
128
145
cl_object
129
146
cl_simple_string_p(cl_object x)
130
147
{
131
 
        @(return ((type_of(x) == t_string &&
 
148
#ifdef ECL_UNICODE
 
149
        cl_type t = type_of(x);
 
150
        @(return (((t == t_base_string || (t == t_string)) &&
132
151
                     !x->string.adjustable &&
133
152
                     !x->string.hasfillp &&
134
153
                     Null(CAR(x->string.displaced))) ? Ct : Cnil))
135
 
}
 
154
#else
 
155
        @(return ((type_of(x) == t_base_string &&
 
156
                     !x->base_string.adjustable &&
 
157
                     !x->base_string.hasfillp &&
 
158
                     Null(CAR(x->base_string.displaced))) ? Ct : Cnil))
 
159
#endif
 
160
 
 
161
}
 
162
 
 
163
#ifdef ECL_UNICODE
 
164
cl_object
 
165
si_base_string_p(cl_object x)
 
166
{
 
167
        @(return (type_of(x) == t_base_string))
 
168
}
 
169
#endif
136
170
 
137
171
cl_object
138
172
cl_simple_bit_vector_p(cl_object x)
279
313
        case t_longfloat:
280
314
                return(x->LF.LFVAL==y->LF.LFVAL);
281
315
 
 
316
#ifdef ECL_UNICODE
282
317
        case t_string:
 
318
#endif
 
319
        case t_base_string:
283
320
                return(string_eq(x, y));
284
321
 
285
322
        case t_bitvector: {
381
418
                        return FALSE;
382
419
 
383
420
        case t_vector:
 
421
#ifdef ECL_UNICODE
384
422
        case t_string:
 
423
#endif
 
424
        case t_base_string:
385
425
        case t_bitvector:
386
 
                if (ty == t_vector || ty == t_string || ty == t_bitvector) {
 
426
                if (ty == t_vector || ty == t_base_string || ty == t_bitvector) {
387
427
                  j = x->vector.fillp;
388
428
                  if (j != y->vector.fillp)
389
429
                    return FALSE;