• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*---------------------------------------------------------------------------*
2  *  platform_utils.h  *
3  *                                                                           *
4  *  Copyright 2007, 2008 Nuance Communciations, Inc.                               *
5  *                                                                           *
6  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
7  *  you may not use this file except in compliance with the License.         *
8  *                                                                           *
9  *  You may obtain a copy of the License at                                  *
10  *      http://www.apache.org/licenses/LICENSE-2.0                           *
11  *                                                                           *
12  *  Unless required by applicable law or agreed to in writing, software      *
13  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15  *  See the License for the specific language governing permissions and      *
16  *  limitations under the License.                                           *
17  *                                                                           *
18  *---------------------------------------------------------------------------*/
19 
20 
21 
22 #ifndef _PLATFORM_UTILS_H_
23 #define _PLATFORM_UTILS_H_
24 
25 /*
26   safe_strtok()
27   Use this in place of regular strtok. which is dangerous because it modifies
28   a global variable.  This function does not.
29 
30   Returns the position in NULL terminated input_str where seps are found,
31   and the length of the token
32   Seps contains a NULL terminated string of separators
33   Returns NULL if error
34 
35   If no more tokens left, token_len is 0
36 */
37 char * safe_strtok(char *input_str, char *seps, int * token_len);
38 
39 /* C54 and WinCE does not have strdup */
40 #if defined TI_DSP || defined UNDER_CE || defined __CC_ARM
41 char * strdup(char *in_string);
42 #endif
43 
44 #endif /* _PLATFORM_UTILS_H_ */
45