![]() |
Home | Libraries | Author | Links |
00001 /* ***** BEGIN LICENSE BLOCK ***** 00002 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 00003 * 00004 * The contents of this file are subject to the Mozilla Public License Version 00005 * 1.1 (the "License"); you may not use this file except in compliance with 00006 * the License. You may obtain a copy of the License at 00007 * http://www.mozilla.org/MPL/ 00008 * 00009 * Software distributed under the License is distributed on an "AS IS" basis, 00010 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 00011 * for the specific language governing rights and limitations under the 00012 * License. 00013 * 00014 * The Original Code is the SysToMath C Libraries package (LibStmC). 00015 * 00016 * The Initial Developer of the Original Code is 00017 * Tom Michaelis, SysToMath. 00018 * Portions created by the Initial Developer are Copyright (C) 1990-2006 00019 * the Initial Developer. All Rights Reserved. 00020 * 00021 * Contributor(s): 00022 * 00023 * Alternatively, the contents of this file may be used under the terms of 00024 * either the GNU General Public License Version 2 or later (the "GPL"), or 00025 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 00026 * in which case the provisions of the GPL or the LGPL are applicable instead 00027 * of those above. If you wish to allow use of your version of this file only 00028 * under the terms of either the GPL or the LGPL, and not to allow others to 00029 * use your version of this file under the terms of the MPL, indicate your 00030 * decision by deleting the provisions above and replace them with the notice 00031 * and other provisions required by the GPL or the LGPL. If you do not delete 00032 * the provisions above, a recipient may use your version of this file under 00033 * the terms of any one of the MPL, the GPL or the LGPL. 00034 * 00035 * ***** END LICENSE BLOCK ***** */ 00036 00037 /****************************************************************************** 00038 * First Release 1990-11-08 00039 ******************************************************************************/ 00040 00041 00080 #ifndef STM_DVEC_H 00081 #define STM_DVEC_H 00082 00083 00084 /* Include header files and macro definitions. */ 00085 #include <stm/internal/_dvec.h> 00086 00087 00088 #ifdef __cplusplus 00089 extern "C" 00090 { 00091 #endif 00092 00093 00120 #define stmDvecAlloc(type, dim) ((type *) stmValloc_ (dim, sizeof (type))) 00121 00122 00135 #define stmDvecResize(type, dvec, dim) \ 00136 ((type *) stmVrealloc_ ((char *) (dvec), dim, sizeof (type))) 00137 00138 00145 #define stmDvecFree(dvec) (stmVfree_ ((char *) (dvec))) 00146 00147 00156 #define stmDvecDim(dvec) (stmVdim_ ((char *) (dvec))) 00157 00158 00172 #define stmDvecDel(type, dvec, start, count) \ 00173 ((type *) stmVdelete_ ((char *) (dvec), start, count, sizeof (type))) 00174 00175 00206 #define stmDvecIns(type, dvec, start, pelem, count) \ 00207 ((type *) stmVinsert_ ((char *) (dvec), start, \ 00208 (const char *) (pelem), count, sizeof (type))) 00209 00210 00224 #define stmDvecElIns(type, dvec, start, elem) \ 00225 stmDvecnElIns_ (type, dvec, start, 1, elem) 00226 00227 00241 #define stmDvecnElIns(type, dvec, start, count, elem) \ 00242 stmDvecnElIns_ (type, dvec, start, count, elem) 00243 00244 00265 #define stmDvecApp(type, dvec, pelem, count) \ 00266 ((type *) stmVappend_ ((char *) (dvec), \ 00267 (const char *) (pelem), count, sizeof (type))) 00268 00269 00281 #define stmDvecElApp(type, dvec, elem) stmDvecnElApp_ (type, dvec, 1, elem) 00282 00283 00295 #define stmDvecnElApp(type, dvec, count, elem) \ 00296 stmDvecnElApp_ (type, dvec, count, elem) 00297 00298 00334 StmDllSpec 00335 char *stmDstrSave (const char *str, int len); 00336 00337 00344 StmDllSpec 00345 stm_inline int stmDstrLen (const char *dstr); 00346 00347 00360 StmDllSpec 00361 char *stmDstrResize (char *dstr, int len); 00362 00363 00377 StmDllSpec 00378 char *stmDstrDel (char *dstr, unsigned start, unsigned count); 00379 00380 00412 StmDllSpec 00413 char *stmDstrIns (char *dstr, unsigned start, const char *str, unsigned count); 00414 00415 00429 StmDllSpec 00430 char *stmDstrChIns (char *dstr, unsigned start, char ch); 00431 00432 00452 StmDllSpec 00453 stm_inline char *stmDstrApp (char *dstr, const char *str, unsigned count); 00454 00455 00467 StmDllSpec 00468 stm_inline char *stmDstrChApp (char *dstr, char ch); 00469 00470 00486 StmDllSpec 00487 char *stmDstrReplace (char *dstr, 00488 unsigned start, unsigned rcount, 00489 const char *str, unsigned count); 00490 00491 00505 StmDllSpec 00506 char *stmDstrPrintf (char *dstr, const char *format, ...); 00507 00508 00522 StmDllSpec 00523 char *stmDstrVfprintf (char *dstr, const char *format, va_list arg); 00524 00525 00555 StmDllSpec 00556 char *stmFgetDstr (FILE *fp, char *dstr, StmBool noNl, StmBool overWrite); 00557 00558 00566 #define StmFgdPreserveNl StmFalse 00567 #define StmFgdStripNl StmTrue 00568 #define StmFgdAppend StmFalse 00569 #define StmFgdNew StmTrue 00577 #ifdef __cplusplus 00578 } 00579 #endif 00580 00581 00582 /* Include inline implementation. */ 00583 #include <stm/internal/_dvec.h> 00584 00585 00586 #endif
© Copyright Tom Michaelis 2002-2007
Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).