summaryrefslogtreecommitdiff
path: root/src/util
Commit message (Collapse)AuthorAge
...
* 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
* File committed into wrong directory.rideout2002-01-21
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2590 17b73243-c579-4c4c-a9d2-2d5706c11dac
* [[message actually from Jonathan Thornburg, checkin by David Rideoutrideout2002-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | since JT doesn't have the appropriate CVS karma]] src/util/Table.c * by popular (or at least semi-popular :) demand..... add new function int Util_TableSetFromString(int handle, const char *string) to set a sequence of key/value entries in an existing table, based on a parameter-file-style string. [[This functionality was present before in Util_TableCreateFromSTring(), but bundled together with creating a new table. This change splits out the "scan through a string doing the table assignments it specifies" functionality into a separate function, since it seems useful in various contextx.]] * change Util_TableCreateFromString() to call the new Util_TableSetFromString() to do most of the work * change the test suite to test the new function a bit src/util/makefile * new file, makefile to build standalone test driver for table routines src/include/util_Table.h * add prototype for new Util_TableSetFromString() function git-svn-id: http://svn.cactuscode.org/flesh/trunk@2588 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added missing include.tradke2002-01-18
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2585 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Check for a race condition in case CCTK_CreateDirectory() is called for thetradke2002-01-17
| | | | | | | same directory from multiple procs at the same time. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2583 17b73243-c579-4c4c-a9d2-2d5706c11dac
* A revised version of the tables source code with auto-destroytradke2002-01-17
| | | | | | | | completely removed. (I also changed the standalone test suite correspondingly.) git-svn-id: http://svn.cactuscode.org/flesh/trunk@2581 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed a small bug. Completed grdoc.tradke2002-01-02
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2565 17b73243-c579-4c4c-a9d2-2d5706c11dac
* The callback routine, CCTKi_SetParameter(), passed to the ParseFile() routinetradke2002-01-02
| | | | | | | | | | now takes the current line number in the parameter file as a third argument. CCTKi_SetParameter() is now able to tell you what line in the parameter file was erroneous. This closes PR Cactus-838. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2555 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed CCTK_TimerPrintData and CCTK_TimerPrintDataI to take two arguements,allen2001-12-29
| | | | | | | | | | | | | | | | | | | | | so you can choose both a timer and a clock to print. Passing a NULL argument for a string, or a -1 for the index versions will cause all the timers/clocks to be used. Also added new functions CCTK_NumClocks CCTK_ClockName CCTK_ClockHandle which I needed for this. Not sure that I really needed the ClockHandle one, but it is useful anyway to test if a clock is registered. Maybe these functions should also take something like a file descriptor, so that the information can be easily printed to a file, or to the HTTPD pages. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2547 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Renamed CCTK_DisplayTimerData() to CCTK_TimerPrintData() (along withrideout2001-12-17
| | | | | | | all their variants). git-svn-id: http://svn.cactuscode.org/flesh/trunk@2509 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added fortran wrapper protoypes.tradke2001-12-12
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2498 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Expanded a CCTK_WARN macro into CCTK_VWarn().tradke2001-12-11
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2496 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added Fortran bindings for timers, and two subroutinesrideout2001-12-11
| | | | | | | | | CCTK_DisplayTimerData() CCTK_DisplayTimerDataI() which display timing data for a given timer. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2494 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Forgot the 'return' statement in my last commit.tradke2001-12-04
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2482 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added return statement to prevent compiler warning 'function should return a ↵tradke2001-12-04
| | | | | | value'. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2480 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixes for Cactus/833,828,825allen2001-12-04
| | | | | | | | | | | | | | | Parsing errors from Parameter file are fatal errors Report all parameter errors before terminating simulation (actually this isn't quite true, it will report all parsing errors and then stop if necessary and then report all parameter setting errors and stop if necessary) In parsing the parameter file omitting the "=" and ommiting the "= value" are fatal errors. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2478 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removed warning from CCTK_SetBoolean, this should be caught in anyallen2001-12-04
| | | | | | | calling routine git-svn-id: http://svn.cactuscode.org/flesh/trunk@2477 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed compiler warnings for variables with 'const' qualifiers.tradke2001-12-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2475 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed Util_SplitFilename() to allocate both the dir and basename string.tradke2001-12-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2474 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Undefine strdup before it is redefined. Fixes a gcc warning.tradke2001-11-27
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2470 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Undefine CCODE before it is redefined. Fixes a gcc warning.tradke2001-11-27
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2469 17b73243-c579-4c4c-a9d2-2d5706c11dac