1 /********************************************************************/
2 /*                                                                  */
3 /*  arr_rtl.h     Primitive actions for the array type.             */
4 /*  Copyright (C) 1989 - 2006  Thomas Mertes                        */
5 /*                                                                  */
6 /*  This file is part of the Seed7 Runtime Library.                 */
7 /*                                                                  */
8 /*  The Seed7 Runtime Library is free software; you can             */
9 /*  redistribute it and/or modify it under the terms of the GNU     */
10 /*  Lesser General Public License as published by the Free Software */
11 /*  Foundation; either version 2.1 of the License, or (at your      */
12 /*  option) any later version.                                      */
13 /*                                                                  */
14 /*  The Seed7 Runtime Library is distributed in the hope that it    */
15 /*  will be useful, but WITHOUT ANY WARRANTY; without even the      */
16 /*  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR */
17 /*  PURPOSE.  See the GNU Lesser General Public License for more    */
18 /*  details.                                                        */
19 /*                                                                  */
20 /*  You should have received a copy of the GNU Lesser General       */
21 /*  Public License along with this program; if not, write to the    */
22 /*  Free Software Foundation, Inc., 51 Franklin Street,             */
23 /*  Fifth Floor, Boston, MA  02110-1301, USA.                       */
24 /*                                                                  */
25 /*  Module: Seed7 Runtime Library                                   */
26 /*  File: seed7/src/arr_rtl.h                                       */
27 /*  Changes: 1991, 1992, 1993, 1994, 2005, 2006  Thomas Mertes      */
28 /*  Content: Primitive actions for the array type.                  */
29 /*                                                                  */
30 /********************************************************************/
31 
32 #ifdef USE_WMAIN
33 rtlArrayType getArgv (const int argc, const wstriType *const argv,
34     striType *arg_0, striType *programName, striType *exePath);
35 #else
36 rtlArrayType getArgv (const int argc, const cstriType *const argv,
37     striType *arg_0, striType *programName, striType *exePath);
38 #endif
39 striType examineSearchPath (const const_striType fileName);
40 void freeRtlStriArray (rtlArrayType work_array, intType used_max_position);
41 void arrAppend (rtlArrayType *const arr_variable, const rtlArrayType arr_from);
42 rtlArrayType arrArrlit2 (intType start_position, rtlArrayType arr1);
43 rtlArrayType arrBaselit (const genericType element);
44 rtlArrayType arrBaselit2 (intType start_position, const genericType element);
45 rtlArrayType arrCat (rtlArrayType arr1, const rtlArrayType arr2);
46 rtlArrayType arrExtend (rtlArrayType arr1, const genericType element);
47 void arrFree (rtlArrayType oldArray);
48 rtlArrayType arrGen (const genericType element1, const genericType element2);
49 rtlArrayType arrHead (const const_rtlArrayType arr1, intType stop);
50 rtlArrayType arrHeadTemp (rtlArrayType *arr_temp, intType stop);
51 genericType arrIdxTemp (rtlArrayType *arr_temp, intType pos);
52 void arrInsert (rtlArrayType *arr_to, intType position, genericType element);
53 void arrInsertArray (rtlArrayType *arr_to, intType position, rtlArrayType elements);
54 rtlArrayType arrMalloc (intType min_position, intType max_position);
55 void arrPush (rtlArrayType *const arr_variable, const genericType element);
56 rtlArrayType arrRange (const const_rtlArrayType arr1, intType start, intType stop);
57 rtlArrayType arrRangeTemp (rtlArrayType *arr_temp, intType start, intType stop);
58 rtlArrayType arrRealloc (rtlArrayType arr, memSizeType oldSize, memSizeType newSize);
59 genericType arrRemove (rtlArrayType *arr_to, intType position);
60 rtlArrayType arrRemoveArray (rtlArrayType *arr_to, intType position, intType length);
61 rtlArrayType arrSort (rtlArrayType arr1, compareType cmp_func);
62 rtlArrayType arrSubarr (const const_rtlArrayType arr1, intType start, intType len);
63 rtlArrayType arrSubarrTemp (rtlArrayType *arr_temp, intType start, intType len);
64 rtlArrayType arrTail (const const_rtlArrayType arr1, intType start);
65 rtlArrayType arrTailTemp (rtlArrayType *arr_temp, intType start);
66