summaryrefslogtreecommitdiff
path: root/src/util
Commit message (Collapse)AuthorAge
...
* Remove spurious (but harmless) break statement from PUSHTOK macro.schnetter2005-07-16
| | | | | | | Make RESIZE_STACK macro semicolon-safe. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4090 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed gcc compiler warnings about local variables named after global symbolstradke2005-04-05
| | | | | | | and potentially uninitialized variables. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4021 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Rename pow10 to mypow10 because pow10 is defined on some systems in <math.h>schnetter2005-03-24
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4018 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Declare variables at the beginning of a function block.tradke2005-03-21
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4017 17b73243-c579-4c4c-a9d2-2d5706c11dac
* update header comment description of where more docs can be foundjthorn2005-03-18
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4014 17b73243-c579-4c4c-a9d2-2d5706c11dac
* move some debug printf() calls closer to the start of their functionsjthorn2005-03-18
| | | | | | | (all inside #ifdef UTIL_TABLE_TEST) git-svn-id: http://svn.cactuscode.org/flesh/trunk@4010 17b73243-c579-4c4c-a9d2-2d5706c11dac
* split Table.c test driver out into a separate thorn (CactusTest/TestTable)jthorn2005-03-18
| | | | | | | | | | | also add another error check in insert_table_entry() to catch the case where the type code is invalid and hence CCTK_VarTypeSize() returns -1 --> this gives a new error return from this function, and hence from all the Util_TableSet* functions git-svn-id: http://svn.cactuscode.org/flesh/trunk@4008 17b73243-c579-4c4c-a9d2-2d5706c11dac
* * untabifyjthorn2005-03-17
| | | | | | | | | * add a bunch of debug printing to the standalone test drivers (which still core-dumps on my laptop after corrupting the malloc heap; I'm in the process of tracking down what's wrong...) git-svn-id: http://svn.cactuscode.org/flesh/trunk@4006 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Make CCTK_BYTE and CCTK_CHAR be distinct types. CCTK_BYTE is for gridschnetter2005-01-29
| | | | | | | | | | | | variables, and CCTK_CHAR (like CCTK_STRING) only for other purposes, e.g. tables. * Introduce unique integer constants for them * Add missing conversion functions from and to strings * Add table functions for CCTK_BYTE. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3972 17b73243-c579-4c4c-a9d2-2d5706c11dac
* The Fortran wrappers for Util_Table{Get,Set}Char are broken; removeschnetter2005-01-27
| | | | | | | | | them. Technically, Fortran has no character type, but only strings, hence the interface to that routine needs to be different from C. Util_TableSetString is still there, used, and works. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3967 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Use int instead of size_t for string length. All other flesh routinesschnetter2004-12-30
| | | | | | | also use int for lengths and not size_t. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3950 17b73243-c579-4c4c-a9d2-2d5706c11dac
* fix wrong function name in grdoc commentjthorn2004-12-28
| | | | | | | -- it's Util_StrSep(), not CCTK_StrSep() git-svn-id: http://svn.cactuscode.org/flesh/trunk@3947 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Revert another accidental change.schnetter2004-12-28
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3946 17b73243-c579-4c4c-a9d2-2d5706c11dac
* 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