summaryrefslogtreecommitdiff
path: root/src/util
Commit message (Collapse)AuthorAge
* Revert accidental changes from the last commit.schnetter2004-12-28
| | | | | | | Sorry. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3945 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Rename "round" to "myround". Otherwise, the function "round" has theschnetter2004-12-28
| | | | | | | | same name as the one from <math.h> (which is #included) but has a different return type, which is an error for gcc 4.0. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3944 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added support for 'g' format.goodale2004-12-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3941 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added support for E format.goodale2004-12-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3940 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fix bug which ate zeros after decimal places for output.goodale2004-12-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3939 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Undo my previous commit because it was GPL code.tradke2004-12-17
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3936 17b73243-c579-4c4c-a9d2-2d5706c11dac
* New version of snprintf() and vsnprintf(). These are taken from the glib 1.2.8tradke2004-12-17
| | | | | | | | | source code. They have integrated a fix to correctly convert floating point numbers into their string representation. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3935 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Functions completing the Cactus Timer API.swhite2004-08-12
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3828 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Renamed local variable 'index' to 'idx' to get rid of gcc compiler warningstradke2004-06-21
| | | | | | | about naming variables after global functions. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3779 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Patch from Yaakoub to support parameter files with <CR><LF> at ends of lines.goodale2004-05-10
| | | | | | | Fixes PR 1596. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3713 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Don't do cache padding if cache size or cacheline size are unknown.tradke2004-05-07
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3697 17b73243-c579-4c4c-a9d2-2d5706c11dac
* * introduce new #define UTIL_TABLE_FORTRAN_WRAPPERS to controljthorn2004-04-15
| | | | | | | | | | whether we compile the Fortran wrapper functions, and put all Fortran wrappers inside this --> standalone test driver now compiles again (& passes) git-svn-id: http://svn.cactuscode.org/flesh/trunk@3665 17b73243-c579-4c4c-a9d2-2d5706c11dac
* 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