2 * NOTICE and LICENSE for Tecplot Input/Output Library (TecIO) - OpenFOAM
4 * Copyright (C) 1988-2009 Tecplot, Inc. All rights reserved worldwide.
6 * Tecplot hereby grants OpenCFD limited authority to distribute without
7 * alteration the source code to the Tecplot Input/Output library, known
8 * as TecIO, as part of its distribution of OpenFOAM and the
9 * OpenFOAM_to_Tecplot converter. Users of this converter are also hereby
10 * granted access to the TecIO source code, and may redistribute it for the
11 * purpose of maintaining the converter. However, no authority is granted
12 * to alter the TecIO source code in any form or manner.
14 * This limited grant of distribution does not supersede Tecplot, Inc.'s
15 * copyright in TecIO. Contact Tecplot, Inc. for further information.
18 * 3535 Factoria Blvd, Ste. 550
19 * Bellevue, WA 98006, USA
20 * Phone: +1 425 653 1200
21 * http://www.tecplot.com/
25 *****************************************************************
26 *****************************************************************
28 ****** Copyright (C) 1988-2008 Tecplot, Inc. *******
30 *****************************************************************
31 *****************************************************************
36 #if defined STRLISTMODULE
39 # define EXTERN extern
42 #if !defined ARRLIST_h
43 # error "Include ARRLIST.h before including STRLIST.h"
48 * For building pltview.exe under Windows, we use
49 * tecio.dll (which is linked to pltview).
50 * Since pltview.exe uses a few of the
51 * functions here, they need to be exported into
52 * the tecio.dll, thus "TECXXX.h" is included for the
53 * LIBFUNCTION & LIBCALL keywords. They are not
54 * documented with the other TECXXX() functions,
57 * If pltview requires other string functions
58 * in the future, they can be added to the dll
59 * by adding LIBFUNCTION & LIBCALL as in
60 * StringListDealloc(), etc. below.
62 * When building the tecplot kernal, LIBFUNCTION
63 * and LIBCALL are nop's.
68 EXTERN Boolean_t
StringListValid(StringList_pa StringList
);
69 EXTERN
void StringListClear(StringList_pa StringList
);
70 EXTERN
void StringListRemoveStrings(StringList_pa StringList
,
71 LgIndex_t StringOffset
,
73 EXTERN
void StringListRemoveString(StringList_pa StringList
,
74 LgIndex_t StringOffset
);
75 LIBFUNCTION
void LIBCALL
StringListDealloc(StringList_pa
*StringList
);
76 EXTERN StringList_pa
StringListAlloc(void);
77 EXTERN Boolean_t
StringListAppendString(StringList_pa StringList
,
79 LIBFUNCTION LgIndex_t LIBCALL
StringListCount(StringList_pa StringList
);
80 LIBFUNCTION
char * LIBCALL
StringListGetString(StringList_pa StringList
,
81 LgIndex_t StringOffset
);
83 #if defined USE_MACROS_FOR_FUNCTIONS
84 # define StringListGetStringRef StringListGetStringRef_MACRO
86 # define StringListGetStringRef StringListGetStringRef_FUNC
89 #if !defined USE_MACROS_FOR_FUNCTIONS
90 EXTERN
const char * StringListGetStringRef_FUNC(StringList_pa StringList
,
91 LgIndex_t StringOffset
);
94 * To maintain the string list's integrity the result is cast to a
95 * (const char *) to minimize the risk of users passing the result
98 #define StringListGetStringRef_MACRO(StringList, StringOffset) \
99 ((const char *)ArrayListGetCharPtr((ArrayList_pa)(StringList), StringOffset))
101 EXTERN Boolean_t
StringListSetString(StringList_pa StringList
,
102 LgIndex_t StringOffset
,
104 EXTERN Boolean_t
StringListInsertString(StringList_pa StringList
,
105 LgIndex_t StringOffset
,
107 EXTERN StringList_pa
StringListCopy(StringList_pa StringList
);
108 EXTERN Boolean_t
StringListAppend(StringList_pa Target
,
109 StringList_pa Source
);
111 EXTERN
char *StringListToNLString(StringList_pa StringList
);
112 EXTERN StringList_pa
StringListFromNLString(const char *String
);
113 EXTERN
char **StringListToArray(StringList_pa StringList
);
114 EXTERN StringList_pa
StringListFromArray(const char **StringArray
,
116 EXTERN StringList_pa
StringListFromCompound(const char *String
);
117 EXTERN
char *StringListToCompound(StringList_pa StringList
,
118 char GroupJoinCharacter
,
119 const char *CharsToEscape
);
120 EXTERN
void StringListSort(StringList_pa StringList
,
121 StringListStringComparator_pf Comparator
,
122 ArbParam_t ClientData
);