summaryrefslogtreecommitdiff
path: root/src/util
Commit message (Collapse)AuthorAge
* drop -ansi -pedanticjthorn2004-04-15
| | | | | | | | from gcc options because (as of C89) those forbid long long (i.e. CCTK_INT8) git-svn-id: http://svn.cactuscode.org/flesh/trunk@3664 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add a function Util_StrMemCmpi that compares a C and a Fortran stringschnetter2004-04-12
| | | | | | | without copying the Fortran string. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3661 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add a C version of the function CCTK_FortranString. Useschnetter2004-04-12
| | | | | | | *_FORTSTRING_LEN to access the string length. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3660 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Remove empty filesschnetter2004-04-01
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3636 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add CVS headerschnetter2004-04-01
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3635 17b73243-c579-4c4c-a9d2-2d5706c11dac
* add comment explaining last commit :)jthorn2004-03-26
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3604 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Do not report an error when allocating 0-sized arrays on certainschnetter2004-03-26
| | | | | | | systems. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3603 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Use the correct macros to determine which CCTK_* types are defined.schnetter2004-03-08
| | | | | | | Fix wrong prototype. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3585 17b73243-c579-4c4c-a9d2-2d5706c11dac
* When stripping the directory part off the parameter file name, do notschnetter2004-02-06
| | | | | | | | forget to also strip the "/" that separates the directory name and the file name. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3571 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fix typo in comment.schnetter2004-01-22
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3558 17b73243-c579-4c4c-a9d2-2d5706c11dac
* for the functionjthorn2004-01-16
| | | | | | | | | | | | | | int Util_DoubleInRange(double inval, const char *range) move the text Valid ranges are of the form start:end:step possibly preceeded by a [ or ( and ended by a ) or ] to indicate closure. The end and step are optional. A * can also be used to indicate any value. from an internal comment up into the header comment, since it describes part of this function's caller-visible semantics. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3514 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Print long int value with %ld instead of converting it to intschnetter2004-01-16
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3507 17b73243-c579-4c4c-a9d2-2d5706c11dac
* typo in commentrideout2004-01-07
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3492 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Allow comparison operators in accumulator expressions.schnetter2003-11-07
| | | | | | | Add the ! not operator to accumulator expressions. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3454 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Introduce the new Cactus variable type CCTK_INT1.schnetter2003-10-13
| | | | | | | Extend routines to handle the new type. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3431 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Properly initialize an allocated cTimerData structure.tradke2003-09-30
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3416 17b73243-c579-4c4c-a9d2-2d5706c11dac
* typo in commentrideout2003-08-22
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3385 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removed flesh-internal routine STR_compi(). Instead, Util_StrCmpi() should betradke2003-08-22
| | | | | | | | used which is also better optimized. This closes PR Cactus/1584. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3382 17b73243-c579-4c4c-a9d2-2d5706c11dac
* renamejthorn2003-07-20
| | | | | | | | | | | | | | | | | Util_Table{Set,Get}FnPointer() --> Util_Table{Set,Get}FPointer() Util_Table{Set,Get}FnPointerArray() --> Util_Table{Set,Get}FPointerArray() (and keep old names as aliases for backwards compatability) this fixes bug Cactus/1308 also add test routines for Util_Table{Set,Get}PointerArray() Util_Table{Set,Get}FPointer() Util_Table{Set,Get}FPointer_Array() so there are now test routines for all the CCTK_POINTER and CCTK_FPOINTER routines (both scalar and array) git-svn-id: http://svn.cactuscode.org/flesh/trunk@3321 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fix a memory leak in Util_TableCreateFromString():jthorn2003-07-19
| | | | | | | | | | | | | This routine first tries to create a table (if this fails it returns an error code). Then it tries to add entries to the table via Util_TableSetFromString(). If this fails it previously returned without destroy the table, thus leaking memory. The fix is to destroy the table before returning the error code. This fixes bug Cactus/1561. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3317 17b73243-c579-4c4c-a9d2-2d5706c11dac
* add standalone-test-driver tests for Util_Table{Set,Get}Pointerjthorn2003-07-19
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3316 17b73243-c579-4c4c-a9d2-2d5706c11dac
* put all Fortran-wrapper routines insidejthorn2003-07-19
| | | | | | | | | | | | | | | #ifndef UTIL_TABLE_TEST #endif /* !UTIL_TABLE_TEST */ since they use CCTK_FCALL and CCTK_FNAME, both of which are only expanded by the perl preprocessor, and thus won't be defined when compiling this (C) file directly for standalone tests. With this change (and my just-committed changes to the standalone-test makefile), the standalone test driver in Table.c now compiles ok, and passes all its tests. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3315 17b73243-c579-4c4c-a9d2-2d5706c11dac
* add EXTRA_CFLAGS to make changing command-line -Dxxx options easierjthorn2003-07-19
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3314 17b73243-c579-4c4c-a9d2-2d5706c11dac
* add header comment explaining why all the complciated machinery is needed :)jthorn2003-07-19
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3313 17b73243-c579-4c4c-a9d2-2d5706c11dac
* * allow C compiler and flags to be overridden from command linejthorn2003-07-19
| | | | | | | | * detect whether the configuration we're using has MPI, and if so link against the right MPI libraries git-svn-id: http://svn.cactuscode.org/flesh/trunk@3312 17b73243-c579-4c4c-a9d2-2d5706c11dac
* restore standalone-test Makefilejthorn2003-07-19
| | | | | | | | | | | | | This Makefile was formerly called makefile (see the cvs attic under that name for older history), but that caused problems with systems with case-insensitive file systems, where the build process confused this with Makefile . I discussed standalone-test Makefiles with Tom Goodale on 18.Jul.2003, and he said that with the name Makefile.standalone they're ok. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3311 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Make it possible to use the string stuff in other standalone tests. Patchgoodale2003-05-09
| | | | | | | | | submitted by Jonathon Thornburg. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@3212 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added OpenBSD-ish Util_strlcpy and Util_strlcat functions submitted by Jonathongoodale2003-04-22
| | | | | | | | | Thornburg. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@3196 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Renamed routine CCTK_NULLPointer() into CCTK_NullPointer().tradke2003-02-12
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3136 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added C wrapper for fortran function CCTK_NULLPointer() which takes notradke2003-02-12
| | | | | | | | arguments and returns a C-style NULL pointer. This is necessary for initializing CCTK_POINTER variables in fortran code. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3135 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Make sure that strncpy'ed strings are properly NUL-terminated.tradke2003-02-11
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3133 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added fortran wrappers for most of the table API routines.tradke2003-01-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3092 17b73243-c579-4c4c-a9d2-2d5706c11dac
* typo in grdocrideout2003-01-07
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3083 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added fortran wrappers for Util_TableCreateFromString() and Util_TableDestroy().tradke2002-12-11
| | | | | | | More to come. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3041 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Implemented fortran wrapper functiontradke2002-12-11
| | | | | | | | | | | | addr = CCTK_PointerTo (var) CCTK_POINTER addr, var which returns the address of a variable passed in by reference from a fortran routine. This function is declared by the DECLARE_CCTK_FUNCTIONS macro. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3039 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Putting semicolons at the end of the CCTK_FILEVERSIONs.goodale2002-11-12
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@3028 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Initialize all items in the StringList structure to NULL when a listallen2002-08-18
| | | | | | | | | is created Fixes Cactus/1201 git-svn-id: http://svn.cactuscode.org/flesh/trunk@2959 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Completed Util_TableSetFromString() to also parse string values and arrays.tradke2002-05-23
| | | | | | | See its Function Reference entry in the User's Guide for details. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2850 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed grdoc.tradke2002-05-16
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2819 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed parsing of undocumented $PARFILE variable.tradke2002-05-13
| | | | | | | This closes PR Cactus/1041. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2809 17b73243-c579-4c4c-a9d2-2d5706c11dac
* From Jonathan Thornburg:allen2002-05-09
| | | | | | | | | | | | | | Change our fake version of the C99/C++ "bool" type from typedef enum { false = 0, true = 1 } bool; to typedef int bool; #define true 1 #define false 0 so we can assign an int to a bool without triggering compiler warnings on the origin. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2804 17b73243-c579-4c4c-a9d2-2d5706c11dac
* CCTK_FN_POINTER -> CCTK_FPOINTERallen2002-04-28
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2770 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Replaced HUGE_VAL by DBL_MAX which should be used as the maximum floating-pointtradke2002-04-11
| | | | | | | | number. Thanks to Jonathan to point this out. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2707 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Use HUGE_VAL instead of FLT_MAX for the maximum possible value for doubles.tradke2002-04-11
| | | | | | | This closes Cactus/966. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2706 17b73243-c579-4c4c-a9d2-2d5706c11dac
* [[from Jonathan Thornburg]]rideout2002-04-03
| | | | | | | | | | | | | | | | | | | | src/util/Table.c src/include/util_Table.h * add new functions (cf my E-mail of 30 Mar 2002) Util_TableClone() Util_TableItClone() * add new functions (cf Erik Schnetter's E-mails of 5 Feb 2002) Util_Table{Set,Get}Generic() Util_Table{Set,Get}GenericArray() * add tests for new functions * fix a memory leak in Util_TableDestroy() * fixed some assert( variable = value ) bugs (yikes!!) * refactor some code to better modularize the implementation * add some more const qualifiers to local vars * reformat code to match flesh standard indentation and { } conventions git-svn-id: http://svn.cactuscode.org/flesh/trunk@2683 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Made it so that netdb.h and winsock2.h are never both included. This waskcamarda2002-02-22
| | | | | | | necessary to compile with the gnu compilers in cygwin. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2617 17b73243-c579-4c4c-a9d2-2d5706c11dac
* [[from Jonathan Thornburg]]tradke2002-02-04
| | | | | | | | | | | | | | | | | | Small fixes to Util_TableSetFromString(): * trap some error cases involving invalid keys which slipped by before * document UTIL_ERROR_BAD_KEY as a possible error code * accept trailing whitespace at end of string (this was rejected before) * revise BNF in grdoc comment to correctly describe what the code accepts [I've already revised it in the latex docs (doc/UsersGuide/FunctionReference.tex)] Also fix Util_TableCreateFromString(): * document UTIL_ERROR_BAD_KEY as a possible error code Thanks to Erik Schnetter for pointing out these problems! git-svn-id: http://svn.cactuscode.org/flesh/trunk@2606 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Optimized version of Util_StrCmpi() which doesn't need to call strlen().tradke2002-01-28
| | | | | | | Closes PR Cactus-892. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2597 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Makefile for standalone test of Table Utilities archived on Maintainer weballen2002-01-25
| | | | | | | pages for now git-svn-id: http://svn.cactuscode.org/flesh/trunk@2596 17b73243-c579-4c4c-a9d2-2d5706c11dac
* The 'h' in $Header$ must be capitalized to be parsed by cvs.rideout2002-01-21
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2591 17b73243-c579-4c4c-a9d2-2d5706c11dac