1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef INCLUDED_RTL_SOURCE_STRIMP_H 25 #define INCLUDED_RTL_SOURCE_STRIMP_H 26 27 #include <osl/interlck.h> 28 29 #include "sal/types.h" 30 31 /* ======================================================================= */ 32 /* Help functions for String and UString */ 33 /* ======================================================================= */ 34 35 #if defined __cplusplus 36 extern "C" { 37 #endif /* __cplusplus */ 38 39 /* 40 * refCount is opaqueincludes 2 bit-fields; 41 * MSB: 'interned' - is stored in the intern hash 42 * MSB-1: 'static' - is a const / static string, 43 * do no ref counting 44 */ 45 #define SAL_STRING_INTERN_FLAG 0x80000000 46 #define SAL_STRING_STATIC_FLAG 0x40000000 47 #define SAL_STRING_REFCOUNT(a) ((a) & 0x3fffffff) 48 49 #define SAL_STRING_IS_INTERN(a) ((a)->refCount & SAL_STRING_INTERN_FLAG) 50 #define SAL_STRING_IS_STATIC(a) ((a)->refCount & SAL_STRING_STATIC_FLAG) 51 52 sal_Int16 rtl_ImplGetDigit( sal_Unicode ch, sal_Int16 nRadix ); 53 54 sal_Bool rtl_ImplIsWhitespace( sal_Unicode c ); 55 56 #if defined __cplusplus 57 } 58 #endif /* __cplusplus */ 59 60 #endif /* INCLUDED_RTL_SOURCE_STRIMP_H */ 61